@lincyaw/aegis-ui 0.3.0 → 0.6.0

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 (162) hide show
  1. package/README.md +82 -5
  2. package/dist/agent/AgentProvider.d.ts +4 -0
  3. package/dist/agent/AskOverlay.d.ts +0 -1
  4. package/dist/agent/AskPanel.d.ts +0 -1
  5. package/dist/agent/agentContext.d.ts +6 -2
  6. package/dist/agent/agentmChannelClient.d.ts +1 -0
  7. package/dist/agent/runtime.d.ts +6 -1
  8. package/dist/agent/usePrimitiveSurface.d.ts +30 -0
  9. package/dist/commands/CommandProvider.d.ts +3 -3
  10. package/dist/commands/commandContext.d.ts +2 -2
  11. package/dist/components/ui/AgentPanel.d.ts +3 -10
  12. package/dist/components/ui/Alert.d.ts +14 -0
  13. package/dist/components/ui/AmbientBackground.d.ts +23 -0
  14. package/dist/components/ui/AuthLayout.d.ts +1 -1
  15. package/dist/components/ui/Avatar.d.ts +14 -14
  16. package/dist/components/ui/BlastRadiusBar.d.ts +6 -13
  17. package/dist/components/ui/Breadcrumb.d.ts +4 -14
  18. package/dist/components/ui/BucketCard.d.ts +1 -1
  19. package/dist/components/ui/Button.d.ts +26 -4
  20. package/dist/components/ui/Carousel.d.ts +28 -0
  21. package/dist/components/ui/ChatComposer.d.ts +1 -1
  22. package/dist/components/ui/ChatMessage.d.ts +7 -14
  23. package/dist/components/ui/ChatMessageList.d.ts +3 -10
  24. package/dist/components/ui/ChatSessionList.d.ts +0 -1
  25. package/dist/components/ui/CheckGrid.d.ts +47 -0
  26. package/dist/components/ui/Checkbox.d.ts +14 -0
  27. package/dist/components/ui/Chip.d.ts +17 -14
  28. package/dist/components/ui/CodeBlock.d.ts +11 -15
  29. package/dist/components/ui/CodeEditor.d.ts +6 -13
  30. package/dist/components/ui/Collapse.d.ts +16 -0
  31. package/dist/components/ui/ColumnLayout.d.ts +16 -0
  32. package/dist/components/ui/CommandInvocationCard.d.ts +7 -14
  33. package/dist/components/ui/CommandPalette.d.ts +0 -1
  34. package/dist/components/ui/ContentInspectorContent.d.ts +14 -0
  35. package/dist/components/ui/ContentInspectorDialog.d.ts +15 -0
  36. package/dist/components/ui/ControlListItem.d.ts +4 -2
  37. package/dist/components/ui/DangerZone.d.ts +1 -1
  38. package/dist/components/ui/DataList.d.ts +3 -11
  39. package/dist/components/ui/DataTable.d.ts +86 -10
  40. package/dist/components/ui/Dialog.d.ts +21 -0
  41. package/dist/components/ui/DiffViewer.d.ts +6 -13
  42. package/dist/components/ui/DropdownMenu.d.ts +6 -2
  43. package/dist/components/ui/EmptyState.d.ts +1 -1
  44. package/dist/components/ui/EnvironmentSwitcher.d.ts +0 -1
  45. package/dist/components/ui/ErrorState.d.ts +8 -2
  46. package/dist/components/ui/EventTable.d.ts +0 -1
  47. package/dist/components/ui/FileDropzone.d.ts +1 -1
  48. package/dist/components/ui/FilePreview.d.ts +8 -15
  49. package/dist/components/ui/FileTree.d.ts +27 -0
  50. package/dist/components/ui/FolderDropzone.d.ts +0 -1
  51. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -1
  52. package/dist/components/ui/FormRow.d.ts +1 -1
  53. package/dist/components/ui/IdentityCell.d.ts +25 -0
  54. package/dist/components/ui/InboxPage.d.ts +3 -10
  55. package/dist/components/ui/KeyValueList.d.ts +3 -10
  56. package/dist/components/ui/LoginForm.d.ts +1 -1
  57. package/dist/components/ui/Markdown.d.ts +9 -3
  58. package/dist/components/ui/MdxDocument.d.ts +17 -0
  59. package/dist/components/ui/MetadataList.d.ts +0 -1
  60. package/dist/components/ui/MetricCard.d.ts +7 -14
  61. package/dist/components/ui/MetricLabel.d.ts +2 -1
  62. package/dist/components/ui/MonoValue.d.ts +6 -11
  63. package/dist/components/ui/NotificationBell.d.ts +1 -1
  64. package/dist/components/ui/ObjectBrowser.d.ts +1 -1
  65. package/dist/components/ui/ObjectInspector.d.ts +0 -1
  66. package/dist/components/ui/PageHeader.d.ts +8 -3
  67. package/dist/components/ui/PageSizeSelect.d.ts +9 -2
  68. package/dist/components/ui/Pagination.d.ts +13 -0
  69. package/dist/components/ui/Panel.d.ts +35 -14
  70. package/dist/components/ui/PanelTitle.d.ts +3 -3
  71. package/dist/components/ui/ParetoChart.d.ts +41 -0
  72. package/dist/components/ui/ParquetViewer.d.ts +8 -15
  73. package/dist/components/ui/PasswordField.d.ts +1 -1
  74. package/dist/components/ui/PickerField.d.ts +17 -0
  75. package/dist/components/ui/ProjectSelector.d.ts +8 -2
  76. package/dist/components/ui/QueryAutocomplete.d.ts +0 -1
  77. package/dist/components/ui/RankBar.d.ts +25 -0
  78. package/dist/components/ui/RegisterForm.d.ts +1 -1
  79. package/dist/components/ui/ResizableSidePanel.d.ts +17 -2
  80. package/dist/components/ui/Reveal.d.ts +17 -0
  81. package/dist/components/ui/RunPips.d.ts +25 -0
  82. package/dist/components/ui/SavedQueryBar.d.ts +0 -1
  83. package/dist/components/ui/ScoreBar.d.ts +21 -0
  84. package/dist/components/ui/SearchInput.d.ts +6 -2
  85. package/dist/components/ui/SectionDivider.d.ts +1 -1
  86. package/dist/components/ui/Select.d.ts +25 -0
  87. package/dist/components/ui/SessionRunView.d.ts +50 -0
  88. package/dist/components/ui/SettingsSection.d.ts +1 -1
  89. package/dist/components/ui/ShareLinkDialog.d.ts +22 -6
  90. package/dist/components/ui/SparkLine.d.ts +3 -10
  91. package/dist/components/ui/StackedBar.d.ts +47 -0
  92. package/dist/components/ui/StatBlock.d.ts +15 -16
  93. package/dist/components/ui/StatusDot.d.ts +2 -2
  94. package/dist/components/ui/TableOfContents.d.ts +20 -0
  95. package/dist/components/ui/Tabs.d.ts +12 -2
  96. package/dist/components/ui/Terminal.d.ts +3 -10
  97. package/dist/components/ui/TextField.d.ts +1 -1
  98. package/dist/components/ui/TimeDisplay.d.ts +3 -3
  99. package/dist/components/ui/TimeRangePicker.d.ts +0 -1
  100. package/dist/components/ui/Timeline.d.ts +23 -15
  101. package/dist/components/ui/ToolCallCard.d.ts +3 -10
  102. package/dist/components/ui/Toolbar.d.ts +0 -1
  103. package/dist/components/ui/TraceSpanInspector.d.ts +15 -0
  104. package/dist/components/ui/TraceTree.d.ts +16 -14
  105. package/dist/components/ui/TrajectoryStep.d.ts +16 -10
  106. package/dist/components/ui/TrajectoryTimeline.d.ts +5 -11
  107. package/dist/components/ui/UploadQueue.d.ts +1 -1
  108. package/dist/components/ui/codeFence.d.ts +5 -0
  109. package/dist/components/ui/index.d.ts +51 -5
  110. package/dist/components/ui/linkComponent.d.ts +12 -0
  111. package/dist/components/ui/mdxTableOfContents.d.ts +13 -0
  112. package/dist/components/ui/relativeTime.d.ts +1 -1
  113. package/dist/components/ui/tablistKeyboard.d.ts +6 -0
  114. package/dist/components/ui/traceFormat.d.ts +5 -0
  115. package/dist/hooks/index.d.ts +2 -0
  116. package/dist/hooks/useCopyToClipboard.d.ts +8 -0
  117. package/dist/hooks/useElementWidth.d.ts +3 -0
  118. package/dist/hooks/useMediaQuery.d.ts +2 -0
  119. package/dist/hooks/useMenuPopover.d.ts +27 -0
  120. package/dist/hooks/usePageHidden.d.ts +2 -0
  121. package/dist/hooks/useResizable.d.ts +9 -0
  122. package/dist/index.cjs +13 -1
  123. package/dist/index.cjs.map +1 -1
  124. package/dist/index.d.ts +8 -5
  125. package/dist/index.js +12123 -123
  126. package/dist/index.js.map +1 -1
  127. package/dist/layouts/shell/AegisShell.d.ts +1 -1
  128. package/dist/layouts/shell/AuthRequiredCard.d.ts +2 -2
  129. package/dist/layouts/shell/TopHeader.d.ts +9 -1
  130. package/dist/layouts/shell/paths.d.ts +11 -0
  131. package/dist/layouts/shell/types.d.ts +40 -13
  132. package/dist/lib/format.d.ts +2 -0
  133. package/dist/lib/id.d.ts +2 -0
  134. package/dist/lib/luceneQuery/lucene.d.ts +63 -0
  135. package/dist/lib/storage.d.ts +12 -0
  136. package/dist/locale/LocaleProvider.d.ts +9 -0
  137. package/dist/locale/index.d.ts +4 -0
  138. package/dist/locale/localeContext.d.ts +2 -0
  139. package/dist/locale/strings.d.ts +110 -0
  140. package/dist/locale/useStrings.d.ts +2 -0
  141. package/dist/mdx-modules.d.ts +22 -0
  142. package/dist/style.css +1 -1
  143. package/dist/theme/antdTheme.d.ts +2 -3
  144. package/dist/vite.cjs +2 -0
  145. package/dist/vite.cjs.map +1 -0
  146. package/dist/vite.d.ts +7 -0
  147. package/dist/vite.js +18 -0
  148. package/dist/vite.js.map +1 -0
  149. package/package.json +43 -18
  150. package/dist/index-6WZzHI2Z.cjs +0 -1151
  151. package/dist/index-6WZzHI2Z.cjs.map +0 -1
  152. package/dist/index-CZ_qegBG.js +0 -6736
  153. package/dist/index-CZ_qegBG.js.map +0 -1
  154. package/dist/index-DLXAAlfH.cjs +0 -15
  155. package/dist/index-DLXAAlfH.cjs.map +0 -1
  156. package/dist/index-DtgBxtmy.js +0 -56284
  157. package/dist/index-DtgBxtmy.js.map +0 -1
  158. package/dist/styles/fonts.d.ts +0 -0
  159. package/dist/workerBundle-D52AeOj1.js +0 -76
  160. package/dist/workerBundle-D52AeOj1.js.map +0 -1
  161. package/dist/workerBundle-FGNDqtbW.cjs +0 -73
  162. package/dist/workerBundle-FGNDqtbW.cjs.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  export interface ShareLinkOptions {
2
3
  ttlSeconds: number;
3
4
  /** When true, response forces attachment download instead of inline render. */
@@ -7,9 +8,16 @@ export interface ShareLinkResult {
7
8
  url: string;
8
9
  expiresAt: string;
9
10
  }
10
- interface ShareLinkDialogProps {
11
+ interface ShareLinkDialogBaseProps {
11
12
  /** Object key being shared — displayed at the top for context. */
12
13
  objectKey: string;
14
+ /** Context under the object key, e.g. what the link opens and that it is read-only. */
15
+ description?: ReactNode;
16
+ /** Optional cancel/close handler — renders a secondary button. */
17
+ onClose?: () => void;
18
+ className?: string;
19
+ }
20
+ interface ExpiringShareLinkProps extends ShareLinkDialogBaseProps {
13
21
  /** Available TTL presets shown as chips. */
14
22
  ttlPresets?: Array<{
15
23
  label: string;
@@ -17,9 +25,17 @@ interface ShareLinkDialogProps {
17
25
  }>;
18
26
  /** Asked when user clicks "Generate". Resolves to URL + expires. */
19
27
  onGenerate: (opts: ShareLinkOptions) => Promise<ShareLinkResult>;
20
- /** Optional cancel/close handler — renders a secondary button. */
21
- onClose?: () => void;
22
- className?: string;
28
+ url?: undefined;
29
+ }
30
+ interface PlainShareLinkProps extends ShareLinkDialogBaseProps {
31
+ /**
32
+ * A link that does not expire, e.g. the current page. It is shown with a
33
+ * copy button and no TTL presets, download toggle or countdown.
34
+ */
35
+ url: string;
36
+ ttlPresets?: undefined;
37
+ onGenerate?: undefined;
23
38
  }
24
- export declare function ShareLinkDialog({ objectKey, ttlPresets, onGenerate, onClose, className, }: ShareLinkDialogProps): import("react/jsx-runtime").JSX.Element;
25
- export default ShareLinkDialog;
39
+ type ShareLinkDialogProps = ExpiringShareLinkProps | PlainShareLinkProps;
40
+ export declare function ShareLinkDialog({ objectKey, description, url: plainUrl, ttlPresets: ttlPresetsProp, onGenerate, onClose, className, }: ShareLinkDialogProps): import("react/jsx-runtime").JSX.Element;
41
+ export {};
@@ -1,12 +1,5 @@
1
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
2
- export interface SparkLineSurface {
3
- id: string;
4
- kind?: SurfaceKind;
5
- label?: string;
6
- project: (points: number[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
7
- askSuggestions?: string[];
8
- ask?: boolean;
9
- }
1
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
2
+ export type SparkLineSurface = PrimitiveSurface<number[]>;
10
3
  interface SparkLineProps {
11
4
  /** Sample values; rendered evenly on the X axis. */
12
5
  points: number[];
@@ -24,4 +17,4 @@ interface SparkLineProps {
24
17
  surface?: SparkLineSurface;
25
18
  }
26
19
  export declare function SparkLine({ points, width, height, strokeWidth, withBackdrop, inverted, className, ariaLabel, surface, }: SparkLineProps): import("react/jsx-runtime").JSX.Element;
27
- export default SparkLine;
20
+ export {};
@@ -0,0 +1,47 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Segment colour from the data palette: `seq` for a single magnitude,
4
+ * `cat-1`…`cat-6` to tell categories apart, `unknown` a neutral muted fill
5
+ * with a hairline edge for a share not classified yet.
6
+ */
7
+ export type StackedBarColor = 'seq' | 'cat-1' | 'cat-2' | 'cat-3' | 'cat-4' | 'cat-5' | 'cat-6' | 'unknown';
8
+ /** One category stacked in every bar, listed in the legend. */
9
+ export interface StackedBarSeries<K extends string> {
10
+ key: K;
11
+ /** Legend text; also names the segment in each bar's accessible label. */
12
+ label: string;
13
+ color: StackedBarColor;
14
+ }
15
+ export interface StackedBarRow<K extends string> {
16
+ key: string;
17
+ label: ReactNode;
18
+ /** Every series' value in this row, keyed by series key. */
19
+ values: Readonly<Record<K, number>>;
20
+ /** Muted text after the row total, e.g. "已复核 30". */
21
+ note?: ReactNode;
22
+ }
23
+ export interface StackedBarProps<K extends string> {
24
+ /** Categories, stacked left to right in this order. */
25
+ series: Array<StackedBarSeries<K>>;
26
+ rows: Array<StackedBarRow<K>>;
27
+ /** Upper bound of the scale. Defaults to the largest row total, or 1 when all are 0. */
28
+ max?: number;
29
+ /** Scale hint between the 0 and maximum ticks, e.g. "越低越好". */
30
+ direction?: ReactNode;
31
+ format?: (value: number) => string;
32
+ /**
33
+ * `table` lists the same rows as a data table in place of the bars, for
34
+ * the host's "查看数据表" control.
35
+ */
36
+ view?: 'chart' | 'table';
37
+ /** Table header of the row label column, e.g. "模型". */
38
+ labelHeader: ReactNode;
39
+ /** Table header of the row total column, e.g. "合计". */
40
+ totalHeader: ReactNode;
41
+ className?: string;
42
+ }
43
+ /**
44
+ * Horizontal stacked bars on one shared scale: a label, the series
45
+ * segments of each row drawn in from the left, and the row total.
46
+ */
47
+ export declare function StackedBar<K extends string>({ series, rows, max, direction, format, view, labelHeader, totalHeader, className, }: StackedBarProps<K>): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
3
- export interface StatBlockSurface {
4
- id: string;
5
- kind?: SurfaceKind;
6
- label?: string;
7
- project: (data: {
8
- label: ReactNode;
9
- value: ReactNode;
10
- unit?: ReactNode;
11
- }) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
12
- askSuggestions?: string[];
13
- ask?: boolean;
14
- }
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
+ export type StatBlockSurface = PrimitiveSurface<{
4
+ label: ReactNode;
5
+ value: ReactNode;
6
+ unit?: ReactNode;
7
+ }>;
15
8
  interface StatBlockProps {
16
9
  label: ReactNode;
17
10
  value: ReactNode;
@@ -19,11 +12,17 @@ interface StatBlockProps {
19
12
  unit?: ReactNode;
20
13
  /** Layout direction. Default: horizontal (label · value, baseline). */
21
14
  direction?: 'horizontal' | 'vertical';
22
- /** Use the larger 18 px mono variant. */
15
+ /** Value in the number type role instead of the numeric role. */
23
16
  emphasized?: boolean;
17
+ /**
18
+ * When `value` is a number, counts it up from 0 once on mount over
19
+ * `--motion-chart`, keeping its decimal places. Shows the final value at
20
+ * once under prefers-reduced-motion.
21
+ */
22
+ animateValue?: boolean;
24
23
  inverted?: boolean;
25
24
  className?: string;
26
25
  surface?: StatBlockSurface;
27
26
  }
28
- export declare function StatBlock({ label, value, unit, direction, emphasized, inverted, className, surface, }: StatBlockProps): import("react/jsx-runtime").JSX.Element;
29
- export default StatBlock;
27
+ export declare function StatBlock({ label, value, unit, direction, emphasized, animateValue, inverted, className, surface, }: StatBlockProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -1,8 +1,8 @@
1
1
  interface StatusDotProps {
2
2
  pulse?: boolean;
3
- tone?: 'ink' | 'inverted' | 'warning' | 'muted';
3
+ tone?: 'ink' | 'inverted' | 'warning' | 'muted' | 'success';
4
4
  size?: number;
5
5
  className?: string;
6
6
  }
7
7
  export declare function StatusDot({ pulse, tone, size, className, }: StatusDotProps): import("react/jsx-runtime").JSX.Element;
8
- export default StatusDot;
8
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ export interface TableOfContentsItem {
3
+ /** The id of the section element, already in the document, the item links to. */
4
+ id: string;
5
+ label: ReactNode;
6
+ /** Nesting depth of the section; 2 and 3 indent the label. Defaults to 1. */
7
+ level?: 1 | 2 | 3;
8
+ }
9
+ export interface TableOfContentsProps {
10
+ /** The sections in document order. */
11
+ items: TableOfContentsItem[];
12
+ /** Controls the current item; omit it to follow the scroll position. */
13
+ currentId?: string;
14
+ /** Called with the id that scrolling or a click makes current. */
15
+ onCurrentChange?: (id: string) => void;
16
+ /** The element that scrolls the sections; omitted or null means the viewport. */
17
+ scrollContainer?: HTMLElement | null;
18
+ className?: string;
19
+ }
20
+ export declare function TableOfContents({ items, currentId, onCurrentChange, scrollContainer, className, }: TableOfContentsProps): ReactElement;
@@ -12,7 +12,17 @@ interface TabsProps {
12
12
  defaultActiveKey?: string;
13
13
  onChange?: (key: string) => void;
14
14
  children?: ReactNode;
15
+ /**
16
+ * Renders the tab list without a tabpanel, for tabs that switch a view
17
+ * rendered elsewhere (site navigation, a toolbar view switch).
18
+ */
19
+ listOnly?: boolean;
20
+ /**
21
+ * `sm` makes each tab `--size-control-sm` tall, so the whole list is
22
+ * `--size-control-base` and lines up with inputs in a toolbar.
23
+ */
24
+ size?: 'md' | 'sm';
15
25
  className?: string;
16
26
  }
17
- export declare function Tabs({ items, activeKey: controlledKey, defaultActiveKey, onChange, children, className, }: TabsProps): import("react/jsx-runtime").JSX.Element;
18
- export default Tabs;
27
+ export declare function Tabs({ items, activeKey: controlledKey, defaultActiveKey, onChange, children, listOnly, size, className, }: TabsProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
3
  export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
4
4
  export interface TerminalLine {
5
5
  ts?: string;
@@ -7,14 +7,7 @@ export interface TerminalLine {
7
7
  level?: LogLevel;
8
8
  body: ReactNode;
9
9
  }
10
- export interface TerminalSurface {
11
- id: string;
12
- kind?: SurfaceKind;
13
- label?: string;
14
- project: (lines: TerminalLine[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
15
- askSuggestions?: string[];
16
- ask?: boolean;
17
- }
10
+ export type TerminalSurface = PrimitiveSurface<TerminalLine[]>;
18
11
  interface TerminalProps {
19
12
  lines: TerminalLine[];
20
13
  ariaLabel?: string;
@@ -22,4 +15,4 @@ interface TerminalProps {
22
15
  surface?: TerminalSurface;
23
16
  }
24
17
  export declare function Terminal({ lines, ariaLabel, className, surface, }: TerminalProps): import("react/jsx-runtime").JSX.Element;
25
- export default Terminal;
18
+ export {};
@@ -7,4 +7,4 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'si
7
7
  trailingIcon?: ReactNode;
8
8
  }
9
9
  export declare const TextField: import('react').ForwardRefExoticComponent<TextFieldProps & import('react').RefAttributes<HTMLInputElement>>;
10
- export default TextField;
10
+ export {};
@@ -1,11 +1,11 @@
1
1
  interface TimeDisplayProps {
2
2
  /** ISO string, timestamp ms, or Date object. */
3
3
  value: string | number | Date;
4
- /** 'absolute' = full timestamp, 'relative' = "2 m ago", 'duration' = elapsed time. */
4
+ /** 'absolute' = full timestamp, 'relative' = "2m ago", 'duration' = elapsed time. */
5
5
  mode?: 'absolute' | 'relative' | 'duration';
6
6
  /** For relative mode: refresh interval in ms (default 60 000). */
7
7
  refreshMs?: number;
8
8
  className?: string;
9
9
  }
10
- export declare function TimeDisplay({ value, mode, className, }: TimeDisplayProps): import("react/jsx-runtime").JSX.Element;
11
- export default TimeDisplay;
10
+ export declare function TimeDisplay({ value, mode, refreshMs, className, }: TimeDisplayProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -15,4 +15,3 @@ export interface TimeRangePickerProps {
15
15
  className?: string;
16
16
  }
17
17
  export declare function TimeRangePicker({ value, onChange, presets, now, placeholder, disabled, className, }: TimeRangePickerProps): import("react/jsx-runtime").JSX.Element;
18
- export default TimeRangePicker;
@@ -1,32 +1,40 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
3
  export interface TimelineItem {
4
4
  id: string;
5
5
  /** Headline — actor / event / verb, e.g. "alice@aegis updated `db.dsn`". */
6
6
  title: ReactNode;
7
7
  /** Body — optional secondary line. */
8
8
  description?: ReactNode;
9
- /** Absolute timestamp; rendered with `var(--font-mono)`. */
9
+ /** Absolute timestamp, in the mono role. */
10
10
  timestamp?: ReactNode;
11
- /** Slot at the end of the row (e.g. revision chip). */
11
+ /** Slot at the end of the title row, in the mono role (e.g. a revision). */
12
12
  meta?: ReactNode;
13
- /** Override dot colour with a CSS custom property name or raw token. */
13
+ /** CSS colour for the dot, e.g. `var(--accent-success)`. */
14
14
  dotColor?: string;
15
+ /**
16
+ * Leading mono label in the `numbered` variant, e.g. a step number.
17
+ * Defaults to the 1-based position, zero-padded to two digits.
18
+ */
19
+ marker?: ReactNode;
15
20
  }
16
- export interface TimelineSurface {
17
- id: string;
18
- kind?: SurfaceKind;
19
- label?: string;
20
- project: (items: TimelineItem[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
21
- askSuggestions?: string[];
22
- ask?: boolean;
23
- }
21
+ export type TimelineSurface = PrimitiveSurface<TimelineItem[]>;
24
22
  interface TimelineProps {
25
23
  items: TimelineItem[];
26
- /** Reverse visual order (newest first vs oldest first). Doesn't sort. */
24
+ /**
25
+ * `numbered` replaces the dot and connector with a leading mono marker
26
+ * column, separates rows with hairlines and keeps the line breaks of
27
+ * each description.
28
+ */
29
+ variant?: 'dot' | 'numbered';
30
+ /**
31
+ * `compact` keeps each title on one line with an ellipsis (a string title
32
+ * shows in full on hover) and tightens the rows.
33
+ */
34
+ density?: 'comfortable' | 'compact';
27
35
  className?: string;
28
36
  style?: CSSProperties;
29
37
  surface?: TimelineSurface;
30
38
  }
31
- export declare function Timeline({ items, className, style, surface }: TimelineProps): import("react/jsx-runtime").JSX.Element;
32
- export default Timeline;
39
+ export declare function Timeline({ items, variant, density, className, style, surface, }: TimelineProps): import("react/jsx-runtime").JSX.Element;
40
+ export {};
@@ -1,4 +1,4 @@
1
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
1
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
2
2
  export type ToolCallStatus = 'running' | 'ok' | 'error';
3
3
  export interface ToolCallData {
4
4
  name: string;
@@ -7,18 +7,11 @@ export interface ToolCallData {
7
7
  status?: ToolCallStatus;
8
8
  isError?: boolean;
9
9
  }
10
- export interface ToolCallCardSurface {
11
- id: string;
12
- kind?: SurfaceKind;
13
- label?: string;
14
- project: (data: ToolCallData) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
15
- askSuggestions?: string[];
16
- ask?: boolean;
17
- }
10
+ export type ToolCallCardSurface = PrimitiveSurface<ToolCallData>;
18
11
  interface ToolCallCardProps {
19
12
  data: ToolCallData;
20
13
  className?: string;
21
14
  surface?: ToolCallCardSurface;
22
15
  }
23
16
  export declare function ToolCallCard({ data, className, surface }: ToolCallCardProps): import("react/jsx-runtime").JSX.Element;
24
- export default ToolCallCard;
17
+ export {};
@@ -21,4 +21,3 @@ export interface ToolbarProps {
21
21
  className?: string;
22
22
  }
23
23
  export declare function Toolbar({ left, center, right, searchPlaceholder, searchValue, onSearchChange, filters, onFilterRemove, onClearFilters, action, className, }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
24
- export default Toolbar;
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { TraceSpan } from './TraceTree';
3
+ export interface TraceSpanInspectorProps {
4
+ span: TraceSpan | null;
5
+ onClose: () => void;
6
+ /** Optional resolver to render related spans (parent + children) as clickable refs. */
7
+ spanLookup?: (id: string) => TraceSpan | undefined;
8
+ /** Called when a related span is clicked. */
9
+ onSelectRelated?: (span: TraceSpan) => void;
10
+ /** Optional raw OTel attributes from the original span row (for the Raw tab JSON). */
11
+ raw?: unknown;
12
+ /** The span's content, shown in the Overview tab under its facts. */
13
+ detail?: ReactNode;
14
+ }
15
+ export declare function TraceSpanInspector({ span, onClose, spanLookup, onSelectRelated, raw, detail, }: TraceSpanInspectorProps): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,17 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
3
- export interface TraceTreeSurface {
4
- id: string;
5
- kind?: SurfaceKind;
6
- label?: string;
7
- project: (spans: TraceSpan[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
8
- askSuggestions?: string[];
9
- ask?: boolean;
10
- }
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
+ export type TraceTreeSurface = PrimitiveSurface<TraceSpan[]>;
11
4
  export interface TraceSpan {
12
5
  id: string;
13
6
  parentId?: string | null;
14
7
  name: string;
15
- /** Milliseconds since trace start. */
16
- startMs: number;
17
- durationMs: number;
8
+ /**
9
+ * Milliseconds since trace start. Leave `startMs` and `durationMs` out for a
10
+ * span whose time is not recorded: its row draws no bar, and siblings that are
11
+ * not all timed keep the order they are given in.
12
+ */
13
+ startMs?: number;
14
+ durationMs?: number;
18
15
  status?: 'ok' | 'error' | 'unset';
19
16
  /** Short label rendered as a chip on the left of the row. */
20
17
  kind?: ReactNode;
@@ -30,6 +27,11 @@ interface TraceTreeProps {
30
27
  className?: string;
31
28
  style?: CSSProperties;
32
29
  surface?: TraceTreeSurface;
30
+ nameColumnWidth?: number;
31
+ defaultNameColumnWidth?: number;
32
+ onNameColumnWidthChange?: (w: number) => void;
33
+ persistKey?: string;
34
+ wrapName?: boolean;
33
35
  }
34
- export declare function TraceTree({ spans, selectedId, onSelect, defaultCollapsedDepth, className, style, surface, }: TraceTreeProps): import("react/jsx-runtime").JSX.Element;
35
- export default TraceTree;
36
+ export declare function TraceTree({ spans, selectedId, onSelect, defaultCollapsedDepth, className, style, surface, nameColumnWidth, defaultNameColumnWidth, onNameColumnWidthChange, persistKey, wrapName, }: TraceTreeProps): import("react/jsx-runtime").JSX.Element;
37
+ export {};
@@ -1,23 +1,29 @@
1
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
1
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
2
2
  import { ToolCallData } from './ToolCallCard';
3
+ /** A labelled text of a step beyond its thought, action and observation. */
4
+ export interface TrajectoryStepSection {
5
+ label: string;
6
+ text: string;
7
+ /** `text` keeps the text as recorded, preformatted and scrolling past a cap. */
8
+ format?: 'markdown' | 'text';
9
+ }
3
10
  export interface TrajectoryStepData {
4
11
  step: number;
5
12
  timestamp?: string;
6
13
  durationMs?: number;
14
+ /** The head's one-line preview; defaults to `action`. */
15
+ summary?: string;
7
16
  thought?: string;
8
17
  action?: string;
9
18
  actionType?: 'tool_call' | 'message' | 'internal';
10
19
  toolCall?: ToolCallData;
20
+ /** Further calls of the step, each a card after `toolCall`. */
21
+ toolCalls?: ToolCallData[];
11
22
  observation?: string;
23
+ /** Shown after the thought and action, before the tool calls. */
24
+ sections?: TrajectoryStepSection[];
12
25
  }
13
- export interface TrajectoryStepSurface {
14
- id: string;
15
- kind?: SurfaceKind;
16
- label?: string;
17
- project: (data: TrajectoryStepData) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
18
- askSuggestions?: string[];
19
- ask?: boolean;
20
- }
26
+ export type TrajectoryStepSurface = PrimitiveSurface<TrajectoryStepData>;
21
27
  interface TrajectoryStepProps {
22
28
  data: TrajectoryStepData;
23
29
  defaultExpanded?: boolean;
@@ -25,4 +31,4 @@ interface TrajectoryStepProps {
25
31
  surface?: TrajectoryStepSurface;
26
32
  }
27
33
  export declare function TrajectoryStep({ data, defaultExpanded, className, surface, }: TrajectoryStepProps): import("react/jsx-runtime").JSX.Element;
28
- export default TrajectoryStep;
34
+ export {};
@@ -1,22 +1,16 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
3
  import { TrajectoryStepData } from './TrajectoryStep';
4
- export interface TrajectoryTimelineSurface {
5
- id: string;
6
- kind?: SurfaceKind;
7
- label?: string;
8
- project: (steps: TrajectoryStepData[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
9
- askSuggestions?: string[];
10
- ask?: boolean;
11
- }
4
+ export type TrajectoryTimelineSurface = PrimitiveSurface<TrajectoryStepData[]>;
12
5
  export interface TrajectoryTimelineProps {
13
6
  steps: TrajectoryStepData[];
14
7
  agentName?: string;
15
8
  status?: 'running' | 'completed' | 'failed';
16
9
  totalDurationMs?: number;
17
10
  extra?: ReactNode;
11
+ /** `false` drops the agent, status and duration header, e.g. inside a titled Panel. */
12
+ header?: boolean;
18
13
  className?: string;
19
14
  surface?: TrajectoryTimelineSurface;
20
15
  }
21
- export declare function TrajectoryTimeline({ steps, agentName, status, totalDurationMs, extra, className, surface, }: TrajectoryTimelineProps): import("react/jsx-runtime").JSX.Element;
22
- export default TrajectoryTimeline;
16
+ export declare function TrajectoryTimeline({ steps, agentName, status, totalDurationMs, extra, header, className, surface, }: TrajectoryTimelineProps): import("react/jsx-runtime").JSX.Element;
@@ -10,4 +10,4 @@ interface UploadQueueProps {
10
10
  className?: string;
11
11
  }
12
12
  export declare function UploadQueue({ items, onRetry, onDismiss, onClearCompleted, className, }: UploadQueueProps): import("react/jsx-runtime").JSX.Element;
13
- export default UploadQueue;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The CodeBlock language of a fenced code block's `language-<name>` class,
3
+ * `text` when the fence names none.
4
+ */
5
+ export declare function fenceLanguage(className: string | undefined): string;
@@ -4,11 +4,20 @@
4
4
  * Add a new primitive ⇒ register it here so app code can `import { X } from
5
5
  * '@/components/ui'` without knowing the file layout.
6
6
  */
7
- export { Button } from './Button';
7
+ export { Button, ButtonLink } from './Button';
8
8
  export { Panel } from './Panel';
9
- export type { PanelSurface } from './Panel';
9
+ export type { PanelElevation, PanelSurface, PanelVariant } from './Panel';
10
10
  export { PanelTitle } from './PanelTitle';
11
+ export { AmbientBackground } from './AmbientBackground';
12
+ export type { AmbientBackgroundProps, AmbientBackgroundVariant, } from './AmbientBackground';
13
+ export { Reveal } from './Reveal';
14
+ export type { RevealProps } from './Reveal';
11
15
  export { Markdown } from './Markdown';
16
+ export type { MarkdownProps } from './Markdown';
17
+ export { MdxDocument } from './MdxDocument';
18
+ export type { MdxDocumentProps } from './MdxDocument';
19
+ export { mdxTableOfContents } from './mdxTableOfContents';
20
+ export type { MdxTocEntry } from './mdxTableOfContents';
12
21
  export { MetricLabel } from './MetricLabel';
13
22
  export { MonoValue } from './MonoValue';
14
23
  export type { MonoValueSurface } from './MonoValue';
@@ -20,6 +29,27 @@ export type { BlastRadiusBarSurface } from './BlastRadiusBar';
20
29
  export { ControlListItem } from './ControlListItem';
21
30
  export { Chip } from './Chip';
22
31
  export type { ChipSurface } from './Chip';
32
+ export { Checkbox } from './Checkbox';
33
+ export { Collapse } from './Collapse';
34
+ export type { CollapseItem } from './Collapse';
35
+ export { Alert } from './Alert';
36
+ export { Pagination } from './Pagination';
37
+ export { Select } from './Select';
38
+ export type { SelectOption } from './Select';
39
+ export { RankBar } from './RankBar';
40
+ export type { RankBarItem } from './RankBar';
41
+ export { ScoreBar } from './ScoreBar';
42
+ export { RunPips } from './RunPips';
43
+ export type { RunPipsCounts } from './RunPips';
44
+ export { ParetoChart } from './ParetoChart';
45
+ export type { ParetoLegendItem, ParetoPoint } from './ParetoChart';
46
+ export { CheckGrid } from './CheckGrid';
47
+ export type { CheckGridCell, CheckGridColumn, CheckGridProps, CheckGridRow, } from './CheckGrid';
48
+ export { StackedBar } from './StackedBar';
49
+ export type { StackedBarColor, StackedBarProps, StackedBarRow, StackedBarSeries, } from './StackedBar';
50
+ export { ColumnLayout } from './ColumnLayout';
51
+ export { PickerField } from './PickerField';
52
+ export { Dialog } from './Dialog';
23
53
  export { SectionDivider } from './SectionDivider';
24
54
  export { KeyValueList } from './KeyValueList';
25
55
  export type { KeyValueItem, KeyValueListSurface } from './KeyValueList';
@@ -30,7 +60,7 @@ export type { SparkLineSurface } from './SparkLine';
30
60
  export { MetricCard } from './MetricCard';
31
61
  export type { MetricCardSurface } from './MetricCard';
32
62
  export { TrajectoryStep } from './TrajectoryStep';
33
- export type { TrajectoryStepData, TrajectoryStepSurface, } from './TrajectoryStep';
63
+ export type { TrajectoryStepData, TrajectoryStepSection, TrajectoryStepSurface, } from './TrajectoryStep';
34
64
  export { TrajectoryTimeline } from './TrajectoryTimeline';
35
65
  export type { TrajectoryTimelineProps, TrajectoryTimelineSurface, } from './TrajectoryTimeline';
36
66
  export { ToolCallCard } from './ToolCallCard';
@@ -40,8 +70,16 @@ export { Skeleton, SkeletonText } from './Skeleton';
40
70
  export { TimeDisplay } from './TimeDisplay';
41
71
  export { CodeBlock } from './CodeBlock';
42
72
  export type { CodeBlockSurface } from './CodeBlock';
73
+ export { FileTree } from './FileTree';
74
+ export type { FileTreeFile, FileTreeProps } from './FileTree';
75
+ export { ContentInspectorDialog, ContentPreview, } from './ContentInspectorDialog';
76
+ export type { ContentInspectorDialogProps, ContentPreviewProps, } from './ContentInspectorDialog';
77
+ export { prepareInspectableContent } from './ContentInspectorContent';
78
+ export type { InspectableContent, InspectableContentKind, PreparedInspectableContent, } from './ContentInspectorContent';
79
+ export { SessionRunOutputView, SessionRunTrajectoryView, } from './SessionRunView';
80
+ export type { SessionRunFact, SessionRunMessage, SessionRunOutputViewProps, SessionRunSubmission, SessionRunSummary, SessionRunToolCall, SessionRunTrajectoryViewProps, } from './SessionRunView';
43
81
  export { DataTable } from './DataTable';
44
- export type { DataTableColumn, DataTableSurface } from './DataTable';
82
+ export type { DataTableCellTone, DataTableColumn, DataTablePagination, DataTableSurface, } from './DataTable';
45
83
  export { EventTable } from './EventTable';
46
84
  export type { EventTableColumn, EventTableProps } from './EventTable';
47
85
  export { DataList } from './DataList';
@@ -58,10 +96,16 @@ export { ObjectInspector } from './ObjectInspector';
58
96
  export type { ObjectInspectorProps, ObjectInspectorTab, } from './ObjectInspector';
59
97
  export { Tabs } from './Tabs';
60
98
  export type { TabItem } from './Tabs';
99
+ export { Carousel } from './Carousel';
100
+ export type { CarouselProps, CarouselSlide } from './Carousel';
61
101
  export { Breadcrumb } from './Breadcrumb';
62
102
  export type { BreadcrumbItem } from './Breadcrumb';
103
+ export { TableOfContents } from './TableOfContents';
104
+ export type { TableOfContentsItem, TableOfContentsProps, } from './TableOfContents';
63
105
  export { Avatar } from './Avatar';
64
- export type { AvatarSurface } from './Avatar';
106
+ export type { AvatarColorSlot, AvatarSurface } from './Avatar';
107
+ export { IdentityCell } from './IdentityCell';
108
+ export type { LinkComponent } from './linkComponent';
65
109
  export { DropdownMenu } from './DropdownMenu';
66
110
  export type { DropdownItem } from './DropdownMenu';
67
111
  export { PageSizeSelect } from './PageSizeSelect';
@@ -111,6 +155,8 @@ export { ParquetViewer } from './ParquetViewer';
111
155
  export type { ParquetViewerSurface } from './ParquetViewer';
112
156
  export { TraceTree } from './TraceTree';
113
157
  export type { TraceSpan, TraceTreeSurface } from './TraceTree';
158
+ export { TraceSpanInspector } from './TraceSpanInspector';
159
+ export type { TraceSpanInspectorProps } from './TraceSpanInspector';
114
160
  export { TimelineChart } from './TimelineChart';
115
161
  export type { TimelineChartProps, TimelineSpan } from './TimelineChart';
116
162
  export { BucketCard } from './BucketCard';
@@ -0,0 +1,12 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ /**
3
+ * Router link adapter for primitives that render links. Routed apps pass a
4
+ * wrapper around their router's `<Link>`; without one the primitive renders
5
+ * a plain `<a href>`, so primitives stay router-agnostic.
6
+ */
7
+ export type LinkComponent = ComponentType<{
8
+ to: string;
9
+ className?: string;
10
+ children: ReactNode;
11
+ }>;
12
+ export declare const DefaultLink: LinkComponent;
@@ -0,0 +1,13 @@
1
+ import { TableOfContentsItem } from './TableOfContents';
2
+ /** One heading of a document's `tableOfContents` export, with the headings under it. */
3
+ export interface MdxTocEntry {
4
+ value: string;
5
+ depth: number;
6
+ id?: string;
7
+ children?: MdxTocEntry[];
8
+ }
9
+ /**
10
+ * The table of contents of a document's `tableOfContents` export: its second
11
+ * and third level headings, in document order.
12
+ */
13
+ export declare function mdxTableOfContents(toc: MdxTocEntry[]): TableOfContentsItem[];