@tangle-network/agent-app 0.50.29 → 0.50.30

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.
@@ -23,7 +23,7 @@ import {
23
23
  PopoverSurface,
24
24
  usePending,
25
25
  usePopover
26
- } from "./chunk-5BDSNHWW.js";
26
+ } from "./chunk-XF6ZRY56.js";
27
27
  import {
28
28
  filterCommandPaletteItems,
29
29
  groupCommandPaletteItems
@@ -2191,6 +2191,198 @@ function AgentProfileEditor({
2191
2191
  ] });
2192
2192
  }
2193
2193
 
2194
+ // src/web-react/agent-profile-viewer.tsx
2195
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
2196
+ function nonempty(value) {
2197
+ return Boolean(value?.trim());
2198
+ }
2199
+ function preview(value, limit = 120) {
2200
+ const flat = value.replace(/\s+/g, " ").trim();
2201
+ return flat.length > limit ? `${flat.slice(0, limit - 1)}\u2026` : flat;
2202
+ }
2203
+ function resourceName(resource) {
2204
+ if (resource.kind === "inline") return resource.name;
2205
+ return [resource.repository, resource.path].filter(Boolean).join(":") || resource.path;
2206
+ }
2207
+ function ResourceRow({ label, resource, path }) {
2208
+ const name = resourceName(resource);
2209
+ return /* @__PURE__ */ jsxs6("li", { className: "min-w-0 py-2 first:pt-0 last:pb-0", children: [
2210
+ /* @__PURE__ */ jsxs6("div", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-0.5", children: [
2211
+ /* @__PURE__ */ jsx8("span", { className: "shrink-0 text-xs font-medium text-muted-foreground", children: label }),
2212
+ path && /* @__PURE__ */ jsx8("code", { className: "break-all font-mono text-xs text-foreground", children: path }),
2213
+ /* @__PURE__ */ jsx8("span", { className: "min-w-0 break-all text-sm text-foreground", children: name }),
2214
+ resource.kind === "github" && resource.ref && /* @__PURE__ */ jsxs6("span", { className: "shrink-0 text-xs text-muted-foreground", children: [
2215
+ "at ",
2216
+ resource.ref
2217
+ ] })
2218
+ ] }),
2219
+ resource.kind === "inline" && nonempty(resource.content) && /* @__PURE__ */ jsxs6("details", { className: "mt-1.5", children: [
2220
+ /* @__PURE__ */ jsx8("summary", { className: "w-fit cursor-pointer select-none text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: "View inline content" }),
2221
+ /* @__PURE__ */ jsx8("pre", { className: "mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted/50 p-3 text-xs leading-relaxed text-foreground", children: resource.content })
2222
+ ] })
2223
+ ] });
2224
+ }
2225
+ function PromptDetail({ label, note, value }) {
2226
+ return /* @__PURE__ */ jsxs6("details", { className: "group/prompt min-w-0", children: [
2227
+ /* @__PURE__ */ jsxs6("summary", { className: "flex min-w-0 cursor-pointer list-none items-start gap-2 rounded-md py-1 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden", children: [
2228
+ /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "mt-1 shrink-0 text-muted-foreground transition-transform group-open/prompt:rotate-90", children: "\u203A" }),
2229
+ /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1", children: [
2230
+ /* @__PURE__ */ jsx8("span", { className: "font-medium text-foreground", children: label }),
2231
+ note && /* @__PURE__ */ jsx8("span", { className: "ml-2 text-xs text-muted-foreground", children: note }),
2232
+ /* @__PURE__ */ jsx8("span", { className: "mt-1 block truncate text-xs text-muted-foreground", children: preview(value) })
2233
+ ] })
2234
+ ] }),
2235
+ /* @__PURE__ */ jsx8("pre", { className: "mb-2 ml-4 max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted/50 p-3 text-sm leading-relaxed text-foreground", children: value })
2236
+ ] });
2237
+ }
2238
+ function ProfileSection({ title, children }) {
2239
+ return /* @__PURE__ */ jsxs6("section", { className: "min-w-0 py-3 first:pt-0 last:pb-0", "aria-label": title, children: [
2240
+ /* @__PURE__ */ jsx8("h3", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: title }),
2241
+ children
2242
+ ] });
2243
+ }
2244
+ function permissionRows(profile) {
2245
+ return Object.entries(profile.permissions ?? {}).flatMap(([name, value]) => {
2246
+ if (typeof value === "string") return [[name, value]];
2247
+ return Object.entries(value).map(([scope, policy]) => [`${name}.${scope}`, policy]);
2248
+ }).sort(([a], [b]) => a.localeCompare(b));
2249
+ }
2250
+ function configuredResources(profile) {
2251
+ const resources = profile.resources;
2252
+ if (!resources) return [];
2253
+ return [
2254
+ ...(resources.files ?? []).map((mount, index) => ({
2255
+ key: `file:${mount.path}:${index}`,
2256
+ label: "File",
2257
+ resource: mount.resource,
2258
+ path: mount.path
2259
+ })),
2260
+ ...(resources.skills ?? []).map((resource, index) => ({
2261
+ key: `skill:${index}`,
2262
+ label: "Skill",
2263
+ resource
2264
+ })),
2265
+ ...(resources.tools ?? []).map((resource, index) => ({
2266
+ key: `tool:${index}`,
2267
+ label: "Tool file",
2268
+ resource
2269
+ })),
2270
+ ...(resources.agents ?? []).map((resource, index) => ({
2271
+ key: `agent:${index}`,
2272
+ label: "Subagent file",
2273
+ resource
2274
+ })),
2275
+ ...(resources.commands ?? []).map((resource, index) => ({
2276
+ key: `command:${index}`,
2277
+ label: "Command file",
2278
+ resource
2279
+ }))
2280
+ ];
2281
+ }
2282
+ function AgentProfileViewer({ profile, className = "", defaultExpanded = true }) {
2283
+ const permissions = permissionRows(profile);
2284
+ const resources = configuredResources(profile);
2285
+ const prompt = profile.prompt;
2286
+ const instructions = prompt?.instructions?.filter(nonempty) ?? [];
2287
+ const resourceInstructions = profile.resources?.instructions;
2288
+ const mcp = Object.entries(profile.mcp ?? {}).sort(([a], [b]) => a.localeCompare(b));
2289
+ const tools = Object.entries(profile.tools ?? {}).sort(([a], [b]) => a.localeCompare(b));
2290
+ const hasBehavior = Boolean(nonempty(prompt?.systemPrompt) || nonempty(prompt?.appendSystemPrompt) || instructions.length || (typeof resourceInstructions === "string" ? nonempty(resourceInstructions) : resourceInstructions));
2291
+ const hasConfiguration = Boolean(hasBehavior || tools.length || permissions.length || mcp.length || profile.connections?.length || resources.length || profile.resources?.failOnError || profile.subagents && Object.keys(profile.subagents).length || profile.hooks && Object.keys(profile.hooks).length || profile.modes && Object.keys(profile.modes).length);
2292
+ const hasProfileDetails = Boolean(profile.model?.default || profile.model?.small || profile.model?.reasoningEffort || profile.harness || profile.description || profile.version || profile.tags?.length || hasConfiguration);
2293
+ return /* @__PURE__ */ jsxs6("section", { className: `min-w-0 text-sm ${className}`.trim(), "aria-label": "Agent profile", children: [
2294
+ /* @__PURE__ */ jsxs6("header", { className: "min-w-0 rounded-xl border border-border bg-card p-4 shadow-sm", children: [
2295
+ /* @__PURE__ */ jsx8("h2", { className: "break-words text-lg font-semibold leading-tight text-foreground", children: nonempty(profile.name) ? profile.name : "Unnamed profile" }),
2296
+ nonempty(profile.description) && /* @__PURE__ */ jsx8("p", { className: "mt-1 whitespace-pre-wrap break-words leading-relaxed text-muted-foreground", children: profile.description }),
2297
+ (profile.model?.default || profile.model?.small || profile.model?.reasoningEffort || profile.harness || profile.version || profile.tags?.length) && /* @__PURE__ */ jsxs6("dl", { className: "mt-3 flex flex-wrap gap-x-4 gap-y-1 text-xs", children: [
2298
+ profile.model?.default && /* @__PURE__ */ jsxs6("div", { className: "flex gap-1", children: [
2299
+ /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground", children: "Default model" }),
2300
+ /* @__PURE__ */ jsx8("dd", { className: "font-medium text-foreground", children: profile.model.default })
2301
+ ] }),
2302
+ profile.model?.small && /* @__PURE__ */ jsxs6("div", { className: "flex gap-1", children: [
2303
+ /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground", children: "Small model" }),
2304
+ /* @__PURE__ */ jsx8("dd", { className: "font-medium text-foreground", children: profile.model.small })
2305
+ ] }),
2306
+ profile.model?.reasoningEffort && /* @__PURE__ */ jsxs6("div", { className: "flex gap-1", children: [
2307
+ /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground", children: "Reasoning" }),
2308
+ /* @__PURE__ */ jsx8("dd", { className: "font-medium text-foreground", children: profile.model.reasoningEffort })
2309
+ ] }),
2310
+ profile.harness && /* @__PURE__ */ jsxs6("div", { className: "flex gap-1", children: [
2311
+ /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground", children: "Preferred harness" }),
2312
+ /* @__PURE__ */ jsx8("dd", { className: "font-medium text-foreground", children: profile.harness })
2313
+ ] }),
2314
+ profile.version && /* @__PURE__ */ jsxs6("div", { className: "flex gap-1", children: [
2315
+ /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground", children: "Version" }),
2316
+ /* @__PURE__ */ jsx8("dd", { className: "font-medium text-foreground", children: profile.version })
2317
+ ] }),
2318
+ profile.tags?.map((tag) => /* @__PURE__ */ jsx8("div", { className: "rounded-full bg-muted px-2 py-0.5 text-muted-foreground", children: tag }, tag))
2319
+ ] })
2320
+ ] }),
2321
+ !hasProfileDetails && /* @__PURE__ */ jsx8("p", { className: "mt-4 border-t border-border pt-3 text-sm text-muted-foreground", children: "No profile details are configured." }),
2322
+ hasConfiguration && /* @__PURE__ */ jsxs6("details", { open: defaultExpanded, className: "group/config mt-4 rounded-xl border border-border bg-card p-4 shadow-sm", children: [
2323
+ /* @__PURE__ */ jsxs6("summary", { className: "flex cursor-pointer list-none items-center gap-2 rounded-md py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden", children: [
2324
+ /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "text-muted-foreground transition-transform group-open/config:rotate-90", children: "\u203A" }),
2325
+ /* @__PURE__ */ jsx8("span", { className: "font-medium text-foreground", children: "Profile configuration" }),
2326
+ /* @__PURE__ */ jsx8("span", { className: "text-xs text-muted-foreground", children: [hasBehavior && "Instructions", (tools.length || permissions.length) > 0 && "Tools", mcp.length > 0 && "MCP", (resources.length || profile.resources?.failOnError) && "Resources", profile.connections?.length && "Connections", profile.subagents && Object.keys(profile.subagents).length > 0 && "Subagents", profile.hooks && Object.keys(profile.hooks).length > 0 && "Hooks", profile.modes && Object.keys(profile.modes).length > 0 && "Modes"].filter(Boolean).join(" \xB7 ") })
2327
+ ] }),
2328
+ /* @__PURE__ */ jsxs6("div", { className: "divide-y divide-border border-t border-border", children: [
2329
+ hasBehavior && /* @__PURE__ */ jsx8(ProfileSection, { title: "Instructions", children: /* @__PURE__ */ jsxs6("div", { className: "space-y-2", children: [
2330
+ nonempty(prompt?.systemPrompt) && /* @__PURE__ */ jsx8(PromptDetail, { label: "System prompt", note: "Replaces the harness default", value: prompt.systemPrompt }),
2331
+ nonempty(prompt?.appendSystemPrompt) && /* @__PURE__ */ jsx8(
2332
+ PromptDetail,
2333
+ {
2334
+ label: "Added system prompt",
2335
+ note: nonempty(prompt.systemPrompt) ? "Supplements the system prompt above" : "Supplements the harness default",
2336
+ value: prompt.appendSystemPrompt
2337
+ }
2338
+ ),
2339
+ instructions.length > 0 && /* @__PURE__ */ jsxs6("div", { className: "space-y-1.5", children: [
2340
+ /* @__PURE__ */ jsxs6("h4", { className: "font-medium text-foreground", children: [
2341
+ "Project instructions ",
2342
+ /* @__PURE__ */ jsx8("span", { className: "ml-1 font-normal text-xs text-muted-foreground", children: "Lower-privilege workspace guidance" })
2343
+ ] }),
2344
+ /* @__PURE__ */ jsx8("ul", { className: "space-y-2", children: instructions.map((instruction, index) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(PromptDetail, { label: `Instruction ${index + 1}`, value: instruction }) }, `${index}:${instruction}`)) })
2345
+ ] }),
2346
+ typeof resourceInstructions === "string" && nonempty(resourceInstructions) && /* @__PURE__ */ jsx8(PromptDetail, { label: "Resource instructions", note: "Configured in resources", value: resourceInstructions }),
2347
+ resourceInstructions && typeof resourceInstructions !== "string" && /* @__PURE__ */ jsx8("ul", { children: /* @__PURE__ */ jsx8(ResourceRow, { label: "Instruction resource", resource: resourceInstructions }) })
2348
+ ] }) }),
2349
+ (tools.length > 0 || permissions.length > 0) && /* @__PURE__ */ jsx8(ProfileSection, { title: "Tool policy", children: /* @__PURE__ */ jsx8("div", { children: /* @__PURE__ */ jsx8("ul", { className: "divide-y divide-border/70", children: [.../* @__PURE__ */ new Set([...tools.map(([name]) => name), ...permissions.map(([name]) => name)])].sort().map((name) => {
2350
+ const enabled = tools.find(([tool]) => tool === name)?.[1];
2351
+ const policy = permissions.find(([permission]) => permission === name)?.[1];
2352
+ return /* @__PURE__ */ jsxs6("li", { className: "flex min-w-0 items-center justify-between gap-4 py-1.5 first:pt-0 last:pb-0", children: [
2353
+ /* @__PURE__ */ jsx8("code", { className: "min-w-0 break-all font-mono text-xs text-foreground", children: name }),
2354
+ /* @__PURE__ */ jsx8("span", { className: "shrink-0 text-xs text-muted-foreground", children: [enabled === void 0 ? void 0 : enabled ? "Enabled" : "Disabled", policy].filter(Boolean).join(" \xB7 ") })
2355
+ ] }, name);
2356
+ }) }) }) }),
2357
+ mcp.length > 0 && /* @__PURE__ */ jsx8(ProfileSection, { title: "MCP servers", children: /* @__PURE__ */ jsx8("ul", { className: "divide-y divide-border/70", children: mcp.map(([name, server]) => /* @__PURE__ */ jsxs6("li", { className: "flex min-w-0 items-center justify-between gap-4 py-1.5 first:pt-0 last:pb-0", children: [
2358
+ /* @__PURE__ */ jsx8("span", { className: "min-w-0 break-words font-medium text-foreground", children: name }),
2359
+ /* @__PURE__ */ jsx8("span", { className: "shrink-0 text-xs text-muted-foreground", children: server.enabled === false ? "Disabled in profile" : "Enabled in profile" })
2360
+ ] }, name)) }) }),
2361
+ Boolean(profile.connections?.length) && /* @__PURE__ */ jsx8(ProfileSection, { title: "Hub capabilities", children: /* @__PURE__ */ jsx8("ul", { className: "space-y-2", children: profile.connections?.map((connection, index) => /* @__PURE__ */ jsxs6("li", { className: "min-w-0", children: [
2362
+ /* @__PURE__ */ jsx8("p", { className: "font-medium text-foreground", children: connection.alias || "Hub connection" }),
2363
+ connection.capabilities.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "mt-1 flex flex-wrap gap-1.5", children: connection.capabilities.map((capability, capabilityIndex) => /* @__PURE__ */ jsx8("li", { className: "rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: capability }, `${capability}:${capabilityIndex}`)) })
2364
+ ] }, `${connection.alias ?? "connection"}:${index}`)) }) }),
2365
+ (resources.length > 0 || profile.resources?.failOnError) && /* @__PURE__ */ jsxs6(ProfileSection, { title: "Declared resources", children: [
2366
+ /* @__PURE__ */ jsx8("ul", { className: "divide-y divide-border/70", children: resources.map(({ key, ...item }) => /* @__PURE__ */ jsx8(ResourceRow, { ...item }, key)) }),
2367
+ profile.resources?.failOnError && /* @__PURE__ */ jsx8("p", { className: "mt-2 text-xs text-muted-foreground", children: "Profile configuration requires declared resources to load successfully." })
2368
+ ] }),
2369
+ Boolean(profile.subagents && Object.keys(profile.subagents).length) && /* @__PURE__ */ jsx8(ProfileSection, { title: "Subagents", children: /* @__PURE__ */ jsx8("ul", { className: "divide-y divide-border/70", children: Object.entries(profile.subagents ?? {}).sort(([a], [b]) => a.localeCompare(b)).map(([name, subagent]) => /* @__PURE__ */ jsxs6("li", { className: "py-1.5 first:pt-0 last:pb-0", children: [
2370
+ /* @__PURE__ */ jsx8("p", { className: "font-medium text-foreground", children: name }),
2371
+ nonempty(subagent.description) && /* @__PURE__ */ jsx8("p", { className: "mt-0.5 whitespace-pre-wrap break-words text-xs leading-relaxed text-muted-foreground", children: subagent.description })
2372
+ ] }, name)) }) }),
2373
+ Boolean(profile.hooks && Object.keys(profile.hooks).length) && /* @__PURE__ */ jsx8(ProfileSection, { title: "Lifecycle hooks", children: /* @__PURE__ */ jsx8("ul", { className: "space-y-1", children: Object.entries(profile.hooks ?? {}).sort(([a], [b]) => a.localeCompare(b)).map(([event, commands]) => /* @__PURE__ */ jsxs6("li", { className: "flex min-w-0 justify-between gap-4", children: [
2374
+ /* @__PURE__ */ jsx8("code", { className: "font-mono text-xs text-foreground", children: event }),
2375
+ /* @__PURE__ */ jsxs6("span", { className: "text-xs text-muted-foreground", children: [
2376
+ commands.length,
2377
+ " configured"
2378
+ ] })
2379
+ ] }, event)) }) }),
2380
+ Boolean(profile.modes && Object.keys(profile.modes).length) && /* @__PURE__ */ jsx8(ProfileSection, { title: "Modes", children: /* @__PURE__ */ jsx8("ul", { className: "flex flex-wrap gap-1.5", children: Object.keys(profile.modes ?? {}).sort().map((mode) => /* @__PURE__ */ jsx8("li", { className: "rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: mode }, mode)) }) })
2381
+ ] })
2382
+ ] })
2383
+ ] });
2384
+ }
2385
+
2194
2386
  // src/web-react/durable-plan-flow.ts
2195
2387
  import { useCallback as useCallback2, useEffect as useEffect6, useRef as useRef5, useState as useState8 } from "react";
2196
2388
  var DurablePlanClientError = class extends Error {
@@ -2730,7 +2922,7 @@ function segmentMentionContent(content, parts) {
2730
2922
 
2731
2923
  // src/web-react/mission-activity.tsx
2732
2924
  import { useCallback as useCallback5, useEffect as useEffect7, useState as useState11 } from "react";
2733
- import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
2925
+ import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
2734
2926
  var LIVE_STATUSES = /* @__PURE__ */ new Set(["pending", "running"]);
2735
2927
  var OK_STATUSES = /* @__PURE__ */ new Set(["completed", "done", "succeeded"]);
2736
2928
  var ERROR_STATUSES = /* @__PURE__ */ new Set(["failed", "error", "cancelled", "aborted"]);
@@ -2777,15 +2969,15 @@ function waterfallLayout(trace) {
2777
2969
  });
2778
2970
  }
2779
2971
  function ChevronGlyph({ className }) {
2780
- return /* @__PURE__ */ jsx8("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx8("path", { d: "m6 9 6 6 6-6" }) });
2972
+ return /* @__PURE__ */ jsx9("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx9("path", { d: "m6 9 6 6 6-6" }) });
2781
2973
  }
2782
2974
  function RefreshGlyph({ className }) {
2783
- return /* @__PURE__ */ jsx8("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx8("path", { d: "M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6" }) });
2975
+ return /* @__PURE__ */ jsx9("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx9("path", { d: "M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6" }) });
2784
2976
  }
2785
2977
  function CopyGlyph({ className }) {
2786
- return /* @__PURE__ */ jsxs6("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
2787
- /* @__PURE__ */ jsx8("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
2788
- /* @__PURE__ */ jsx8("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
2978
+ return /* @__PURE__ */ jsxs7("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
2979
+ /* @__PURE__ */ jsx9("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
2980
+ /* @__PURE__ */ jsx9("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
2789
2981
  ] });
2790
2982
  }
2791
2983
  function TraceIdCopy({ traceId }) {
@@ -2800,7 +2992,7 @@ function TraceIdCopy({ traceId }) {
2800
2992
  }
2801
2993
  );
2802
2994
  }, [traceId]);
2803
- return /* @__PURE__ */ jsxs6(
2995
+ return /* @__PURE__ */ jsxs7(
2804
2996
  "button",
2805
2997
  {
2806
2998
  type: "button",
@@ -2809,29 +3001,29 @@ function TraceIdCopy({ traceId }) {
2809
3001
  "aria-label": "Copy trace id",
2810
3002
  className: "inline-flex min-w-0 items-center gap-1.5 rounded text-left font-mono text-muted-foreground transition hover:text-foreground",
2811
3003
  children: [
2812
- /* @__PURE__ */ jsx8("span", { className: "truncate", children: traceId }),
2813
- /* @__PURE__ */ jsx8(CopyGlyph, { className: "h-3 w-3 shrink-0" }),
2814
- copied && /* @__PURE__ */ jsx8("span", { className: "shrink-0 not-italic text-success", children: "copied" })
3004
+ /* @__PURE__ */ jsx9("span", { className: "truncate", children: traceId }),
3005
+ /* @__PURE__ */ jsx9(CopyGlyph, { className: "h-3 w-3 shrink-0" }),
3006
+ copied && /* @__PURE__ */ jsx9("span", { className: "shrink-0 not-italic text-success", children: "copied" })
2815
3007
  ]
2816
3008
  }
2817
3009
  );
2818
3010
  }
2819
3011
  function StatusDot({ tone }) {
2820
- return /* @__PURE__ */ jsxs6("span", { className: "inline-flex items-center", children: [
2821
- /* @__PURE__ */ jsx8(
3012
+ return /* @__PURE__ */ jsxs7("span", { className: "inline-flex items-center", children: [
3013
+ /* @__PURE__ */ jsx9(
2822
3014
  "span",
2823
3015
  {
2824
3016
  "aria-hidden": true,
2825
3017
  className: `h-2 w-2 shrink-0 rounded-full ${tone === "live" ? "bg-warning" : tone === "ok" ? "bg-success" : tone === "error" ? "bg-destructive" : "bg-muted-foreground/40"}`
2826
3018
  }
2827
3019
  ),
2828
- /* @__PURE__ */ jsx8("span", { className: "sr-only", children: tone })
3020
+ /* @__PURE__ */ jsx9("span", { className: "sr-only", children: tone })
2829
3021
  ] });
2830
3022
  }
2831
3023
  function RunLabel({ tool, detail, live }) {
2832
- return /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 truncate", children: [
2833
- /* @__PURE__ */ jsx8("span", { className: live ? "agent-shimmer font-medium" : "font-medium", "data-motion": live ? "essential" : void 0, children: tool }),
2834
- /* @__PURE__ */ jsxs6("span", { className: "text-muted-foreground", children: [
3024
+ return /* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1 truncate", children: [
3025
+ /* @__PURE__ */ jsx9("span", { className: live ? "agent-shimmer font-medium" : "font-medium", "data-motion": live ? "essential" : void 0, children: tool }),
3026
+ /* @__PURE__ */ jsxs7("span", { className: "text-muted-foreground", children: [
2835
3027
  " \u2014 ",
2836
3028
  detail
2837
3029
  ] })
@@ -2846,19 +3038,19 @@ function FlowWaterfall({ trace }) {
2846
3038
  const rows = waterfallLayout(trace);
2847
3039
  if (rows.length === 0) return null;
2848
3040
  const cost = formatActivityCost(trace.costUsd);
2849
- return /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
2850
- rows.map((row, i) => /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-[minmax(0,2fr)_minmax(0,3fr)_auto] items-center gap-2", children: [
2851
- /* @__PURE__ */ jsx8("span", { className: "truncate font-mono text-xs text-muted-foreground", title: row.name, children: row.name }),
2852
- /* @__PURE__ */ jsx8("div", { className: "relative h-2 rounded-sm bg-secondary", children: /* @__PURE__ */ jsx8(
3041
+ return /* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
3042
+ rows.map((row, i) => /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-[minmax(0,2fr)_minmax(0,3fr)_auto] items-center gap-2", children: [
3043
+ /* @__PURE__ */ jsx9("span", { className: "truncate font-mono text-xs text-muted-foreground", title: row.name, children: row.name }),
3044
+ /* @__PURE__ */ jsx9("div", { className: "relative h-2 rounded-sm bg-secondary", children: /* @__PURE__ */ jsx9(
2853
3045
  "div",
2854
3046
  {
2855
3047
  className: `absolute inset-y-0 rounded-sm ${row.ok ? BAR_CLASS[row.kind] : "bg-destructive/80"} ${row.approx ? "opacity-70" : ""}`,
2856
3048
  style: { left: `${row.offsetPct}%`, width: `${row.widthPct}%` }
2857
3049
  }
2858
3050
  ) }),
2859
- /* @__PURE__ */ jsx8("span", { className: "shrink-0 font-mono text-xs tabular-nums text-muted-foreground/70", children: row.durationLabel })
3051
+ /* @__PURE__ */ jsx9("span", { className: "shrink-0 font-mono text-xs tabular-nums text-muted-foreground/70", children: row.durationLabel })
2860
3052
  ] }, i)),
2861
- /* @__PURE__ */ jsxs6("p", { className: "pt-0.5 text-right font-mono text-xs tabular-nums text-muted-foreground/60", children: [
3053
+ /* @__PURE__ */ jsxs7("p", { className: "pt-0.5 text-right font-mono text-xs tabular-nums text-muted-foreground/60", children: [
2862
3054
  (trace.totalMs / 1e3).toFixed(1),
2863
3055
  "s",
2864
3056
  cost ? ` \xB7 ${cost}` : ""
@@ -2870,35 +3062,35 @@ function LaneRow({ run, staggerIndex }) {
2870
3062
  const tone = activityTone(run.status);
2871
3063
  const cost = formatActivityCost(run.costUsd);
2872
3064
  const duration = formatActivityDuration(run.durationMs);
2873
- return /* @__PURE__ */ jsxs6("div", { className: "agent-arrive flex items-center gap-2 py-1 text-xs", style: arrival, children: [
2874
- /* @__PURE__ */ jsx8(StatusDot, { tone }),
2875
- /* @__PURE__ */ jsx8(RunLabel, { tool: run.tool, detail: run.detail, live: tone === "live" }),
2876
- tone === "live" && (run.iteration !== void 0 || run.phase !== void 0) && /* @__PURE__ */ jsx8("span", { className: "shrink-0 rounded-full bg-warning/10 px-1.5 py-0.5 font-mono text-xs text-warning", children: [run.iteration !== void 0 ? `iter ${run.iteration}` : null, run.phase ?? null].filter(Boolean).join(" \xB7 ") }),
2877
- /* @__PURE__ */ jsxs6("span", { className: "flex shrink-0 items-center gap-1.5 font-mono text-xs tabular-nums text-muted-foreground/70", children: [
2878
- tone !== "live" && tone !== "ok" && /* @__PURE__ */ jsx8("span", { children: run.status }),
2879
- cost && /* @__PURE__ */ jsx8("span", { children: cost }),
2880
- duration && /* @__PURE__ */ jsx8("span", { children: duration })
3065
+ return /* @__PURE__ */ jsxs7("div", { className: "agent-arrive flex items-center gap-2 py-1 text-xs", style: arrival, children: [
3066
+ /* @__PURE__ */ jsx9(StatusDot, { tone }),
3067
+ /* @__PURE__ */ jsx9(RunLabel, { tool: run.tool, detail: run.detail, live: tone === "live" }),
3068
+ tone === "live" && (run.iteration !== void 0 || run.phase !== void 0) && /* @__PURE__ */ jsx9("span", { className: "shrink-0 rounded-full bg-warning/10 px-1.5 py-0.5 font-mono text-xs text-warning", children: [run.iteration !== void 0 ? `iter ${run.iteration}` : null, run.phase ?? null].filter(Boolean).join(" \xB7 ") }),
3069
+ /* @__PURE__ */ jsxs7("span", { className: "flex shrink-0 items-center gap-1.5 font-mono text-xs tabular-nums text-muted-foreground/70", children: [
3070
+ tone !== "live" && tone !== "ok" && /* @__PURE__ */ jsx9("span", { children: run.status }),
3071
+ cost && /* @__PURE__ */ jsx9("span", { children: cost }),
3072
+ duration && /* @__PURE__ */ jsx9("span", { children: duration })
2881
3073
  ] })
2882
3074
  ] });
2883
3075
  }
2884
3076
  function MissionActivityLane({ activity, startedAt, nowMs }) {
2885
3077
  const [expanded, setExpanded] = useState11(false);
2886
3078
  if (activity.length === 0) return null;
2887
- return /* @__PURE__ */ jsxs6("div", { className: "mt-1 border-l border-border pl-3", children: [
2888
- activity.map((run, index) => /* @__PURE__ */ jsx8(LaneRow, { run, staggerIndex: index }, run.taskId)),
2889
- /* @__PURE__ */ jsxs6(
3079
+ return /* @__PURE__ */ jsxs7("div", { className: "mt-1 border-l border-border pl-3", children: [
3080
+ activity.map((run, index) => /* @__PURE__ */ jsx9(LaneRow, { run, staggerIndex: index }, run.taskId)),
3081
+ /* @__PURE__ */ jsxs7(
2890
3082
  "button",
2891
3083
  {
2892
3084
  type: "button",
2893
3085
  onClick: () => setExpanded((v) => !v),
2894
3086
  className: "flex items-center gap-1 py-0.5 text-xs font-medium text-muted-foreground/70 transition hover:text-foreground",
2895
3087
  children: [
2896
- /* @__PURE__ */ jsx8(ChevronGlyph, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` }),
3088
+ /* @__PURE__ */ jsx9(ChevronGlyph, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` }),
2897
3089
  "timeline"
2898
3090
  ]
2899
3091
  }
2900
3092
  ),
2901
- expanded && /* @__PURE__ */ jsx8("div", { className: "rounded-md border border-border bg-secondary p-2", children: /* @__PURE__ */ jsx8(
3093
+ expanded && /* @__PURE__ */ jsx9("div", { className: "rounded-md border border-border bg-secondary p-2", children: /* @__PURE__ */ jsx9(
2902
3094
  FlowWaterfall,
2903
3095
  {
2904
3096
  trace: stepActivityFlowTrace(activity, {
@@ -2919,35 +3111,35 @@ function ActivityRow({
2919
3111
  const tone = activityTone(record.status);
2920
3112
  const cost = formatActivityCost(record.costUsd);
2921
3113
  const duration = formatActivityDuration(record.durationMs);
2922
- return /* @__PURE__ */ jsxs6("div", { className: "agent-arrive rounded-lg border border-card-edge bg-card", style: arrival, children: [
2923
- /* @__PURE__ */ jsxs6("button", { type: "button", onClick: () => setOpen((v) => !v), className: "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm", children: [
2924
- /* @__PURE__ */ jsx8(StatusDot, { tone }),
2925
- /* @__PURE__ */ jsx8(RunLabel, { tool: record.tool, detail: record.detail, live: tone === "live" }),
2926
- tone === "live" && (record.iteration !== void 0 || record.phase !== void 0) && /* @__PURE__ */ jsx8("span", { className: "shrink-0 rounded-full bg-warning/10 px-2 py-0.5 font-mono text-xs text-warning", children: [record.iteration !== void 0 ? `iter ${record.iteration}` : null, record.phase ?? null].filter(Boolean).join(" \xB7 ") }),
2927
- /* @__PURE__ */ jsx8(
3114
+ return /* @__PURE__ */ jsxs7("div", { className: "agent-arrive rounded-lg border border-card-edge bg-card", style: arrival, children: [
3115
+ /* @__PURE__ */ jsxs7("button", { type: "button", onClick: () => setOpen((v) => !v), className: "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm", children: [
3116
+ /* @__PURE__ */ jsx9(StatusDot, { tone }),
3117
+ /* @__PURE__ */ jsx9(RunLabel, { tool: record.tool, detail: record.detail, live: tone === "live" }),
3118
+ tone === "live" && (record.iteration !== void 0 || record.phase !== void 0) && /* @__PURE__ */ jsx9("span", { className: "shrink-0 rounded-full bg-warning/10 px-2 py-0.5 font-mono text-xs text-warning", children: [record.iteration !== void 0 ? `iter ${record.iteration}` : null, record.phase ?? null].filter(Boolean).join(" \xB7 ") }),
3119
+ /* @__PURE__ */ jsx9(
2928
3120
  "span",
2929
3121
  {
2930
3122
  className: `shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${tone === "ok" ? "bg-success/10 text-success" : tone === "error" ? "bg-destructive/10 text-destructive" : tone === "live" ? "bg-warning/10 text-warning" : "bg-secondary text-muted-foreground"}`,
2931
3123
  children: record.status
2932
3124
  }
2933
3125
  ),
2934
- cost && /* @__PURE__ */ jsx8("span", { className: "shrink-0 font-mono text-xs tabular-nums text-muted-foreground", children: cost }),
2935
- /* @__PURE__ */ jsx8(ChevronGlyph, { className: `h-3 w-3 shrink-0 text-muted-foreground transition-transform ${open ? "rotate-180" : ""}` })
3126
+ cost && /* @__PURE__ */ jsx9("span", { className: "shrink-0 font-mono text-xs tabular-nums text-muted-foreground", children: cost }),
3127
+ /* @__PURE__ */ jsx9(ChevronGlyph, { className: `h-3 w-3 shrink-0 text-muted-foreground transition-transform ${open ? "rotate-180" : ""}` })
2936
3128
  ] }),
2937
- open && /* @__PURE__ */ jsxs6("div", { className: "space-y-2.5 border-t border-border px-3 py-2.5", children: [
2938
- record.durationMs !== void 0 && /* @__PURE__ */ jsx8("div", { className: "rounded-md border border-border bg-secondary p-2", children: /* @__PURE__ */ jsx8(FlowWaterfall, { trace: stepActivityFlowTrace([record]) }) }),
2939
- /* @__PURE__ */ jsxs6("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-xs", children: [
2940
- /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground/60", children: "task" }),
2941
- /* @__PURE__ */ jsx8("dd", { className: "truncate text-muted-foreground", children: record.taskId }),
2942
- /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground/60", children: "started" }),
2943
- /* @__PURE__ */ jsx8("dd", { className: "text-muted-foreground", children: new Date(record.startedAt).toLocaleString() }),
2944
- duration && /* @__PURE__ */ jsxs6(Fragment3, { children: [
2945
- /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground/60", children: "duration" }),
2946
- /* @__PURE__ */ jsx8("dd", { className: "text-muted-foreground", children: duration })
3129
+ open && /* @__PURE__ */ jsxs7("div", { className: "space-y-2.5 border-t border-border px-3 py-2.5", children: [
3130
+ record.durationMs !== void 0 && /* @__PURE__ */ jsx9("div", { className: "rounded-md border border-border bg-secondary p-2", children: /* @__PURE__ */ jsx9(FlowWaterfall, { trace: stepActivityFlowTrace([record]) }) }),
3131
+ /* @__PURE__ */ jsxs7("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-xs", children: [
3132
+ /* @__PURE__ */ jsx9("dt", { className: "text-muted-foreground/60", children: "task" }),
3133
+ /* @__PURE__ */ jsx9("dd", { className: "truncate text-muted-foreground", children: record.taskId }),
3134
+ /* @__PURE__ */ jsx9("dt", { className: "text-muted-foreground/60", children: "started" }),
3135
+ /* @__PURE__ */ jsx9("dd", { className: "text-muted-foreground", children: new Date(record.startedAt).toLocaleString() }),
3136
+ duration && /* @__PURE__ */ jsxs7(Fragment3, { children: [
3137
+ /* @__PURE__ */ jsx9("dt", { className: "text-muted-foreground/60", children: "duration" }),
3138
+ /* @__PURE__ */ jsx9("dd", { className: "text-muted-foreground", children: duration })
2947
3139
  ] }),
2948
- record.traceId && /* @__PURE__ */ jsxs6(Fragment3, { children: [
2949
- /* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground/60", children: "trace" }),
2950
- /* @__PURE__ */ jsx8("dd", { className: "min-w-0", children: /* @__PURE__ */ jsx8(TraceIdCopy, { traceId: record.traceId }) })
3140
+ record.traceId && /* @__PURE__ */ jsxs7(Fragment3, { children: [
3141
+ /* @__PURE__ */ jsx9("dt", { className: "text-muted-foreground/60", children: "trace" }),
3142
+ /* @__PURE__ */ jsx9("dd", { className: "min-w-0", children: /* @__PURE__ */ jsx9(TraceIdCopy, { traceId: record.traceId }) })
2951
3143
  ] })
2952
3144
  ] }),
2953
3145
  record.missionRef && renderMissionRef?.(record.missionRef, record)
@@ -2979,10 +3171,10 @@ function AgentActivityPanel({ fetchActivity, renderMissionRef, title = "Agent ac
2979
3171
  void load();
2980
3172
  }, [load]);
2981
3173
  const loading = status === "loading";
2982
- return /* @__PURE__ */ jsxs6("div", { className: "space-y-2", children: [
2983
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
2984
- /* @__PURE__ */ jsx8("h2", { className: "flex-1 text-sm font-semibold", children: title }),
2985
- /* @__PURE__ */ jsx8(
3174
+ return /* @__PURE__ */ jsxs7("div", { className: "space-y-2", children: [
3175
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2", children: [
3176
+ /* @__PURE__ */ jsx9("h2", { className: "flex-1 text-sm font-semibold", children: title }),
3177
+ /* @__PURE__ */ jsx9(
2986
3178
  "button",
2987
3179
  {
2988
3180
  type: "button",
@@ -2990,15 +3182,15 @@ function AgentActivityPanel({ fetchActivity, renderMissionRef, title = "Agent ac
2990
3182
  disabled: loading,
2991
3183
  "aria-label": "Refresh",
2992
3184
  className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground disabled:opacity-50",
2993
- children: /* @__PURE__ */ jsx8(RefreshGlyph, { className: `h-3.5 w-3.5 ${loading ? "animate-spin" : ""}` })
3185
+ children: /* @__PURE__ */ jsx9(RefreshGlyph, { className: `h-3.5 w-3.5 ${loading ? "animate-spin" : ""}` })
2994
3186
  }
2995
3187
  )
2996
3188
  ] }),
2997
- status === "error" && /* @__PURE__ */ jsx8("p", { role: "alert", className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: error }),
2998
- status === "ready" && rows.length === 0 && /* @__PURE__ */ jsx8("p", { className: "px-1 text-sm text-muted-foreground", children: emptyLabel }),
2999
- /* @__PURE__ */ jsx8("span", { role: "status", "aria-live": "polite", "aria-busy": loading, className: "sr-only", children: loading ? "Loading activity\u2026" : "" }),
3000
- /* @__PURE__ */ jsx8("div", { className: "space-y-1.5", "aria-busy": loading, children: rows.map((record, index) => /* @__PURE__ */ jsx8(ActivityRow, { record, renderMissionRef, staggerIndex: index }, record.taskId)) }),
3001
- cursor && /* @__PURE__ */ jsx8(
3189
+ status === "error" && /* @__PURE__ */ jsx9("p", { role: "alert", className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: error }),
3190
+ status === "ready" && rows.length === 0 && /* @__PURE__ */ jsx9("p", { className: "px-1 text-sm text-muted-foreground", children: emptyLabel }),
3191
+ /* @__PURE__ */ jsx9("span", { role: "status", "aria-live": "polite", "aria-busy": loading, className: "sr-only", children: loading ? "Loading activity\u2026" : "" }),
3192
+ /* @__PURE__ */ jsx9("div", { className: "space-y-1.5", "aria-busy": loading, children: rows.map((record, index) => /* @__PURE__ */ jsx9(ActivityRow, { record, renderMissionRef, staggerIndex: index }, record.taskId)) }),
3193
+ cursor && /* @__PURE__ */ jsx9(
3002
3194
  "button",
3003
3195
  {
3004
3196
  type: "button",
@@ -3172,7 +3364,7 @@ function provenanceTriggerLabel(record, standing) {
3172
3364
  }
3173
3365
 
3174
3366
  // src/web-react/provenance.tsx
3175
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
3367
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
3176
3368
  var BASIS_TONES = {
3177
3369
  extracted: "border-primary/30 bg-primary/10 text-primary",
3178
3370
  entered: "border-success/30 bg-success/10 text-success",
@@ -3197,27 +3389,27 @@ function BasisGlyph({ basis, className }) {
3197
3389
  };
3198
3390
  switch (basis) {
3199
3391
  case "extracted":
3200
- return /* @__PURE__ */ jsxs7("svg", { ...shared, children: [
3201
- /* @__PURE__ */ jsx9("path", { d: "M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z" }),
3202
- /* @__PURE__ */ jsx9("polyline", { points: "14 3 14 8 19 8" }),
3203
- /* @__PURE__ */ jsx9("line", { x1: "9", y1: "13", x2: "15", y2: "13" })
3392
+ return /* @__PURE__ */ jsxs8("svg", { ...shared, children: [
3393
+ /* @__PURE__ */ jsx10("path", { d: "M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z" }),
3394
+ /* @__PURE__ */ jsx10("polyline", { points: "14 3 14 8 19 8" }),
3395
+ /* @__PURE__ */ jsx10("line", { x1: "9", y1: "13", x2: "15", y2: "13" })
3204
3396
  ] });
3205
3397
  case "entered":
3206
- return /* @__PURE__ */ jsxs7("svg", { ...shared, children: [
3207
- /* @__PURE__ */ jsx9("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
3208
- /* @__PURE__ */ jsx9("circle", { cx: "12", cy: "7", r: "4" })
3398
+ return /* @__PURE__ */ jsxs8("svg", { ...shared, children: [
3399
+ /* @__PURE__ */ jsx10("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
3400
+ /* @__PURE__ */ jsx10("circle", { cx: "12", cy: "7", r: "4" })
3209
3401
  ] });
3210
3402
  case "computed":
3211
- return /* @__PURE__ */ jsxs7("svg", { ...shared, children: [
3212
- /* @__PURE__ */ jsx9("line", { x1: "4", y1: "9", x2: "20", y2: "9" }),
3213
- /* @__PURE__ */ jsx9("line", { x1: "4", y1: "15", x2: "20", y2: "15" }),
3214
- /* @__PURE__ */ jsx9("line", { x1: "10", y1: "3", x2: "8", y2: "21" }),
3215
- /* @__PURE__ */ jsx9("line", { x1: "16", y1: "3", x2: "14", y2: "21" })
3403
+ return /* @__PURE__ */ jsxs8("svg", { ...shared, children: [
3404
+ /* @__PURE__ */ jsx10("line", { x1: "4", y1: "9", x2: "20", y2: "9" }),
3405
+ /* @__PURE__ */ jsx10("line", { x1: "4", y1: "15", x2: "20", y2: "15" }),
3406
+ /* @__PURE__ */ jsx10("line", { x1: "10", y1: "3", x2: "8", y2: "21" }),
3407
+ /* @__PURE__ */ jsx10("line", { x1: "16", y1: "3", x2: "14", y2: "21" })
3216
3408
  ] });
3217
3409
  case "asserted":
3218
- return /* @__PURE__ */ jsxs7("svg", { ...shared, children: [
3219
- /* @__PURE__ */ jsx9("path", { d: "M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1" }),
3220
- /* @__PURE__ */ jsx9("circle", { cx: "12", cy: "12", r: "3.2" })
3410
+ return /* @__PURE__ */ jsxs8("svg", { ...shared, children: [
3411
+ /* @__PURE__ */ jsx10("path", { d: "M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1" }),
3412
+ /* @__PURE__ */ jsx10("circle", { cx: "12", cy: "12", r: "3.2" })
3221
3413
  ] });
3222
3414
  }
3223
3415
  }
@@ -3237,11 +3429,11 @@ function SourceRow({
3237
3429
  const status = source.status ?? "ready";
3238
3430
  const statusLine = describeProvenanceSourceStatus(source);
3239
3431
  const openable = status === "ready" && (onOpenSource !== void 0 || source.href !== void 0);
3240
- return /* @__PURE__ */ jsxs7("li", { className: "rounded-md border border-card-edge bg-card px-2.5 py-2", children: [
3241
- /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1", children: [
3242
- /* @__PURE__ */ jsx9("span", { className: "text-sm font-medium text-foreground", children: source.label }),
3243
- source.locator && /* @__PURE__ */ jsx9("span", { className: "text-xs text-muted-foreground", children: source.locator }),
3244
- openable && (onOpenSource ? /* @__PURE__ */ jsxs7(
3432
+ return /* @__PURE__ */ jsxs8("li", { className: "rounded-md border border-card-edge bg-card px-2.5 py-2", children: [
3433
+ /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1", children: [
3434
+ /* @__PURE__ */ jsx10("span", { className: "text-sm font-medium text-foreground", children: source.label }),
3435
+ source.locator && /* @__PURE__ */ jsx10("span", { className: "text-xs text-muted-foreground", children: source.locator }),
3436
+ openable && (onOpenSource ? /* @__PURE__ */ jsxs8(
3245
3437
  "button",
3246
3438
  {
3247
3439
  type: "button",
@@ -3252,7 +3444,7 @@ function SourceRow({
3252
3444
  source.label
3253
3445
  ]
3254
3446
  }
3255
- ) : /* @__PURE__ */ jsxs7(
3447
+ ) : /* @__PURE__ */ jsxs8(
3256
3448
  "a",
3257
3449
  {
3258
3450
  href: source.href,
@@ -3266,7 +3458,7 @@ function SourceRow({
3266
3458
  }
3267
3459
  ))
3268
3460
  ] }),
3269
- source.quote && /* @__PURE__ */ jsxs7("blockquote", { className: "mt-1 border-l-2 border-primary/50 pl-2 text-[12px] italic leading-snug text-foreground", children: [
3461
+ source.quote && /* @__PURE__ */ jsxs8("blockquote", { className: "mt-1 border-l-2 border-primary/50 pl-2 text-[12px] italic leading-snug text-foreground", children: [
3270
3462
  "\u201C",
3271
3463
  source.quote,
3272
3464
  "\u201D"
@@ -3275,14 +3467,14 @@ function SourceRow({
3275
3467
  // update is theirs to read, not an interruption. Either way it is TEXT
3276
3468
  // — a spinner alone and a greyed row alone both render as "nothing
3277
3469
  // here".
3278
- /* @__PURE__ */ jsxs7(
3470
+ /* @__PURE__ */ jsxs8(
3279
3471
  "p",
3280
3472
  {
3281
3473
  role: "status",
3282
3474
  className: `mt-1 text-xs ${status === "unavailable" ? "text-destructive" : "text-muted-foreground"}`,
3283
3475
  children: [
3284
3476
  statusLine,
3285
- status === "unavailable" && onRetrySource && /* @__PURE__ */ jsx9(
3477
+ status === "unavailable" && onRetrySource && /* @__PURE__ */ jsx10(
3286
3478
  "button",
3287
3479
  {
3288
3480
  type: "button",
@@ -3349,12 +3541,12 @@ function ProvenanceValue({
3349
3541
  document.removeEventListener("touchstart", onPointerDown, true);
3350
3542
  };
3351
3543
  }, [open]);
3352
- const summary = /* @__PURE__ */ jsxs7("span", { className: "inline-flex flex-wrap items-baseline gap-x-1.5", children: [
3353
- record.label && /* @__PURE__ */ jsx9("span", { className: "text-xs text-muted-foreground", children: record.label }),
3354
- /* @__PURE__ */ jsx9("span", { className: hasValue ? "text-sm text-foreground" : "text-sm italic text-muted-foreground", children: hasValue ? record.display : missingValueLabel })
3544
+ const summary = /* @__PURE__ */ jsxs8("span", { className: "inline-flex flex-wrap items-baseline gap-x-1.5", children: [
3545
+ record.label && /* @__PURE__ */ jsx10("span", { className: "text-xs text-muted-foreground", children: record.label }),
3546
+ /* @__PURE__ */ jsx10("span", { className: hasValue ? "text-sm text-foreground" : "text-sm italic text-muted-foreground", children: hasValue ? record.display : missingValueLabel })
3355
3547
  ] });
3356
3548
  if (maxDepth <= 0) {
3357
- return /* @__PURE__ */ jsxs7(
3549
+ return /* @__PURE__ */ jsxs8(
3358
3550
  "div",
3359
3551
  {
3360
3552
  className: `inline-block max-w-full ${className ?? ""}`,
@@ -3362,22 +3554,22 @@ function ProvenanceValue({
3362
3554
  "data-provenance-standing": standing,
3363
3555
  children: [
3364
3556
  summary,
3365
- /* @__PURE__ */ jsxs7(
3557
+ /* @__PURE__ */ jsxs8(
3366
3558
  "span",
3367
3559
  {
3368
3560
  className: `ml-1.5 inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-xs font-medium ${BASIS_TONES[record.basis]}`,
3369
3561
  children: [
3370
- /* @__PURE__ */ jsx9(BasisGlyph, { basis: record.basis, className: "h-3 w-3" }),
3562
+ /* @__PURE__ */ jsx10(BasisGlyph, { basis: record.basis, className: "h-3 w-3" }),
3371
3563
  basisMeta.label
3372
3564
  ]
3373
3565
  }
3374
3566
  ),
3375
- /* @__PURE__ */ jsx9("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: describeProvenance(record) })
3567
+ /* @__PURE__ */ jsx10("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: describeProvenance(record) })
3376
3568
  ]
3377
3569
  }
3378
3570
  );
3379
3571
  }
3380
- return /* @__PURE__ */ jsxs7(
3572
+ return /* @__PURE__ */ jsxs8(
3381
3573
  "div",
3382
3574
  {
3383
3575
  ref: rootRef,
@@ -3386,9 +3578,9 @@ function ProvenanceValue({
3386
3578
  "data-provenance-basis": record.basis,
3387
3579
  "data-provenance-standing": standing,
3388
3580
  children: [
3389
- /* @__PURE__ */ jsxs7("span", { className: "inline-flex flex-wrap items-baseline gap-1.5", children: [
3581
+ /* @__PURE__ */ jsxs8("span", { className: "inline-flex flex-wrap items-baseline gap-1.5", children: [
3390
3582
  summary,
3391
- /* @__PURE__ */ jsxs7(
3583
+ /* @__PURE__ */ jsxs8(
3392
3584
  "button",
3393
3585
  {
3394
3586
  ref: triggerRef,
@@ -3399,17 +3591,17 @@ function ProvenanceValue({
3399
3591
  "aria-label": provenanceTriggerLabel(record, standing),
3400
3592
  className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-xs font-medium transition hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ${BASIS_TONES[record.basis]}`,
3401
3593
  children: [
3402
- /* @__PURE__ */ jsx9(BasisGlyph, { basis: record.basis, className: "h-3 w-3" }),
3403
- /* @__PURE__ */ jsx9("span", { "aria-hidden": true, children: basisMeta.label })
3594
+ /* @__PURE__ */ jsx10(BasisGlyph, { basis: record.basis, className: "h-3 w-3" }),
3595
+ /* @__PURE__ */ jsx10("span", { "aria-hidden": true, children: basisMeta.label })
3404
3596
  ]
3405
3597
  }
3406
3598
  ),
3407
3599
  standing !== "settled" && // Legible at rest: what to do about the value does not wait for
3408
3600
  // someone to open the panel. `aria-hidden` because the trigger's
3409
3601
  // accessible name already carries it — this is the visual half.
3410
- /* @__PURE__ */ jsx9("span", { "aria-hidden": true, className: `text-xs font-medium ${STANDING_TONES[standing]}`, children: standingMeta.label })
3602
+ /* @__PURE__ */ jsx10("span", { "aria-hidden": true, className: `text-xs font-medium ${STANDING_TONES[standing]}`, children: standingMeta.label })
3411
3603
  ] }),
3412
- open && /* @__PURE__ */ jsxs7(
3604
+ open && /* @__PURE__ */ jsxs8(
3413
3605
  "div",
3414
3606
  {
3415
3607
  id: panelId,
@@ -3417,19 +3609,19 @@ function ProvenanceValue({
3417
3609
  "aria-label": provenanceTriggerLabel(record, standing),
3418
3610
  className: "mt-1.5 w-full min-w-0 space-y-2 rounded-lg border border-border bg-card px-3 py-2.5 text-left",
3419
3611
  children: [
3420
- /* @__PURE__ */ jsxs7("div", { children: [
3421
- /* @__PURE__ */ jsx9("p", { className: "text-[12px] leading-snug text-foreground", children: describeProvenance(record) }),
3422
- /* @__PURE__ */ jsxs7("p", { className: `mt-0.5 text-xs leading-snug ${STANDING_TONES[standing]}`, children: [
3612
+ /* @__PURE__ */ jsxs8("div", { children: [
3613
+ /* @__PURE__ */ jsx10("p", { className: "text-[12px] leading-snug text-foreground", children: describeProvenance(record) }),
3614
+ /* @__PURE__ */ jsxs8("p", { className: `mt-0.5 text-xs leading-snug ${STANDING_TONES[standing]}`, children: [
3423
3615
  standingMeta.label,
3424
3616
  " \u2014 ",
3425
3617
  provenanceNextMove(record, standing, confidencePolicy)
3426
3618
  ] }),
3427
- basisMeta.checkableAgainst === null && /* @__PURE__ */ jsxs7("p", { className: "mt-0.5 text-xs leading-snug text-muted-foreground", children: [
3619
+ basisMeta.checkableAgainst === null && /* @__PURE__ */ jsxs8("p", { className: "mt-0.5 text-xs leading-snug text-muted-foreground", children: [
3428
3620
  basisMeta.meaning,
3429
3621
  " There is nothing outside the model to check it against."
3430
3622
  ] })
3431
3623
  ] }),
3432
- sources.length > 0 && /* @__PURE__ */ jsx9("ul", { className: "space-y-1.5", children: sources.map((source, index) => /* @__PURE__ */ jsx9(
3624
+ sources.length > 0 && /* @__PURE__ */ jsx10("ul", { className: "space-y-1.5", children: sources.map((source, index) => /* @__PURE__ */ jsx10(
3433
3625
  SourceRow,
3434
3626
  {
3435
3627
  source,
@@ -3442,12 +3634,12 @@ function ProvenanceValue({
3442
3634
  gaps.filter((gap) => gap.kind !== "unavailable-source").map((gap) => (
3443
3635
  // An unavailable source already states itself on its own row; a
3444
3636
  // structural gap has no row to state it, so it gets one here.
3445
- /* @__PURE__ */ jsx9("p", { className: "rounded-md bg-destructive/10 px-2 py-1.5 text-xs leading-snug text-destructive", children: gap.message }, gap.kind)
3637
+ /* @__PURE__ */ jsx10("p", { className: "rounded-md bg-destructive/10 px-2 py-1.5 text-xs leading-snug text-destructive", children: gap.message }, gap.kind)
3446
3638
  )),
3447
- loading.length > 0 && sources.length === 0 && /* @__PURE__ */ jsx9("p", { role: "status", className: "text-xs text-muted-foreground", children: "Looking up where this came from\u2026" }),
3448
- inputs.length > 0 && /* @__PURE__ */ jsxs7("div", { className: "border-t border-border pt-2", children: [
3449
- /* @__PURE__ */ jsx9("p", { className: "text-xs font-medium uppercase tracking-[0.05em] text-muted-foreground", children: record.derivation ? `Computed from ${record.derivation}` : "Computed from" }),
3450
- /* @__PURE__ */ jsx9("ul", { className: "mt-1.5 space-y-1.5", children: inputs.map((input, index) => /* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsx9(
3639
+ loading.length > 0 && sources.length === 0 && /* @__PURE__ */ jsx10("p", { role: "status", className: "text-xs text-muted-foreground", children: "Looking up where this came from\u2026" }),
3640
+ inputs.length > 0 && /* @__PURE__ */ jsxs8("div", { className: "border-t border-border pt-2", children: [
3641
+ /* @__PURE__ */ jsx10("p", { className: "text-xs font-medium uppercase tracking-[0.05em] text-muted-foreground", children: record.derivation ? `Computed from ${record.derivation}` : "Computed from" }),
3642
+ /* @__PURE__ */ jsx10("ul", { className: "mt-1.5 space-y-1.5", children: inputs.map((input, index) => /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(
3451
3643
  ProvenanceValue,
3452
3644
  {
3453
3645
  record: input,
@@ -3468,26 +3660,26 @@ function ProvenanceValue({
3468
3660
  }
3469
3661
  function ProvenanceLegend({ bases, className }) {
3470
3662
  if (bases.length === 0) return null;
3471
- return /* @__PURE__ */ jsx9("ul", { className: `flex flex-wrap items-center gap-x-3 gap-y-1.5 ${className ?? ""}`, children: bases.map((basis) => {
3663
+ return /* @__PURE__ */ jsx10("ul", { className: `flex flex-wrap items-center gap-x-3 gap-y-1.5 ${className ?? ""}`, children: bases.map((basis) => {
3472
3664
  const meta = provenanceBasisMeta(basis);
3473
- return /* @__PURE__ */ jsxs7("li", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
3474
- /* @__PURE__ */ jsxs7(
3665
+ return /* @__PURE__ */ jsxs8("li", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
3666
+ /* @__PURE__ */ jsxs8(
3475
3667
  "span",
3476
3668
  {
3477
3669
  className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-xs font-medium ${BASIS_TONES[basis]}`,
3478
3670
  children: [
3479
- /* @__PURE__ */ jsx9(BasisGlyph, { basis, className: "h-3 w-3" }),
3671
+ /* @__PURE__ */ jsx10(BasisGlyph, { basis, className: "h-3 w-3" }),
3480
3672
  meta.label
3481
3673
  ]
3482
3674
  }
3483
3675
  ),
3484
- /* @__PURE__ */ jsx9("span", { children: meta.meaning })
3676
+ /* @__PURE__ */ jsx10("span", { children: meta.meaning })
3485
3677
  ] }, basis);
3486
3678
  }) });
3487
3679
  }
3488
3680
 
3489
3681
  // src/web-react/seat-paywall.tsx
3490
- import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
3682
+ import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
3491
3683
  function usd(cents) {
3492
3684
  return new Intl.NumberFormat("en-US", {
3493
3685
  style: "currency",
@@ -3497,7 +3689,7 @@ function usd(cents) {
3497
3689
  }).format(cents / 100);
3498
3690
  }
3499
3691
  function CheckGlyph3() {
3500
- return /* @__PURE__ */ jsx10(
3692
+ return /* @__PURE__ */ jsx11(
3501
3693
  "svg",
3502
3694
  {
3503
3695
  className: "h-4 w-4 shrink-0 text-primary",
@@ -3508,14 +3700,14 @@ function CheckGlyph3() {
3508
3700
  strokeLinecap: "round",
3509
3701
  strokeLinejoin: "round",
3510
3702
  "aria-hidden": true,
3511
- children: /* @__PURE__ */ jsx10("path", { d: "M20 6 9 17l-5-5" })
3703
+ children: /* @__PURE__ */ jsx11("path", { d: "M20 6 9 17l-5-5" })
3512
3704
  }
3513
3705
  );
3514
3706
  }
3515
3707
  function Benefit({ children }) {
3516
- return /* @__PURE__ */ jsxs8("li", { className: "flex items-start gap-2.5 text-sm text-foreground", children: [
3517
- /* @__PURE__ */ jsx10("span", { className: "mt-0.5", children: /* @__PURE__ */ jsx10(CheckGlyph3, {}) }),
3518
- /* @__PURE__ */ jsx10("span", { children })
3708
+ return /* @__PURE__ */ jsxs9("li", { className: "flex items-start gap-2.5 text-sm text-foreground", children: [
3709
+ /* @__PURE__ */ jsx11("span", { className: "mt-0.5", children: /* @__PURE__ */ jsx11(CheckGlyph3, {}) }),
3710
+ /* @__PURE__ */ jsx11("span", { children })
3519
3711
  ] });
3520
3712
  }
3521
3713
  function SeatPaywall({
@@ -3533,45 +3725,45 @@ function SeatPaywall({
3533
3725
  const recurringPrice = offer ? usd(offer.recurring.priceCents) : `$${priceUsd}`;
3534
3726
  const recurringUsage = offer ? usd(offer.recurring.includedCreditsCents) : `$${includedUsageUsd}`;
3535
3727
  const introductory = offer?.introductory ?? null;
3536
- return /* @__PURE__ */ jsx10("div", { className: "flex min-h-[60vh] w-full items-center justify-center p-6", children: /* @__PURE__ */ jsxs8("div", { className: "w-full max-w-md rounded-2xl border border-card-edge bg-card p-8", children: [
3537
- /* @__PURE__ */ jsx10("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: product }),
3538
- /* @__PURE__ */ jsxs8("h1", { className: "mt-2 text-2xl font-semibold tracking-tight text-foreground", children: [
3728
+ return /* @__PURE__ */ jsx11("div", { className: "flex min-h-[60vh] w-full items-center justify-center p-6", children: /* @__PURE__ */ jsxs9("div", { className: "w-full max-w-md rounded-2xl border border-card-edge bg-card p-8", children: [
3729
+ /* @__PURE__ */ jsx11("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: product }),
3730
+ /* @__PURE__ */ jsxs9("h1", { className: "mt-2 text-2xl font-semibold tracking-tight text-foreground", children: [
3539
3731
  "Unlock ",
3540
3732
  product
3541
3733
  ] }),
3542
- tagline && /* @__PURE__ */ jsx10("p", { className: "mt-2 text-sm text-muted-foreground", children: tagline }),
3543
- introductory ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
3544
- /* @__PURE__ */ jsxs8("div", { className: "mt-6 flex items-baseline gap-1.5", children: [
3545
- /* @__PURE__ */ jsx10("span", { className: "text-3xl font-semibold text-foreground", children: usd(introductory.priceCents) }),
3546
- /* @__PURE__ */ jsx10("span", { className: "text-sm text-muted-foreground", children: "first month" })
3734
+ tagline && /* @__PURE__ */ jsx11("p", { className: "mt-2 text-sm text-muted-foreground", children: tagline }),
3735
+ introductory ? /* @__PURE__ */ jsxs9(Fragment4, { children: [
3736
+ /* @__PURE__ */ jsxs9("div", { className: "mt-6 flex items-baseline gap-1.5", children: [
3737
+ /* @__PURE__ */ jsx11("span", { className: "text-3xl font-semibold text-foreground", children: usd(introductory.priceCents) }),
3738
+ /* @__PURE__ */ jsx11("span", { className: "text-sm text-muted-foreground", children: "first month" })
3547
3739
  ] }),
3548
- /* @__PURE__ */ jsxs8("p", { className: "mt-1 text-sm text-muted-foreground", children: [
3740
+ /* @__PURE__ */ jsxs9("p", { className: "mt-1 text-sm text-muted-foreground", children: [
3549
3741
  "Includes ",
3550
3742
  usd(introductory.includedCreditsCents),
3551
3743
  " of AI usage in your first month"
3552
3744
  ] }),
3553
- /* @__PURE__ */ jsxs8("p", { className: "mt-1 text-sm text-muted-foreground", children: [
3745
+ /* @__PURE__ */ jsxs9("p", { className: "mt-1 text-sm text-muted-foreground", children: [
3554
3746
  "Then ",
3555
3747
  recurringPrice,
3556
3748
  "/mo \xB7 includes ",
3557
3749
  recurringUsage,
3558
3750
  "/mo of AI usage"
3559
3751
  ] })
3560
- ] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
3561
- /* @__PURE__ */ jsxs8("div", { className: "mt-6 flex items-baseline gap-1.5", children: [
3562
- /* @__PURE__ */ jsx10("span", { className: "text-3xl font-semibold text-foreground", children: recurringPrice }),
3563
- /* @__PURE__ */ jsx10("span", { className: "text-sm text-muted-foreground", children: "/mo" })
3752
+ ] }) : /* @__PURE__ */ jsxs9(Fragment4, { children: [
3753
+ /* @__PURE__ */ jsxs9("div", { className: "mt-6 flex items-baseline gap-1.5", children: [
3754
+ /* @__PURE__ */ jsx11("span", { className: "text-3xl font-semibold text-foreground", children: recurringPrice }),
3755
+ /* @__PURE__ */ jsx11("span", { className: "text-sm text-muted-foreground", children: "/mo" })
3564
3756
  ] }),
3565
- /* @__PURE__ */ jsxs8("p", { className: "mt-1 text-sm text-muted-foreground", children: [
3757
+ /* @__PURE__ */ jsxs9("p", { className: "mt-1 text-sm text-muted-foreground", children: [
3566
3758
  "Includes ",
3567
3759
  recurringUsage,
3568
3760
  "/mo of AI usage"
3569
3761
  ] })
3570
3762
  ] }),
3571
- /* @__PURE__ */ jsx10("ul", { className: "mt-6 space-y-2.5", children: (benefits ?? [
3763
+ /* @__PURE__ */ jsx11("ul", { className: "mt-6 space-y-2.5", children: (benefits ?? [
3572
3764
  `Full access to ${product}`
3573
- ]).map((benefit, i) => /* @__PURE__ */ jsx10(Benefit, { children: benefit }, i)) }),
3574
- /* @__PURE__ */ jsx10(
3765
+ ]).map((benefit, i) => /* @__PURE__ */ jsx11(Benefit, { children: benefit }, i)) }),
3766
+ /* @__PURE__ */ jsx11(
3575
3767
  "button",
3576
3768
  {
3577
3769
  type: "button",
@@ -3581,7 +3773,7 @@ function SeatPaywall({
3581
3773
  children: pending ? "Opening checkout\u2026" : ctaLabel ?? "Continue to checkout"
3582
3774
  }
3583
3775
  ),
3584
- footnote && /* @__PURE__ */ jsx10("p", { className: "mt-3 text-center text-xs text-muted-foreground/70", children: footnote })
3776
+ footnote && /* @__PURE__ */ jsx11("p", { className: "mt-3 text-center text-xs text-muted-foreground/70", children: footnote })
3585
3777
  ] }) });
3586
3778
  }
3587
3779
 
@@ -3950,7 +4142,7 @@ function pruneRecordGridOverlay(rows, overlay) {
3950
4142
  }
3951
4143
 
3952
4144
  // src/web-react/record-grid.tsx
3953
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
4145
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
3954
4146
  var EMPTY_RECORD_GRID_ROWS = [];
3955
4147
  var CELL_KEY_SEPARATOR = "\0";
3956
4148
  function cellKey(rowId, columnId) {
@@ -4262,9 +4454,9 @@ function RecordGrid({
4262
4454
  [beginEdit, columns, editing, focusCell, onUpdate, reviewing, visibleRows]
4263
4455
  );
4264
4456
  if (state.status === "idle" || state.status === "loading") {
4265
- return /* @__PURE__ */ jsxs9("div", { className: `space-y-3 ${className ?? ""}`, children: [
4457
+ return /* @__PURE__ */ jsxs10("div", { className: `space-y-3 ${className ?? ""}`, children: [
4266
4458
  toolbar,
4267
- /* @__PURE__ */ jsxs9(
4459
+ /* @__PURE__ */ jsxs10(
4268
4460
  "div",
4269
4461
  {
4270
4462
  role: "status",
@@ -4272,22 +4464,22 @@ function RecordGrid({
4272
4464
  "aria-live": "polite",
4273
4465
  className: "space-y-2 rounded-xl border border-card-edge bg-card p-4",
4274
4466
  children: [
4275
- /* @__PURE__ */ jsxs9("span", { className: "sr-only", children: [
4467
+ /* @__PURE__ */ jsxs10("span", { className: "sr-only", children: [
4276
4468
  "Loading ",
4277
4469
  caption
4278
4470
  ] }),
4279
- Array.from({ length: Math.max(1, loadingRowCount) }, (_, index) => /* @__PURE__ */ jsx11("div", { className: "h-8 animate-pulse rounded-md bg-secondary", "aria-hidden": true }, index))
4471
+ Array.from({ length: Math.max(1, loadingRowCount) }, (_, index) => /* @__PURE__ */ jsx12("div", { className: "h-8 animate-pulse rounded-md bg-secondary", "aria-hidden": true }, index))
4280
4472
  ]
4281
4473
  }
4282
4474
  )
4283
4475
  ] });
4284
4476
  }
4285
4477
  if (state.status === "error") {
4286
- return /* @__PURE__ */ jsxs9("div", { className: `space-y-3 ${className ?? ""}`, children: [
4478
+ return /* @__PURE__ */ jsxs10("div", { className: `space-y-3 ${className ?? ""}`, children: [
4287
4479
  toolbar,
4288
- /* @__PURE__ */ jsxs9("div", { role: "alert", className: "rounded-xl border border-destructive/40 bg-destructive/10 px-4 py-4", children: [
4289
- /* @__PURE__ */ jsx11("p", { className: "text-sm font-medium text-destructive", children: state.message }),
4290
- /* @__PURE__ */ jsx11(
4480
+ /* @__PURE__ */ jsxs10("div", { role: "alert", className: "rounded-xl border border-destructive/40 bg-destructive/10 px-4 py-4", children: [
4481
+ /* @__PURE__ */ jsx12("p", { className: "text-sm font-medium text-destructive", children: state.message }),
4482
+ /* @__PURE__ */ jsx12(
4291
4483
  "button",
4292
4484
  {
4293
4485
  type: "button",
@@ -4299,7 +4491,7 @@ function RecordGrid({
4299
4491
  ] })
4300
4492
  ] });
4301
4493
  }
4302
- const addForm = adding && onCreate && !reviewing ? /* @__PURE__ */ jsx11(
4494
+ const addForm = adding && onCreate && !reviewing ? /* @__PURE__ */ jsx12(
4303
4495
  AddRecordForm,
4304
4496
  {
4305
4497
  columns,
@@ -4318,13 +4510,13 @@ function RecordGrid({
4318
4510
  }
4319
4511
  ) : null;
4320
4512
  if (visibleRows.length === 0 && !reviewing) {
4321
- return /* @__PURE__ */ jsxs9("div", { className: `space-y-3 ${className ?? ""}`, children: [
4513
+ return /* @__PURE__ */ jsxs10("div", { className: `space-y-3 ${className ?? ""}`, children: [
4322
4514
  toolbar,
4323
- addForm ?? /* @__PURE__ */ jsxs9("div", { className: "rounded-xl border border-dashed border-border px-6 py-10 text-center", children: [
4324
- /* @__PURE__ */ jsx11("p", { className: "text-sm font-medium text-foreground", children: empty.title }),
4325
- empty.description && /* @__PURE__ */ jsx11("p", { className: "mx-auto mt-1 max-w-md text-sm text-muted-foreground", children: empty.description }),
4326
- /* @__PURE__ */ jsxs9("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-2", children: [
4327
- empty.action && (isValidElement(empty.action) ? empty.action : /* @__PURE__ */ jsx11(
4515
+ addForm ?? /* @__PURE__ */ jsxs10("div", { className: "rounded-xl border border-dashed border-border px-6 py-10 text-center", children: [
4516
+ /* @__PURE__ */ jsx12("p", { className: "text-sm font-medium text-foreground", children: empty.title }),
4517
+ empty.description && /* @__PURE__ */ jsx12("p", { className: "mx-auto mt-1 max-w-md text-sm text-muted-foreground", children: empty.description }),
4518
+ /* @__PURE__ */ jsxs10("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-2", children: [
4519
+ empty.action && (isValidElement(empty.action) ? empty.action : /* @__PURE__ */ jsx12(
4328
4520
  "button",
4329
4521
  {
4330
4522
  type: "button",
@@ -4333,7 +4525,7 @@ function RecordGrid({
4333
4525
  children: empty.action.label
4334
4526
  }
4335
4527
  )),
4336
- onCreate && /* @__PURE__ */ jsx11(
4528
+ onCreate && /* @__PURE__ */ jsx12(
4337
4529
  "button",
4338
4530
  {
4339
4531
  type: "button",
@@ -4358,18 +4550,18 @@ function RecordGrid({
4358
4550
  addedCount > 0 ? `${addedCount} added` : null,
4359
4551
  removedCount > 0 ? `${removedCount} removed` : null
4360
4552
  ].filter((part) => part !== null).join(" \xB7 ");
4361
- const reviewBar = reviewing ? /* @__PURE__ */ jsxs9(
4553
+ const reviewBar = reviewing ? /* @__PURE__ */ jsxs10(
4362
4554
  "div",
4363
4555
  {
4364
4556
  "data-record-grid-review": "",
4365
4557
  className: "flex flex-wrap items-center justify-between gap-3 rounded-xl border border-card-edge bg-card px-4 py-2.5",
4366
4558
  children: [
4367
- /* @__PURE__ */ jsxs9("div", { className: "min-w-0", children: [
4368
- /* @__PURE__ */ jsx11("p", { className: "text-[11px] font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: "Proposed changes" }),
4369
- /* @__PURE__ */ jsx11("p", { className: "mt-0.5 text-xs tabular-nums text-muted-foreground", children: reviewSummary })
4559
+ /* @__PURE__ */ jsxs10("div", { className: "min-w-0", children: [
4560
+ /* @__PURE__ */ jsx12("p", { className: "text-[11px] font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: "Proposed changes" }),
4561
+ /* @__PURE__ */ jsx12("p", { className: "mt-0.5 text-xs tabular-nums text-muted-foreground", children: reviewSummary })
4370
4562
  ] }),
4371
- (onAcceptAll || onRejectAll) && /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
4372
- onRejectAll && /* @__PURE__ */ jsx11(
4563
+ (onAcceptAll || onRejectAll) && /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
4564
+ onRejectAll && /* @__PURE__ */ jsx12(
4373
4565
  "button",
4374
4566
  {
4375
4567
  type: "button",
@@ -4379,7 +4571,7 @@ function RecordGrid({
4379
4571
  children: "Reject all"
4380
4572
  }
4381
4573
  ),
4382
- onAcceptAll && /* @__PURE__ */ jsx11(
4574
+ onAcceptAll && /* @__PURE__ */ jsx12(
4383
4575
  "button",
4384
4576
  {
4385
4577
  type: "button",
@@ -4393,10 +4585,10 @@ function RecordGrid({
4393
4585
  ]
4394
4586
  }
4395
4587
  ) : null;
4396
- return /* @__PURE__ */ jsxs9("div", { className: `space-y-3 ${className ?? ""}`, children: [
4588
+ return /* @__PURE__ */ jsxs10("div", { className: `space-y-3 ${className ?? ""}`, children: [
4397
4589
  toolbar,
4398
4590
  reviewBar,
4399
- /* @__PURE__ */ jsx11("div", { className: "overflow-x-auto rounded-xl border border-card-edge bg-card", children: /* @__PURE__ */ jsxs9(
4591
+ /* @__PURE__ */ jsx12("div", { className: "overflow-x-auto rounded-xl border border-card-edge bg-card", children: /* @__PURE__ */ jsxs10(
4400
4592
  "table",
4401
4593
  {
4402
4594
  role: "grid",
@@ -4404,8 +4596,8 @@ function RecordGrid({
4404
4596
  className: "w-full border-collapse text-left text-sm",
4405
4597
  onKeyDown: handleGridKeyDown,
4406
4598
  children: [
4407
- /* @__PURE__ */ jsx11("thead", { children: /* @__PURE__ */ jsxs9("tr", { role: "row", className: "border-b border-border text-xs uppercase tracking-[0.05em] text-muted-foreground", children: [
4408
- columns.map((column) => /* @__PURE__ */ jsx11(
4599
+ /* @__PURE__ */ jsx12("thead", { children: /* @__PURE__ */ jsxs10("tr", { role: "row", className: "border-b border-border text-xs uppercase tracking-[0.05em] text-muted-foreground", children: [
4600
+ columns.map((column) => /* @__PURE__ */ jsx12(
4409
4601
  "th",
4410
4602
  {
4411
4603
  role: "columnheader",
@@ -4415,17 +4607,17 @@ function RecordGrid({
4415
4607
  },
4416
4608
  column.id
4417
4609
  )),
4418
- showActionsColumn && /* @__PURE__ */ jsx11("th", { role: "columnheader", scope: "col", className: "w-px px-3 py-2 font-medium", children: /* @__PURE__ */ jsx11("span", { className: "sr-only", children: reviewing ? "Review" : "Row actions" }) })
4610
+ showActionsColumn && /* @__PURE__ */ jsx12("th", { role: "columnheader", scope: "col", className: "w-px px-3 py-2 font-medium", children: /* @__PURE__ */ jsx12("span", { className: "sr-only", children: reviewing ? "Review" : "Row actions" }) })
4419
4611
  ] }) }),
4420
- /* @__PURE__ */ jsxs9("tbody", { children: [
4612
+ /* @__PURE__ */ jsxs10("tbody", { children: [
4421
4613
  visibleRows.map((row) => {
4422
4614
  const rowLabel = recordGridRowLabel(columns, row);
4423
4615
  const pending = row.id in pendingRows;
4424
4616
  const rowError = rowErrors[row.id];
4425
4617
  const rowDiff = reviewing ? diffByRow.get(row.id) : void 0;
4426
4618
  const removedRow = rowDiff?.kind === "removed";
4427
- return /* @__PURE__ */ jsxs9(Fragment5, { children: [
4428
- /* @__PURE__ */ jsxs9(
4619
+ return /* @__PURE__ */ jsxs10(Fragment5, { children: [
4620
+ /* @__PURE__ */ jsxs10(
4429
4621
  "tr",
4430
4622
  {
4431
4623
  role: "row",
@@ -4445,8 +4637,8 @@ function RecordGrid({
4445
4637
  const errorId = `${fieldPrefix}-cell-error-${row.id}-${column.id}`;
4446
4638
  const cellDiff = rowDiff?.kind === "changed" ? diffCellByKey.get(key) : void 0;
4447
4639
  if (isEditing && editable) {
4448
- return /* @__PURE__ */ jsxs9("td", { role: "gridcell", className: `px-3 py-1.5 ${alignmentClass(column)}`, children: [
4449
- /* @__PURE__ */ jsx11(
4640
+ return /* @__PURE__ */ jsxs10("td", { role: "gridcell", className: `px-3 py-1.5 ${alignmentClass(column)}`, children: [
4641
+ /* @__PURE__ */ jsx12(
4450
4642
  CellEditor,
4451
4643
  {
4452
4644
  column,
@@ -4459,11 +4651,11 @@ function RecordGrid({
4459
4651
  onCancel: () => cancelEdit(row, column)
4460
4652
  }
4461
4653
  ),
4462
- cellError !== void 0 && /* @__PURE__ */ jsx11("p", { id: errorId, role: "alert", className: "mt-1 text-xs leading-snug text-destructive", children: cellError })
4654
+ cellError !== void 0 && /* @__PURE__ */ jsx12("p", { id: errorId, role: "alert", className: "mt-1 text-xs leading-snug text-destructive", children: cellError })
4463
4655
  ] }, column.id);
4464
4656
  }
4465
4657
  if (column.kind === "boolean" && editable) {
4466
- return /* @__PURE__ */ jsx11("td", { role: "gridcell", className: `px-3 py-2 ${alignmentClass(column)}`, children: /* @__PURE__ */ jsx11(
4658
+ return /* @__PURE__ */ jsx12("td", { role: "gridcell", className: `px-3 py-2 ${alignmentClass(column)}`, children: /* @__PURE__ */ jsx12(
4467
4659
  "input",
4468
4660
  {
4469
4661
  type: "checkbox",
@@ -4482,7 +4674,7 @@ function RecordGrid({
4482
4674
  ) }, column.id);
4483
4675
  }
4484
4676
  const display = applicable ? formatRecordGridValue(column, value, locale) : "";
4485
- return /* @__PURE__ */ jsx11(
4677
+ return /* @__PURE__ */ jsx12(
4486
4678
  "td",
4487
4679
  {
4488
4680
  role: "gridcell",
@@ -4500,20 +4692,20 @@ function RecordGrid({
4500
4692
  className: `px-3 py-2 outline-none focus:ring-2 focus:ring-inset focus:ring-primary/50 ${alignmentClass(
4501
4693
  column
4502
4694
  )} ${editable ? "cursor-text" : ""}`,
4503
- children: /* @__PURE__ */ jsxs9("span", { className: "inline-flex max-w-full items-center gap-1.5", children: [
4504
- column.id === columns[0]?.id && removedRow && /* @__PURE__ */ jsx11("span", { className: "inline-flex shrink-0 rounded border border-destructive/60 px-1 py-px text-[11px] font-semibold uppercase tracking-[0.05em] text-destructive", children: "Remove" }),
4505
- cellDiff ? /* @__PURE__ */ jsxs9("span", { className: "inline-flex max-w-full flex-wrap items-baseline gap-x-1.5", children: [
4506
- /* @__PURE__ */ jsx11("span", { className: "tabular-nums text-destructive line-through decoration-destructive/60", children: formatRecordGridValue(column, cellDiff.before, locale) || "\u2014" }),
4507
- /* @__PURE__ */ jsx11("span", { "aria-hidden": "true", className: "text-muted-foreground", children: "\u2192" }),
4508
- /* @__PURE__ */ jsx11("span", { className: "tabular-nums font-medium text-success", children: formatRecordGridValue(column, cellDiff.after, locale) || "\u2014" })
4509
- ] }) : /* @__PURE__ */ jsx11(
4695
+ children: /* @__PURE__ */ jsxs10("span", { className: "inline-flex max-w-full items-center gap-1.5", children: [
4696
+ column.id === columns[0]?.id && removedRow && /* @__PURE__ */ jsx12("span", { className: "inline-flex shrink-0 rounded border border-destructive/60 px-1 py-px text-[11px] font-semibold uppercase tracking-[0.05em] text-destructive", children: "Remove" }),
4697
+ cellDiff ? /* @__PURE__ */ jsxs10("span", { className: "inline-flex max-w-full flex-wrap items-baseline gap-x-1.5", children: [
4698
+ /* @__PURE__ */ jsx12("span", { className: "tabular-nums text-destructive line-through decoration-destructive/60", children: formatRecordGridValue(column, cellDiff.before, locale) || "\u2014" }),
4699
+ /* @__PURE__ */ jsx12("span", { "aria-hidden": "true", className: "text-muted-foreground", children: "\u2192" }),
4700
+ /* @__PURE__ */ jsx12("span", { className: "tabular-nums font-medium text-success", children: formatRecordGridValue(column, cellDiff.after, locale) || "\u2014" })
4701
+ ] }) : /* @__PURE__ */ jsx12(
4510
4702
  "span",
4511
4703
  {
4512
4704
  className: removedRow ? "truncate text-destructive line-through decoration-destructive/60" : display === "" ? "text-muted-foreground" : "truncate text-foreground",
4513
4705
  children: display === "" ? applicable ? "\u2014" : "n/a" : display
4514
4706
  }
4515
4707
  ),
4516
- source && /* @__PURE__ */ jsx11(
4708
+ source && /* @__PURE__ */ jsx12(
4517
4709
  SourceMarker,
4518
4710
  {
4519
4711
  panelId: `${fieldPrefix}-source-${row.id}-${column.id}`,
@@ -4529,7 +4721,7 @@ function RecordGrid({
4529
4721
  column.id
4530
4722
  );
4531
4723
  }),
4532
- showActionsColumn && /* @__PURE__ */ jsx11("td", { role: "gridcell", className: "px-3 py-2 text-right", children: reviewing ? rowDiff && /* @__PURE__ */ jsx11(
4724
+ showActionsColumn && /* @__PURE__ */ jsx12("td", { role: "gridcell", className: "px-3 py-2 text-right", children: reviewing ? rowDiff && /* @__PURE__ */ jsx12(
4533
4725
  ReviewActions,
4534
4726
  {
4535
4727
  rowId: row.id,
@@ -4538,8 +4730,8 @@ function RecordGrid({
4538
4730
  onAccept: onAcceptRow,
4539
4731
  onReject: onRejectRow
4540
4732
  }
4541
- ) : row.readOnly === true ? null : confirmDelete === row.id ? /* @__PURE__ */ jsxs9("span", { className: "inline-flex items-center gap-1.5", children: [
4542
- /* @__PURE__ */ jsx11(
4733
+ ) : row.readOnly === true ? null : confirmDelete === row.id ? /* @__PURE__ */ jsxs10("span", { className: "inline-flex items-center gap-1.5", children: [
4734
+ /* @__PURE__ */ jsx12(
4543
4735
  "button",
4544
4736
  {
4545
4737
  type: "button",
@@ -4549,7 +4741,7 @@ function RecordGrid({
4549
4741
  children: "Delete"
4550
4742
  }
4551
4743
  ),
4552
- /* @__PURE__ */ jsx11(
4744
+ /* @__PURE__ */ jsx12(
4553
4745
  "button",
4554
4746
  {
4555
4747
  type: "button",
@@ -4559,14 +4751,14 @@ function RecordGrid({
4559
4751
  children: "Cancel"
4560
4752
  }
4561
4753
  )
4562
- ] }) : /* @__PURE__ */ jsx11(
4754
+ ] }) : /* @__PURE__ */ jsx12(
4563
4755
  "button",
4564
4756
  {
4565
4757
  type: "button",
4566
4758
  "aria-label": `Delete ${rowLabel}`,
4567
4759
  onClick: () => setConfirmDelete(row.id),
4568
4760
  className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-destructive/10 hover:text-destructive",
4569
- children: /* @__PURE__ */ jsxs9(
4761
+ children: /* @__PURE__ */ jsxs10(
4570
4762
  "svg",
4571
4763
  {
4572
4764
  viewBox: "0 0 24 24",
@@ -4578,8 +4770,8 @@ function RecordGrid({
4578
4770
  strokeLinejoin: "round",
4579
4771
  "aria-hidden": true,
4580
4772
  children: [
4581
- /* @__PURE__ */ jsx11("polyline", { points: "3 6 5 6 21 6" }),
4582
- /* @__PURE__ */ jsx11("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
4773
+ /* @__PURE__ */ jsx12("polyline", { points: "3 6 5 6 21 6" }),
4774
+ /* @__PURE__ */ jsx12("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
4583
4775
  ]
4584
4776
  }
4585
4777
  )
@@ -4588,12 +4780,12 @@ function RecordGrid({
4588
4780
  ]
4589
4781
  }
4590
4782
  ),
4591
- rowError !== void 0 && /* @__PURE__ */ jsx11("tr", { role: "row", className: "border-b border-border", children: /* @__PURE__ */ jsx11("td", { role: "gridcell", colSpan: columnSpan, className: "px-3 pb-2", children: /* @__PURE__ */ jsx11("p", { role: "alert", className: "rounded-md bg-destructive/10 px-2.5 py-1.5 text-xs text-destructive", children: rowError }) }) })
4783
+ rowError !== void 0 && /* @__PURE__ */ jsx12("tr", { role: "row", className: "border-b border-border", children: /* @__PURE__ */ jsx12("td", { role: "gridcell", colSpan: columnSpan, className: "px-3 pb-2", children: /* @__PURE__ */ jsx12("p", { role: "alert", className: "rounded-md bg-destructive/10 px-2.5 py-1.5 text-xs text-destructive", children: rowError }) }) })
4592
4784
  ] }, row.id);
4593
4785
  }),
4594
4786
  reviewing && addedRows.map((row) => {
4595
4787
  const rowLabel = recordGridRowLabel(columns, row);
4596
- return /* @__PURE__ */ jsxs9(
4788
+ return /* @__PURE__ */ jsxs10(
4597
4789
  "tr",
4598
4790
  {
4599
4791
  role: "row",
@@ -4604,9 +4796,9 @@ function RecordGrid({
4604
4796
  const applicable = isRecordGridCellApplicable(column, row.values);
4605
4797
  const value = row.values[column.id] ?? null;
4606
4798
  const display = applicable ? formatRecordGridValue(column, value, locale) : "";
4607
- return /* @__PURE__ */ jsx11("td", { role: "gridcell", className: `px-3 py-2 ${alignmentClass(column)}`, children: /* @__PURE__ */ jsxs9("span", { className: "inline-flex max-w-full items-center gap-1.5", children: [
4608
- columnIndex === 0 && /* @__PURE__ */ jsx11("span", { className: "inline-flex shrink-0 rounded border border-success/60 px-1 py-px text-[11px] font-semibold uppercase tracking-[0.05em] text-success", children: "New" }),
4609
- /* @__PURE__ */ jsx11(
4799
+ return /* @__PURE__ */ jsx12("td", { role: "gridcell", className: `px-3 py-2 ${alignmentClass(column)}`, children: /* @__PURE__ */ jsxs10("span", { className: "inline-flex max-w-full items-center gap-1.5", children: [
4800
+ columnIndex === 0 && /* @__PURE__ */ jsx12("span", { className: "inline-flex shrink-0 rounded border border-success/60 px-1 py-px text-[11px] font-semibold uppercase tracking-[0.05em] text-success", children: "New" }),
4801
+ /* @__PURE__ */ jsx12(
4610
4802
  "span",
4611
4803
  {
4612
4804
  className: `tabular-nums ${display === "" ? "text-muted-foreground" : "truncate text-foreground"}`,
@@ -4615,7 +4807,7 @@ function RecordGrid({
4615
4807
  )
4616
4808
  ] }) }, column.id);
4617
4809
  }),
4618
- /* @__PURE__ */ jsx11("td", { role: "gridcell", className: "px-3 py-2 text-right", children: /* @__PURE__ */ jsx11(
4810
+ /* @__PURE__ */ jsx12("td", { role: "gridcell", className: "px-3 py-2 text-right", children: /* @__PURE__ */ jsx12(
4619
4811
  ReviewActions,
4620
4812
  {
4621
4813
  rowId: row.id,
@@ -4631,8 +4823,8 @@ function RecordGrid({
4631
4823
  );
4632
4824
  })
4633
4825
  ] }),
4634
- hasFooter && /* @__PURE__ */ jsx11("tfoot", { children: /* @__PURE__ */ jsxs9("tr", { role: "row", className: "border-t-2 border-border", children: [
4635
- columns.map((column) => /* @__PURE__ */ jsx11(
4826
+ hasFooter && /* @__PURE__ */ jsx12("tfoot", { children: /* @__PURE__ */ jsxs10("tr", { role: "row", className: "border-t-2 border-border", children: [
4827
+ columns.map((column) => /* @__PURE__ */ jsx12(
4636
4828
  "td",
4637
4829
  {
4638
4830
  role: "gridcell",
@@ -4641,19 +4833,19 @@ function RecordGrid({
4641
4833
  },
4642
4834
  column.id
4643
4835
  )),
4644
- showActionsColumn && /* @__PURE__ */ jsx11("td", { role: "gridcell" })
4836
+ showActionsColumn && /* @__PURE__ */ jsx12("td", { role: "gridcell" })
4645
4837
  ] }) })
4646
4838
  ]
4647
4839
  }
4648
4840
  ) }),
4649
- onCreate && !reviewing && (addForm ?? /* @__PURE__ */ jsxs9(
4841
+ onCreate && !reviewing && (addForm ?? /* @__PURE__ */ jsxs10(
4650
4842
  "button",
4651
4843
  {
4652
4844
  type: "button",
4653
4845
  onClick: openAdd,
4654
4846
  className: "inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent",
4655
4847
  children: [
4656
- /* @__PURE__ */ jsxs9(
4848
+ /* @__PURE__ */ jsxs10(
4657
4849
  "svg",
4658
4850
  {
4659
4851
  viewBox: "0 0 24 24",
@@ -4665,8 +4857,8 @@ function RecordGrid({
4665
4857
  strokeLinejoin: "round",
4666
4858
  "aria-hidden": true,
4667
4859
  children: [
4668
- /* @__PURE__ */ jsx11("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
4669
- /* @__PURE__ */ jsx11("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
4860
+ /* @__PURE__ */ jsx12("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
4861
+ /* @__PURE__ */ jsx12("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
4670
4862
  ]
4671
4863
  }
4672
4864
  ),
@@ -4678,8 +4870,8 @@ function RecordGrid({
4678
4870
  }
4679
4871
  function ReviewActions({ rowId, kind, rowLabel, onAccept, onReject }) {
4680
4872
  const noun = kind === "changed" ? `proposed change to ${rowLabel}` : kind === "added" ? `new row ${rowLabel}` : `removal of ${rowLabel}`;
4681
- return /* @__PURE__ */ jsxs9("span", { className: "inline-flex items-center gap-1.5", children: [
4682
- onReject && /* @__PURE__ */ jsx11(
4873
+ return /* @__PURE__ */ jsxs10("span", { className: "inline-flex items-center gap-1.5", children: [
4874
+ onReject && /* @__PURE__ */ jsx12(
4683
4875
  "button",
4684
4876
  {
4685
4877
  type: "button",
@@ -4689,7 +4881,7 @@ function ReviewActions({ rowId, kind, rowLabel, onAccept, onReject }) {
4689
4881
  children: "Reject"
4690
4882
  }
4691
4883
  ),
4692
- onAccept && /* @__PURE__ */ jsx11(
4884
+ onAccept && /* @__PURE__ */ jsx12(
4693
4885
  "button",
4694
4886
  {
4695
4887
  type: "button",
@@ -4710,7 +4902,7 @@ function CellEditor({ column, rowLabel, text, invalid, describedBy, onText, onCo
4710
4902
  className: INPUT_CLASS
4711
4903
  };
4712
4904
  if (column.kind === "select") {
4713
- return /* @__PURE__ */ jsxs9(
4905
+ return /* @__PURE__ */ jsxs10(
4714
4906
  "select",
4715
4907
  {
4716
4908
  ...shared,
@@ -4727,8 +4919,8 @@ function CellEditor({ column, rowLabel, text, invalid, describedBy, onText, onCo
4727
4919
  },
4728
4920
  onBlur: () => onCommit(text),
4729
4921
  children: [
4730
- /* @__PURE__ */ jsx11("option", { value: "", children: "\u2014" }),
4731
- column.options.map((option) => /* @__PURE__ */ jsx11("option", { value: option.value, children: option.label }, option.value))
4922
+ /* @__PURE__ */ jsx12("option", { value: "", children: "\u2014" }),
4923
+ column.options.map((option) => /* @__PURE__ */ jsx12("option", { value: option.value, children: option.label }, option.value))
4732
4924
  ]
4733
4925
  }
4734
4926
  );
@@ -4746,7 +4938,7 @@ function CellEditor({ column, rowLabel, text, invalid, describedBy, onText, onCo
4746
4938
  }
4747
4939
  };
4748
4940
  if (column.kind === "text" && column.multiline === true) {
4749
- return /* @__PURE__ */ jsx11(
4941
+ return /* @__PURE__ */ jsx12(
4750
4942
  "textarea",
4751
4943
  {
4752
4944
  ...shared,
@@ -4758,7 +4950,7 @@ function CellEditor({ column, rowLabel, text, invalid, describedBy, onText, onCo
4758
4950
  }
4759
4951
  );
4760
4952
  }
4761
- return /* @__PURE__ */ jsx11(
4953
+ return /* @__PURE__ */ jsx12(
4762
4954
  "input",
4763
4955
  {
4764
4956
  ...shared,
@@ -4780,8 +4972,8 @@ function SourceMarker({ panelId, columnHeader, rowLabel, source, open, onToggle
4780
4972
  [onToggle]
4781
4973
  );
4782
4974
  const { containerRef, triggerRef, panelRef, triggerProps } = usePopover(open, setOpen);
4783
- return /* @__PURE__ */ jsxs9("span", { ref: containerRef, className: "relative inline-flex", children: [
4784
- /* @__PURE__ */ jsx11(
4975
+ return /* @__PURE__ */ jsxs10("span", { ref: containerRef, className: "relative inline-flex", children: [
4976
+ /* @__PURE__ */ jsx12(
4785
4977
  "button",
4786
4978
  {
4787
4979
  type: "button",
@@ -4794,7 +4986,7 @@ function SourceMarker({ panelId, columnHeader, rowLabel, source, open, onToggle
4794
4986
  onToggle();
4795
4987
  },
4796
4988
  className: `inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${BASIS_TONES2[basis]}`,
4797
- children: /* @__PURE__ */ jsx11(
4989
+ children: /* @__PURE__ */ jsx12(
4798
4990
  "svg",
4799
4991
  {
4800
4992
  viewBox: "0 0 24 24",
@@ -4804,12 +4996,12 @@ function SourceMarker({ panelId, columnHeader, rowLabel, source, open, onToggle
4804
4996
  strokeWidth: "2.5",
4805
4997
  strokeLinecap: "round",
4806
4998
  "aria-hidden": true,
4807
- children: /* @__PURE__ */ jsx11("path", { d: "M9 8h6M9 12h6M9 16h3" })
4999
+ children: /* @__PURE__ */ jsx12("path", { d: "M9 8h6M9 12h6M9 16h3" })
4808
5000
  }
4809
5001
  )
4810
5002
  }
4811
5003
  ),
4812
- /* @__PURE__ */ jsxs9(
5004
+ /* @__PURE__ */ jsxs10(
4813
5005
  PopoverSurface,
4814
5006
  {
4815
5007
  open,
@@ -4819,17 +5011,17 @@ function SourceMarker({ panelId, columnHeader, rowLabel, source, open, onToggle
4819
5011
  panelRef,
4820
5012
  className: `w-64 rounded-lg border border-card-edge bg-popover p-3 text-left ${OVERLAY_SHADOW}`,
4821
5013
  children: [
4822
- source.quote && /* @__PURE__ */ jsxs9("span", { className: "block border-l-2 border-primary/50 pl-2 text-xs italic leading-snug text-foreground", children: [
5014
+ source.quote && /* @__PURE__ */ jsxs10("span", { className: "block border-l-2 border-primary/50 pl-2 text-xs italic leading-snug text-foreground", children: [
4823
5015
  "\u201C",
4824
5016
  source.quote,
4825
5017
  "\u201D"
4826
5018
  ] }),
4827
- /* @__PURE__ */ jsxs9("span", { className: "mt-2 block text-xs text-muted-foreground", children: [
5019
+ /* @__PURE__ */ jsxs10("span", { className: "mt-2 block text-xs text-muted-foreground", children: [
4828
5020
  source.label ?? "Source",
4829
5021
  source.locator ? ` \xB7 ${source.locator}` : "",
4830
5022
  ` \xB7 ${BASIS_TITLES[basis]}`
4831
5023
  ] }),
4832
- source.href && /* @__PURE__ */ jsx11(
5024
+ source.href && /* @__PURE__ */ jsx12(
4833
5025
  "a",
4834
5026
  {
4835
5027
  href: source.href,
@@ -4858,7 +5050,7 @@ function AddRecordForm({
4858
5050
  onCancel
4859
5051
  }) {
4860
5052
  const groups = useMemo5(() => groupColumns(columns), [columns]);
4861
- return /* @__PURE__ */ jsxs9(
5053
+ return /* @__PURE__ */ jsxs10(
4862
5054
  "form",
4863
5055
  {
4864
5056
  noValidate: true,
@@ -4869,31 +5061,31 @@ function AddRecordForm({
4869
5061
  },
4870
5062
  className: "space-y-4 rounded-xl border border-card-edge bg-card p-4",
4871
5063
  children: [
4872
- /* @__PURE__ */ jsx11("h3", { className: "text-sm font-semibold text-foreground", children: label }),
4873
- formError !== null && /* @__PURE__ */ jsx11("p", { role: "alert", className: "rounded-md bg-destructive/10 px-3 py-2 text-xs text-destructive", children: formError }),
5064
+ /* @__PURE__ */ jsx12("h3", { className: "text-sm font-semibold text-foreground", children: label }),
5065
+ formError !== null && /* @__PURE__ */ jsx12("p", { role: "alert", className: "rounded-md bg-destructive/10 px-3 py-2 text-xs text-destructive", children: formError }),
4874
5066
  groups.map((group) => {
4875
5067
  const fields = group.columns.filter((column) => isRecordGridCellApplicable(column, draft));
4876
5068
  if (fields.length === 0) return null;
4877
- return /* @__PURE__ */ jsxs9(
5069
+ return /* @__PURE__ */ jsxs10(
4878
5070
  "fieldset",
4879
5071
  {
4880
5072
  className: group.label === null ? "min-w-0" : "min-w-0 rounded-lg border border-card-edge p-3",
4881
5073
  children: [
4882
- group.label !== null && /* @__PURE__ */ jsx11("legend", { className: "px-1 text-xs font-medium text-muted-foreground", children: group.label }),
4883
- /* @__PURE__ */ jsx11("div", { className: "grid gap-3 sm:grid-cols-2", children: fields.map((column) => {
5074
+ group.label !== null && /* @__PURE__ */ jsx12("legend", { className: "px-1 text-xs font-medium text-muted-foreground", children: group.label }),
5075
+ /* @__PURE__ */ jsx12("div", { className: "grid gap-3 sm:grid-cols-2", children: fields.map((column) => {
4884
5076
  const fieldId = `${fieldPrefix}-${column.id}`;
4885
5077
  const errorId = `${fieldId}-error`;
4886
5078
  const message = errors[column.id];
4887
- return /* @__PURE__ */ jsxs9(
5079
+ return /* @__PURE__ */ jsxs10(
4888
5080
  "div",
4889
5081
  {
4890
5082
  className: column.kind === "text" && column.multiline === true ? "sm:col-span-2" : "",
4891
5083
  children: [
4892
- /* @__PURE__ */ jsxs9("label", { htmlFor: fieldId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: [
5084
+ /* @__PURE__ */ jsxs10("label", { htmlFor: fieldId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: [
4893
5085
  column.header,
4894
- column.required === true && /* @__PURE__ */ jsx11("span", { className: "ml-0.5 text-destructive", children: "*" })
5086
+ column.required === true && /* @__PURE__ */ jsx12("span", { className: "ml-0.5 text-destructive", children: "*" })
4895
5087
  ] }),
4896
- /* @__PURE__ */ jsx11(
5088
+ /* @__PURE__ */ jsx12(
4897
5089
  DraftField,
4898
5090
  {
4899
5091
  column,
@@ -4904,8 +5096,8 @@ function AddRecordForm({
4904
5096
  onValue: (next) => setDraft({ ...draft, [column.id]: next })
4905
5097
  }
4906
5098
  ),
4907
- column.hint && /* @__PURE__ */ jsx11("p", { className: "mt-1 text-xs text-muted-foreground", children: column.hint }),
4908
- message !== void 0 && /* @__PURE__ */ jsx11("p", { id: errorId, role: "alert", className: "mt-1 text-xs text-destructive", children: message })
5099
+ column.hint && /* @__PURE__ */ jsx12("p", { className: "mt-1 text-xs text-muted-foreground", children: column.hint }),
5100
+ message !== void 0 && /* @__PURE__ */ jsx12("p", { id: errorId, role: "alert", className: "mt-1 text-xs text-destructive", children: message })
4909
5101
  ]
4910
5102
  },
4911
5103
  column.id
@@ -4916,8 +5108,8 @@ function AddRecordForm({
4916
5108
  group.label ?? "_"
4917
5109
  );
4918
5110
  }),
4919
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
4920
- /* @__PURE__ */ jsx11(
5111
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
5112
+ /* @__PURE__ */ jsx12(
4921
5113
  "button",
4922
5114
  {
4923
5115
  type: "submit",
@@ -4926,7 +5118,7 @@ function AddRecordForm({
4926
5118
  children: busy ? "Saving\u2026" : "Save"
4927
5119
  }
4928
5120
  ),
4929
- /* @__PURE__ */ jsx11(
5121
+ /* @__PURE__ */ jsx12(
4930
5122
  "button",
4931
5123
  {
4932
5124
  type: "button",
@@ -4947,7 +5139,7 @@ function DraftField({ column, id, value, invalid, describedBy, onValue }) {
4947
5139
  "aria-describedby": describedBy
4948
5140
  };
4949
5141
  if (column.kind === "boolean") {
4950
- return /* @__PURE__ */ jsx11(
5142
+ return /* @__PURE__ */ jsx12(
4951
5143
  "input",
4952
5144
  {
4953
5145
  ...shared,
@@ -4959,7 +5151,7 @@ function DraftField({ column, id, value, invalid, describedBy, onValue }) {
4959
5151
  );
4960
5152
  }
4961
5153
  if (column.kind === "select") {
4962
- return /* @__PURE__ */ jsxs9(
5154
+ return /* @__PURE__ */ jsxs10(
4963
5155
  "select",
4964
5156
  {
4965
5157
  ...shared,
@@ -4967,14 +5159,14 @@ function DraftField({ column, id, value, invalid, describedBy, onValue }) {
4967
5159
  value: typeof value === "string" ? value : "",
4968
5160
  onChange: (event) => onValue(event.target.value === "" ? null : event.target.value),
4969
5161
  children: [
4970
- /* @__PURE__ */ jsx11("option", { value: "", children: "\u2014" }),
4971
- column.options.map((option) => /* @__PURE__ */ jsx11("option", { value: option.value, children: option.label }, option.value))
5162
+ /* @__PURE__ */ jsx12("option", { value: "", children: "\u2014" }),
5163
+ column.options.map((option) => /* @__PURE__ */ jsx12("option", { value: option.value, children: option.label }, option.value))
4972
5164
  ]
4973
5165
  }
4974
5166
  );
4975
5167
  }
4976
5168
  if (column.kind === "text" && column.multiline === true) {
4977
- return /* @__PURE__ */ jsx11(
5169
+ return /* @__PURE__ */ jsx12(
4978
5170
  "textarea",
4979
5171
  {
4980
5172
  ...shared,
@@ -4986,7 +5178,7 @@ function DraftField({ column, id, value, invalid, describedBy, onValue }) {
4986
5178
  );
4987
5179
  }
4988
5180
  if (column.kind === "number" || column.kind === "currency") {
4989
- return /* @__PURE__ */ jsx11(
5181
+ return /* @__PURE__ */ jsx12(
4990
5182
  "input",
4991
5183
  {
4992
5184
  ...shared,
@@ -5006,7 +5198,7 @@ function DraftField({ column, id, value, invalid, describedBy, onValue }) {
5006
5198
  }
5007
5199
  );
5008
5200
  }
5009
- return /* @__PURE__ */ jsx11(
5201
+ return /* @__PURE__ */ jsx12(
5010
5202
  "input",
5011
5203
  {
5012
5204
  ...shared,
@@ -5028,11 +5220,11 @@ import {
5028
5220
  useState as useState14
5029
5221
  } from "react";
5030
5222
  import { createPortal } from "react-dom";
5031
- import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
5223
+ import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
5032
5224
  function SearchGlyph({ className }) {
5033
- return /* @__PURE__ */ jsxs10("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
5034
- /* @__PURE__ */ jsx12("circle", { cx: "11", cy: "11", r: "8" }),
5035
- /* @__PURE__ */ jsx12("path", { d: "m21 21-4.3-4.3" })
5225
+ return /* @__PURE__ */ jsxs11("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
5226
+ /* @__PURE__ */ jsx13("circle", { cx: "11", cy: "11", r: "8" }),
5227
+ /* @__PURE__ */ jsx13("path", { d: "m21 21-4.3-4.3" })
5036
5228
  ] });
5037
5229
  }
5038
5230
  function CommandPalette({
@@ -5119,8 +5311,8 @@ function CommandPalette({
5119
5311
  if (!open || typeof document === "undefined") return null;
5120
5312
  let rowIndex = -1;
5121
5313
  return createPortal(
5122
- /* @__PURE__ */ jsxs10(Fragment6, { children: [
5123
- /* @__PURE__ */ jsx12(
5314
+ /* @__PURE__ */ jsxs11(Fragment6, { children: [
5315
+ /* @__PURE__ */ jsx13(
5124
5316
  "div",
5125
5317
  {
5126
5318
  "aria-hidden": true,
@@ -5129,7 +5321,7 @@ function CommandPalette({
5129
5321
  className: "fixed inset-0 z-[999] bg-background/80"
5130
5322
  }
5131
5323
  ),
5132
- /* @__PURE__ */ jsx12("div", { className: "pointer-events-none fixed inset-x-0 top-[15%] z-[1000] flex justify-center px-4", children: /* @__PURE__ */ jsxs10(
5324
+ /* @__PURE__ */ jsx13("div", { className: "pointer-events-none fixed inset-x-0 top-[15%] z-[1000] flex justify-center px-4", children: /* @__PURE__ */ jsxs11(
5133
5325
  "div",
5134
5326
  {
5135
5327
  role: "dialog",
@@ -5138,9 +5330,9 @@ function CommandPalette({
5138
5330
  ...{ [POPOVER_SURFACE_ATTR]: surfaceId },
5139
5331
  className: `agent-pop-in pointer-events-auto flex max-h-[70vh] w-[560px] max-w-full flex-col overflow-hidden rounded-xl border border-card-edge bg-popover ${OVERLAY_SHADOW}`,
5140
5332
  children: [
5141
- /* @__PURE__ */ jsxs10("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-3 py-2.5", children: [
5142
- /* @__PURE__ */ jsx12(SearchGlyph, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
5143
- /* @__PURE__ */ jsx12(
5333
+ /* @__PURE__ */ jsxs11("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-3 py-2.5", children: [
5334
+ /* @__PURE__ */ jsx13(SearchGlyph, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
5335
+ /* @__PURE__ */ jsx13(
5144
5336
  "input",
5145
5337
  {
5146
5338
  ref: inputRef,
@@ -5161,15 +5353,15 @@ function CommandPalette({
5161
5353
  }
5162
5354
  )
5163
5355
  ] }),
5164
- /* @__PURE__ */ jsxs10("div", { role: "listbox", id: listId, className: "min-h-0 flex-1 overflow-y-auto p-1 pb-2", children: [
5165
- loading && /* @__PURE__ */ jsx12("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "Loading\u2026" }),
5166
- !loading && flat.length === 0 && /* @__PURE__ */ jsx12("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: emptyMessage ?? (query.trim() ? `No results for \u201C${query.trim()}\u201D` : "Nothing here yet") }),
5167
- !loading && sections.map((section) => /* @__PURE__ */ jsxs10("div", { children: [
5168
- /* @__PURE__ */ jsx12("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: section.group }),
5356
+ /* @__PURE__ */ jsxs11("div", { role: "listbox", id: listId, className: "min-h-0 flex-1 overflow-y-auto p-1 pb-2", children: [
5357
+ loading && /* @__PURE__ */ jsx13("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "Loading\u2026" }),
5358
+ !loading && flat.length === 0 && /* @__PURE__ */ jsx13("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: emptyMessage ?? (query.trim() ? `No results for \u201C${query.trim()}\u201D` : "Nothing here yet") }),
5359
+ !loading && sections.map((section) => /* @__PURE__ */ jsxs11("div", { children: [
5360
+ /* @__PURE__ */ jsx13("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: section.group }),
5169
5361
  section.items.map((item) => {
5170
5362
  rowIndex += 1;
5171
5363
  const index = rowIndex;
5172
- return /* @__PURE__ */ jsxs10(
5364
+ return /* @__PURE__ */ jsxs11(
5173
5365
  "div",
5174
5366
  {
5175
5367
  id: `${listId}-${index}`,
@@ -5179,9 +5371,9 @@ function CommandPalette({
5179
5371
  onClick: () => choose(item),
5180
5372
  className: `flex w-full cursor-pointer items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm ${index === activeIndex ? "bg-accent" : ""}`,
5181
5373
  children: [
5182
- /* @__PURE__ */ jsx12("span", { className: "truncate text-foreground", children: item.label }),
5183
- item.description && /* @__PURE__ */ jsx12("span", { className: "truncate text-xs text-muted-foreground", children: item.description }),
5184
- item.hint && /* @__PURE__ */ jsx12("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-muted-foreground", children: item.hint })
5374
+ /* @__PURE__ */ jsx13("span", { className: "truncate text-foreground", children: item.label }),
5375
+ item.description && /* @__PURE__ */ jsx13("span", { className: "truncate text-xs text-muted-foreground", children: item.description }),
5376
+ item.hint && /* @__PURE__ */ jsx13("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-muted-foreground", children: item.hint })
5185
5377
  ]
5186
5378
  },
5187
5379
  item.id
@@ -5189,15 +5381,15 @@ function CommandPalette({
5189
5381
  })
5190
5382
  ] }, section.group))
5191
5383
  ] }),
5192
- /* @__PURE__ */ jsxs10("div", { className: "flex shrink-0 items-center justify-between border-t border-border px-3 py-2 text-xs text-muted-foreground", children: [
5193
- /* @__PURE__ */ jsx12("span", { className: "tabular-nums", children: query.trim() ? `${flat.length} of ${items.length}` : `${items.length} items` }),
5194
- /* @__PURE__ */ jsxs10("span", { className: "flex items-center gap-1.5", children: [
5195
- /* @__PURE__ */ jsx12("kbd", { className: "rounded border border-border bg-background px-1 py-0.5", children: "\u2191\u2193" }),
5196
- /* @__PURE__ */ jsx12("span", { children: "navigate" }),
5197
- /* @__PURE__ */ jsx12("kbd", { className: "ml-1.5 rounded border border-border bg-background px-1 py-0.5", children: "\u21B5" }),
5198
- /* @__PURE__ */ jsx12("span", { children: "select" }),
5199
- /* @__PURE__ */ jsx12("kbd", { className: "ml-1.5 rounded border border-border bg-background px-1 py-0.5", children: "esc" }),
5200
- /* @__PURE__ */ jsx12("span", { children: "close" })
5384
+ /* @__PURE__ */ jsxs11("div", { className: "flex shrink-0 items-center justify-between border-t border-border px-3 py-2 text-xs text-muted-foreground", children: [
5385
+ /* @__PURE__ */ jsx13("span", { className: "tabular-nums", children: query.trim() ? `${flat.length} of ${items.length}` : `${items.length} items` }),
5386
+ /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-1.5", children: [
5387
+ /* @__PURE__ */ jsx13("kbd", { className: "rounded border border-border bg-background px-1 py-0.5", children: "\u2191\u2193" }),
5388
+ /* @__PURE__ */ jsx13("span", { children: "navigate" }),
5389
+ /* @__PURE__ */ jsx13("kbd", { className: "ml-1.5 rounded border border-border bg-background px-1 py-0.5", children: "\u21B5" }),
5390
+ /* @__PURE__ */ jsx13("span", { children: "select" }),
5391
+ /* @__PURE__ */ jsx13("kbd", { className: "ml-1.5 rounded border border-border bg-background px-1 py-0.5", children: "esc" }),
5392
+ /* @__PURE__ */ jsx13("span", { children: "close" })
5201
5393
  ] })
5202
5394
  ] })
5203
5395
  ]
@@ -5209,7 +5401,7 @@ function CommandPalette({
5209
5401
  }
5210
5402
 
5211
5403
  // src/web-react/sparkline.tsx
5212
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
5404
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
5213
5405
  var DEFAULT_SPARKLINE_WIDTH = 96;
5214
5406
  var DEFAULT_SPARKLINE_HEIGHT = 24;
5215
5407
  var DEFAULT_INSET = 2.5;
@@ -5315,21 +5507,21 @@ function Sparkline({
5315
5507
  const geometry = sparklineGeometry(values, { width, height });
5316
5508
  const accessibleName = sparklineLabel(values, { label, format });
5317
5509
  if (geometry.points.length === 0) {
5318
- return /* @__PURE__ */ jsxs11(
5510
+ return /* @__PURE__ */ jsxs12(
5319
5511
  "span",
5320
5512
  {
5321
5513
  "data-sparkline": geometry.gaps > 0 ? "unavailable" : "empty",
5322
5514
  className: joinClasses("text-[11px] text-muted-foreground", className),
5323
5515
  children: [
5324
- /* @__PURE__ */ jsx13("span", { className: "sr-only", children: accessibleName }),
5325
- /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: geometry.gaps > 0 ? unavailableLabel : emptyLabel })
5516
+ /* @__PURE__ */ jsx14("span", { className: "sr-only", children: accessibleName }),
5517
+ /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: geometry.gaps > 0 ? unavailableLabel : emptyLabel })
5326
5518
  ]
5327
5519
  }
5328
5520
  );
5329
5521
  }
5330
5522
  const drawsLine = geometry.segments.some((segment) => segment.length > 1);
5331
5523
  const end = geometry.points[geometry.points.length - 1];
5332
- return /* @__PURE__ */ jsxs11(
5524
+ return /* @__PURE__ */ jsxs12(
5333
5525
  "svg",
5334
5526
  {
5335
5527
  role: "img",
@@ -5346,7 +5538,7 @@ function Sparkline({
5346
5538
  geometry.segments.map((segment, index) => {
5347
5539
  const key = `segment-${index}`;
5348
5540
  if (segment.length > 1) {
5349
- return /* @__PURE__ */ jsx13(
5541
+ return /* @__PURE__ */ jsx14(
5350
5542
  "polyline",
5351
5543
  {
5352
5544
  points: sparklinePointsAttribute(segment),
@@ -5362,9 +5554,9 @@ function Sparkline({
5362
5554
  }
5363
5555
  const only = segment[0];
5364
5556
  if (only.x === end.x && only.y === end.y) return null;
5365
- return /* @__PURE__ */ jsx13("circle", { cx: only.x, cy: only.y, r: DOT_RADIUS, fill: "currentColor" }, key);
5557
+ return /* @__PURE__ */ jsx14("circle", { cx: only.x, cy: only.y, r: DOT_RADIUS, fill: "currentColor" }, key);
5366
5558
  }),
5367
- /* @__PURE__ */ jsx13("circle", { cx: end.x, cy: end.y, r: DOT_RADIUS, fill: "currentColor" })
5559
+ /* @__PURE__ */ jsx14("circle", { cx: end.x, cy: end.y, r: DOT_RADIUS, fill: "currentColor" })
5368
5560
  ]
5369
5561
  }
5370
5562
  );
@@ -5378,7 +5570,7 @@ import {
5378
5570
  useRef as useRef10,
5379
5571
  useState as useState15
5380
5572
  } from "react";
5381
- import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
5573
+ import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
5382
5574
  function insightDelta(value, previous) {
5383
5575
  if (typeof value !== "number" || !Number.isFinite(value)) return null;
5384
5576
  if (typeof previous !== "number" || !Number.isFinite(previous)) return null;
@@ -5431,7 +5623,7 @@ function InsightCard({
5431
5623
  const tone = delta ? insightDeltaTone(delta.direction, polarity) : "neutral";
5432
5624
  const unavailable = typeof value === "number" && !Number.isFinite(value);
5433
5625
  const shown = typeof value === "number" ? format(value) : value;
5434
- return /* @__PURE__ */ jsxs12(
5626
+ return /* @__PURE__ */ jsxs13(
5435
5627
  "article",
5436
5628
  {
5437
5629
  "data-insight-card": "",
@@ -5439,40 +5631,40 @@ function InsightCard({
5439
5631
  className: joinClasses("agent-arrive flex h-full flex-col rounded-xl border border-card-edge bg-card p-4", className),
5440
5632
  style,
5441
5633
  children: [
5442
- eyebrow ? /* @__PURE__ */ jsx14("p", { "data-insight-eyebrow": "", className: "mb-0.5 text-[11px] font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: eyebrow }) : null,
5443
- /* @__PURE__ */ jsxs12("div", { className: "flex items-baseline justify-between gap-2", children: [
5444
- /* @__PURE__ */ jsx14("h3", { className: "text-[13px] font-medium text-muted-foreground", children: title }),
5634
+ eyebrow ? /* @__PURE__ */ jsx15("p", { "data-insight-eyebrow": "", className: "mb-0.5 text-[11px] font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: eyebrow }) : null,
5635
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-baseline justify-between gap-2", children: [
5636
+ /* @__PURE__ */ jsx15("h3", { className: "text-[13px] font-medium text-muted-foreground", children: title }),
5445
5637
  live ? (
5446
5638
  // No `data-motion` opt-out: the word is the signal and the sweep is
5447
5639
  // emphasis, so the reduced-motion floor reaches this like everything
5448
5640
  // else and leaves a static, legible label.
5449
- /* @__PURE__ */ jsx14("span", { className: "agent-shimmer shrink-0 text-[11px] font-medium", "data-insight-live": "", children: liveLabel })
5641
+ /* @__PURE__ */ jsx15("span", { className: "agent-shimmer shrink-0 text-[11px] font-medium", "data-insight-live": "", children: liveLabel })
5450
5642
  ) : null
5451
5643
  ] }),
5452
- /* @__PURE__ */ jsx14("p", { className: "mt-1 flex items-baseline gap-1", children: unavailable ? /* @__PURE__ */ jsxs12("span", { "data-insight-value": "unavailable", className: "text-xl font-semibold text-muted-foreground", children: [
5453
- /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: INSIGHT_UNAVAILABLE_GLYPH }),
5454
- /* @__PURE__ */ jsx14("span", { className: "sr-only", children: INSIGHT_UNAVAILABLE_LABEL })
5455
- ] }) : /* @__PURE__ */ jsxs12(Fragment7, { children: [
5456
- /* @__PURE__ */ jsx14("span", { className: "text-xl font-semibold tabular-nums text-foreground", children: shown }),
5457
- unit ? /* @__PURE__ */ jsx14("span", { className: "text-[11px] text-muted-foreground", children: unit }) : null
5644
+ /* @__PURE__ */ jsx15("p", { className: "mt-1 flex items-baseline gap-1", children: unavailable ? /* @__PURE__ */ jsxs13("span", { "data-insight-value": "unavailable", className: "text-xl font-semibold text-muted-foreground", children: [
5645
+ /* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: INSIGHT_UNAVAILABLE_GLYPH }),
5646
+ /* @__PURE__ */ jsx15("span", { className: "sr-only", children: INSIGHT_UNAVAILABLE_LABEL })
5647
+ ] }) : /* @__PURE__ */ jsxs13(Fragment7, { children: [
5648
+ /* @__PURE__ */ jsx15("span", { className: "text-xl font-semibold tabular-nums text-foreground", children: shown }),
5649
+ unit ? /* @__PURE__ */ jsx15("span", { className: "text-[11px] text-muted-foreground", children: unit }) : null
5458
5650
  ] }) }),
5459
- delta ? /* @__PURE__ */ jsxs12("p", { "data-insight-delta": delta.direction, className: `mt-0.5 text-[11px] font-medium ${TONE_CLASS[tone]}`, children: [
5460
- /* @__PURE__ */ jsxs12("span", { "aria-hidden": "true", children: [
5651
+ delta ? /* @__PURE__ */ jsxs13("p", { "data-insight-delta": delta.direction, className: `mt-0.5 text-[11px] font-medium ${TONE_CLASS[tone]}`, children: [
5652
+ /* @__PURE__ */ jsxs13("span", { "aria-hidden": "true", children: [
5461
5653
  DIRECTION_GLYPH[delta.direction],
5462
5654
  " "
5463
5655
  ] }),
5464
5656
  formatInsightDelta(delta, format)
5465
5657
  ] }) : null,
5466
- description ? /* @__PURE__ */ jsx14("p", { className: "mt-1 text-[11px] text-muted-foreground", children: description }) : null,
5467
- series ? /* @__PURE__ */ jsx14("div", { className: "mt-2 text-muted-foreground", children: /* @__PURE__ */ jsx14(Sparkline, { values: series, label: seriesLabel ?? title, format }) }) : null,
5468
- action ? /* @__PURE__ */ jsx14("div", { className: "mt-3", children: renderInsightAction(action) }) : null
5658
+ description ? /* @__PURE__ */ jsx15("p", { className: "mt-1 text-[11px] text-muted-foreground", children: description }) : null,
5659
+ series ? /* @__PURE__ */ jsx15("div", { className: "mt-2 text-muted-foreground", children: /* @__PURE__ */ jsx15(Sparkline, { values: series, label: seriesLabel ?? title, format }) }) : null,
5660
+ action ? /* @__PURE__ */ jsx15("div", { className: "mt-3", children: renderInsightAction(action) }) : null
5469
5661
  ]
5470
5662
  }
5471
5663
  );
5472
5664
  }
5473
5665
  function renderInsightAction(action) {
5474
5666
  if (isValidElement2(action)) return action;
5475
- return /* @__PURE__ */ jsx14(
5667
+ return /* @__PURE__ */ jsx15(
5476
5668
  "button",
5477
5669
  {
5478
5670
  type: "button",
@@ -5557,7 +5749,7 @@ function InsightDeck({
5557
5749
  },
5558
5750
  [onPageChange]
5559
5751
  );
5560
- return /* @__PURE__ */ jsx14(
5752
+ return /* @__PURE__ */ jsx15(
5561
5753
  AsyncView,
5562
5754
  {
5563
5755
  state: shown,
@@ -5565,7 +5757,7 @@ function InsightDeck({
5565
5757
  loadingLabel,
5566
5758
  retryLabel,
5567
5759
  className,
5568
- children: (insights) => /* @__PURE__ */ jsx14(
5760
+ children: (insights) => /* @__PURE__ */ jsx15(
5569
5761
  InsightPages,
5570
5762
  {
5571
5763
  insights,
@@ -5678,7 +5870,7 @@ function InsightPages({
5678
5870
  }
5679
5871
  if (moved) event.preventDefault();
5680
5872
  };
5681
- return /* @__PURE__ */ jsxs12(
5873
+ return /* @__PURE__ */ jsxs13(
5682
5874
  "section",
5683
5875
  {
5684
5876
  ref: sectionRef,
@@ -5690,7 +5882,7 @@ function InsightPages({
5690
5882
  tabIndex: pageCount > 1 ? 0 : void 0,
5691
5883
  "aria-keyshortcuts": pageCount > 1 ? "ArrowLeft ArrowRight PageUp PageDown Home End" : void 0,
5692
5884
  children: [
5693
- /* @__PURE__ */ jsx14("ul", { ref: listRef, className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3", children: visible.map(({ id, style, ...card }, index) => (
5885
+ /* @__PURE__ */ jsx15("ul", { ref: listRef, className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3", children: visible.map(({ id, style, ...card }, index) => (
5694
5886
  // The page index is in the key on purpose: a page turn is an arrival,
5695
5887
  // and reusing the node would swap the text under a card that never
5696
5888
  // moved. Remounting replays `.agent-arrive` with the new stagger.
@@ -5701,10 +5893,10 @@ function InsightPages({
5701
5893
  // does not arrive a second time. The key does BOTH jobs — but only
5702
5894
  // because the deck now keeps this subtree mounted across a reload
5703
5895
  // (see `InsightDeck`); a key is never compared across a teardown.
5704
- /* @__PURE__ */ jsx14("li", { children: /* @__PURE__ */ jsx14(InsightCard, { ...card, style: staggerStyle(index, style) }) }, `${current}:${id}`)
5896
+ /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsx15(InsightCard, { ...card, style: staggerStyle(index, style) }) }, `${current}:${id}`)
5705
5897
  )) }),
5706
- /* @__PURE__ */ jsxs12("div", { className: pageCount > 1 ? "flex items-center justify-between gap-2" : void 0, children: [
5707
- /* @__PURE__ */ jsxs12(
5898
+ /* @__PURE__ */ jsxs13("div", { className: pageCount > 1 ? "flex items-center justify-between gap-2" : void 0, children: [
5899
+ /* @__PURE__ */ jsxs13(
5708
5900
  "p",
5709
5901
  {
5710
5902
  role: "status",
@@ -5718,8 +5910,8 @@ function InsightPages({
5718
5910
  ]
5719
5911
  }
5720
5912
  ),
5721
- pageCount > 1 ? /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-1", children: [
5722
- /* @__PURE__ */ jsx14(PagerButton, { label: "Previous insights", glyph: "\u2039", atEnd: current === 0, onClick: () => goTo(current - 1) }),
5913
+ pageCount > 1 ? /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1", children: [
5914
+ /* @__PURE__ */ jsx15(PagerButton, { label: "Previous insights", glyph: "\u2039", atEnd: current === 0, onClick: () => goTo(current - 1) }),
5723
5915
  pageCount <= MAX_PAGE_DOTS ? Array.from({ length: pageCount }, (_, index) => (
5724
5916
  // WCAG 2.2 SC 2.5.8 wants a 24x24 CSS px target. The dot stays
5725
5917
  // 8px because a 24px dot is a different control; the BUTTON
@@ -5727,7 +5919,7 @@ function InsightPages({
5727
5919
  // and the span is the graphic. The Spacing exception cannot
5728
5920
  // rescue the bare dot — at a 12px pitch the 24px circle around
5729
5921
  // each centre overlaps its neighbour's.
5730
- /* @__PURE__ */ jsx14(
5922
+ /* @__PURE__ */ jsx15(
5731
5923
  "button",
5732
5924
  {
5733
5925
  type: "button",
@@ -5735,7 +5927,7 @@ function InsightPages({
5735
5927
  "aria-current": index === current ? "page" : void 0,
5736
5928
  onClick: () => goTo(index),
5737
5929
  className: "group flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
5738
- children: /* @__PURE__ */ jsx14(
5930
+ children: /* @__PURE__ */ jsx15(
5739
5931
  "span",
5740
5932
  {
5741
5933
  "aria-hidden": "true",
@@ -5749,7 +5941,7 @@ function InsightPages({
5749
5941
  index
5750
5942
  )
5751
5943
  )) : null,
5752
- /* @__PURE__ */ jsx14(
5944
+ /* @__PURE__ */ jsx15(
5753
5945
  PagerButton,
5754
5946
  {
5755
5947
  label: "Next insights",
@@ -5770,7 +5962,7 @@ function PagerButton({
5770
5962
  atEnd,
5771
5963
  onClick
5772
5964
  }) {
5773
- return /* @__PURE__ */ jsx14(
5965
+ return /* @__PURE__ */ jsx15(
5774
5966
  "button",
5775
5967
  {
5776
5968
  type: "button",
@@ -5780,14 +5972,14 @@ function PagerButton({
5780
5972
  if (!atEnd) onClick();
5781
5973
  },
5782
5974
  className: `flex h-6 w-6 items-center justify-center rounded-md border border-border text-xs text-muted-foreground transition ${atEnd ? "opacity-40" : "hover:bg-accent hover:text-foreground"}`,
5783
- children: /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: glyph })
5975
+ children: /* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: glyph })
5784
5976
  }
5785
5977
  );
5786
5978
  }
5787
5979
 
5788
5980
  // src/web-react/api-access-panel.tsx
5789
5981
  import { useEffect as useEffect12, useRef as useRef11, useState as useState16 } from "react";
5790
- import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
5982
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
5791
5983
  var defaultExpiryChoices = [1, 7, 30];
5792
5984
  var inputClass = "h-11 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground";
5793
5985
  var buttonClass = "inline-flex items-center justify-center rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground disabled:opacity-50";
@@ -5905,20 +6097,20 @@ function ApiAccessPanel({
5905
6097
  setRevoking(null);
5906
6098
  }
5907
6099
  }
5908
- return /* @__PURE__ */ jsx15("main", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxs13("div", { className: "mx-auto max-w-2xl space-y-8 px-4 py-8 sm:px-8", children: [
5909
- /* @__PURE__ */ jsxs13("div", { className: "space-y-2", children: [
5910
- accountHref && /* @__PURE__ */ jsx15("a", { href: accountHref, className: "text-sm text-muted-foreground hover:text-foreground", children: "Account" }),
5911
- /* @__PURE__ */ jsx15("h1", { className: "text-2xl font-semibold text-foreground", children: "API access" }),
5912
- /* @__PURE__ */ jsx15("p", { className: "text-sm text-muted-foreground", children: description ?? "Connect a client to your account. Each key acts with your permissions and only the access you choose." })
6100
+ return /* @__PURE__ */ jsx16("main", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxs14("div", { className: "mx-auto max-w-2xl space-y-8 px-4 py-8 sm:px-8", children: [
6101
+ /* @__PURE__ */ jsxs14("div", { className: "space-y-2", children: [
6102
+ accountHref && /* @__PURE__ */ jsx16("a", { href: accountHref, className: "text-sm text-muted-foreground hover:text-foreground", children: "Account" }),
6103
+ /* @__PURE__ */ jsx16("h1", { className: "text-2xl font-semibold text-foreground", children: "API access" }),
6104
+ /* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground", children: description ?? "Connect a client to your account. Each key acts with your permissions and only the access you choose." })
5913
6105
  ] }),
5914
- error && /* @__PURE__ */ jsx15("p", { role: "alert", className: "rounded-lg border border-destructive/40 p-3 text-sm text-destructive", children: error }),
5915
- notice && /* @__PURE__ */ jsx15("p", { role: "status", className: "text-sm text-muted-foreground", children: notice }),
5916
- created ? /* @__PURE__ */ jsxs13("section", { "aria-labelledby": "save-api-key", className: "space-y-4 rounded-xl border border-border bg-card p-5", children: [
5917
- /* @__PURE__ */ jsx15("h2", { ref: keyHeading, tabIndex: -1, id: "save-api-key", className: "font-medium outline-none", children: "Save your key" }),
5918
- /* @__PURE__ */ jsx15("p", { className: "text-sm text-muted-foreground", children: "Copy it directly into your client\u2019s secret storage. It is shown only now. Keep it out of chat messages and prompts." }),
5919
- /* @__PURE__ */ jsxs13("div", { className: "flex gap-2", children: [
5920
- /* @__PURE__ */ jsx15("input", { "aria-label": "New API key", type: "password", value: created.key, readOnly: true, autoComplete: "off", className: `${inputClass} min-w-0 font-mono` }),
5921
- /* @__PURE__ */ jsx15("button", { className: buttonClass, onClick: async () => {
6106
+ error && /* @__PURE__ */ jsx16("p", { role: "alert", className: "rounded-lg border border-destructive/40 p-3 text-sm text-destructive", children: error }),
6107
+ notice && /* @__PURE__ */ jsx16("p", { role: "status", className: "text-sm text-muted-foreground", children: notice }),
6108
+ created ? /* @__PURE__ */ jsxs14("section", { "aria-labelledby": "save-api-key", className: "space-y-4 rounded-xl border border-border bg-card p-5", children: [
6109
+ /* @__PURE__ */ jsx16("h2", { ref: keyHeading, tabIndex: -1, id: "save-api-key", className: "font-medium outline-none", children: "Save your key" }),
6110
+ /* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground", children: "Copy it directly into your client\u2019s secret storage. It is shown only now. Keep it out of chat messages and prompts." }),
6111
+ /* @__PURE__ */ jsxs14("div", { className: "flex gap-2", children: [
6112
+ /* @__PURE__ */ jsx16("input", { "aria-label": "New API key", type: "password", value: created.key, readOnly: true, autoComplete: "off", className: `${inputClass} min-w-0 font-mono` }),
6113
+ /* @__PURE__ */ jsx16("button", { className: buttonClass, onClick: async () => {
5922
6114
  try {
5923
6115
  await navigator.clipboard.writeText(created.key);
5924
6116
  setNotice("Key copied");
@@ -5927,32 +6119,32 @@ function ApiAccessPanel({
5927
6119
  }
5928
6120
  }, children: "Copy key" })
5929
6121
  ] }),
5930
- /* @__PURE__ */ jsx15("button", { className: outlineClass, onClick: () => {
6122
+ /* @__PURE__ */ jsx16("button", { className: outlineClass, onClick: () => {
5931
6123
  setCreated(null);
5932
6124
  setNotice(null);
5933
6125
  }, children: "I\u2019ve saved it" })
5934
- ] }) : /* @__PURE__ */ jsxs13("form", { onSubmit: createKey, className: "space-y-5 rounded-xl border border-border bg-card p-5", children: [
5935
- /* @__PURE__ */ jsx15("h2", { className: "font-medium", children: "Create a key" }),
5936
- /* @__PURE__ */ jsxs13("div", { className: "grid gap-4 sm:grid-cols-[1fr_10rem]", children: [
5937
- /* @__PURE__ */ jsxs13("div", { className: "space-y-1.5", children: [
5938
- /* @__PURE__ */ jsx15("label", { className: "text-sm font-medium", htmlFor: "key-name", children: "Name" }),
5939
- /* @__PURE__ */ jsx15("input", { ref: nameInput, id: "key-name", className: inputClass, value: name, onChange: (event) => setName(event.target.value), placeholder: "Client on my server", maxLength: 100, required: true, autoComplete: "off" })
6126
+ ] }) : /* @__PURE__ */ jsxs14("form", { onSubmit: createKey, className: "space-y-5 rounded-xl border border-border bg-card p-5", children: [
6127
+ /* @__PURE__ */ jsx16("h2", { className: "font-medium", children: "Create a key" }),
6128
+ /* @__PURE__ */ jsxs14("div", { className: "grid gap-4 sm:grid-cols-[1fr_10rem]", children: [
6129
+ /* @__PURE__ */ jsxs14("div", { className: "space-y-1.5", children: [
6130
+ /* @__PURE__ */ jsx16("label", { className: "text-sm font-medium", htmlFor: "key-name", children: "Name" }),
6131
+ /* @__PURE__ */ jsx16("input", { ref: nameInput, id: "key-name", className: inputClass, value: name, onChange: (event) => setName(event.target.value), placeholder: "Client on my server", maxLength: 100, required: true, autoComplete: "off" })
5940
6132
  ] }),
5941
- /* @__PURE__ */ jsxs13("div", { className: "space-y-1.5", children: [
5942
- /* @__PURE__ */ jsx15("label", { className: "text-sm font-medium", htmlFor: "key-expiry", children: "Expires in" }),
5943
- /* @__PURE__ */ jsx15("select", { id: "key-expiry", value: selectedDays ?? "", onChange: (event) => setDays(Number(event.target.value)), className: "h-11 w-full rounded-lg border border-input bg-background px-3 text-sm", children: allowedDays.map((days2) => /* @__PURE__ */ jsxs13("option", { value: days2, children: [
6133
+ /* @__PURE__ */ jsxs14("div", { className: "space-y-1.5", children: [
6134
+ /* @__PURE__ */ jsx16("label", { className: "text-sm font-medium", htmlFor: "key-expiry", children: "Expires in" }),
6135
+ /* @__PURE__ */ jsx16("select", { id: "key-expiry", value: selectedDays ?? "", onChange: (event) => setDays(Number(event.target.value)), className: "h-11 w-full rounded-lg border border-input bg-background px-3 text-sm", children: allowedDays.map((days2) => /* @__PURE__ */ jsxs14("option", { value: days2, children: [
5944
6136
  days2,
5945
6137
  " ",
5946
6138
  days2 === 1 ? "day" : "days"
5947
6139
  ] }, days2)) })
5948
6140
  ] })
5949
6141
  ] }),
5950
- /* @__PURE__ */ jsxs13("fieldset", { className: "space-y-3", children: [
5951
- /* @__PURE__ */ jsx15("legend", { className: "mb-3 text-sm font-medium", children: "Permissions" }),
6142
+ /* @__PURE__ */ jsxs14("fieldset", { className: "space-y-3", children: [
6143
+ /* @__PURE__ */ jsx16("legend", { className: "mb-3 text-sm font-medium", children: "Permissions" }),
5952
6144
  access.map((option) => {
5953
6145
  const unavailable = !expandScopes([option.scope], access).includes(option.scope);
5954
- return /* @__PURE__ */ jsxs13("label", { className: "flex cursor-pointer items-start gap-3", children: [
5955
- /* @__PURE__ */ jsx15(
6146
+ return /* @__PURE__ */ jsxs14("label", { className: "flex cursor-pointer items-start gap-3", children: [
6147
+ /* @__PURE__ */ jsx16(
5956
6148
  "input",
5957
6149
  {
5958
6150
  type: "checkbox",
@@ -5962,38 +6154,38 @@ function ApiAccessPanel({
5962
6154
  onChange: (event) => setScopes((current) => event.target.checked ? expandScopes([...current, option.scope], access) : pruneScopes(current.filter((scope) => scope !== option.scope), access))
5963
6155
  }
5964
6156
  ),
5965
- /* @__PURE__ */ jsxs13("span", { className: "text-sm", children: [
5966
- /* @__PURE__ */ jsx15("span", { className: "block font-medium", children: option.label }),
5967
- /* @__PURE__ */ jsx15("span", { className: "text-muted-foreground", children: option.description }),
5968
- unavailable && /* @__PURE__ */ jsx15("span", { className: "block text-muted-foreground", children: "Required permission unavailable." })
6157
+ /* @__PURE__ */ jsxs14("span", { className: "text-sm", children: [
6158
+ /* @__PURE__ */ jsx16("span", { className: "block font-medium", children: option.label }),
6159
+ /* @__PURE__ */ jsx16("span", { className: "text-muted-foreground", children: option.description }),
6160
+ unavailable && /* @__PURE__ */ jsx16("span", { className: "block text-muted-foreground", children: "Required permission unavailable." })
5969
6161
  ] })
5970
6162
  ] }, option.scope);
5971
6163
  })
5972
6164
  ] }),
5973
- limitsDescription && /* @__PURE__ */ jsx15("p", { className: "text-xs text-muted-foreground", children: limitsDescription }),
5974
- /* @__PURE__ */ jsx15("button", { className: buttonClass, type: "submit", disabled: creating || !name.trim() || !selectedScopes.length || selectedDays === void 0, children: creating ? "Creating\u2026" : "Create key" })
6165
+ limitsDescription && /* @__PURE__ */ jsx16("p", { className: "text-xs text-muted-foreground", children: limitsDescription }),
6166
+ /* @__PURE__ */ jsx16("button", { className: buttonClass, type: "submit", disabled: creating || !name.trim() || !selectedScopes.length || selectedDays === void 0, children: creating ? "Creating\u2026" : "Create key" })
5975
6167
  ] }),
5976
- /* @__PURE__ */ jsxs13("section", { "aria-labelledby": "existing-keys", className: "space-y-3", children: [
5977
- /* @__PURE__ */ jsx15("h2", { id: "existing-keys", className: "font-medium", children: "Your keys" }),
5978
- keys.length === 0 ? /* @__PURE__ */ jsx15("p", { className: "text-sm text-muted-foreground", children: "No keys yet." }) : /* @__PURE__ */ jsx15("ul", { className: "divide-y divide-border rounded-xl border border-border bg-card", children: keys.map((key) => /* @__PURE__ */ jsxs13("li", { className: "flex items-start justify-between gap-3 p-4", children: [
5979
- /* @__PURE__ */ jsxs13("div", { className: "min-w-0 space-y-1", children: [
5980
- /* @__PURE__ */ jsx15("p", { className: "break-words text-sm font-medium", children: key.name }),
5981
- /* @__PURE__ */ jsx15("p", { className: "text-xs text-muted-foreground", children: key.expiresAt ? `${new Date(key.expiresAt).getTime() <= Date.now() ? "Expired" : "Expires"} ${new Date(key.expiresAt).toLocaleDateString()}` : "No expiry" }),
5982
- /* @__PURE__ */ jsx15("p", { className: "text-xs text-muted-foreground", children: key.scopes.map((scope) => access.find((access2) => access2.scope === scope)?.label ?? scope).join(" \xB7 ") })
6168
+ /* @__PURE__ */ jsxs14("section", { "aria-labelledby": "existing-keys", className: "space-y-3", children: [
6169
+ /* @__PURE__ */ jsx16("h2", { id: "existing-keys", className: "font-medium", children: "Your keys" }),
6170
+ keys.length === 0 ? /* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground", children: "No keys yet." }) : /* @__PURE__ */ jsx16("ul", { className: "divide-y divide-border rounded-xl border border-border bg-card", children: keys.map((key) => /* @__PURE__ */ jsxs14("li", { className: "flex items-start justify-between gap-3 p-4", children: [
6171
+ /* @__PURE__ */ jsxs14("div", { className: "min-w-0 space-y-1", children: [
6172
+ /* @__PURE__ */ jsx16("p", { className: "break-words text-sm font-medium", children: key.name }),
6173
+ /* @__PURE__ */ jsx16("p", { className: "text-xs text-muted-foreground", children: key.expiresAt ? `${new Date(key.expiresAt).getTime() <= Date.now() ? "Expired" : "Expires"} ${new Date(key.expiresAt).toLocaleDateString()}` : "No expiry" }),
6174
+ /* @__PURE__ */ jsx16("p", { className: "text-xs text-muted-foreground", children: key.scopes.map((scope) => access.find((access2) => access2.scope === scope)?.label ?? scope).join(" \xB7 ") })
5983
6175
  ] }),
5984
- /* @__PURE__ */ jsx15("button", { className: outlineClass, disabled: revoking !== null, onClick: () => revokeKey(key.id), "aria-label": `Revoke ${key.name}`, children: revoking === key.id ? "Revoking\u2026" : "Revoke" })
6176
+ /* @__PURE__ */ jsx16("button", { className: outlineClass, disabled: revoking !== null, onClick: () => revokeKey(key.id), "aria-label": `Revoke ${key.name}`, children: revoking === key.id ? "Revoking\u2026" : "Revoke" })
5985
6177
  ] }, key.id)) })
5986
6178
  ] }),
5987
- /* @__PURE__ */ jsxs13("p", { className: "text-sm text-muted-foreground", children: [
6179
+ /* @__PURE__ */ jsxs14("p", { className: "text-sm text-muted-foreground", children: [
5988
6180
  "Use ",
5989
- /* @__PURE__ */ jsx15("code", { className: "text-xs", children: baseUrl }),
6181
+ /* @__PURE__ */ jsx16("code", { className: "text-xs", children: baseUrl }),
5990
6182
  " as the API base and send the key as a Bearer credential."
5991
6183
  ] })
5992
6184
  ] }) });
5993
6185
  }
5994
6186
 
5995
6187
  // src/web-react/index.tsx
5996
- import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
6188
+ import { Fragment as Fragment8, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
5997
6189
  function formatModelCost(msg, models) {
5998
6190
  if (msg.promptTokens == null && msg.completionTokens == null) return null;
5999
6191
  const pricing = models.find((m) => m.id === msg.modelUsed)?.pricing;
@@ -6012,41 +6204,41 @@ function formatTokensPerSecond(msg) {
6012
6204
  return `${Math.round(msg.completionTokens / (msg.durationMs / 1e3))} tok/s`;
6013
6205
  }
6014
6206
  function RunDrillIn({ run, onClose }) {
6015
- return /* @__PURE__ */ jsxs14("div", { className: `fixed inset-y-0 right-0 z-50 flex w-[480px] max-w-full flex-col border-l border-card-edge bg-popover ${OVERLAY_SHADOW}`, children: [
6016
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 border-b border-border px-4 py-3", children: [
6017
- /* @__PURE__ */ jsx16(
6207
+ return /* @__PURE__ */ jsxs15("div", { className: `fixed inset-y-0 right-0 z-50 flex w-[480px] max-w-full flex-col border-l border-card-edge bg-popover ${OVERLAY_SHADOW}`, children: [
6208
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2 border-b border-border px-4 py-3", children: [
6209
+ /* @__PURE__ */ jsx17(
6018
6210
  "span",
6019
6211
  {
6020
6212
  className: `h-2 w-2 shrink-0 rounded-full ${run.status === "running" ? "bg-warning" : run.status === "error" ? "bg-destructive" : "bg-success"}`
6021
6213
  }
6022
6214
  ),
6023
- /* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
6024
- /* @__PURE__ */ jsx16("p", { className: "truncate text-[15px] font-semibold", children: run.title }),
6025
- /* @__PURE__ */ jsx16("p", { className: "truncate font-mono text-xs text-muted-foreground", children: run.toolName })
6215
+ /* @__PURE__ */ jsxs15("div", { className: "min-w-0 flex-1", children: [
6216
+ /* @__PURE__ */ jsx17("p", { className: "truncate text-[15px] font-semibold", children: run.title }),
6217
+ /* @__PURE__ */ jsx17("p", { className: "truncate font-mono text-xs text-muted-foreground", children: run.toolName })
6026
6218
  ] }),
6027
- /* @__PURE__ */ jsx16(
6219
+ /* @__PURE__ */ jsx17(
6028
6220
  "button",
6029
6221
  {
6030
6222
  type: "button",
6031
6223
  onClick: onClose,
6032
6224
  "aria-label": "Close",
6033
6225
  className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
6034
- children: /* @__PURE__ */ jsx16("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx16("path", { d: "M18 6 6 18M6 6l12 12" }) })
6226
+ children: /* @__PURE__ */ jsx17("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx17("path", { d: "M18 6 6 18M6 6l12 12" }) })
6035
6227
  }
6036
6228
  )
6037
6229
  ] }),
6038
- /* @__PURE__ */ jsxs14("div", { className: "flex-1 space-y-3 overflow-y-auto p-4", children: [
6039
- run.steps.length === 0 && /* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground", children: "No steps recorded yet." }),
6040
- run.steps.map((step, i) => /* @__PURE__ */ jsxs14("div", { className: "rounded-lg border border-card-edge bg-card", children: [
6041
- /* @__PURE__ */ jsxs14("div", { className: "flex items-baseline gap-2 border-b border-border px-3 py-1.5", children: [
6042
- /* @__PURE__ */ jsx16("span", { className: `font-mono text-xs ${step.status === "error" ? "text-destructive" : "text-muted-foreground"}`, children: step.status === "error" ? "\u2717" : "$" }),
6043
- /* @__PURE__ */ jsx16("code", { className: "min-w-0 flex-1 truncate font-mono text-xs", children: step.label }),
6044
- /* @__PURE__ */ jsx16("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: new Date(step.at).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }) })
6230
+ /* @__PURE__ */ jsxs15("div", { className: "flex-1 space-y-3 overflow-y-auto p-4", children: [
6231
+ run.steps.length === 0 && /* @__PURE__ */ jsx17("p", { className: "text-sm text-muted-foreground", children: "No steps recorded yet." }),
6232
+ run.steps.map((step, i) => /* @__PURE__ */ jsxs15("div", { className: "rounded-lg border border-card-edge bg-card", children: [
6233
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-baseline gap-2 border-b border-border px-3 py-1.5", children: [
6234
+ /* @__PURE__ */ jsx17("span", { className: `font-mono text-xs ${step.status === "error" ? "text-destructive" : "text-muted-foreground"}`, children: step.status === "error" ? "\u2717" : "$" }),
6235
+ /* @__PURE__ */ jsx17("code", { className: "min-w-0 flex-1 truncate font-mono text-xs", children: step.label }),
6236
+ /* @__PURE__ */ jsx17("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: new Date(step.at).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }) })
6045
6237
  ] }),
6046
- step.detail && /* @__PURE__ */ jsx16("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap px-3 py-2 font-mono text-xs leading-relaxed text-muted-foreground", children: step.detail })
6238
+ step.detail && /* @__PURE__ */ jsx17("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap px-3 py-2 font-mono text-xs leading-relaxed text-muted-foreground", children: step.detail })
6047
6239
  ] }, i))
6048
6240
  ] }),
6049
- /* @__PURE__ */ jsx16("p", { className: "border-t border-border px-4 py-2 text-xs text-muted-foreground", children: "Read-only transcript \u2014 reply in the main chat." })
6241
+ /* @__PURE__ */ jsx17("p", { className: "border-t border-border px-4 py-2 text-xs text-muted-foreground", children: "Read-only transcript \u2014 reply in the main chat." })
6050
6242
  ] });
6051
6243
  }
6052
6244
  function pendingApprovalOf(call) {
@@ -6062,23 +6254,23 @@ function ChatEmptyState({
6062
6254
  }) {
6063
6255
  const doorCount = Math.min(doors?.length ?? 0, 3);
6064
6256
  const doorsGridClass = doorCount === 1 ? "mx-auto max-w-sm sm:grid-cols-1" : doorCount === 2 ? "sm:grid-cols-2" : "sm:grid-cols-3";
6065
- return /* @__PURE__ */ jsxs14("div", { className: "mx-auto flex w-full max-w-2xl flex-col items-center px-6 py-12 text-center sm:py-20", children: [
6066
- /* @__PURE__ */ jsx16("span", { className: "mb-5 inline-flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10 ring-1 ring-primary/15", children: /* @__PURE__ */ jsx16(BrandMark, { size: 32, className: "shrink-0" }) }),
6067
- /* @__PURE__ */ jsx16("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: productName }),
6068
- /* @__PURE__ */ jsx16("h2", { className: "mt-1.5 text-balance text-2xl font-semibold leading-tight text-foreground", children: headline }),
6069
- subline && /* @__PURE__ */ jsx16("p", { className: "mt-3 max-w-md text-[15px] leading-relaxed text-muted-foreground", children: subline }),
6070
- doors && doors.length > 0 && /* @__PURE__ */ jsx16("div", { className: `mt-7 grid w-full gap-2.5 ${doorsGridClass}`, children: doors.slice(0, 3).map((door, i) => /* @__PURE__ */ jsxs14(
6257
+ return /* @__PURE__ */ jsxs15("div", { className: "mx-auto flex w-full max-w-2xl flex-col items-center px-6 py-12 text-center sm:py-20", children: [
6258
+ /* @__PURE__ */ jsx17("span", { className: "mb-5 inline-flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10 ring-1 ring-primary/15", children: /* @__PURE__ */ jsx17(BrandMark, { size: 32, className: "shrink-0" }) }),
6259
+ /* @__PURE__ */ jsx17("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: productName }),
6260
+ /* @__PURE__ */ jsx17("h2", { className: "mt-1.5 text-balance text-2xl font-semibold leading-tight text-foreground", children: headline }),
6261
+ subline && /* @__PURE__ */ jsx17("p", { className: "mt-3 max-w-md text-[15px] leading-relaxed text-muted-foreground", children: subline }),
6262
+ doors && doors.length > 0 && /* @__PURE__ */ jsx17("div", { className: `mt-7 grid w-full gap-2.5 ${doorsGridClass}`, children: doors.slice(0, 3).map((door, i) => /* @__PURE__ */ jsxs15(
6071
6263
  "button",
6072
6264
  {
6073
6265
  type: "button",
6074
6266
  onClick: door.onSelect,
6075
6267
  className: "group flex min-h-[44px] flex-col items-start rounded-xl border border-border bg-card px-4 py-3 text-left transition hover:border-primary/40 hover:bg-accent",
6076
6268
  children: [
6077
- /* @__PURE__ */ jsxs14("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
6269
+ /* @__PURE__ */ jsxs15("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
6078
6270
  door.icon,
6079
6271
  door.label
6080
6272
  ] }),
6081
- door.description && /* @__PURE__ */ jsx16("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
6273
+ door.description && /* @__PURE__ */ jsx17("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
6082
6274
  ]
6083
6275
  },
6084
6276
  i
@@ -6087,26 +6279,26 @@ function ChatEmptyState({
6087
6279
  }
6088
6280
  function ToolGlyph({ name, className }) {
6089
6281
  if (name.startsWith("sandbox_")) {
6090
- return /* @__PURE__ */ jsxs14("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6091
- /* @__PURE__ */ jsx16("polyline", { points: "4 17 10 11 4 5" }),
6092
- /* @__PURE__ */ jsx16("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
6282
+ return /* @__PURE__ */ jsxs15("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6283
+ /* @__PURE__ */ jsx17("polyline", { points: "4 17 10 11 4 5" }),
6284
+ /* @__PURE__ */ jsx17("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
6093
6285
  ] });
6094
6286
  }
6095
6287
  if (name === "submit_proposal") {
6096
- return /* @__PURE__ */ jsxs14("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6097
- /* @__PURE__ */ jsx16("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
6098
- /* @__PURE__ */ jsx16("path", { d: "M14 2v6h6M9 15l2 2 4-4" })
6288
+ return /* @__PURE__ */ jsxs15("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6289
+ /* @__PURE__ */ jsx17("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
6290
+ /* @__PURE__ */ jsx17("path", { d: "M14 2v6h6M9 15l2 2 4-4" })
6099
6291
  ] });
6100
6292
  }
6101
6293
  if (name === "schedule_followup") {
6102
- return /* @__PURE__ */ jsxs14("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: [
6103
- /* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "9" }),
6104
- /* @__PURE__ */ jsx16("path", { d: "M12 7v5l3 3" })
6294
+ return /* @__PURE__ */ jsxs15("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: [
6295
+ /* @__PURE__ */ jsx17("circle", { cx: "12", cy: "12", r: "9" }),
6296
+ /* @__PURE__ */ jsx17("path", { d: "M12 7v5l3 3" })
6105
6297
  ] });
6106
6298
  }
6107
- return /* @__PURE__ */ jsxs14("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6108
- /* @__PURE__ */ jsx16("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3" }),
6109
- /* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "4" })
6299
+ return /* @__PURE__ */ jsxs15("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6300
+ /* @__PURE__ */ jsx17("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3" }),
6301
+ /* @__PURE__ */ jsx17("circle", { cx: "12", cy: "12", r: "4" })
6110
6302
  ] });
6111
6303
  }
6112
6304
  function toolOutcomeOf(call) {
@@ -6192,40 +6384,40 @@ function truncate(v, max = 240) {
6192
6384
  function KvRows({ data }) {
6193
6385
  const entries = Object.entries(data).filter(([, v]) => v !== void 0 && v !== null && v !== "");
6194
6386
  if (!entries.length) return null;
6195
- return /* @__PURE__ */ jsx16("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1", children: entries.map(([k, v]) => /* @__PURE__ */ jsxs14("div", { className: "contents", children: [
6196
- /* @__PURE__ */ jsx16("dt", { className: "font-mono text-xs text-muted-foreground", children: k }),
6197
- /* @__PURE__ */ jsx16("dd", { className: "min-w-0 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground", children: truncate(v) })
6387
+ return /* @__PURE__ */ jsx17("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1", children: entries.map(([k, v]) => /* @__PURE__ */ jsxs15("div", { className: "contents", children: [
6388
+ /* @__PURE__ */ jsx17("dt", { className: "font-mono text-xs text-muted-foreground", children: k }),
6389
+ /* @__PURE__ */ jsx17("dd", { className: "min-w-0 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground", children: truncate(v) })
6198
6390
  ] }, k)) });
6199
6391
  }
6200
6392
  function ShellDetail({ call }) {
6201
6393
  const outcome = toolOutcomeOf(call);
6202
6394
  const r = outcome?.result ?? {};
6203
- return /* @__PURE__ */ jsxs14("div", { className: "overflow-hidden rounded-md bg-zinc-900 font-mono text-xs leading-relaxed", children: [
6204
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 px-3 pt-2 text-zinc-400", children: [
6205
- /* @__PURE__ */ jsx16("span", { className: "select-none text-zinc-500", children: "$" }),
6206
- /* @__PURE__ */ jsx16("span", { className: "min-w-0 flex-1 truncate text-zinc-200", children: String(call.args?.command ?? "") }),
6207
- r.exitCode != null && /* @__PURE__ */ jsxs14("span", { className: r.exitCode === 0 ? "text-success" : "text-destructive", children: [
6395
+ return /* @__PURE__ */ jsxs15("div", { className: "overflow-hidden rounded-md bg-zinc-900 font-mono text-xs leading-relaxed", children: [
6396
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2 px-3 pt-2 text-zinc-400", children: [
6397
+ /* @__PURE__ */ jsx17("span", { className: "select-none text-zinc-500", children: "$" }),
6398
+ /* @__PURE__ */ jsx17("span", { className: "min-w-0 flex-1 truncate text-zinc-200", children: String(call.args?.command ?? "") }),
6399
+ r.exitCode != null && /* @__PURE__ */ jsxs15("span", { className: r.exitCode === 0 ? "text-success" : "text-destructive", children: [
6208
6400
  "exit ",
6209
6401
  r.exitCode
6210
6402
  ] })
6211
6403
  ] }),
6212
- /* @__PURE__ */ jsx16("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap px-3 pb-2.5 pt-1.5 text-zinc-300", children: outcome?.ok === false ? outcome.message ?? "failed" : [r.stdout, r.stderr].filter(Boolean).join("\n") || "(no output)" })
6404
+ /* @__PURE__ */ jsx17("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap px-3 pb-2.5 pt-1.5 text-zinc-300", children: outcome?.ok === false ? outcome.message ?? "failed" : [r.stdout, r.stderr].filter(Boolean).join("\n") || "(no output)" })
6213
6405
  ] });
6214
6406
  }
6215
6407
  function DefaultToolDetail({ call }) {
6216
6408
  const result = call.result;
6217
6409
  const envelope = typeof result === "object" && result !== null ? result : null;
6218
- return /* @__PURE__ */ jsxs14("div", { className: "space-y-2", children: [
6219
- call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */ jsxs14("div", { children: [
6220
- /* @__PURE__ */ jsx16("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Called with" }),
6221
- /* @__PURE__ */ jsx16(KvRows, { data: call.args })
6410
+ return /* @__PURE__ */ jsxs15("div", { className: "space-y-2", children: [
6411
+ call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */ jsxs15("div", { children: [
6412
+ /* @__PURE__ */ jsx17("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Called with" }),
6413
+ /* @__PURE__ */ jsx17(KvRows, { data: call.args })
6222
6414
  ] }),
6223
- envelope ? /* @__PURE__ */ jsxs14("div", { children: [
6224
- /* @__PURE__ */ jsx16("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: envelope.ok === false ? "Failed" : "Result" }),
6225
- envelope.ok === false ? /* @__PURE__ */ jsx16("p", { className: "text-xs text-destructive", children: envelope.message ?? "Tool failed" }) : envelope.result && typeof envelope.result === "object" ? /* @__PURE__ */ jsx16(KvRows, { data: envelope.result }) : envelope.result != null ? /* @__PURE__ */ jsx16("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(envelope.result) }) : null
6226
- ] }) : result != null ? /* @__PURE__ */ jsxs14("div", { children: [
6227
- /* @__PURE__ */ jsx16("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Result" }),
6228
- /* @__PURE__ */ jsx16("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(result) })
6415
+ envelope ? /* @__PURE__ */ jsxs15("div", { children: [
6416
+ /* @__PURE__ */ jsx17("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: envelope.ok === false ? "Failed" : "Result" }),
6417
+ envelope.ok === false ? /* @__PURE__ */ jsx17("p", { className: "text-xs text-destructive", children: envelope.message ?? "Tool failed" }) : envelope.result && typeof envelope.result === "object" ? /* @__PURE__ */ jsx17(KvRows, { data: envelope.result }) : envelope.result != null ? /* @__PURE__ */ jsx17("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(envelope.result) }) : null
6418
+ ] }) : result != null ? /* @__PURE__ */ jsxs15("div", { children: [
6419
+ /* @__PURE__ */ jsx17("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Result" }),
6420
+ /* @__PURE__ */ jsx17("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(result) })
6229
6421
  ] }) : null
6230
6422
  ] });
6231
6423
  }
@@ -6240,20 +6432,20 @@ function ProposalCard({
6240
6432
  const { summary, meta, typeSlug } = proposalPreview(call);
6241
6433
  const custom = renderers?.[call.name]?.(call, message);
6242
6434
  const { pending: deciding, run: decide } = usePending();
6243
- return /* @__PURE__ */ jsxs14("div", { className: "w-full max-w-full rounded-xl border border-warning/50 bg-warning/[0.06] text-sm shadow-sm ring-1 ring-warning/10", children: [
6244
- /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
6245
- /* @__PURE__ */ jsx16("span", { className: "mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning", children: /* @__PURE__ */ jsx16(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
6246
- /* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
6247
- /* @__PURE__ */ jsx16("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-warning-strong", children: approval ? "Needs your approval" : "Awaiting approval" }),
6248
- /* @__PURE__ */ jsx16("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
6249
- summary && /* @__PURE__ */ jsx16("p", { className: "mt-1 text-xs leading-relaxed text-muted-foreground", children: summary }),
6250
- typeSlug && /* @__PURE__ */ jsx16("p", { className: "mt-1 font-mono text-xs text-muted-foreground", children: typeSlug }),
6251
- meta.length > 0 && /* @__PURE__ */ jsx16("div", { className: "mt-1.5 flex flex-wrap items-center gap-1.5", children: meta.map((m, i) => /* @__PURE__ */ jsx16("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground", children: m }, i)) })
6435
+ return /* @__PURE__ */ jsxs15("div", { className: "w-full max-w-full rounded-xl border border-warning/50 bg-warning/[0.06] text-sm shadow-sm ring-1 ring-warning/10", children: [
6436
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
6437
+ /* @__PURE__ */ jsx17("span", { className: "mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning", children: /* @__PURE__ */ jsx17(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
6438
+ /* @__PURE__ */ jsxs15("div", { className: "min-w-0 flex-1", children: [
6439
+ /* @__PURE__ */ jsx17("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-warning-strong", children: approval ? "Needs your approval" : "Awaiting approval" }),
6440
+ /* @__PURE__ */ jsx17("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
6441
+ summary && /* @__PURE__ */ jsx17("p", { className: "mt-1 text-xs leading-relaxed text-muted-foreground", children: summary }),
6442
+ typeSlug && /* @__PURE__ */ jsx17("p", { className: "mt-1 font-mono text-xs text-muted-foreground", children: typeSlug }),
6443
+ meta.length > 0 && /* @__PURE__ */ jsx17("div", { className: "mt-1.5 flex flex-wrap items-center gap-1.5", children: meta.map((m, i) => /* @__PURE__ */ jsx17("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground", children: m }, i)) })
6252
6444
  ] })
6253
6445
  ] }),
6254
- /* @__PURE__ */ jsxs14("div", { className: "flex flex-wrap items-center gap-2 px-4 pb-3.5 pt-3", children: [
6255
- approval && /* @__PURE__ */ jsxs14(Fragment8, { children: [
6256
- /* @__PURE__ */ jsx16(
6446
+ /* @__PURE__ */ jsxs15("div", { className: "flex flex-wrap items-center gap-2 px-4 pb-3.5 pt-3", children: [
6447
+ approval && /* @__PURE__ */ jsxs15(Fragment8, { children: [
6448
+ /* @__PURE__ */ jsx17(
6257
6449
  "button",
6258
6450
  {
6259
6451
  type: "button",
@@ -6263,7 +6455,7 @@ function ProposalCard({
6263
6455
  children: "Approve & run"
6264
6456
  }
6265
6457
  ),
6266
- /* @__PURE__ */ jsx16(
6458
+ /* @__PURE__ */ jsx17(
6267
6459
  "button",
6268
6460
  {
6269
6461
  type: "button",
@@ -6274,7 +6466,7 @@ function ProposalCard({
6274
6466
  }
6275
6467
  )
6276
6468
  ] }),
6277
- /* @__PURE__ */ jsxs14(
6469
+ /* @__PURE__ */ jsxs15(
6278
6470
  "button",
6279
6471
  {
6280
6472
  type: "button",
@@ -6283,12 +6475,12 @@ function ProposalCard({
6283
6475
  className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground",
6284
6476
  children: [
6285
6477
  expanded ? "Hide details" : "View details",
6286
- /* @__PURE__ */ jsx16(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
6478
+ /* @__PURE__ */ jsx17(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
6287
6479
  ]
6288
6480
  }
6289
6481
  )
6290
6482
  ] }),
6291
- expanded && /* @__PURE__ */ jsx16("div", { className: "border-t border-warning/20 px-4 py-3 text-xs", children: custom ?? /* @__PURE__ */ jsx16(DefaultToolDetail, { call }) })
6483
+ expanded && /* @__PURE__ */ jsx17("div", { className: "border-t border-warning/20 px-4 py-3 text-xs", children: custom ?? /* @__PURE__ */ jsx17(DefaultToolDetail, { call }) })
6292
6484
  ] });
6293
6485
  }
6294
6486
  function formatFollowupWhen(when) {
@@ -6303,14 +6495,14 @@ function FollowupCard({ call }) {
6303
6495
  const when = typeof a.when === "string" ? a.when : typeof a.at === "string" ? a.at : typeof a.schedule === "string" ? a.schedule : null;
6304
6496
  const failed = toolCallFailed(call);
6305
6497
  const errorText = failed ? toolOutcomeOf(call)?.message ?? "Scheduling failed" : null;
6306
- return /* @__PURE__ */ jsx16("div", { className: "flex items-start gap-2", children: /* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1 overflow-hidden rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--md3-surface-container)]", children: [
6307
- /* @__PURE__ */ jsxs14("div", { className: "flex w-full items-center gap-2.5 px-3 py-2", children: [
6308
- /* @__PURE__ */ jsx16("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx16(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
6309
- /* @__PURE__ */ jsx16("span", { className: "shrink-0 whitespace-nowrap text-xs font-medium text-foreground", children: friendlyToolTitle(call) }),
6310
- when && /* @__PURE__ */ jsx16("span", { title: when, className: "hidden min-w-0 flex-1 truncate font-mono text-xs tabular-nums text-muted-foreground sm:inline", children: formatFollowupWhen(when) }),
6311
- /* @__PURE__ */ jsx16("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: call.status === "running" ? /* @__PURE__ */ jsx16("svg", { className: "h-3 w-3 shrink-0 animate-spin text-[var(--accent-text)]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx16("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }) : /* @__PURE__ */ jsx16("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${failed ? "bg-[var(--surface-danger-text)]" : "bg-[var(--surface-success-text)]"}` }) })
6498
+ return /* @__PURE__ */ jsx17("div", { className: "flex items-start gap-2", children: /* @__PURE__ */ jsxs15("div", { className: "min-w-0 flex-1 overflow-hidden rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--md3-surface-container)]", children: [
6499
+ /* @__PURE__ */ jsxs15("div", { className: "flex w-full items-center gap-2.5 px-3 py-2", children: [
6500
+ /* @__PURE__ */ jsx17("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx17(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
6501
+ /* @__PURE__ */ jsx17("span", { className: "shrink-0 whitespace-nowrap text-xs font-medium text-foreground", children: friendlyToolTitle(call) }),
6502
+ when && /* @__PURE__ */ jsx17("span", { title: when, className: "hidden min-w-0 flex-1 truncate font-mono text-xs tabular-nums text-muted-foreground sm:inline", children: formatFollowupWhen(when) }),
6503
+ /* @__PURE__ */ jsx17("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: call.status === "running" ? /* @__PURE__ */ jsx17("svg", { className: "h-3 w-3 shrink-0 animate-spin text-[var(--accent-text)]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx17("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }) : /* @__PURE__ */ jsx17("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${failed ? "bg-[var(--surface-danger-text)]" : "bg-[var(--surface-success-text)]"}` }) })
6312
6504
  ] }),
6313
- errorText && /* @__PURE__ */ jsx16("div", { className: "border-t border-border px-3 py-2 text-xs text-[var(--surface-danger-text)]", children: errorText })
6505
+ errorText && /* @__PURE__ */ jsx17("div", { className: "border-t border-border px-3 py-2 text-xs text-[var(--surface-danger-text)]", children: errorText })
6314
6506
  ] }) });
6315
6507
  }
6316
6508
  function toolRowTitle(call) {
@@ -6333,10 +6525,10 @@ function ToolCallCard({
6333
6525
  const arrival = useArrivalStyle(staggerIndex ?? 0);
6334
6526
  const pending = call.status === "done" ? pendingApprovalOf(call) : null;
6335
6527
  const kind = blockKindOf(call);
6336
- const arrive = (row) => /* @__PURE__ */ jsx16("div", { className: "agent-arrive", style: arrival, children: row });
6528
+ const arrive = (row) => /* @__PURE__ */ jsx17("div", { className: "agent-arrive", style: arrival, children: row });
6337
6529
  if (pending) {
6338
6530
  return arrive(
6339
- /* @__PURE__ */ jsx16(
6531
+ /* @__PURE__ */ jsx17(
6340
6532
  ProposalCard,
6341
6533
  {
6342
6534
  call,
@@ -6349,18 +6541,18 @@ function ToolCallCard({
6349
6541
  );
6350
6542
  }
6351
6543
  if (kind === "followup") {
6352
- return arrive(/* @__PURE__ */ jsx16(FollowupCard, { call }));
6544
+ return arrive(/* @__PURE__ */ jsx17(FollowupCard, { call }));
6353
6545
  }
6354
6546
  const custom = renderers?.[call.name]?.(call, message);
6355
6547
  return arrive(
6356
- /* @__PURE__ */ jsx16(
6548
+ /* @__PURE__ */ jsx17(
6357
6549
  InlineToolItem,
6358
6550
  {
6359
6551
  part: chatToolCallPart(call),
6360
6552
  title: toolRowTitle(call),
6361
6553
  description: toolRowDescription(call),
6362
- renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */ jsx16(ShellDetail, { call }) : /* @__PURE__ */ jsx16(DefaultToolDetail, { call })),
6363
- actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */ jsx16(
6554
+ renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */ jsx17(ShellDetail, { call }) : /* @__PURE__ */ jsx17(DefaultToolDetail, { call })),
6555
+ actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */ jsx17(
6364
6556
  "button",
6365
6557
  {
6366
6558
  type: "button",
@@ -6368,9 +6560,9 @@ function ToolCallCard({
6368
6560
  "aria-label": "Open full transcript",
6369
6561
  title: "Open full transcript",
6370
6562
  className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
6371
- children: /* @__PURE__ */ jsxs14("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6372
- /* @__PURE__ */ jsx16("path", { d: "M7 17 17 7" }),
6373
- /* @__PURE__ */ jsx16("path", { d: "M7 7h10v10" })
6563
+ children: /* @__PURE__ */ jsxs15("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6564
+ /* @__PURE__ */ jsx17("path", { d: "M7 17 17 7" }),
6565
+ /* @__PURE__ */ jsx17("path", { d: "M7 7h10v10" })
6374
6566
  ] })
6375
6567
  }
6376
6568
  ) : void 0
@@ -6379,7 +6571,7 @@ function ToolCallCard({
6379
6571
  );
6380
6572
  }
6381
6573
  function StreamingCaret() {
6382
- return /* @__PURE__ */ jsx16(
6574
+ return /* @__PURE__ */ jsx17(
6383
6575
  "span",
6384
6576
  {
6385
6577
  className: "ml-0.5 inline-block h-[1.1em] w-[3px] translate-y-[2px] animate-[agent-caret_1s_step-end_infinite] rounded-sm bg-foreground/70",
@@ -6404,9 +6596,9 @@ function SegmentText({
6404
6596
  // the container on top of that makes the paragraph shimmer while it types.
6405
6597
  // The distinction is what separates "the answer materialised" from "the
6406
6598
  // log was appended to".
6407
- /* @__PURE__ */ jsxs14("div", { className: `${messageClassName}${streaming ? "" : " agent-stream-in"}`, children: [
6599
+ /* @__PURE__ */ jsxs15("div", { className: `${messageClassName}${streaming ? "" : " agent-stream-in"}`, children: [
6408
6600
  body,
6409
- showCaret && /* @__PURE__ */ jsx16(StreamingCaret, {})
6601
+ showCaret && /* @__PURE__ */ jsx17(StreamingCaret, {})
6410
6602
  ] })
6411
6603
  );
6412
6604
  }
@@ -6431,7 +6623,7 @@ function SegmentedBody({
6431
6623
  const leftoverToolCalls = (msg.toolCalls ?? []).filter(
6432
6624
  (tc) => !segmentToolIds.has(tc.id)
6433
6625
  );
6434
- const renderToolCard = (call, index) => /* @__PURE__ */ jsx16(
6626
+ const renderToolCard = (call, index) => /* @__PURE__ */ jsx17(
6435
6627
  ToolCallCard,
6436
6628
  {
6437
6629
  call,
@@ -6459,7 +6651,7 @@ function SegmentedBody({
6459
6651
  for (const g of groups) {
6460
6652
  if (g.kind === "text") {
6461
6653
  children.push(
6462
- /* @__PURE__ */ jsx16(
6654
+ /* @__PURE__ */ jsx17(
6463
6655
  SegmentText,
6464
6656
  {
6465
6657
  content: g.content,
@@ -6475,13 +6667,13 @@ function SegmentedBody({
6475
6667
  }
6476
6668
  if (!streaming && g.calls.length >= COLLAPSE_TOOL_RUN_AT && !g.calls.some(isImportantTool)) {
6477
6669
  children.push(
6478
- /* @__PURE__ */ jsxs14("details", { children: [
6479
- /* @__PURE__ */ jsxs14("summary", { className: "cursor-pointer select-none rounded-md py-0.5 text-xs font-medium text-muted-foreground [transition:color_var(--motion-control)] hover:text-foreground", children: [
6670
+ /* @__PURE__ */ jsxs15("details", { children: [
6671
+ /* @__PURE__ */ jsxs15("summary", { className: "cursor-pointer select-none rounded-md py-0.5 text-xs font-medium text-muted-foreground [transition:color_var(--motion-control)] hover:text-foreground", children: [
6480
6672
  "Worked through ",
6481
6673
  g.calls.length,
6482
6674
  " steps"
6483
6675
  ] }),
6484
- /* @__PURE__ */ jsx16("div", { className: "mt-1.5 flex flex-col gap-1.5", children: g.calls.map(renderToolCard) })
6676
+ /* @__PURE__ */ jsx17("div", { className: "mt-1.5 flex flex-col gap-1.5", children: g.calls.map(renderToolCard) })
6485
6677
  ] }, `tools-fold-${g.index}`)
6486
6678
  );
6487
6679
  continue;
@@ -6490,9 +6682,9 @@ function SegmentedBody({
6490
6682
  }
6491
6683
  leftoverToolCalls.forEach((call, index) => children.push(renderToolCard(call, index)));
6492
6684
  if (streaming && segments[lastIndex]?.kind === "tool") {
6493
- children.push(/* @__PURE__ */ jsx16(StreamingCaret, {}, "streaming-caret"));
6685
+ children.push(/* @__PURE__ */ jsx17(StreamingCaret, {}, "streaming-caret"));
6494
6686
  }
6495
- return /* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-2", children });
6687
+ return /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-2", children });
6496
6688
  }
6497
6689
  var QUIET_META_LANE_CLASS = "mt-1 flex h-[18px] items-center gap-2 text-xs tabular-nums text-muted-foreground opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none [@media(hover:none)]:opacity-100";
6498
6690
  function copyTextOf(msg) {
@@ -6522,7 +6714,7 @@ function CopyMessageButton({ text }) {
6522
6714
  }
6523
6715
  );
6524
6716
  };
6525
- return /* @__PURE__ */ jsx16(
6717
+ return /* @__PURE__ */ jsx17(
6526
6718
  "button",
6527
6719
  {
6528
6720
  type: "button",
@@ -6530,9 +6722,9 @@ function CopyMessageButton({ text }) {
6530
6722
  "aria-label": "Copy message",
6531
6723
  title: "Copy message",
6532
6724
  className: "rounded p-0.5 text-muted-foreground transition hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
6533
- children: copied ? /* @__PURE__ */ jsx16("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx16("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs14("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6534
- /* @__PURE__ */ jsx16("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
6535
- /* @__PURE__ */ jsx16("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
6725
+ children: copied ? /* @__PURE__ */ jsx17("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx17("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs15("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6726
+ /* @__PURE__ */ jsx17("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
6727
+ /* @__PURE__ */ jsx17("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
6536
6728
  ] })
6537
6729
  }
6538
6730
  );
@@ -6577,12 +6769,12 @@ function AssistantMessageImpl({
6577
6769
  const [reasoningToggled, setReasoningToggled] = useState17(null);
6578
6770
  const reasoningOpen = reasoningToggled ?? !hasAnswerText;
6579
6771
  const quiet = chrome === "quiet";
6580
- return /* @__PURE__ */ jsxs14("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
6581
- !quiet && /* @__PURE__ */ jsxs14("div", { className: "mb-1 flex items-baseline gap-2 text-xs tabular-nums text-muted-foreground", children: [
6582
- /* @__PURE__ */ jsx16("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
6583
- msg.modelUsed && /* @__PURE__ */ jsx16("span", { className: "font-mono normal-case", children: msg.modelUsed }),
6584
- formatTokensPerSecond(msg) && /* @__PURE__ */ jsx16("span", { children: formatTokensPerSecond(msg) }),
6585
- formatModelCost(msg, models) && /* @__PURE__ */ jsx16("span", { children: formatModelCost(msg, models) })
6772
+ return /* @__PURE__ */ jsxs15("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
6773
+ !quiet && /* @__PURE__ */ jsxs15("div", { className: "mb-1 flex items-baseline gap-2 text-xs tabular-nums text-muted-foreground", children: [
6774
+ /* @__PURE__ */ jsx17("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
6775
+ msg.modelUsed && /* @__PURE__ */ jsx17("span", { className: "font-mono normal-case", children: msg.modelUsed }),
6776
+ formatTokensPerSecond(msg) && /* @__PURE__ */ jsx17("span", { children: formatTokensPerSecond(msg) }),
6777
+ formatModelCost(msg, models) && /* @__PURE__ */ jsx17("span", { children: formatModelCost(msg, models) })
6586
6778
  ] }),
6587
6779
  reasoning && // The canonical run-row grammar (RunRowShell — the same shell the tool
6588
6780
  // rows compose): one family of rows instead of a bespoke disclosure per
@@ -6592,12 +6784,12 @@ function AssistantMessageImpl({
6592
6784
  // and a click outranks the default from then on — the contract the old
6593
6785
  // hand-rolled disclosure had, now enforced through the shell's
6594
6786
  // controlled `open`.
6595
- /* @__PURE__ */ jsx16(
6787
+ /* @__PURE__ */ jsx17(
6596
6788
  RunRowShell,
6597
6789
  {
6598
6790
  className: "mb-2",
6599
- icon: /* @__PURE__ */ jsx16(BrainGlyph, { className: "h-3.5 w-3.5" }),
6600
- title: !hasAnswerText ? /* @__PURE__ */ jsxs14("span", { className: "agent-shimmer", "data-motion": "essential", children: [
6791
+ icon: /* @__PURE__ */ jsx17(BrainGlyph, { className: "h-3.5 w-3.5" }),
6792
+ title: !hasAnswerText ? /* @__PURE__ */ jsxs15("span", { className: "agent-shimmer", "data-motion": "essential", children: [
6601
6793
  "Thinking",
6602
6794
  thinkingSeconds >= 1 ? ` \xB7 ${thinkingSeconds}s` : "\u2026"
6603
6795
  ] }) : thinkMsRef.current != null ? (
@@ -6612,7 +6804,7 @@ function AssistantMessageImpl({
6612
6804
  status: hasAnswerText ? "idle" : "running",
6613
6805
  open: reasoningOpen,
6614
6806
  onOpenChange: (next) => setReasoningToggled(next),
6615
- children: /* @__PURE__ */ jsx16(
6807
+ children: /* @__PURE__ */ jsx17(
6616
6808
  "div",
6617
6809
  {
6618
6810
  ref: reasoningScrollRef,
@@ -6622,7 +6814,7 @@ function AssistantMessageImpl({
6622
6814
  )
6623
6815
  }
6624
6816
  ),
6625
- segments && segments.length > 0 ? /* @__PURE__ */ jsx16(
6817
+ segments && segments.length > 0 ? /* @__PURE__ */ jsx17(
6626
6818
  SegmentedBody,
6627
6819
  {
6628
6820
  segments,
@@ -6634,12 +6826,12 @@ function AssistantMessageImpl({
6634
6826
  toolRenderers,
6635
6827
  messageClassName
6636
6828
  }
6637
- ) : /* @__PURE__ */ jsxs14(Fragment8, { children: [
6638
- /* @__PURE__ */ jsxs14("div", { className: messageClassName, children: [
6829
+ ) : /* @__PURE__ */ jsxs15(Fragment8, { children: [
6830
+ /* @__PURE__ */ jsxs15("div", { className: messageClassName, children: [
6639
6831
  body,
6640
- streaming && content && !msg.toolCalls?.length && /* @__PURE__ */ jsx16(StreamingCaret, {})
6832
+ streaming && content && !msg.toolCalls?.length && /* @__PURE__ */ jsx17(StreamingCaret, {})
6641
6833
  ] }),
6642
- msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */ jsx16("div", { className: "mt-2 flex flex-col gap-1.5", children: msg.toolCalls.map((tc, index) => /* @__PURE__ */ jsx16(
6834
+ msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */ jsx17("div", { className: "mt-2 flex flex-col gap-1.5", children: msg.toolCalls.map((tc, index) => /* @__PURE__ */ jsx17(
6643
6835
  ToolCallCard,
6644
6836
  {
6645
6837
  call: tc,
@@ -6652,7 +6844,7 @@ function AssistantMessageImpl({
6652
6844
  tc.id
6653
6845
  )) })
6654
6846
  ] }),
6655
- durableCards && msg.parts && /* @__PURE__ */ jsx16(
6847
+ durableCards && msg.parts && /* @__PURE__ */ jsx17(
6656
6848
  DurableChatCards,
6657
6849
  {
6658
6850
  ...durableCards,
@@ -6661,7 +6853,7 @@ function AssistantMessageImpl({
6661
6853
  className: "mt-3"
6662
6854
  }
6663
6855
  ),
6664
- workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */ jsx16(
6856
+ workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */ jsx17(
6665
6857
  WorkProductCard,
6666
6858
  {
6667
6859
  part,
@@ -6671,7 +6863,7 @@ function AssistantMessageImpl({
6671
6863
  `${part.ref.id}:${part.ref.version}`
6672
6864
  )),
6673
6865
  renderExtras?.(msg),
6674
- resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx16("div", { className: "mt-2", children: /* @__PURE__ */ jsx16(
6866
+ resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx17("div", { className: "mt-2", children: /* @__PURE__ */ jsx17(
6675
6867
  MessageAttachments,
6676
6868
  {
6677
6869
  parts: attachmentPartsFromMessageParts(msg.parts),
@@ -6679,11 +6871,11 @@ function AssistantMessageImpl({
6679
6871
  justify: "start"
6680
6872
  }
6681
6873
  ) }),
6682
- quiet && /* @__PURE__ */ jsxs14("div", { "data-testid": "message-meta-lane", className: QUIET_META_LANE_CLASS, children: [
6683
- /* @__PURE__ */ jsx16(CopyMessageButton, { text: copyTextOf(msg) }),
6684
- msg.modelUsed && /* @__PURE__ */ jsx16("span", { className: "font-mono", children: msg.modelUsed }),
6685
- formatTokensPerSecond(msg) && /* @__PURE__ */ jsx16("span", { children: formatTokensPerSecond(msg) }),
6686
- formatModelCost(msg, models) && /* @__PURE__ */ jsx16("span", { children: formatModelCost(msg, models) })
6874
+ quiet && /* @__PURE__ */ jsxs15("div", { "data-testid": "message-meta-lane", className: QUIET_META_LANE_CLASS, children: [
6875
+ /* @__PURE__ */ jsx17(CopyMessageButton, { text: copyTextOf(msg) }),
6876
+ msg.modelUsed && /* @__PURE__ */ jsx17("span", { className: "font-mono", children: msg.modelUsed }),
6877
+ formatTokensPerSecond(msg) && /* @__PURE__ */ jsx17("span", { children: formatTokensPerSecond(msg) }),
6878
+ formatModelCost(msg, models) && /* @__PURE__ */ jsx17("span", { children: formatModelCost(msg, models) })
6687
6879
  ] })
6688
6880
  ] });
6689
6881
  }
@@ -6700,23 +6892,23 @@ function useThinkingSeconds(active) {
6700
6892
  }
6701
6893
  function ThinkingRow({ agentLabel, chrome = "labeled" }) {
6702
6894
  const seconds = useThinkingSeconds(true);
6703
- return /* @__PURE__ */ jsxs14("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: [
6704
- chrome !== "quiet" && /* @__PURE__ */ jsx16("p", { className: "mb-1 text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: agentLabel }),
6705
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 text-[15px] text-muted-foreground", children: [
6706
- /* @__PURE__ */ jsx16("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx16("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }),
6895
+ return /* @__PURE__ */ jsxs15("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: [
6896
+ chrome !== "quiet" && /* @__PURE__ */ jsx17("p", { className: "mb-1 text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: agentLabel }),
6897
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2 text-[15px] text-muted-foreground", children: [
6898
+ /* @__PURE__ */ jsx17("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx17("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }),
6707
6899
  "Thinking",
6708
6900
  seconds >= 3 ? ` \xB7 ${seconds}s` : "..."
6709
6901
  ] })
6710
6902
  ] });
6711
6903
  }
6712
6904
  function StreamErrorRow({ message, onRetry }) {
6713
- return /* @__PURE__ */ jsx16("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: /* @__PURE__ */ jsxs14("div", { role: "alert", className: "flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/5 px-3 py-2.5 text-sm text-destructive", children: [
6714
- /* @__PURE__ */ jsxs14("svg", { className: "mt-0.5 h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6715
- /* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "9" }),
6716
- /* @__PURE__ */ jsx16("path", { d: "M12 8v4m0 4h.01" })
6905
+ return /* @__PURE__ */ jsx17("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: /* @__PURE__ */ jsxs15("div", { role: "alert", className: "flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/5 px-3 py-2.5 text-sm text-destructive", children: [
6906
+ /* @__PURE__ */ jsxs15("svg", { className: "mt-0.5 h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
6907
+ /* @__PURE__ */ jsx17("circle", { cx: "12", cy: "12", r: "9" }),
6908
+ /* @__PURE__ */ jsx17("path", { d: "M12 8v4m0 4h.01" })
6717
6909
  ] }),
6718
- /* @__PURE__ */ jsx16("span", { className: "min-w-0 flex-1 break-words", children: message }),
6719
- onRetry && /* @__PURE__ */ jsx16(
6910
+ /* @__PURE__ */ jsx17("span", { className: "min-w-0 flex-1 break-words", children: message }),
6911
+ onRetry && /* @__PURE__ */ jsx17(
6720
6912
  "button",
6721
6913
  {
6722
6914
  type: "button",
@@ -6752,32 +6944,32 @@ function ChatMessages({
6752
6944
  const messageClassName = messageSize === "large" ? "agent-app-message-copy text-[17px] leading-[1.6]" : "agent-app-message-copy text-base leading-[1.6]";
6753
6945
  const assistantMessageClassName = `${messageClassName} bg-transparent text-[hsl(var(--foreground))]`;
6754
6946
  const renderBody = useMemo7(
6755
- () => renderMarkdown ?? ((content) => /* @__PURE__ */ jsx16("p", { className: "whitespace-pre-wrap", children: content })),
6947
+ () => renderMarkdown ?? ((content) => /* @__PURE__ */ jsx17("p", { className: "whitespace-pre-wrap", children: content })),
6756
6948
  [renderMarkdown]
6757
6949
  );
6758
6950
  const lastIsUser = messages[messages.length - 1]?.role === "user";
6759
6951
  const quiet = chrome === "quiet";
6760
6952
  if (messages.length === 0 && !loading && !error) {
6761
- const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */ jsx16(ChatEmptyState, { ...emptyState });
6762
- return /* @__PURE__ */ jsxs14(Fragment8, { children: [
6953
+ const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */ jsx17(ChatEmptyState, { ...emptyState });
6954
+ return /* @__PURE__ */ jsxs15(Fragment8, { children: [
6763
6955
  header,
6764
6956
  empty
6765
6957
  ] });
6766
6958
  }
6767
- return /* @__PURE__ */ jsxs14(Fragment8, { children: [
6959
+ return /* @__PURE__ */ jsxs15(Fragment8, { children: [
6768
6960
  header,
6769
6961
  messages.map(
6770
- (msg) => msg.role === "user" ? /* @__PURE__ */ jsxs14("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
6771
- /* @__PURE__ */ jsxs14("div", { className: `ml-auto w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
6772
- !quiet && /* @__PURE__ */ jsx16("p", { className: "mb-1 text-right text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: userLabel }),
6773
- /* @__PURE__ */ jsx16(
6962
+ (msg) => msg.role === "user" ? /* @__PURE__ */ jsxs15("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
6963
+ /* @__PURE__ */ jsxs15("div", { className: `ml-auto w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
6964
+ !quiet && /* @__PURE__ */ jsx17("p", { className: "mb-1 text-right text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: userLabel }),
6965
+ /* @__PURE__ */ jsx17(
6774
6966
  "div",
6775
6967
  {
6776
6968
  className: `rounded-2xl bg-[hsl(var(--foreground))] px-4 py-2.5 text-[hsl(var(--background))] ${quiet ? "" : "rounded-tr-md "}${messageClassName}`,
6777
- children: /* @__PURE__ */ jsx16("p", { className: "whitespace-pre-wrap", children: msg.content })
6969
+ children: /* @__PURE__ */ jsx17("p", { className: "whitespace-pre-wrap", children: msg.content })
6778
6970
  }
6779
6971
  ),
6780
- resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx16("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx16(
6972
+ resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx17("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx17(
6781
6973
  MessageAttachments,
6782
6974
  {
6783
6975
  parts: attachmentPartsFromMessageParts(msg.parts),
@@ -6786,8 +6978,8 @@ function ChatMessages({
6786
6978
  }
6787
6979
  ) })
6788
6980
  ] }),
6789
- quiet && /* @__PURE__ */ jsx16("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-end`, children: /* @__PURE__ */ jsx16(CopyMessageButton, { text: msg.content }) })
6790
- ] }, msg.id) : /* @__PURE__ */ jsx16(
6981
+ quiet && /* @__PURE__ */ jsx17("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-end`, children: /* @__PURE__ */ jsx17(CopyMessageButton, { text: msg.content }) })
6982
+ ] }, msg.id) : /* @__PURE__ */ jsx17(
6791
6983
  AssistantMessage,
6792
6984
  {
6793
6985
  msg,
@@ -6808,8 +7000,8 @@ function ChatMessages({
6808
7000
  msg.id
6809
7001
  )
6810
7002
  ),
6811
- loading && lastIsUser && /* @__PURE__ */ jsx16(ThinkingRow, { agentLabel, chrome }),
6812
- error && !loading && /* @__PURE__ */ jsx16(StreamErrorRow, { message: error, onRetry })
7003
+ loading && lastIsUser && /* @__PURE__ */ jsx17(ThinkingRow, { agentLabel, chrome }),
7004
+ error && !loading && /* @__PURE__ */ jsx17(StreamErrorRow, { message: error, onRetry })
6813
7005
  ] });
6814
7006
  }
6815
7007
 
@@ -6845,6 +7037,7 @@ export {
6845
7037
  consumeChatStream,
6846
7038
  streamChatTurn,
6847
7039
  AgentProfileEditor,
7040
+ AgentProfileViewer,
6848
7041
  DurablePlanClientError,
6849
7042
  createDurablePlanDecisionClient,
6850
7043
  useDurablePlanFlow,
@@ -6945,4 +7138,4 @@ export {
6945
7138
  useThinkingSeconds,
6946
7139
  ChatMessages
6947
7140
  };
6948
- //# sourceMappingURL=chunk-M2SAK7ZH.js.map
7141
+ //# sourceMappingURL=chunk-QJRXKMHJ.js.map