@tangle-network/agent-app 0.45.23 → 0.45.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/{DesignCanvas-ZG7DJS7C.js → DesignCanvas-3RRPVPCP.js} +2 -2
  2. package/dist/{DesignCanvasEditor-SLFMHOII.js → DesignCanvasEditor-KAMMEX7E.js} +4 -4
  3. package/dist/{TimelineEditor-6PV42FLG.js → TimelineEditor-IIBVCAZV.js} +2 -2
  4. package/dist/VaultPane-MUWGYVJ7.js +7 -0
  5. package/dist/assistant/index.d.ts +11 -0
  6. package/dist/assistant/index.js +89 -56
  7. package/dist/assistant/index.js.map +1 -1
  8. package/dist/chat-react/index.js +4 -1
  9. package/dist/chat-react/index.js.map +1 -1
  10. package/dist/chat-routes/index.d.ts +57 -6
  11. package/dist/chat-routes/index.js +225 -17
  12. package/dist/chat-routes/index.js.map +1 -1
  13. package/dist/{chunk-MLACJ6DB.js → chunk-7O4FZAFP.js} +10 -10
  14. package/dist/chunk-7O4FZAFP.js.map +1 -0
  15. package/dist/{chunk-OASVAPRL.js → chunk-AWPK7ZDS.js} +3 -3
  16. package/dist/{chunk-YTMKRL3L.js → chunk-HZ4WCA37.js} +3 -2
  17. package/dist/chunk-HZ4WCA37.js.map +1 -0
  18. package/dist/{chunk-FVJP2RTC.js → chunk-JJJEO4ND.js} +91 -36
  19. package/dist/chunk-JJJEO4ND.js.map +1 -0
  20. package/dist/{chunk-7PFFFRVU.js → chunk-KOMP6NDW.js} +172 -43
  21. package/dist/chunk-KOMP6NDW.js.map +1 -0
  22. package/dist/{chunk-TZO3SOUL.js → chunk-LSQR6HM6.js} +49 -33
  23. package/dist/chunk-LSQR6HM6.js.map +1 -0
  24. package/dist/{chunk-3IHYJIDJ.js → chunk-NC2V63EL.js} +15 -15
  25. package/dist/chunk-NC2V63EL.js.map +1 -0
  26. package/dist/{chunk-73CQJOIU.js → chunk-OYGM5WLD.js} +5 -5
  27. package/dist/chunk-OYGM5WLD.js.map +1 -0
  28. package/dist/chunk-YIQHOAHN.js +340 -0
  29. package/dist/chunk-YIQHOAHN.js.map +1 -0
  30. package/dist/design-canvas-react/index.d.ts +2 -2
  31. package/dist/design-canvas-react/index.js +9 -9
  32. package/dist/design-canvas-react/index.js.map +1 -1
  33. package/dist/design-canvas-react/lazy.js +1 -1
  34. package/dist/sequences-react/index.js +2 -2
  35. package/dist/theme/index.d.ts +27 -1
  36. package/dist/theme/index.js +1 -1
  37. package/dist/theme/tailwind-preset.d.ts +25 -0
  38. package/dist/theme/tailwind-preset.js +55 -1
  39. package/dist/theme/tailwind-preset.js.map +1 -1
  40. package/dist/theme/tokens.css +298 -40
  41. package/dist/vault/index.js +1 -1
  42. package/dist/vault/lazy.js +1 -1
  43. package/dist/web-react/async/index.js +19 -307
  44. package/dist/web-react/async/index.js.map +1 -1
  45. package/dist/web-react/index.d.ts +73 -6
  46. package/dist/web-react/index.js +2 -2
  47. package/dist/work-product-react/index.js +1 -1
  48. package/package.json +1 -1
  49. package/dist/VaultPane-HFH734K6.js +0 -7
  50. package/dist/chunk-3IHYJIDJ.js.map +0 -1
  51. package/dist/chunk-73CQJOIU.js.map +0 -1
  52. package/dist/chunk-7PFFFRVU.js.map +0 -1
  53. package/dist/chunk-FVJP2RTC.js.map +0 -1
  54. package/dist/chunk-MLACJ6DB.js.map +0 -1
  55. package/dist/chunk-TZO3SOUL.js.map +0 -1
  56. package/dist/chunk-YTMKRL3L.js.map +0 -1
  57. /package/dist/{DesignCanvas-ZG7DJS7C.js.map → DesignCanvas-3RRPVPCP.js.map} +0 -0
  58. /package/dist/{DesignCanvasEditor-SLFMHOII.js.map → DesignCanvasEditor-KAMMEX7E.js.map} +0 -0
  59. /package/dist/{TimelineEditor-6PV42FLG.js.map → TimelineEditor-IIBVCAZV.js.map} +0 -0
  60. /package/dist/{VaultPane-HFH734K6.js.map → VaultPane-MUWGYVJ7.js.map} +0 -0
  61. /package/dist/{chunk-OASVAPRL.js.map → chunk-AWPK7ZDS.js.map} +0 -0
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  WorkProductCard,
11
11
  workProductPartsFromMessageParts
