@ai-matrx/agents 0.59.214 → 0.59.215

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.
@@ -106,46 +106,17 @@ function formatChars(n) {
106
106
  }
107
107
 
108
108
  // context/react/icons.tsx
109
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
110
- function icon(children) {
111
- return function Icon(props) {
112
- return /* @__PURE__ */ jsx(
113
- "svg",
114
- {
115
- xmlns: "http://www.w3.org/2000/svg",
116
- viewBox: "0 0 24 24",
117
- fill: "none",
118
- stroke: "currentColor",
119
- strokeWidth: 2,
120
- strokeLinecap: "round",
121
- strokeLinejoin: "round",
122
- "aria-hidden": "true",
123
- ...props,
124
- children
125
- }
126
- );
127
- };
128
- }
129
- var EyeIcon = icon(
130
- /* @__PURE__ */ jsxs(Fragment, { children: [
131
- /* @__PURE__ */ jsx("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }),
132
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
133
- ] })
134
- );
135
- var RotateCcwIcon = icon(
136
- /* @__PURE__ */ jsxs(Fragment, { children: [
137
- /* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
138
- /* @__PURE__ */ jsx("path", { d: "M3 3v5h5" })
139
- ] })
140
- );
141
- var ArrowDownToLineIcon = icon(
142
- /* @__PURE__ */ jsxs(Fragment, { children: [
143
- /* @__PURE__ */ jsx("path", { d: "M12 17V3" }),
144
- /* @__PURE__ */ jsx("path", { d: "m6 11 6 6 6-6" }),
145
- /* @__PURE__ */ jsx("path", { d: "M19 21H5" })
146
- ] })
147
- );
148
- var MinusIcon = icon(/* @__PURE__ */ jsx("path", { d: "M5 12h14" }));
109
+ import {
110
+ ArrowDownToLineIcon as GArrowDownToLineIcon,
111
+ EyeIcon as GEyeIcon,
112
+ MinusIcon as GMinusIcon,
113
+ RotateCcwIcon as GRotateCcwIcon
114
+ } from "@ai-matrx/design-system/icons";
115
+ var sized = (Glyph) => Glyph;
116
+ var EyeIcon = sized(GEyeIcon);
117
+ var RotateCcwIcon = sized(GRotateCcwIcon);
118
+ var ArrowDownToLineIcon = sized(GArrowDownToLineIcon);
119
+ var MinusIcon = sized(GMinusIcon);
149
120
 
150
121
  // context/react/ContextRulesTable.tsx
151
122
  import { AlertTriangleIcon } from "@ai-matrx/design-system/icons";
@@ -226,11 +197,11 @@ function includeChanges(rows, include, cap) {
226
197
  // context/react/FrozenInclude.tsx
227
198
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, cn } from "@ai-matrx/design-system";
228
199
  import { CheckIcon, LockIcon } from "@ai-matrx/design-system/icons";
229
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
200
+ import { jsx, jsxs } from "react/jsx-runtime";
230
201
  var FROZEN_INCLUDE_TOOLTIP = "Sent as shown";
231
202
  function FrozenInclude({ name, checked }) {
232
- return /* @__PURE__ */ jsx2(TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs2(Tooltip, { children: [
233
- /* @__PURE__ */ jsx2(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs2(
203
+ return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
204
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
234
205
  "span",
235
206
  {
236
207
  role: "img",
@@ -242,12 +213,12 @@ function FrozenInclude({ name, checked }) {
242
213
  checked ? "bg-muted text-foreground" : "bg-transparent"
243
214
  ),
244
215
  children: [
245
- checked ? /* @__PURE__ */ jsx2(CheckIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx2(MinusIcon, { className: "h-3 w-3" }),
246
- /* @__PURE__ */ jsx2(LockIcon, { className: "h-2.5 w-2.5 opacity-70" })
216
+ checked ? /* @__PURE__ */ jsx(CheckIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(MinusIcon, { className: "h-3 w-3" }),
217
+ /* @__PURE__ */ jsx(LockIcon, { className: "h-2.5 w-2.5 opacity-70" })
247
218
  ]
248
219
  }
249
220
  ) }),
250
- /* @__PURE__ */ jsx2(TooltipContent, { children: FROZEN_INCLUDE_TOOLTIP })
221
+ /* @__PURE__ */ jsx(TooltipContent, { children: FROZEN_INCLUDE_TOOLTIP })
251
222
  ] }) });
252
223
  }
253
224
 
@@ -338,7 +309,7 @@ function onRequestReason(row) {
338
309
  }
339
310
 
340
311
  // context/react/InlineMaxInput.tsx
341
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
312
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
342
313
  function InlineMaxInput({
343
314
  value,
344
315
  inherited,
@@ -372,16 +343,16 @@ function InlineMaxInput({
372
343
  if (next !== value) onCommit(next);
373
344
  };
374
345
  const overridden = value !== null;
375
- return /* @__PURE__ */ jsxs3("div", { className: cn2("flex items-center justify-end", comfortable ? "gap-0.5" : "gap-1"), children: [
376
- /* @__PURE__ */ jsx3(
346
+ return /* @__PURE__ */ jsxs2("div", { className: cn2("flex items-center justify-end", comfortable ? "gap-0.5" : "gap-1"), children: [
347
+ /* @__PURE__ */ jsx2(
377
348
  "span",
378
349
  {
379
350
  "aria-hidden": "true",
380
351
  className: cn2("h-1.5 w-1.5 shrink-0 rounded-full", overridden ? "bg-primary" : "bg-transparent")
381
352
  }
382
353
  ),
383
- /* @__PURE__ */ jsxs3(Tooltip2, { open: notice, children: [
384
- /* @__PURE__ */ jsx3(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx3(
354
+ /* @__PURE__ */ jsxs2(Tooltip2, { open: notice, children: [
355
+ /* @__PURE__ */ jsx2(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx2(
385
356
  Input,
386
357
  {
387
358
  type: "text",
@@ -417,10 +388,10 @@ function InlineMaxInput({
417
388
  )
418
389
  }
419
390
  ) }),
420
- /* @__PURE__ */ jsx3(TooltipContent2, { children: `Limit is ${cap}` })
391
+ /* @__PURE__ */ jsx2(TooltipContent2, { children: `Limit is ${cap}` })
421
392
  ] }),
422
- overridden && !disabled ? /* @__PURE__ */ jsxs3(Tooltip2, { children: [
423
- /* @__PURE__ */ jsx3(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx3(
393
+ overridden && !disabled ? /* @__PURE__ */ jsxs2(Tooltip2, { children: [
394
+ /* @__PURE__ */ jsx2(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx2(
424
395
  "button",
425
396
  {
426
397
  type: "button",
@@ -430,11 +401,11 @@ function InlineMaxInput({
430
401
  "inline-flex shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",
431
402
  comfortable ? "h-8 w-7" : "h-5 w-5"
432
403
  ),
433
- children: /* @__PURE__ */ jsx3(RotateCcwIcon, { className: "h-3 w-3" })
404
+ children: /* @__PURE__ */ jsx2(RotateCcwIcon, { className: "h-3 w-3" })
434
405
  }
435
406
  ) }),
436
- /* @__PURE__ */ jsx3(TooltipContent2, { children: `Reset to ${formatLimit(inherited)}` })
437
- ] }) : /* @__PURE__ */ jsx3("span", { "aria-hidden": "true", className: cn2("shrink-0", comfortable ? "w-7" : "w-5") })
407
+ /* @__PURE__ */ jsx2(TooltipContent2, { children: `Reset to ${formatLimit(inherited)}` })
408
+ ] }) : /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: cn2("shrink-0", comfortable ? "w-7" : "w-5") })
438
409
  ] });
439
410
  }
440
411
 
@@ -455,7 +426,7 @@ function summarizeContextRows(rows) {
455
426
  }
456
427
 
457
428
  // context/react/ContextRulesTable.tsx
458
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
429
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
459
430
  var CONTEXT_RULES_GRID = {
460
431
  compact: "grid grid-cols-[minmax(0,1fr)_2.75rem_4rem_6.5rem] items-center gap-x-2 px-2",
461
432
  comfortable: "grid grid-cols-[minmax(0,1fr)_2.75rem_3.5rem_6.75rem] items-center gap-x-1.5 px-3"
@@ -521,7 +492,7 @@ function ContextRulesTable({
521
492
  const changes = bulkChanges(list, next);
522
493
  if (changes.length > 0) onSetInclude(changes);
523
494
  } : void 0;
524
- const renderRow = (row, depth) => /* @__PURE__ */ jsx4(
495
+ const renderRow = (row, depth) => /* @__PURE__ */ jsx3(
525
496
  ContextRuleRow,
526
497
  {
527
498
  row,
@@ -540,11 +511,11 @@ function ContextRulesTable({
540
511
  },
541
512
  rowId(row)
542
513
  );
543
- const heading = (props) => /* @__PURE__ */ jsx4(Heading, { ...props, grid, narrow, comfortable, readOnly }, props.id);
514
+ const heading = (props) => /* @__PURE__ */ jsx3(Heading, { ...props, grid, narrow, comfortable, readOnly }, props.id);
544
515
  const renderLevel = (level, depth) => {
545
516
  const all = levelRows(level);
546
517
  const name = level.ref.path[level.ref.path.length - 1] ?? "";
547
- return /* @__PURE__ */ jsxs4("div", { role: "rowgroup", "aria-label": headed ? level.ref.path.join(" \u203A ") : void 0, "data-level": level.ref.id, children: [
518
+ return /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": headed ? level.ref.path.join(" \u203A ") : void 0, "data-level": level.ref.id, children: [
548
519
  headed ? heading({
549
520
  id: `h:${level.ref.id}`,
550
521
  kind: "level",
@@ -555,7 +526,7 @@ function ContextRulesTable({
555
526
  ...levelSwitch(level, bulk(all))
556
527
  }) : null,
557
528
  level.rows.map((row) => renderRow(row, depth + 1)),
558
- level.groups.map((group) => /* @__PURE__ */ jsxs4("div", { role: "rowgroup", "aria-label": group.ref.label, "data-group": group.ref.id, children: [
529
+ level.groups.map((group) => /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": group.ref.label, "data-group": group.ref.id, children: [
559
530
  heading({
560
531
  id: `h:${group.ref.id}`,
561
532
  kind: "group",
@@ -570,7 +541,7 @@ function ContextRulesTable({
570
541
  ] }, group.ref.id))
571
542
  ] }, level.ref.id);
572
543
  };
573
- return /* @__PURE__ */ jsx4(TooltipProvider2, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs4(
544
+ return /* @__PURE__ */ jsx3(TooltipProvider2, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs3(
574
545
  "div",
575
546
  {
576
547
  ref: rootRef,
@@ -580,20 +551,20 @@ function ContextRulesTable({
580
551
  "data-layout": narrow ? "narrow" : "wide",
581
552
  className: cn3("text-xs", className),
582
553
  children: [
583
- narrow ? null : /* @__PURE__ */ jsxs4(
554
+ narrow ? null : /* @__PURE__ */ jsxs3(
584
555
  "div",
585
556
  {
586
557
  role: "row",
587
558
  className: cn3(grid, "sticky top-0 z-10 h-7 border-b border-border bg-card font-medium text-muted-foreground"),
588
559
  children: [
589
- /* @__PURE__ */ jsx4("span", { role: "columnheader", children: "Item" }),
590
- /* @__PURE__ */ jsx4("span", { role: "columnheader", className: "text-center", children: "Include" }),
591
- /* @__PURE__ */ jsx4("span", { role: "columnheader", className: "text-right", children: "Chars" }),
592
- /* @__PURE__ */ jsx4("span", { role: "columnheader", className: "pr-6 text-right", children: "Inline max" })
560
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", children: "Item" }),
561
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "text-center", children: "Include" }),
562
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "text-right", children: "Chars" }),
563
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "pr-6 text-right", children: "Inline max" })
593
564
  ]
594
565
  }
595
566
  ),
596
- levels.length === 0 ? /* @__PURE__ */ jsx4("div", { className: "px-2 py-3 text-center text-muted-foreground", children: "None" }) : sectionsOf(levels).map((section) => {
567
+ levels.length === 0 ? /* @__PURE__ */ jsx3("div", { className: "px-2 py-3 text-center text-muted-foreground", children: "None" }) : sectionsOf(levels).map((section) => {
597
568
  if (section.label === null || !headed) return renderLevel(section.levels[0], 0);
598
569
  const all = section.levels.flatMap(levelRows);
599
570
  const several = section.levels.length > 1;
@@ -605,7 +576,7 @@ function ContextRulesTable({
605
576
  }
606
577
  if (changes.length > 0) onSetInclude?.(changes);
607
578
  } : void 0;
608
- return /* @__PURE__ */ jsxs4("div", { role: "rowgroup", "aria-label": section.label, "data-section": section.label, children: [
579
+ return /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": section.label, "data-section": section.label, children: [
609
580
  heading({
610
581
  id: `h:${section.id}`,
611
582
  kind: "section",
@@ -646,7 +617,7 @@ function Heading({
646
617
  const total = rows.length;
647
618
  const showSwitch = !noSwitch && (Boolean(onToggle) || readOnly && total > 0);
648
619
  const countLabel = total > 0 ? count === total ? String(total) : `${count}/${total}` : null;
649
- const toggle = showSwitch ? readOnly ? /* @__PURE__ */ jsx4(FrozenInclude, { name: switchName, checked }) : /* @__PURE__ */ jsx4(
620
+ const toggle = showSwitch ? readOnly ? /* @__PURE__ */ jsx3(FrozenInclude, { name: switchName, checked }) : /* @__PURE__ */ jsx3(
650
621
  Switch,
651
622
  {
652
623
  size: "sm",
@@ -656,7 +627,7 @@ function Heading({
656
627
  onCheckedChange: (next) => onToggle?.(next)
657
628
  }
658
629
  ) : null;
659
- return /* @__PURE__ */ jsxs4(
630
+ return /* @__PURE__ */ jsxs3(
660
631
  "div",
661
632
  {
662
633
  role: "row",
@@ -668,13 +639,13 @@ function Heading({
668
639
  kind === "group" ? "bg-muted/25 text-muted-foreground" : "bg-muted/60 text-foreground"
669
640
  ),
670
641
  children: [
671
- /* @__PURE__ */ jsxs4("div", { role: "cell", className: cn3("flex min-w-0 items-baseline gap-1.5", indent(depth)), children: [
672
- /* @__PURE__ */ jsx4("span", { className: "min-w-0 whitespace-normal break-words", title: label, children: label }),
673
- countLabel ? /* @__PURE__ */ jsx4("span", { className: "shrink-0 font-normal tabular-nums text-muted-foreground", children: countLabel }) : null
642
+ /* @__PURE__ */ jsxs3("div", { role: "cell", className: cn3("flex min-w-0 items-baseline gap-1.5", indent(depth)), children: [
643
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 whitespace-normal break-words", title: label, children: label }),
644
+ countLabel ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 font-normal tabular-nums text-muted-foreground", children: countLabel }) : null
674
645
  ] }),
675
- /* @__PURE__ */ jsx4("div", { role: "cell", className: cn3("flex justify-center", narrow && "order-last"), children: toggle }),
676
- /* @__PURE__ */ jsx4("div", { role: "cell", className: "text-right font-normal tabular-nums text-muted-foreground", children: total > 0 ? charsLabel : null }),
677
- /* @__PURE__ */ jsx4("div", { role: "cell" })
646
+ /* @__PURE__ */ jsx3("div", { role: "cell", className: cn3("flex justify-center", narrow && "order-last"), children: toggle }),
647
+ /* @__PURE__ */ jsx3("div", { role: "cell", className: "text-right font-normal tabular-nums text-muted-foreground", children: total > 0 ? charsLabel : null }),
648
+ /* @__PURE__ */ jsx3("div", { role: "cell" })
678
649
  ]
679
650
  }
680
651
  );
@@ -696,7 +667,7 @@ function ContextRuleRow({
696
667
  }) {
697
668
  const selfChecked = row.blockedBy === "self_check" || mismatches.some((m) => m.reason === "self_check");
698
669
  const decided = selfChecked ? SELF_CHECK_TOOLTIP : row.serverResolved ? SERVER_RESOLVED_TOOLTIP : `Include: ${LAYER_LABEL[row.decided_by.include]} \xB7 Limit: ${LAYER_LABEL[row.decided_by.max_inline_chars]}`;
699
- const labelNode = onOpenRow ? /* @__PURE__ */ jsx4(
670
+ const labelNode = onOpenRow ? /* @__PURE__ */ jsx3(
700
671
  "button",
701
672
  {
702
673
  type: "button",
@@ -704,8 +675,8 @@ function ContextRuleRow({
704
675
  className: "block min-w-0 flex-1 truncate text-left hover:underline focus-visible:underline focus-visible:outline-none",
705
676
  children: row.label
706
677
  }
707
- ) : /* @__PURE__ */ jsx4("span", { className: "block min-w-0 flex-1 truncate", children: row.label });
708
- return /* @__PURE__ */ jsxs4(
678
+ ) : /* @__PURE__ */ jsx3("span", { className: "block min-w-0 flex-1 truncate", children: row.label });
679
+ return /* @__PURE__ */ jsxs3(
709
680
  "div",
710
681
  {
711
682
  role: "row",
@@ -722,7 +693,7 @@ function ContextRuleRow({
722
693
  selected && "bg-accent"
723
694
  ),
724
695
  children: [
725
- /* @__PURE__ */ jsxs4(
696
+ /* @__PURE__ */ jsxs3(
726
697
  "div",
727
698
  {
728
699
  role: "cell",
@@ -732,31 +703,31 @@ function ContextRuleRow({
732
703
  !row.include && "opacity-50"
733
704
  ),
734
705
  children: [
735
- mismatches.length > 0 ? /* @__PURE__ */ jsxs4(Tooltip3, { children: [
736
- /* @__PURE__ */ jsx4(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx4(
706
+ mismatches.length > 0 ? /* @__PURE__ */ jsxs3(Tooltip3, { children: [
707
+ /* @__PURE__ */ jsx3(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx3(
737
708
  "span",
738
709
  {
739
710
  role: "img",
740
711
  "aria-label": "Mismatch",
741
712
  className: "inline-flex shrink-0 text-warning",
742
- children: /* @__PURE__ */ jsx4(AlertTriangleIcon, { className: "h-3.5 w-3.5" })
713
+ children: /* @__PURE__ */ jsx3(AlertTriangleIcon, { className: "h-3.5 w-3.5" })
743
714
  }
744
715
  ) }),
745
- /* @__PURE__ */ jsx4(TooltipContent3, { children: describeMismatches(mismatches) })
716
+ /* @__PURE__ */ jsx3(TooltipContent3, { children: describeMismatches(mismatches) })
746
717
  ] }) : null,
747
- lead ? /* @__PURE__ */ jsx4("span", { className: "inline-flex shrink-0 items-center", children: lead }) : null,
748
- /* @__PURE__ */ jsxs4(Tooltip3, { children: [
749
- /* @__PURE__ */ jsx4(TooltipTrigger3, { asChild: true, children: labelNode }),
750
- /* @__PURE__ */ jsxs4(TooltipContent3, { children: [
751
- /* @__PURE__ */ jsx4("div", { children: row.label }),
752
- /* @__PURE__ */ jsx4("div", { className: "font-normal text-muted-foreground", children: decided })
718
+ lead ? /* @__PURE__ */ jsx3("span", { className: "inline-flex shrink-0 items-center", children: lead }) : null,
719
+ /* @__PURE__ */ jsxs3(Tooltip3, { children: [
720
+ /* @__PURE__ */ jsx3(TooltipTrigger3, { asChild: true, children: labelNode }),
721
+ /* @__PURE__ */ jsxs3(TooltipContent3, { children: [
722
+ /* @__PURE__ */ jsx3("div", { children: row.label }),
723
+ /* @__PURE__ */ jsx3("div", { className: "font-normal text-muted-foreground", children: decided })
753
724
  ] })
754
725
  ] }),
755
- trail ? /* @__PURE__ */ jsx4("span", { className: "min-w-0 max-w-[45%] shrink truncate text-muted-foreground", children: trail }) : null
726
+ trail ? /* @__PURE__ */ jsx3("span", { className: "min-w-0 max-w-[45%] shrink truncate text-muted-foreground", children: trail }) : null
756
727
  ]
757
728
  }
758
729
  ),
759
- /* @__PURE__ */ jsx4("div", { role: "cell", className: cn3("flex justify-center", narrow && "order-last"), children: readOnly ? /* @__PURE__ */ jsx4(FrozenInclude, { name: row.label, checked: row.include }) : /* @__PURE__ */ jsx4(
730
+ /* @__PURE__ */ jsx3("div", { role: "cell", className: cn3("flex justify-center", narrow && "order-last"), children: readOnly ? /* @__PURE__ */ jsx3(FrozenInclude, { name: row.label, checked: row.include }) : /* @__PURE__ */ jsx3(
760
731
  Switch,
761
732
  {
762
733
  size: "sm",
@@ -765,21 +736,21 @@ function ContextRuleRow({
765
736
  onCheckedChange: (next) => onChange(row.key, row.surfaceKey, withInclude(row, next))
766
737
  }
767
738
  ) }),
768
- /* @__PURE__ */ jsxs4(
739
+ /* @__PURE__ */ jsxs3(
769
740
  "div",
770
741
  {
771
742
  role: "cell",
772
743
  className: cn3("flex items-center justify-end gap-1 tabular-nums", !row.include && "opacity-50"),
773
744
  children: [
774
- row.include && row.delivery === "on_request" ? /* @__PURE__ */ jsxs4(Tooltip3, { children: [
775
- /* @__PURE__ */ jsx4(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx4("span", { role: "img", "aria-label": "On request", className: "inline-flex text-muted-foreground", children: /* @__PURE__ */ jsx4(ArrowDownToLineIcon, { className: "h-3 w-3" }) }) }),
776
- /* @__PURE__ */ jsx4(TooltipContent3, { children: onRequestReason(row) })
745
+ row.include && row.delivery === "on_request" ? /* @__PURE__ */ jsxs3(Tooltip3, { children: [
746
+ /* @__PURE__ */ jsx3(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx3("span", { role: "img", "aria-label": "On request", className: "inline-flex text-muted-foreground", children: /* @__PURE__ */ jsx3(ArrowDownToLineIcon, { className: "h-3 w-3" }) }) }),
747
+ /* @__PURE__ */ jsx3(TooltipContent3, { children: onRequestReason(row) })
777
748
  ] }) : null,
778
- /* @__PURE__ */ jsx4("span", { children: formatChars(row.chars) })
749
+ /* @__PURE__ */ jsx3("span", { children: formatChars(row.chars) })
779
750
  ]
780
751
  }
781
752
  ),
782
- /* @__PURE__ */ jsx4("div", { role: "cell", children: narrow ? /* @__PURE__ */ jsx4(InlineMaxButton, { row, cap, readOnly, comfortable, onChange }) : /* @__PURE__ */ jsx4(
753
+ /* @__PURE__ */ jsx3("div", { role: "cell", children: narrow ? /* @__PURE__ */ jsx3(InlineMaxButton, { row, cap, readOnly, comfortable, onChange }) : /* @__PURE__ */ jsx3(
783
754
  InlineMaxInput,
784
755
  {
785
756
  label: row.label,
@@ -806,8 +777,8 @@ function InlineMaxButton({
806
777
  const [open, setOpen] = React2.useState(false);
807
778
  const own = row.userRule?.max_inline_chars ?? null;
808
779
  const text = own !== null ? formatLimit(own) : limitPlaceholder(row, cap);
809
- return /* @__PURE__ */ jsxs4(Popover, { open, onOpenChange: setOpen, children: [
810
- /* @__PURE__ */ jsx4(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs4(
780
+ return /* @__PURE__ */ jsxs3(Popover, { open, onOpenChange: setOpen, children: [
781
+ /* @__PURE__ */ jsx3(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs3(
811
782
  "button",
812
783
  {
813
784
  type: "button",
@@ -819,14 +790,14 @@ function InlineMaxButton({
819
790
  own === null ? "text-muted-foreground" : "text-foreground"
820
791
  ),
821
792
  children: [
822
- own !== null ? /* @__PURE__ */ jsx4("span", { "aria-hidden": true, className: "h-1 w-1 rounded-full bg-primary" }) : null,
793
+ own !== null ? /* @__PURE__ */ jsx3("span", { "aria-hidden": true, className: "h-1 w-1 rounded-full bg-primary" }) : null,
823
794
  text
824
795
  ]
825
796
  }
826
797
  ) }),
827
- /* @__PURE__ */ jsx4(PopoverContent, { align: "end", className: "w-auto p-2", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 text-xs", children: [
828
- /* @__PURE__ */ jsx4("span", { className: "text-muted-foreground", children: "Inline max" }),
829
- /* @__PURE__ */ jsx4(
798
+ /* @__PURE__ */ jsx3(PopoverContent, { align: "end", className: "w-auto p-2", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-xs", children: [
799
+ /* @__PURE__ */ jsx3("span", { className: "text-muted-foreground", children: "Inline max" }),
800
+ /* @__PURE__ */ jsx3(
830
801
  InlineMaxInput,
831
802
  {
832
803
  label: row.label,
@@ -859,7 +830,7 @@ import {
859
830
  cn as cn4
860
831
  } from "@ai-matrx/design-system";
861
832
  import { AlertTriangleIcon as AlertTriangleIcon2, EyeOffIcon, PanelRightIcon } from "@ai-matrx/design-system/icons";
862
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
833
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
863
834
  var BLIND_TOOLTIP = "This model can't read these values";
864
835
  var BLIND_LABEL = "Not read";
865
836
  function IconButton({
@@ -868,8 +839,8 @@ function IconButton({
868
839
  comfortable,
869
840
  children
870
841
  }) {
871
- return /* @__PURE__ */ jsxs5(Tooltip4, { children: [
872
- /* @__PURE__ */ jsx5(TooltipTrigger4, { asChild: true, children: /* @__PURE__ */ jsx5(
842
+ return /* @__PURE__ */ jsxs4(Tooltip4, { children: [
843
+ /* @__PURE__ */ jsx4(TooltipTrigger4, { asChild: true, children: /* @__PURE__ */ jsx4(
873
844
  "button",
874
845
  {
875
846
  type: "button",
@@ -882,7 +853,7 @@ function IconButton({
882
853
  children
883
854
  }
884
855
  ) }),
885
- /* @__PURE__ */ jsx5(TooltipContent4, { children: label })
856
+ /* @__PURE__ */ jsx4(TooltipContent4, { children: label })
886
857
  ] });
887
858
  }
888
859
  function ContextRulesChip({
@@ -925,7 +896,7 @@ function ContextRulesChip({
925
896
  const canMaster = !readOnly && on !== void 0 && onToggleAll !== void 0;
926
897
  const setEverything = (next) => onToggleAll?.(next);
927
898
  const eyeOpen = !blind && on !== false;
928
- const faceButton = /* @__PURE__ */ jsx5(
899
+ const faceButton = /* @__PURE__ */ jsx4(
929
900
  Button,
930
901
  {
931
902
  variant,
@@ -934,19 +905,19 @@ function ContextRulesChip({
934
905
  ...warn ? { "data-mismatch": "true" } : {},
935
906
  ...blind ? { "data-blind": "true" } : {},
936
907
  ...pressed !== void 0 ? { pressed } : {},
937
- ...warn ? { tone: "warning", glyphTone: "warning", iconEnd: /* @__PURE__ */ jsx5(AlertTriangleIcon2, {}) } : {},
938
- icon: eyeOpen ? /* @__PURE__ */ jsx5(EyeIcon, {}) : /* @__PURE__ */ jsx5(EyeOffIcon, {}),
908
+ ...warn ? { tone: "warning", glyphTone: "warning", iconEnd: /* @__PURE__ */ jsx4(AlertTriangleIcon2, {}) } : {},
909
+ icon: eyeOpen ? /* @__PURE__ */ jsx4(EyeIcon, {}) : /* @__PURE__ */ jsx4(EyeOffIcon, {}),
939
910
  ...isMobile ? { onClick: () => setOpen(true) } : {},
940
911
  className: cn4("min-w-0", className),
941
912
  children: `${name ? `${name} \xB7 ` : ""}${count}${warn ? ` \xB7 ${mismatchCount}` : ""}`
942
913
  }
943
914
  );
944
915
  const faceTip = blind ? BLIND_TOOLTIP : name ? null : faceName;
945
- const withBlindTip = (trigger) => faceTip ? /* @__PURE__ */ jsxs5(Tooltip4, { children: [
946
- /* @__PURE__ */ jsx5(TooltipTrigger4, { asChild: true, children: trigger }),
947
- /* @__PURE__ */ jsx5(TooltipContent4, { children: faceTip })
916
+ const withBlindTip = (trigger) => faceTip ? /* @__PURE__ */ jsxs4(Tooltip4, { children: [
917
+ /* @__PURE__ */ jsx4(TooltipTrigger4, { asChild: true, children: trigger }),
918
+ /* @__PURE__ */ jsx4(TooltipContent4, { children: faceTip })
948
919
  ] }) : trigger;
949
- const body = /* @__PURE__ */ jsxs5(
920
+ const body = /* @__PURE__ */ jsxs4(
950
921
  "div",
951
922
  {
952
923
  className: "flex min-h-0 flex-col",
@@ -954,7 +925,7 @@ function ContextRulesChip({
954
925
  if (event.key === "Escape" && event.currentTarget.contains(event.target)) setOpen(false);
955
926
  },
956
927
  children: [
957
- /* @__PURE__ */ jsxs5(
928
+ /* @__PURE__ */ jsxs4(
958
929
  "div",
959
930
  {
960
931
  className: cn4(
@@ -962,12 +933,12 @@ function ContextRulesChip({
962
933
  comfortable ? "h-12" : "h-10"
963
934
  ),
964
935
  children: [
965
- eyeOpen ? /* @__PURE__ */ jsx5(EyeIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ jsx5(EyeOffIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
966
- headerName ? /* @__PURE__ */ jsx5("span", { className: "min-w-0 truncate text-sm font-medium", children: headerName }) : null,
967
- /* @__PURE__ */ jsx5("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${count} \xB7 ${charsLabel} chars` }),
968
- /* @__PURE__ */ jsxs5("div", { className: "ml-auto flex shrink-0 items-center gap-0.5", children: [
969
- blind ? /* @__PURE__ */ jsx5("span", { className: "mr-1 text-xs text-muted-foreground", children: BLIND_LABEL }) : null,
970
- canMaster ? /* @__PURE__ */ jsx5(
936
+ eyeOpen ? /* @__PURE__ */ jsx4(EyeIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ jsx4(EyeOffIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
937
+ headerName ? /* @__PURE__ */ jsx4("span", { className: "min-w-0 truncate text-sm font-medium", children: headerName }) : null,
938
+ /* @__PURE__ */ jsx4("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${count} \xB7 ${charsLabel} chars` }),
939
+ /* @__PURE__ */ jsxs4("div", { className: "ml-auto flex shrink-0 items-center gap-0.5", children: [
940
+ blind ? /* @__PURE__ */ jsx4("span", { className: "mr-1 text-xs text-muted-foreground", children: BLIND_LABEL }) : null,
941
+ canMaster ? /* @__PURE__ */ jsx4(
971
942
  Switch2,
972
943
  {
973
944
  size: "sm",
@@ -977,8 +948,8 @@ function ContextRulesChip({
977
948
  className: "mr-1"
978
949
  }
979
950
  ) : null,
980
- anyOverride && !readOnly ? /* @__PURE__ */ jsx5(IconButton, { label: "Reset all", onClick: onResetAll, comfortable, children: /* @__PURE__ */ jsx5(RotateCcwIcon, { className: "h-3.5 w-3.5" }) }) : null,
981
- /* @__PURE__ */ jsx5(
951
+ anyOverride && !readOnly ? /* @__PURE__ */ jsx4(IconButton, { label: "Reset all", onClick: onResetAll, comfortable, children: /* @__PURE__ */ jsx4(RotateCcwIcon, { className: "h-3.5 w-3.5" }) }) : null,
952
+ /* @__PURE__ */ jsx4(
982
953
  IconButton,
983
954
  {
984
955
  label: "Open full view",
@@ -987,14 +958,14 @@ function ContextRulesChip({
987
958
  setOpen(false);
988
959
  onOpenFullView();
989
960
  },
990
- children: /* @__PURE__ */ jsx5(PanelRightIcon, { className: "h-3.5 w-3.5" })
961
+ children: /* @__PURE__ */ jsx4(PanelRightIcon, { className: "h-3.5 w-3.5" })
991
962
  }
992
963
  )
993
964
  ] })
994
965
  ]
995
966
  }
996
967
  ),
997
- /* @__PURE__ */ jsx5("div", { className: cn4("min-h-0 overflow-y-auto", comfortable ? "max-h-[70dvh]" : "max-h-[min(24rem,60vh)]"), children: /* @__PURE__ */ jsx5(
968
+ /* @__PURE__ */ jsx4("div", { className: cn4("min-h-0 overflow-y-auto", comfortable ? "max-h-[70dvh]" : "max-h-[min(24rem,60vh)]"), children: /* @__PURE__ */ jsx4(
998
969
  ContextRulesTable,
999
970
  {
1000
971
  rows,
@@ -1012,14 +983,14 @@ function ContextRulesChip({
1012
983
  }
1013
984
  );
1014
985
  if (isMobile) {
1015
- return /* @__PURE__ */ jsxs5(TooltipProvider3, { delayDuration: 300, titleTooltips: false, children: [
986
+ return /* @__PURE__ */ jsxs4(TooltipProvider3, { delayDuration: 300, titleTooltips: false, children: [
1016
987
  withBlindTip(faceButton),
1017
- /* @__PURE__ */ jsx5(BottomSheet, { open, onOpenChange: setOpen, title: name || faceName, surface: "solid", children: body })
988
+ /* @__PURE__ */ jsx4(BottomSheet, { open, onOpenChange: setOpen, title: name || faceName, surface: "solid", children: body })
1018
989
  ] });
1019
990
  }
1020
- return /* @__PURE__ */ jsx5(TooltipProvider3, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs5(Popover2, { open, onOpenChange: setOpen, children: [
1021
- withBlindTip(/* @__PURE__ */ jsx5(PopoverTrigger2, { asChild: true, children: faceButton })),
1022
- /* @__PURE__ */ jsx5(
991
+ return /* @__PURE__ */ jsx4(TooltipProvider3, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs4(Popover2, { open, onOpenChange: setOpen, children: [
992
+ withBlindTip(/* @__PURE__ */ jsx4(PopoverTrigger2, { asChild: true, children: faceButton })),
993
+ /* @__PURE__ */ jsx4(
1023
994
  PopoverContent2,
1024
995
  {
1025
996
  align: "end",
@@ -1043,7 +1014,7 @@ import { AlertTriangleIcon as AlertTriangleIcon3, ChevronLeftIcon, SearchIcon }
1043
1014
  // context/react/ContextDeliveredValue.tsx
1044
1015
  import * as React4 from "react";
1045
1016
  import { ErrorBox, Skeleton, cn as cn5 } from "@ai-matrx/design-system";
1046
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1017
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1047
1018
  function ContextDeliveredValue({
1048
1019
  row,
1049
1020
  load,
@@ -1051,10 +1022,10 @@ function ContextDeliveredValue({
1051
1022
  }) {
1052
1023
  const blocks = row.deliveredBlocks ?? [];
1053
1024
  if (!row.delivered && !row.onRequest && blocks.length === 0) {
1054
- return isServerAuthoritativeKey(row.key) ? /* @__PURE__ */ jsx6("p", { "data-testid": "context-server-fills", className: cn5("text-xs text-muted-foreground", className), children: "Filled in by the server" }) : null;
1025
+ return isServerAuthoritativeKey(row.key) ? /* @__PURE__ */ jsx5("p", { "data-testid": "context-server-fills", className: cn5("text-xs text-muted-foreground", className), children: "Filled in by the server" }) : null;
1055
1026
  }
1056
- return /* @__PURE__ */ jsxs6("div", { className: cn5("flex flex-col gap-3", className), children: [
1057
- row.delivered ? /* @__PURE__ */ jsx6(
1027
+ return /* @__PURE__ */ jsxs5("div", { className: cn5("flex flex-col gap-3", className), children: [
1028
+ row.delivered ? /* @__PURE__ */ jsx5(
1058
1029
  DeliveredSection,
1059
1030
  {
1060
1031
  title: "Agent received",
@@ -1063,7 +1034,7 @@ function ContextDeliveredValue({
1063
1034
  load
1064
1035
  }
1065
1036
  ) : null,
1066
- blocks.map((block) => /* @__PURE__ */ jsx6(
1037
+ blocks.map((block) => /* @__PURE__ */ jsx5(
1067
1038
  DeliveredSection,
1068
1039
  {
1069
1040
  title: block.label,
@@ -1076,7 +1047,7 @@ function ContextDeliveredValue({
1076
1047
  row.onRequest || row.delivery === "on_request" && row.delivered ? (
1077
1048
  // A lazy value (a document, a file family …) carries no ref: the turn never reads
1078
1049
  // it. It is fetched — and sized — when opened.
1079
- /* @__PURE__ */ jsx6(
1050
+ /* @__PURE__ */ jsx5(
1080
1051
  DeliveredSection,
1081
1052
  {
1082
1053
  title: "Returned on request",
@@ -1086,7 +1057,7 @@ function ContextDeliveredValue({
1086
1057
  }
1087
1058
  )
1088
1059
  ) : null,
1089
- row.delivered && CONTEXT_FETCHABLE_ROWS[row.key] ? /* @__PURE__ */ jsx6(
1060
+ row.delivered && CONTEXT_FETCHABLE_ROWS[row.key] ? /* @__PURE__ */ jsx5(
1090
1061
  DeliveredSection,
1091
1062
  {
1092
1063
  title: "Agent can fetch",
@@ -1133,18 +1104,18 @@ function DeliveredSection({
1133
1104
  };
1134
1105
  }, [load, kind, key, attempt]);
1135
1106
  const unavailable = loaded.state === "done" && !loaded.available;
1136
- return /* @__PURE__ */ jsxs6("section", { className: "flex flex-col gap-1", "aria-label": title, "data-view-kind": kind, "data-view-key": key, children: [
1137
- /* @__PURE__ */ jsxs6("div", { className: "flex items-baseline gap-2 text-xs", children: [
1138
- /* @__PURE__ */ jsx6("span", { className: "font-medium", children: title }),
1139
- unavailable ? /* @__PURE__ */ jsx6(
1107
+ return /* @__PURE__ */ jsxs5("section", { className: "flex flex-col gap-1", "aria-label": title, "data-view-kind": kind, "data-view-key": key, children: [
1108
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-baseline gap-2 text-xs", children: [
1109
+ /* @__PURE__ */ jsx5("span", { className: "font-medium", children: title }),
1110
+ unavailable ? /* @__PURE__ */ jsx5(
1140
1111
  "span",
1141
1112
  {
1142
1113
  "data-testid": "context-delivered-unavailable",
1143
1114
  className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
1144
1115
  children: "Not available to this agent"
1145
1116
  }
1146
- ) : ref_ || loaded.state === "done" ? /* @__PURE__ */ jsx6("span", { className: "tabular-nums text-muted-foreground", children: `${formatChars(ref_ ? ref_.chars : loaded.state === "done" ? loaded.chars : 0)} chars` }) : null,
1147
- loaded.state === "done" && loaded.fetched === false ? /* @__PURE__ */ jsx6(
1117
+ ) : ref_ || loaded.state === "done" ? /* @__PURE__ */ jsx5("span", { className: "tabular-nums text-muted-foreground", children: `${formatChars(ref_ ? ref_.chars : loaded.state === "done" ? loaded.chars : 0)} chars` }) : null,
1118
+ loaded.state === "done" && loaded.fetched === false ? /* @__PURE__ */ jsx5(
1148
1119
  "span",
1149
1120
  {
1150
1121
  "data-testid": "context-delivered-not-read",
@@ -1153,9 +1124,9 @@ function DeliveredSection({
1153
1124
  }
1154
1125
  ) : null
1155
1126
  ] }),
1156
- unavailable ? null : !load ? /* @__PURE__ */ jsx6("span", { className: "text-xs text-muted-foreground", children: "\u2014" }) : loaded.state === "loading" ? /* @__PURE__ */ jsx6(Skeleton, { "data-testid": "context-delivered-loading", className: "h-16 w-full" }) : loaded.state === "error" ? /* @__PURE__ */ jsxs6(ErrorBox, { as: "div", message: loaded.message, className: "flex items-center gap-2 text-xs text-destructive", children: [
1157
- /* @__PURE__ */ jsx6("span", { className: "min-w-0 truncate", title: loaded.message, children: loaded.message }),
1158
- /* @__PURE__ */ jsx6(
1127
+ unavailable ? null : !load ? /* @__PURE__ */ jsx5("span", { className: "text-xs text-muted-foreground", children: "\u2014" }) : loaded.state === "loading" ? /* @__PURE__ */ jsx5(Skeleton, { "data-testid": "context-delivered-loading", className: "h-16 w-full" }) : loaded.state === "error" ? /* @__PURE__ */ jsxs5(ErrorBox, { as: "div", message: loaded.message, className: "flex items-center gap-2 text-xs text-destructive", children: [
1128
+ /* @__PURE__ */ jsx5("span", { className: "min-w-0 truncate", title: loaded.message, children: loaded.message }),
1129
+ /* @__PURE__ */ jsx5(
1159
1130
  "button",
1160
1131
  {
1161
1132
  type: "button",
@@ -1164,7 +1135,7 @@ function DeliveredSection({
1164
1135
  children: "Retry"
1165
1136
  }
1166
1137
  )
1167
- ] }) : loaded.text === "" ? /* @__PURE__ */ jsx6("span", { "data-testid": "context-delivered-empty", className: "text-xs text-muted-foreground", children: "None" }) : /* @__PURE__ */ jsx6(
1138
+ ] }) : loaded.text === "" ? /* @__PURE__ */ jsx5("span", { "data-testid": "context-delivered-empty", className: "text-xs text-muted-foreground", children: "None" }) : /* @__PURE__ */ jsx5(
1168
1139
  "pre",
1169
1140
  {
1170
1141
  "data-testid": "context-delivered-text",
@@ -1181,7 +1152,7 @@ function DeliveredSection({
1181
1152
 
1182
1153
  // context/react/ContextReceiptBlocks.tsx
1183
1154
  import { cn as cn6 } from "@ai-matrx/design-system";
1184
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1155
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1185
1156
  function ContextReceiptBlocks({
1186
1157
  blocks,
1187
1158
  selectedId,
@@ -1191,16 +1162,16 @@ function ContextReceiptBlocks({
1191
1162
  }) {
1192
1163
  if (blocks.length === 0) return null;
1193
1164
  const comfortable = density === "comfortable";
1194
- return /* @__PURE__ */ jsx7("div", { role: "table", "aria-label": "Also sent", className: cn6("text-xs", className), children: /* @__PURE__ */ jsxs7("div", { role: "rowgroup", children: [
1195
- /* @__PURE__ */ jsx7(
1165
+ return /* @__PURE__ */ jsx6("div", { role: "table", "aria-label": "Also sent", className: cn6("text-xs", className), children: /* @__PURE__ */ jsxs6("div", { role: "rowgroup", children: [
1166
+ /* @__PURE__ */ jsx6(
1196
1167
  "div",
1197
1168
  {
1198
1169
  role: "row",
1199
1170
  className: "flex h-6 items-center bg-muted/40 px-2 font-medium text-muted-foreground",
1200
- children: /* @__PURE__ */ jsx7("span", { role: "cell", children: "Also sent" })
1171
+ children: /* @__PURE__ */ jsx6("span", { role: "cell", children: "Also sent" })
1201
1172
  }
1202
1173
  ),
1203
- blocks.map((block) => /* @__PURE__ */ jsxs7(
1174
+ blocks.map((block) => /* @__PURE__ */ jsxs6(
1204
1175
  "div",
1205
1176
  {
1206
1177
  role: "row",
@@ -1213,7 +1184,7 @@ function ContextReceiptBlocks({
1213
1184
  selectedId === block.id && "bg-accent"
1214
1185
  ),
1215
1186
  children: [
1216
- /* @__PURE__ */ jsx7("div", { role: "cell", className: "col-span-2 flex min-w-0 items-center", children: onOpenBlock ? /* @__PURE__ */ jsx7(
1187
+ /* @__PURE__ */ jsx6("div", { role: "cell", className: "col-span-2 flex min-w-0 items-center", children: onOpenBlock ? /* @__PURE__ */ jsx6(
1217
1188
  "button",
1218
1189
  {
1219
1190
  type: "button",
@@ -1222,9 +1193,9 @@ function ContextReceiptBlocks({
1222
1193
  className: "block min-w-0 flex-1 truncate text-left hover:underline focus-visible:underline focus-visible:outline-none",
1223
1194
  children: block.label
1224
1195
  }
1225
- ) : /* @__PURE__ */ jsx7("span", { title: block.label, className: "block min-w-0 flex-1 truncate", children: block.label }) }),
1226
- /* @__PURE__ */ jsx7("div", { role: "cell", className: "text-right tabular-nums", children: formatChars(block.delivered.chars) }),
1227
- /* @__PURE__ */ jsx7("div", { role: "cell" })
1196
+ ) : /* @__PURE__ */ jsx6("span", { title: block.label, className: "block min-w-0 flex-1 truncate", children: block.label }) }),
1197
+ /* @__PURE__ */ jsx6("div", { role: "cell", className: "text-right tabular-nums", children: formatChars(block.delivered.chars) }),
1198
+ /* @__PURE__ */ jsx6("div", { role: "cell" })
1228
1199
  ]
1229
1200
  },
1230
1201
  block.id
@@ -1236,12 +1207,12 @@ function ContextReceiptBlockDetail({
1236
1207
  load,
1237
1208
  className
1238
1209
  }) {
1239
- return /* @__PURE__ */ jsxs7("div", { className: cn6("flex flex-col gap-3 p-3", className), children: [
1240
- /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 items-baseline gap-2", children: [
1241
- /* @__PURE__ */ jsx7("h3", { className: "min-w-0 truncate text-sm font-medium", children: block.label }),
1242
- /* @__PURE__ */ jsx7("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${formatChars(block.delivered.chars)} chars \xB7 ${DELIVERY_LABEL.inline}` })
1210
+ return /* @__PURE__ */ jsxs6("div", { className: cn6("flex flex-col gap-3 p-3", className), children: [
1211
+ /* @__PURE__ */ jsxs6("div", { className: "flex min-w-0 items-baseline gap-2", children: [
1212
+ /* @__PURE__ */ jsx6("h3", { className: "min-w-0 truncate text-sm font-medium", children: block.label }),
1213
+ /* @__PURE__ */ jsx6("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${formatChars(block.delivered.chars)} chars \xB7 ${DELIVERY_LABEL.inline}` })
1243
1214
  ] }),
1244
- /* @__PURE__ */ jsx7(
1215
+ /* @__PURE__ */ jsx6(
1245
1216
  DeliveredSection,
1246
1217
  {
1247
1218
  title: "Agent received",
@@ -1254,7 +1225,7 @@ function ContextReceiptBlockDetail({
1254
1225
  }
1255
1226
 
1256
1227
  // context/react/ContextRulesPanelBody.tsx
1257
- import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1228
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1258
1229
  function layerCells(row) {
1259
1230
  const { surface, agent, default_max } = row.layers ?? {};
1260
1231
  const declared = agent?.declared === true;
@@ -1277,7 +1248,7 @@ function layerCells(row) {
1277
1248
  var LAYERS = ["default", "page", "agent", "you"];
1278
1249
  function LayerTable({ row }) {
1279
1250
  const cells = layerCells(row);
1280
- const cell = (text, winning) => /* @__PURE__ */ jsx8(
1251
+ const cell = (text, winning) => /* @__PURE__ */ jsx7(
1281
1252
  "span",
1282
1253
  {
1283
1254
  role: "cell",
@@ -1289,26 +1260,26 @@ function LayerTable({ row }) {
1289
1260
  children: text
1290
1261
  }
1291
1262
  );
1292
- return /* @__PURE__ */ jsxs8("div", { role: "table", "aria-label": "Layers", className: "text-xs", children: [
1293
- /* @__PURE__ */ jsxs8(
1263
+ return /* @__PURE__ */ jsxs7("div", { role: "table", "aria-label": "Layers", className: "text-xs", children: [
1264
+ /* @__PURE__ */ jsxs7(
1294
1265
  "div",
1295
1266
  {
1296
1267
  role: "row",
1297
1268
  className: "grid h-7 grid-cols-[1fr_5rem_5rem] items-center gap-x-2 border-b border-border font-medium text-muted-foreground",
1298
1269
  children: [
1299
- /* @__PURE__ */ jsx8("span", { role: "columnheader", children: "Layer" }),
1300
- /* @__PURE__ */ jsx8("span", { role: "columnheader", className: "text-right", children: "Include" }),
1301
- /* @__PURE__ */ jsx8("span", { role: "columnheader", className: "text-right", children: "Inline max" })
1270
+ /* @__PURE__ */ jsx7("span", { role: "columnheader", children: "Layer" }),
1271
+ /* @__PURE__ */ jsx7("span", { role: "columnheader", className: "text-right", children: "Include" }),
1272
+ /* @__PURE__ */ jsx7("span", { role: "columnheader", className: "text-right", children: "Inline max" })
1302
1273
  ]
1303
1274
  }
1304
1275
  ),
1305
- LAYERS.map((layer) => /* @__PURE__ */ jsxs8(
1276
+ LAYERS.map((layer) => /* @__PURE__ */ jsxs7(
1306
1277
  "div",
1307
1278
  {
1308
1279
  role: "row",
1309
1280
  className: "grid h-7 grid-cols-[1fr_5rem_5rem] items-center gap-x-2 border-b border-border/50",
1310
1281
  children: [
1311
- /* @__PURE__ */ jsx8("span", { role: "cell", children: LAYER_LABEL[layer] }),
1282
+ /* @__PURE__ */ jsx7("span", { role: "cell", children: LAYER_LABEL[layer] }),
1312
1283
  cell(cells[layer].include, row.decided_by.include === layer),
1313
1284
  cell(cells[layer].limit, row.decided_by.max_inline_chars === layer)
1314
1285
  ]
@@ -1327,18 +1298,18 @@ function RowDetail({
1327
1298
  comfortable,
1328
1299
  loadView
1329
1300
  }) {
1330
- return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-3 p-3", children: [
1331
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 items-baseline gap-2", children: [
1332
- /* @__PURE__ */ jsx8("h3", { className: "min-w-0 truncate text-sm font-medium", children: row.label }),
1333
- /* @__PURE__ */ jsx8("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${formatChars(row.chars)} chars \xB7 ${DELIVERY_LABEL[row.delivery]}` })
1301
+ return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-3 p-3", children: [
1302
+ /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 items-baseline gap-2", children: [
1303
+ /* @__PURE__ */ jsx7("h3", { className: "min-w-0 truncate text-sm font-medium", children: row.label }),
1304
+ /* @__PURE__ */ jsx7("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${formatChars(row.chars)} chars \xB7 ${DELIVERY_LABEL[row.delivery]}` })
1334
1305
  ] }),
1335
- mismatches.length > 0 ? /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-1.5 rounded-md border border-warning/40 bg-warning/10 px-2 py-1.5 text-xs text-warning", children: [
1336
- /* @__PURE__ */ jsx8(AlertTriangleIcon3, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
1337
- /* @__PURE__ */ jsx8("span", { children: describeMismatches(mismatches) })
1306
+ mismatches.length > 0 ? /* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-1.5 rounded-md border border-warning/40 bg-warning/10 px-2 py-1.5 text-xs text-warning", children: [
1307
+ /* @__PURE__ */ jsx7(AlertTriangleIcon3, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
1308
+ /* @__PURE__ */ jsx7("span", { children: describeMismatches(mismatches) })
1338
1309
  ] }) : null,
1339
- /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-2 text-xs", children: [
1340
- /* @__PURE__ */ jsx8("span", { className: "text-muted-foreground", children: "Include" }),
1341
- /* @__PURE__ */ jsx8("div", { className: cn7("flex items-center", comfortable ? "h-11" : "h-7"), children: readOnly ? /* @__PURE__ */ jsx8(FrozenInclude, { name: row.label, checked: row.include }) : /* @__PURE__ */ jsx8(
1310
+ /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-2 text-xs", children: [
1311
+ /* @__PURE__ */ jsx7("span", { className: "text-muted-foreground", children: "Include" }),
1312
+ /* @__PURE__ */ jsx7("div", { className: cn7("flex items-center", comfortable ? "h-11" : "h-7"), children: readOnly ? /* @__PURE__ */ jsx7(FrozenInclude, { name: row.label, checked: row.include }) : /* @__PURE__ */ jsx7(
1342
1313
  Switch3,
1343
1314
  {
1344
1315
  size: "sm",
@@ -1347,8 +1318,8 @@ function RowDetail({
1347
1318
  onCheckedChange: (next) => onChange(row.key, row.surfaceKey, withInclude(row, next))
1348
1319
  }
1349
1320
  ) }),
1350
- /* @__PURE__ */ jsx8("span", { className: "text-muted-foreground", children: "Inline max" }),
1351
- /* @__PURE__ */ jsx8("div", { className: "flex", children: /* @__PURE__ */ jsx8(
1321
+ /* @__PURE__ */ jsx7("span", { className: "text-muted-foreground", children: "Inline max" }),
1322
+ /* @__PURE__ */ jsx7("div", { className: "flex", children: /* @__PURE__ */ jsx7(
1352
1323
  InlineMaxInput,
1353
1324
  {
1354
1325
  label: row.label,
@@ -1362,8 +1333,8 @@ function RowDetail({
1362
1333
  }
1363
1334
  ) })
1364
1335
  ] }),
1365
- /* @__PURE__ */ jsx8(LayerTable, { row }),
1366
- /* @__PURE__ */ jsx8(ContextDeliveredValue, { row, load: loadView }),
1336
+ /* @__PURE__ */ jsx7(LayerTable, { row }),
1337
+ /* @__PURE__ */ jsx7(ContextDeliveredValue, { row, load: loadView }),
1367
1338
  renderDetail ? renderDetail(row) : null
1368
1339
  ] });
1369
1340
  }
@@ -1406,9 +1377,9 @@ function ContextRulesPanelBody({
1406
1377
  const openedBlock = openBlockId ? (blocks ?? []).find((b) => b.id === openBlockId) ?? null : null;
1407
1378
  const selected = !openedBlock && selectedKey ? rows.find((r) => r.key === selectedKey) ?? null : null;
1408
1379
  const comfortable = !!isMobile;
1409
- const search = /* @__PURE__ */ jsxs8("div", { className: "relative shrink-0 border-b border-border p-2", children: [
1410
- /* @__PURE__ */ jsx8(SearchIcon, { className: "pointer-events-none absolute left-4 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
1411
- /* @__PURE__ */ jsx8(
1380
+ const search = /* @__PURE__ */ jsxs7("div", { className: "relative shrink-0 border-b border-border p-2", children: [
1381
+ /* @__PURE__ */ jsx7(SearchIcon, { className: "pointer-events-none absolute left-4 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
1382
+ /* @__PURE__ */ jsx7(
1412
1383
  Input2,
1413
1384
  {
1414
1385
  type: "search",
@@ -1420,8 +1391,8 @@ function ContextRulesPanelBody({
1420
1391
  }
1421
1392
  )
1422
1393
  ] });
1423
- const table = /* @__PURE__ */ jsxs8("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
1424
- /* @__PURE__ */ jsx8(
1394
+ const table = /* @__PURE__ */ jsxs7("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
1395
+ /* @__PURE__ */ jsx7(
1425
1396
  ContextRulesTable,
1426
1397
  {
1427
1398
  rows: visible,
@@ -1436,7 +1407,7 @@ function ContextRulesPanelBody({
1436
1407
  ...mismatches ? { mismatches } : {}
1437
1408
  }
1438
1409
  ),
1439
- /* @__PURE__ */ jsx8(
1410
+ /* @__PURE__ */ jsx7(
1440
1411
  ContextReceiptBlocks,
1441
1412
  {
1442
1413
  blocks: visibleBlocks,
@@ -1446,7 +1417,7 @@ function ContextRulesPanelBody({
1446
1417
  }
1447
1418
  )
1448
1419
  ] });
1449
- const detail = openedBlock ? /* @__PURE__ */ jsx8(ContextReceiptBlockDetail, { block: openedBlock, load: loadView }) : selected ? /* @__PURE__ */ jsx8(
1420
+ const detail = openedBlock ? /* @__PURE__ */ jsx7(ContextReceiptBlockDetail, { block: openedBlock, load: loadView }) : selected ? /* @__PURE__ */ jsx7(
1450
1421
  RowDetail,
1451
1422
  {
1452
1423
  row: selected,
@@ -1460,8 +1431,8 @@ function ContextRulesPanelBody({
1460
1431
  }
1461
1432
  ) : null;
1462
1433
  const sideBySide = !isMobile;
1463
- return /* @__PURE__ */ jsx8(TooltipProvider4, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs8("div", { "data-slot": "context-rules-panel", className: cn7("@container flex h-full min-h-0 min-w-0", className), children: [
1464
- /* @__PURE__ */ jsxs8(
1434
+ return /* @__PURE__ */ jsx7(TooltipProvider4, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs7("div", { "data-slot": "context-rules-panel", className: cn7("@container flex h-full min-h-0 min-w-0", className), children: [
1435
+ /* @__PURE__ */ jsxs7(
1465
1436
  "aside",
1466
1437
  {
1467
1438
  "data-slot": "context-rules-list",
@@ -1475,8 +1446,8 @@ function ContextRulesPanelBody({
1475
1446
  ]
1476
1447
  }
1477
1448
  ),
1478
- detail ? /* @__PURE__ */ jsxs8("section", { "data-slot": "context-rules-detail", className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
1479
- /* @__PURE__ */ jsx8(
1449
+ detail ? /* @__PURE__ */ jsxs7("section", { "data-slot": "context-rules-detail", className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
1450
+ /* @__PURE__ */ jsx7(
1480
1451
  "div",
1481
1452
  {
1482
1453
  className: cn7(
@@ -1484,7 +1455,7 @@ function ContextRulesPanelBody({
1484
1455
  comfortable ? "h-12" : "h-8",
1485
1456
  sideBySide && "@min-[40rem]:hidden"
1486
1457
  ),
1487
- children: /* @__PURE__ */ jsxs8(
1458
+ children: /* @__PURE__ */ jsxs7(
1488
1459
  "button",
1489
1460
  {
1490
1461
  type: "button",
@@ -1494,14 +1465,14 @@ function ContextRulesPanelBody({
1494
1465
  comfortable ? "h-11 text-sm" : "h-7 text-xs"
1495
1466
  ),
1496
1467
  children: [
1497
- /* @__PURE__ */ jsx8(ChevronLeftIcon, { className: comfortable ? "h-4 w-4" : "h-3.5 w-3.5" }),
1468
+ /* @__PURE__ */ jsx7(ChevronLeftIcon, { className: comfortable ? "h-4 w-4" : "h-3.5 w-3.5" }),
1498
1469
  "Back"
1499
1470
  ]
1500
1471
  }
1501
1472
  )
1502
1473
  }
1503
1474
  ),
1504
- /* @__PURE__ */ jsx8("div", { className: "min-h-0 flex-1 overflow-y-auto", children: detail })
1475
+ /* @__PURE__ */ jsx7("div", { className: "min-h-0 flex-1 overflow-y-auto", children: detail })
1505
1476
  ] }) : null
1506
1477
  ] }) });
1507
1478
  }