12
- } from "./chunk-YTMKRL3L.js";
12
+ } from "./chunk-HZ4WCA37.js";
13
13
  import {
14
14
  attachmentPartsFromMessageParts
15
15
  } from "./chunk-B2UEW62O.js";
@@ -166,7 +166,7 @@ function usePopover(open, setOpen) {
166
166
  }
167
167
  };
168
168
  }
169
- var POPOVER_OPTION_FOCUS = "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-card";
169
+ var POPOVER_OPTION_FOCUS = "focus-visible:[outline-offset:-2px]";
170
170
  function usePending() {
171
171
  const [pending, setPending] = useState2(false);
172
172
  const inFlight = useRef2(false);
@@ -278,7 +278,7 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
278
278
  type: "button",
279
279
  ...triggerProps,
280
280
  onClick: () => setOpen(!open),
281
- className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
281
+ className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30",
282
282
  children: [
283
283
  selected ? renderProviderBadge ? renderProviderBadge(selected.provider) : /* @__PURE__ */ jsx2(ProviderLogo, { provider: selected.provider, size: 16 }) : /* @__PURE__ */ jsx2(SparkleGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }),
284
284
  /* @__PURE__ */ jsx2("span", { className: "max-w-[160px] truncate", children: selected?.name ?? value }),
@@ -297,7 +297,7 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
297
297
  value: query,
298
298
  onChange: (e) => setQuery(e.target.value),
299
299
  placeholder: "Search models...",
300
- className: "flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"
300
+ className: "flex-1 bg-transparent text-sm placeholder:text-muted-foreground"
301
301
  }
302
302
  )
303
303
  ] }) }),
@@ -343,7 +343,7 @@ function EffortPicker({ value, onChange, levels = DEFAULT_EFFORT_LEVELS, label =
343
343
  ...triggerProps,
344
344
  onClick: () => setOpen(!open),
345
345
  title: label ? `${label} \u2014 how hard the agent reasons before answering` : "Reasoning effort",
346
- className: "inline-flex min-h-[36px] items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
346
+ className: "inline-flex min-h-[36px] items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30",
347
347
  children: [
348
348
  /* @__PURE__ */ jsx2(SparkleGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }),
349
349
  /* @__PURE__ */ jsxs2("span", { children: [
@@ -581,12 +581,12 @@ function InteractionActionButton({
581
581
  type: "button",
582
582
  onClick,
583
583
  disabled,
584
- className: `inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition disabled:cursor-not-allowed disabled:opacity-40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ${variantClasses}`,
584
+ className: `inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition disabled:cursor-not-allowed disabled:opacity-40 ${variantClasses}`,
585
585
  children
586
586
  }
587
587
  );
588
588
  }
589
- var FIELD_INPUT_CLASSES = "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary disabled:opacity-50";
589
+ var FIELD_INPUT_CLASSES = "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground focus:border-primary disabled:opacity-50";
590
590
  function QuestionOptionList({
591
591
  groupName,
592
592
  idPrefix,
@@ -923,7 +923,7 @@ function DurablePlanCard({
923
923
  {
924
924
  type: "button",
925
925
  onClick: () => setExpanded((value) => !value),
926
- className: "mt-1 text-xs text-muted-foreground hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
926
+ className: "mt-1 text-xs text-muted-foreground hover:text-foreground",
927
927
  children: expanded ? "Collapse plan" : "Show full plan"
928
928
  }
929
929
  )
@@ -939,7 +939,7 @@ function DurablePlanCard({
939
939
  onChange: (event) => setFeedback(event.target.value),
940
940
  rows: 2,
941
941
  placeholder: "Describe what you want changed in the plan",
942
- className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary disabled:opacity-50"
942
+ className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm focus:border-primary disabled:opacity-50"
943
943
  }
944
944
  )
945
945
  ] }),
@@ -1071,7 +1071,7 @@ function InteractionPlanCard({
1071
1071
  {
1072
1072
  type: "button",
1073
1073
  onClick: () => setExpanded((prev) => !prev),
1074
- className: "mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1074
+ className: "mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground",
1075
1075
  children: [
1076
1076
  /* @__PURE__ */ jsx6(ChevronDownGlyph, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` }),
1077
1077
  expanded ? "Collapse plan" : "Show full plan"
@@ -1090,7 +1090,7 @@ function InteractionPlanCard({
1090
1090
  onChange: (event) => setValues((prev) => ({ ...prev, [field.name]: { ...prev[field.name], text: event.target.value } })),
1091
1091
  rows: 2,
1092
1092
  placeholder: field.type === "text" ? field.placeholder ?? "Optional feedback for the agent" : void 0,
1093
- className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary disabled:opacity-50"
1093
+ className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground focus:border-primary disabled:opacity-50"
1094
1094
  }
1095
1095
  ) : /* @__PURE__ */ jsx6(
1096
1096
  "input",
@@ -1100,7 +1100,7 @@ function InteractionPlanCard({
1100
1100
  disabled,
1101
1101
  "aria-label": field.label,
1102
1102
  onChange: (event) => setValues((prev) => ({ ...prev, [field.name]: { ...prev[field.name], text: event.target.value } })),
1103
- className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary disabled:opacity-50"
1103
+ className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground focus:border-primary disabled:opacity-50"
1104
1104
  }
1105
1105
  )
1106
1106
  ] }, field.name)) }),
@@ -1309,7 +1309,7 @@ function AttachmentThumbnail({ part, resolveFileUrl, fetchFile }) {
1309
1309
  window.open(objectUrl, "_blank", "noopener");
1310
1310
  }, [objectUrl]);
1311
1311
  if (!result) {
1312
- return /* @__PURE__ */ jsx8("span", { className: "inline-block h-16 w-16 shrink-0 animate-pulse rounded-md bg-muted", "aria-hidden": true });
1312
+ return /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "inline-block h-16 w-16 shrink-0 animate-pulse rounded-md bg-muted" });
1313
1313
  }
1314
1314
  if (!result.ok || !objectUrl) {
1315
1315
  return /* @__PURE__ */ jsx8(AttachmentThumbnailError, { name: part.name });
@@ -1320,7 +1320,7 @@ function AttachmentThumbnail({ part, resolveFileUrl, fetchFile }) {
1320
1320
  type: "button",
1321
1321
  onClick: handleClick,
1322
1322
  "aria-label": `Open ${part.name}`,
1323
- className: "h-16 w-16 shrink-0 overflow-hidden rounded-md border border-border focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
1323
+ className: "h-16 w-16 shrink-0 overflow-hidden rounded-md border border-border",
1324
1324
  children: /* @__PURE__ */ jsx8("img", { src: objectUrl, alt: part.name, className: "h-16 w-16 object-cover" })
1325
1325
  }
1326
1326
  );
@@ -1588,9 +1588,28 @@ function UploadGlyph({ className }) {
1588
1588
  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 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" }) });
1589
1589
  }
1590
1590
  var MAX_HEIGHT = 168;
1591
+ var DEFAULT_SEND_FAILURE = "Message not sent. Your draft is still here \u2014 try again.";
1592
+ function isRejectedOutcome(outcome) {
1593
+ return typeof outcome === "object" && outcome !== null && outcome.ok === false;
1594
+ }
1595
+ function isPromise(value) {
1596
+ return typeof value?.then === "function";
1597
+ }
1598
+ function sendFailureText(error, fallback) {
1599
+ if (typeof error === "object" && error !== null && "ok" in error) {
1600
+ const named = error.error;
1601
+ if (typeof named === "string" && named.trim() !== "") return named;
1602
+ return fallback;
1603
+ }
1604
+ if (typeof error === "string" && error.trim() !== "") return error;
1605
+ if (error instanceof Error && error.message.trim() !== "") return error.message;
1606
+ return fallback;
1607
+ }
1591
1608
  function ChatComposer({
1592
1609
  onSend,
1593
1610
  onSendParts,
1611
+ onSendFailed,
1612
+ sendFailureMessage = DEFAULT_SEND_FAILURE,
1594
1613
  onCancel,
1595
1614
  isStreaming = false,
1596
1615
  disabled = false,
@@ -1616,6 +1635,8 @@ function ChatComposer({
1616
1635
  const isControlled = value !== void 0;
1617
1636
  const [internal, setInternal] = useState7(initialValue ?? "");
1618
1637
  const text = isControlled ? value : internal;
1638
+ const textRef = useRef5(text);
1639
+ textRef.current = text;
1619
1640
  const textareaRef = useRef5(null);
1620
1641
  const fileInputRef = useRef5(null);
1621
1642
  const folderInputRef = useRef5(null);
@@ -1659,6 +1680,18 @@ function ChatComposer({
1659
1680
  el.focus();
1660
1681
  el.setSelectionRange(text.length, text.length);
1661
1682
  }, [text]);
1683
+ const restoreCaretRef = useRef5(null);
1684
+ useEffect6(() => {
1685
+ const pending = restoreCaretRef.current;
1686
+ if (!pending || pending.text !== text) return;
1687
+ restoreCaretRef.current = null;
1688
+ const el = textareaRef.current;
1689
+ if (!el) return;
1690
+ el.focus();
1691
+ const start = Math.min(pending.start, text.length);
1692
+ const end = Math.min(pending.end, text.length);
1693
+ el.setSelectionRange(start, end);
1694
+ }, [text]);
1662
1695
  useEffect6(() => {
1663
1696
  if (!focusShortcut || disabled) return;
1664
1697
  function onKeyDown(e) {
@@ -1673,20 +1706,68 @@ function ChatComposer({
1673
1706
  const readyFileCount = pendingFiles.filter((f) => f.status === "ready").length;
1674
1707
  const hasSendable = text.trim().length > 0 || readyFileCount > 0;
1675
1708
  const canSend = hasSendable && !isStreaming && !disabled;
1709
+ const [failedSend, setFailedSend] = useState7(null);
1710
+ const failSend = useCallback2(
1711
+ (error, draft, trimmed, parts, caret) => {
1712
+ const message = sendFailureText(error, sendFailureMessage);
1713
+ const restored = textRef.current === "";
1714
+ if (restored) {
1715
+ const el = textareaRef.current;
1716
+ setText(draft);
1717
+ if (el && el.value === draft) {
1718
+ el.focus();
1719
+ el.setSelectionRange(Math.min(caret.start, draft.length), Math.min(caret.end, draft.length));
1720
+ } else {
1721
+ restoreCaretRef.current = { text: draft, start: caret.start, end: caret.end };
1722
+ }
1723
+ }
1724
+ setFailedSend({ message, text: draft, trimmed, parts, restored });
1725
+ onSendFailed?.({ message, text: draft, parts, error, restored });
1726
+ },
1727
+ [onSendFailed, sendFailureMessage, setText]
1728
+ );
1729
+ const dispatchSend = useCallback2(
1730
+ (draft, trimmed, parts, caret) => {
1731
+ let outcome;
1732
+ try {
1733
+ outcome = onSendParts ? onSendParts(trimmed, parts) : onSend?.(trimmed);
1734
+ } catch (error) {
1735
+ failSend(error, draft, trimmed, parts, caret);
1736
+ return;
1737
+ }
1738
+ if (isPromise(outcome)) {
1739
+ void outcome.then(
1740
+ (settled) => {
1741
+ if (isRejectedOutcome(settled)) failSend(settled, draft, trimmed, parts, caret);
1742
+ },
1743
+ (error) => failSend(error, draft, trimmed, parts, caret)
1744
+ );
1745
+ return;
1746
+ }
1747
+ if (isRejectedOutcome(outcome)) failSend(outcome, draft, trimmed, parts, caret);
1748
+ },
1749
+ [onSend, onSendParts, failSend]
1750
+ );
1676
1751
  const send = useCallback2(() => {
1677
1752
  const trimmed = text.trim();
1678
1753
  if (isStreaming || disabled) return;
1679
1754
  const readyFiles = pendingFiles.filter((f) => f.status === "ready");
1680
1755
  if (!trimmed && readyFiles.length === 0) return;
1681
- if (onSendParts) {
1682
- const parts = readyFiles.filter((f) => f.part).map((f) => f.part);
1683
- onSendParts(trimmed, parts);
1684
- setText("");
1685
- return;
1686
- }
1687
- onSend?.(trimmed);
1756
+ const parts = onSendParts ? readyFiles.filter((f) => f.part).map((f) => f.part) : [];
1757
+ const el = textareaRef.current;
1758
+ const caret = { start: el?.selectionStart ?? text.length, end: el?.selectionEnd ?? text.length };
1759
+ setFailedSend(null);
1688
1760
  setText("");
1689
- }, [text, isStreaming, disabled, onSend, onSendParts, pendingFiles, setText]);
1761
+ textRef.current = "";
1762
+ dispatchSend(text, trimmed, parts, caret);
1763
+ }, [text, isStreaming, disabled, onSendParts, pendingFiles, setText, dispatchSend]);
1764
+ const retryFailedSend = useCallback2(() => {
1765
+ const failure = failedSend;
1766
+ if (!failure || isStreaming || disabled) return;
1767
+ setFailedSend(null);
1768
+ const caret = { start: failure.text.length, end: failure.text.length };
1769
+ dispatchSend(failure.text, failure.trimmed, failure.parts, caret);
1770
+ }, [failedSend, isStreaming, disabled, dispatchSend]);
1690
1771
  const handleKeyDown = (e) => {
1691
1772
  if (e.nativeEvent.isComposing) return;
1692
1773
  if (e.key === "Enter" && !e.shiftKey) {
@@ -1752,6 +1833,50 @@ function ChatComposer({
1752
1833
  /* @__PURE__ */ jsx9("p", { className: "mt-0.5 text-xs text-muted-foreground", children: dropDescription })
1753
1834
  ] }) }),
1754
1835
  showAbove && /* @__PURE__ */ jsx9("div", { className: "mb-1.5 flex flex-wrap items-center gap-1.5 px-1", children: controls }),
1836
+ failedSend && /* @__PURE__ */ jsxs7(
1837
+ "div",
1838
+ {
1839
+ role: "alert",
1840
+ "data-testid": "composer-send-error",
1841
+ className: "mb-2 rounded-xl border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",
1842
+ children: [
1843
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-2", children: [
1844
+ /* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1", children: failedSend.message }),
1845
+ /* @__PURE__ */ jsx9(
1846
+ "button",
1847
+ {
1848
+ type: "button",
1849
+ "aria-label": "Dismiss send error",
1850
+ onClick: () => setFailedSend(null),
1851
+ className: "shrink-0 font-medium underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50",
1852
+ children: "Dismiss"
1853
+ }
1854
+ )
1855
+ ] }),
1856
+ !failedSend.restored && /* @__PURE__ */ jsxs7("div", { className: "mt-1.5", children: [
1857
+ /* @__PURE__ */ jsx9(
1858
+ "p",
1859
+ {
1860
+ "data-testid": "composer-unsent-draft",
1861
+ className: "max-h-20 overflow-y-auto whitespace-pre-wrap rounded-lg border border-destructive/30 bg-card px-2 py-1 text-foreground",
1862
+ children: failedSend.text
1863
+ }
1864
+ ),
1865
+ /* @__PURE__ */ jsx9(
1866
+ "button",
1867
+ {
1868
+ type: "button",
1869
+ "aria-label": "Retry sending the unsent message",
1870
+ onClick: retryFailedSend,
1871
+ disabled: isStreaming || disabled,
1872
+ className: "mt-1.5 font-medium underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50",
1873
+ children: "Retry"
1874
+ }
1875
+ )
1876
+ ] })
1877
+ ]
1878
+ }
1879
+ ),
1755
1880
  pendingFiles.length > 0 && /* @__PURE__ */ jsx9("div", { className: "mb-2 flex flex-wrap gap-1.5", children: [...folderChips, ...fileChips].map((f) => /* @__PURE__ */ jsxs7(
1756
1881
  "span",
1757
1882
  {
@@ -2499,7 +2624,7 @@ function TraceIdCopy({ traceId }) {
2499
2624
  onClick: copy,
2500
2625
  title: "Copy trace id",
2501
2626
  "aria-label": "Copy trace id",
2502
- className: "inline-flex min-w-0 items-center gap-1.5 rounded text-left font-mono text-muted-foreground transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-card",
2627
+ className: "inline-flex min-w-0 items-center gap-1.5 rounded text-left font-mono text-muted-foreground transition hover:text-foreground",
2503
2628
  children: [
2504
2629
  /* @__PURE__ */ jsx10("span", { className: "truncate", children: traceId }),
2505
2630
  /* @__PURE__ */ jsx10(CopyGlyph, { className: "h-3 w-3 shrink-0" }),
@@ -2686,7 +2811,8 @@ function AgentActivityPanel({ fetchActivity, renderMissionRef, title = "Agent ac
2686
2811
  ] }),
2687
2812
  error && /* @__PURE__ */ jsx10("p", { role: "alert", className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: error }),
2688
2813
  !error && rows.length === 0 && !loading && /* @__PURE__ */ jsx10("p", { className: "px-1 text-sm text-muted-foreground", children: emptyLabel }),
2689
- /* @__PURE__ */ jsx10("div", { className: "space-y-1.5", children: rows.map((record) => /* @__PURE__ */ jsx10(ActivityRow, { record, renderMissionRef }, record.taskId)) }),
2814
+ /* @__PURE__ */ jsx10("span", { role: "status", "aria-live": "polite", "aria-busy": loading, className: "sr-only", children: loading ? "Loading activity\u2026" : "" }),
2815
+ /* @__PURE__ */ jsx10("div", { className: "space-y-1.5", "aria-busy": loading, children: rows.map((record) => /* @__PURE__ */ jsx10(ActivityRow, { record, renderMissionRef }, record.taskId)) }),
2690
2816
  cursor && /* @__PURE__ */ jsx10(
2691
2817
  "button",
2692
2818
  {
@@ -3528,7 +3654,7 @@ function useSessionActions({
3528
3654
  void submitRename();
3529
3655
  }
3530
3656
  },
3531
- className: "mt-1.5 h-9 w-full rounded-md border border-border bg-background px-3 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"
3657
+ className: "mt-1.5 h-9 w-full rounded-md border border-border bg-background px-3 text-sm text-foreground"
3532
3658
  }
3533
3659
  )
3534
3660
  ]
@@ -3630,11 +3756,14 @@ function formatSessionTimestamp(isoDate) {
3630
3756
  return new Date(at).toLocaleDateString(void 0, { month: "short", day: "numeric" });
3631
3757
  }
3632
3758
  function SkeletonRows() {
3633
- return /* @__PURE__ */ jsx13("div", { className: "flex flex-col gap-0.5", "aria-hidden": true, children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-3 px-3 py-2.5", children: [
3634
- /* @__PURE__ */ jsx13("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" }),
3635
- /* @__PURE__ */ jsx13("div", { className: "h-4 w-1/2 animate-pulse rounded bg-muted" }),
3636
- /* @__PURE__ */ jsx13("div", { className: "ml-auto h-3 w-12 animate-pulse rounded bg-muted" })
3637
- ] }, i)) });
3759
+ return /* @__PURE__ */ jsxs11(Fragment6, { children: [
3760
+ /* @__PURE__ */ jsx13("span", { role: "status", "aria-live": "polite", "aria-busy": true, className: "sr-only", children: "Loading sessions\u2026" }),
3761
+ /* @__PURE__ */ jsx13("div", { className: "flex flex-col gap-0.5", "aria-hidden": true, children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-3 px-3 py-2.5", children: [
3762
+ /* @__PURE__ */ jsx13("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" }),
3763
+ /* @__PURE__ */ jsx13("div", { className: "h-4 w-1/2 animate-pulse rounded bg-muted" }),
3764
+ /* @__PURE__ */ jsx13("div", { className: "ml-auto h-3 w-12 animate-pulse rounded bg-muted" })
3765
+ ] }, i)) })
3766
+ ] });
3638
3767
  }
3639
3768
  function MessageIcon({ className }) {
3640
3769
  return /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 24 24", className, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx13("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
@@ -3750,7 +3879,7 @@ function SessionHistoryPanel({
3750
3879
  onChange: (e) => onQueryChange(e.target.value),
3751
3880
  placeholder: "Search your sessions\u2026",
3752
3881
  "aria-label": "Search sessions",
3753
- className: "h-9 min-w-0 appearance-none rounded-md border border-border bg-card px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring sm:flex-1 [&::-webkit-search-cancel-button]:appearance-none"
3882
+ className: "h-9 min-w-0 appearance-none rounded-md border border-border bg-card px-3 text-sm text-foreground placeholder:text-muted-foreground sm:flex-1 [&::-webkit-search-cancel-button]:appearance-none"
3754
3883
  }
3755
3884
  ),
3756
3885
  /* @__PURE__ */ jsxs11(
@@ -3759,7 +3888,7 @@ function SessionHistoryPanel({
3759
3888
  value: sort,
3760
3889
  onChange: (e) => onSortChange(e.target.value),
3761
3890
  "aria-label": "Sort sessions",
3762
- className: "h-9 shrink-0 appearance-none rounded-md border border-border bg-card px-2 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring sm:w-[132px]",
3891
+ className: "h-9 shrink-0 appearance-none rounded-md border border-border bg-card px-2 text-sm text-foreground sm:w-[132px]",
3763
3892
  children: [
3764
3893
  /* @__PURE__ */ jsx13("option", { value: "newest", children: "Newest" }),
3765
3894
  /* @__PURE__ */ jsx13("option", { value: "oldest", children: "Oldest" })
@@ -3818,7 +3947,7 @@ function SessionHistoryPanel({
3818
3947
  value: ageDays,
3819
3948
  onChange: (event) => setAgeDays(event.target.value),
3820
3949
  "aria-invalid": ageDays.length > 0 && !validAgeDays,
3821
- className: "h-8 w-20 rounded-md border border-border bg-card px-2 text-xs tabular-nums text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"
3950
+ className: "h-8 w-20 rounded-md border border-border bg-card px-2 text-xs tabular-nums text-foreground"
3822
3951
  }
3823
3952
  ),
3824
3953
  /* @__PURE__ */ jsx13("span", { className: "text-xs text-muted-foreground", children: "days" }),
@@ -3886,7 +4015,7 @@ function SessionHistoryPanel({
3886
4015
  },
3887
4016
  session.id
3888
4017
  )),
3889
- history.isError ? /* @__PURE__ */ jsx13(ErrorBlock, { onRetry: history.retry, message: "Couldn\u2019t load more sessions.", inline: true }) : history.hasMore ? /* @__PURE__ */ jsx13("div", { ref: sentinelRef, className: "flex items-center justify-center py-6", children: history.isLoadingMore && /* @__PURE__ */ jsx13("span", { className: "text-xs text-muted-foreground", children: "Loading\u2026" }) }) : null
4018
+ history.isError ? /* @__PURE__ */ jsx13(ErrorBlock, { onRetry: history.retry, message: "Couldn\u2019t load more sessions.", inline: true }) : history.hasMore ? /* @__PURE__ */ jsx13("div", { ref: sentinelRef, className: "flex items-center justify-center py-6", children: history.isLoadingMore && /* @__PURE__ */ jsx13("span", { role: "status", "aria-live": "polite", "aria-busy": true, className: "text-xs text-muted-foreground", children: "Loading\u2026" }) }) : null
3890
4019
  ] }) })
3891
4020
  ] }),
3892
4021
  bulkTarget && /* @__PURE__ */ jsx13(
@@ -5295,7 +5424,7 @@ function GearGlyph({ className }) {
5295
5424
  /* @__PURE__ */ jsx15("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
5296
5425
  ] });
5297
5426
  }
5298
- var FOCUS_RING = "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background";
5427
+ var FOCUS_RING = "";
5299
5428
  function HarnessPicker({
5300
5429
  value,
5301
5430
  onChange,
@@ -5492,7 +5621,7 @@ function ChatEmptyState({
5492
5621
  {
5493
5622
  type: "button",
5494
5623
  onClick: door.onSelect,
5495
- 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/30 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
5624
+ 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/30",
5496
5625
  children: [
5497
5626
  /* @__PURE__ */ jsx16("span", { className: "text-sm font-semibold text-foreground", children: door.label }),
5498
5627
  door.description && /* @__PURE__ */ jsx16("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
@@ -5643,7 +5772,7 @@ function ProposalCard({
5643
5772
  /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
5644
5773
  /* @__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" }) }),
5645
5774
  /* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
5646
- /* @__PURE__ */ jsx16("p", { className: "text-[10px] font-semibold uppercase tracking-wider text-warning-foreground", children: "Needs your approval" }),
5775
+ /* @__PURE__ */ jsx16("p", { className: "text-[10px] font-semibold uppercase tracking-wider text-warning-strong", children: "Needs your approval" }),
5647
5776
  /* @__PURE__ */ jsx16("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
5648
5777
  summary && /* @__PURE__ */ jsx16("p", { className: "mt-1 text-[13px] leading-relaxed text-muted-foreground", children: summary }),
5649
5778
  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-muted/60 px-2 py-0.5 text-[11px] font-medium text-muted-foreground", children: m }, i)) })
@@ -5657,7 +5786,7 @@ function ProposalCard({
5657
5786
  type: "button",
5658
5787
  disabled: deciding,
5659
5788
  onClick: () => decide(() => approval.onApprove(pending.proposalId, call.id)),
5660
- className: "inline-flex min-h-[40px] flex-1 items-center justify-center rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground shadow-sm transition hover:bg-primary/90 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:cursor-not-allowed disabled:opacity-60 sm:flex-none sm:min-w-[160px]",
5789
+ className: "inline-flex min-h-[40px] flex-1 items-center justify-center rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground shadow-sm transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-60 sm:flex-none sm:min-w-[160px]",
5661
5790
  children: "Approve & run"
5662
5791
  }
5663
5792
  ),
@@ -5667,7 +5796,7 @@ function ProposalCard({
5667
5796
  type: "button",
5668
5797
  disabled: deciding,
5669
5798
  onClick: () => decide(() => approval.onReject(pending.proposalId, call.id)),
5670
- className: "inline-flex min-h-[40px] items-center justify-center rounded-lg border border-border bg-transparent px-4 py-2 text-sm font-medium text-muted-foreground transition hover:bg-accent/30 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:cursor-not-allowed disabled:opacity-60",
5799
+ className: "inline-flex min-h-[40px] items-center justify-center rounded-lg border border-border bg-transparent px-4 py-2 text-sm font-medium text-muted-foreground transition hover:bg-accent/30 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60",
5671
5800
  children: "Reject"
5672
5801
  }
5673
5802
  )
@@ -5678,7 +5807,7 @@ function ProposalCard({
5678
5807
  type: "button",
5679
5808
  onClick: () => setExpanded((v) => !v),
5680
5809
  "aria-expanded": expanded,
5681
- className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5810
+ className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground",
5682
5811
  children: [
5683
5812
  expanded ? "Hide details" : "View details",
5684
5813
  /* @__PURE__ */ jsx16(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
@@ -5740,7 +5869,7 @@ function ToolCallCard({
5740
5869
  type: "button",
5741
5870
  onClick: () => setExpanded((v) => !v),
5742
5871
  "aria-expanded": expanded,
5743
- className: "flex min-w-0 flex-1 items-center gap-2 rounded text-left focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5872
+ className: "flex min-w-0 flex-1 items-center gap-2 rounded text-left",
5744
5873
  children: [
5745
5874
  /* @__PURE__ */ jsx16(
5746
5875
  "span",
@@ -5767,7 +5896,7 @@ function ToolCallCard({
5767
5896
  onClick: () => setExpanded((v) => !v),
5768
5897
  "aria-label": expanded ? "Collapse details" : "Expand details",
5769
5898
  "aria-expanded": expanded,
5770
- className: "shrink-0 rounded p-0.5 focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5899
+ className: "shrink-0 rounded p-0.5",
5771
5900
  children: /* @__PURE__ */ jsx16(ChevronDown, { className: `h-3 w-3 text-muted-foreground transition-transform ${expanded ? "rotate-180" : ""}` })
5772
5901
  }
5773
5902
  )
@@ -6235,4 +6364,4 @@ export {
6235
6364
  useThinkingSeconds,
6236
6365
  ChatMessages
6237
6366
  };
6238
- //# sourceMappingURL=chunk-7PFFFRVU.js.map
6367
+ //# sourceMappingURL=chunk-KOMP6NDW.js.map