asta-ui 0.9.4 → 0.9.6

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 (130) hide show
  1. package/css/asta.css +2 -2
  2. package/css/asta.js +1461 -1
  3. package/css/components.css +1900 -138
  4. package/css/runtime/agent.css +136 -0
  5. package/css/runtime/agent.js +173 -0
  6. package/css/runtime/assist.css +79 -0
  7. package/css/runtime/assist.js +799 -0
  8. package/css/runtime/controls.css +48 -0
  9. package/css/runtime/controls.js +482 -0
  10. package/css/src/agent.css +484 -0
  11. package/css/src/assist.css +598 -0
  12. package/css/src/controls.css +424 -0
  13. package/css/tokens.css +16 -0
  14. package/dist/agent-plan.d.ts +2 -0
  15. package/dist/agent-plan.js +11 -0
  16. package/dist/agent-team.d.ts +2 -0
  17. package/dist/agent-team.js +7 -0
  18. package/dist/api-keys.d.ts +2 -0
  19. package/dist/api-keys.js +10 -0
  20. package/dist/autonomy-dial.d.ts +2 -0
  21. package/dist/autonomy-dial.js +7 -0
  22. package/dist/base/agent-plan.d.ts +2 -0
  23. package/dist/base/agent-plan.js +11 -0
  24. package/dist/base/agent-team.d.ts +2 -0
  25. package/dist/base/agent-team.js +7 -0
  26. package/dist/base/api-keys.d.ts +2 -0
  27. package/dist/base/api-keys.js +10 -0
  28. package/dist/base/autonomy-dial.d.ts +2 -0
  29. package/dist/base/autonomy-dial.js +7 -0
  30. package/dist/base/change-ledger.d.ts +2 -0
  31. package/dist/base/change-ledger.js +7 -0
  32. package/dist/base/citations.d.ts +2 -0
  33. package/dist/base/citations.js +9 -0
  34. package/dist/base/context-meter.d.ts +2 -0
  35. package/dist/base/context-meter.js +14 -0
  36. package/dist/base/fallback-chain.d.ts +2 -0
  37. package/dist/base/fallback-chain.js +7 -0
  38. package/dist/base/model-picker.d.ts +2 -0
  39. package/dist/base/model-picker.js +9 -0
  40. package/dist/base/prompt-composer.d.ts +2 -0
  41. package/dist/base/prompt-composer.js +9 -0
  42. package/dist/base/scrub-input.d.ts +2 -0
  43. package/dist/base/scrub-input.js +13 -0
  44. package/dist/base/thinking.d.ts +2 -0
  45. package/dist/base/thinking.js +11 -0
  46. package/dist/base/tool-approval.d.ts +2 -0
  47. package/dist/base/tool-approval.js +9 -0
  48. package/dist/base/trace-waterfall.d.ts +2 -0
  49. package/dist/base/trace-waterfall.js +9 -0
  50. package/dist/base.js +202 -134
  51. package/dist/change-ledger.d.ts +2 -0
  52. package/dist/change-ledger.js +7 -0
  53. package/dist/chunk-24O5V2PQ.js +253 -0
  54. package/dist/chunk-44DNL43W.js +490 -0
  55. package/dist/chunk-45IXJ7W7.js +245 -0
  56. package/dist/chunk-ANL6VX4X.js +326 -0
  57. package/dist/chunk-DNROUJ62.js +432 -0
  58. package/dist/chunk-F4CWSZXK.js +226 -0
  59. package/dist/chunk-GBOJUMMY.js +163 -0
  60. package/dist/chunk-H4NFBYKY.js +275 -0
  61. package/dist/chunk-KFPGQ5RT.js +321 -0
  62. package/dist/chunk-OIIMYSVT.js +342 -0
  63. package/dist/chunk-TL32C2SQ.js +221 -0
  64. package/dist/chunk-UBTYMAKF.js +240 -0
  65. package/dist/chunk-W6YVDJHX.js +235 -0
  66. package/dist/chunk-XYQI4ZYV.js +314 -0
  67. package/dist/citations.d.ts +2 -0
  68. package/dist/citations.js +9 -0
  69. package/dist/context-meter.d.ts +2 -0
  70. package/dist/context-meter.js +14 -0
  71. package/dist/fallback-chain.d.ts +2 -0
  72. package/dist/fallback-chain.js +7 -0
  73. package/dist/index.js +202 -134
  74. package/dist/model-picker.d.ts +2 -0
  75. package/dist/model-picker.js +9 -0
  76. package/dist/prompt-composer.d.ts +2 -0
  77. package/dist/prompt-composer.js +9 -0
  78. package/dist/scrub-input.d.ts +2 -0
  79. package/dist/scrub-input.js +13 -0
  80. package/dist/thinking.d.ts +2 -0
  81. package/dist/thinking.js +11 -0
  82. package/dist/tool-approval.d.ts +2 -0
  83. package/dist/tool-approval.js +9 -0
  84. package/dist/trace-waterfall.d.ts +2 -0
  85. package/dist/trace-waterfall.js +9 -0
  86. package/dist/types/components/kit/agent-plan.d.ts +34 -0
  87. package/dist/types/components/kit/api-keys.d.ts +62 -0
  88. package/dist/types/components/kit/citations.d.ts +34 -0
  89. package/dist/types/components/kit/context-meter.d.ts +38 -0
  90. package/dist/types/components/kit/model-picker.d.ts +46 -0
  91. package/dist/types/components/kit/prompt-composer.d.ts +61 -0
  92. package/dist/types/components/kit/scrub-input.d.ts +44 -0
  93. package/dist/types/components/kit/thinking.d.ts +28 -0
  94. package/dist/types/components/kit/tool-approval.d.ts +43 -0
  95. package/dist/types/components/kit/trace-waterfall.d.ts +44 -0
  96. package/dist/types/components/lab/blocks/AgentTeam.d.ts +2 -0
  97. package/dist/types/components/lab/blocks/AutonomyDial.d.ts +2 -0
  98. package/dist/types/components/lab/blocks/ChangeLedger.d.ts +2 -0
  99. package/dist/types/components/lab/blocks/FallbackChain.d.ts +2 -0
  100. package/dist/types/packages/asta-ui/src/agent-plan.d.ts +2 -0
  101. package/dist/types/packages/asta-ui/src/agent-team.d.ts +2 -0
  102. package/dist/types/packages/asta-ui/src/api-keys.d.ts +2 -0
  103. package/dist/types/packages/asta-ui/src/autonomy-dial.d.ts +2 -0
  104. package/dist/types/packages/asta-ui/src/base/agent-plan.d.ts +2 -0
  105. package/dist/types/packages/asta-ui/src/base/agent-team.d.ts +2 -0
  106. package/dist/types/packages/asta-ui/src/base/api-keys.d.ts +2 -0
  107. package/dist/types/packages/asta-ui/src/base/autonomy-dial.d.ts +2 -0
  108. package/dist/types/packages/asta-ui/src/base/change-ledger.d.ts +2 -0
  109. package/dist/types/packages/asta-ui/src/base/citations.d.ts +2 -0
  110. package/dist/types/packages/asta-ui/src/base/context-meter.d.ts +2 -0
  111. package/dist/types/packages/asta-ui/src/base/fallback-chain.d.ts +2 -0
  112. package/dist/types/packages/asta-ui/src/base/model-picker.d.ts +2 -0
  113. package/dist/types/packages/asta-ui/src/base/prompt-composer.d.ts +2 -0
  114. package/dist/types/packages/asta-ui/src/base/scrub-input.d.ts +2 -0
  115. package/dist/types/packages/asta-ui/src/base/thinking.d.ts +2 -0
  116. package/dist/types/packages/asta-ui/src/base/tool-approval.d.ts +2 -0
  117. package/dist/types/packages/asta-ui/src/base/trace-waterfall.d.ts +2 -0
  118. package/dist/types/packages/asta-ui/src/base.d.ts +25 -1
  119. package/dist/types/packages/asta-ui/src/change-ledger.d.ts +2 -0
  120. package/dist/types/packages/asta-ui/src/citations.d.ts +2 -0
  121. package/dist/types/packages/asta-ui/src/context-meter.d.ts +2 -0
  122. package/dist/types/packages/asta-ui/src/fallback-chain.d.ts +2 -0
  123. package/dist/types/packages/asta-ui/src/index.d.ts +25 -1
  124. package/dist/types/packages/asta-ui/src/model-picker.d.ts +2 -0
  125. package/dist/types/packages/asta-ui/src/prompt-composer.d.ts +2 -0
  126. package/dist/types/packages/asta-ui/src/scrub-input.d.ts +2 -0
  127. package/dist/types/packages/asta-ui/src/thinking.d.ts +2 -0
  128. package/dist/types/packages/asta-ui/src/tool-approval.d.ts +2 -0
  129. package/dist/types/packages/asta-ui/src/trace-waterfall.d.ts +2 -0
  130. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ export * from "./types/packages/asta-ui/src/trace-waterfall";
2
+ export { default } from "./types/packages/asta-ui/src/trace-waterfall";
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ TraceWaterfall,
4
+ trace_waterfall_default
5
+ } from "./chunk-OIIMYSVT.js";
6
+ export {
7
+ TraceWaterfall,
8
+ trace_waterfall_default as default
9
+ };
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from "react";
2
+ export type PlanStepStatus = "pending" | "running" | "done" | "skipped" | "failed";
3
+ export interface PlanStep {
4
+ id: string;
5
+ title: string;
6
+ status: PlanStepStatus;
7
+ /** The live log line while running, or a short result or reason once settled. */
8
+ detail?: string;
9
+ /** When the step started (epoch ms). A running step counts up from here. */
10
+ startedAt?: number;
11
+ /** How long it took in ms, once settled. */
12
+ duration?: number;
13
+ /** Smaller steps inside this one. They show when the row is open. */
14
+ substeps?: PlanStep[];
15
+ }
16
+ export interface AgentPlanProps {
17
+ /** What the agent is doing, e.g. "Migrate billing to usage-based plans". */
18
+ title: string;
19
+ steps: PlanStep[];
20
+ /** Something on the right of the header, e.g. a Stop button. */
21
+ action?: ReactNode;
22
+ /** Shown under the list, e.g. Retry after a failure. */
23
+ footer?: ReactNode;
24
+ className?: string;
25
+ }
26
+ /** 4200 → "4.2s", 75000 → "1m 15s". */
27
+ export declare const formatStepTime: (ms: number) => string;
28
+ /**
29
+ * A task list an agent works through while you watch. Steps go from pending to running to done, skipped or
30
+ * failed, each with its own timer. The running step opens by itself to show its live log line, and its check
31
+ * draws in when it finishes. Failures use a word and an icon, not red.
32
+ */
33
+ export declare function AgentPlan({ title, steps, action, footer, className }: AgentPlanProps): import("react").JSX.Element;
34
+ export default AgentPlan;
@@ -0,0 +1,62 @@
1
+ import { type ReactNode } from "react";
2
+ export interface ApiKey {
3
+ id: string;
4
+ name: string;
5
+ /** Start of the key, e.g. "ak_live". */
6
+ prefix: string;
7
+ /** Last four characters of the secret. */
8
+ last4: string;
9
+ scopes: string[];
10
+ created: Date;
11
+ lastUsed?: Date | null;
12
+ /** When it stops working. Leave out for no expiry. */
13
+ expires?: Date | null;
14
+ }
15
+ export interface ApiKeyScope {
16
+ value: string;
17
+ label: string;
18
+ hint?: string;
19
+ }
20
+ export interface NewApiKey {
21
+ name: string;
22
+ scopes: string[];
23
+ /** null means it never expires. */
24
+ expiresInDays: number | null;
25
+ }
26
+ export interface ApiKeysProps {
27
+ defaultKeys?: ApiKey[];
28
+ scopes?: ApiKeyScope[];
29
+ expiryOptions?: {
30
+ label: string;
31
+ days: number | null;
32
+ }[];
33
+ /** Create the key on your server and return it with the full secret. Reject to keep the form and show an error. */
34
+ onCreate?: (input: NewApiKey) => Promise<{
35
+ key: ApiKey;
36
+ secret: string;
37
+ }> | {
38
+ key: ApiKey;
39
+ secret: string;
40
+ };
41
+ /** Called once the undo window has passed. */
42
+ onRevoke?: (id: string) => void;
43
+ /** Shows placeholder rows in the final layout. */
44
+ loading?: boolean;
45
+ /** Load error. Shown instead of the list, with a retry button when `onRetry` is set. */
46
+ error?: string | null;
47
+ onRetry?: () => void;
48
+ /** How long a revoke can be undone, in ms. */
49
+ undoMs?: number;
50
+ /** Override "now" for relative times. */
51
+ now?: Date;
52
+ title?: string;
53
+ description?: ReactNode;
54
+ className?: string;
55
+ }
56
+ /**
57
+ * A settings section for API keys: a list of keys with masked prefixes, scopes, last use and status. Create a key
58
+ * in an inline form and its secret shows once in a highlighted row with a copy button, then masks for good.
59
+ * Revoking asks first and leaves a few seconds to undo. Stacks into cards on narrow screens.
60
+ */
61
+ export declare function ApiKeys({ defaultKeys, scopes, expiryOptions, onCreate, onRevoke, loading, error, onRetry, undoMs, now: nowProp, title, description, className, }: ApiKeysProps): import("react").JSX.Element;
62
+ export default ApiKeys;
@@ -0,0 +1,34 @@
1
+ export interface CitationSource {
2
+ title: string;
3
+ /** Shown under the title and used for the letter tile, e.g. "fieldnotes.dev". */
4
+ domain: string;
5
+ /** The passage the answer leans on. */
6
+ snippet: string;
7
+ /** The exact part of `snippet` that was cited. It is highlighted in the preview. */
8
+ quote?: string;
9
+ /** Opens the source. Without it the source card is not a link. */
10
+ url?: string;
11
+ /** e.g. "Oct 2026". */
12
+ date?: string;
13
+ }
14
+ export interface CitationsProps {
15
+ /**
16
+ * The answer. Mark a citation with its source number in brackets: "Revenue grew 18% [1]." Several at once:
17
+ * "[1, 3]" or "[1][3]". A blank line starts a new paragraph.
18
+ */
19
+ text: string;
20
+ /** Source 1 is `sources[0]`. */
21
+ sources: CitationSource[];
22
+ /** Keeps the layout with placeholder lines while the answer loads. */
23
+ loading?: boolean;
24
+ /** How many source cards show before "Show all". Default 3. */
25
+ visible?: number;
26
+ className?: string;
27
+ }
28
+ /**
29
+ * An answer with numbered citation pills. Hover or focus a pill to preview its source: title, domain and
30
+ * the quoted passage with the cited part highlighted. The Sources row below expands into a full list, and
31
+ * hovering a source lights up its pills in the text. Tap a pill on touch screens.
32
+ */
33
+ export declare function Citations({ text, sources, loading, visible, className }: CitationsProps): import("react").JSX.Element;
34
+ export default Citations;
@@ -0,0 +1,38 @@
1
+ import { type PopoverAlign, type PopoverSide } from "./popover";
2
+ export interface ContextSegment {
3
+ label: string;
4
+ tokens: number;
5
+ }
6
+ export interface ContextBreakdownProps {
7
+ /** What fills the window, e.g. system prompt, tools, files, conversation. */
8
+ segments: ContextSegment[];
9
+ /** Size of the context window in tokens. */
10
+ max: number;
11
+ /** Model name shown in the header. */
12
+ model?: string;
13
+ /** From this share of `max` (0–1) the ring and bar turn ink and a note shows. Default 0.8. */
14
+ warnAt?: number;
15
+ /** Shows "Compact conversation". Return a promise and the button shows progress until it settles. */
16
+ onCompact?: () => void | Promise<void>;
17
+ className?: string;
18
+ }
19
+ export interface ContextMeterProps extends ContextBreakdownProps {
20
+ /** `sm` shows the ring and percentage only. */
21
+ size?: "sm" | "md";
22
+ side?: PopoverSide;
23
+ align?: PopoverAlign;
24
+ }
25
+ /** 182600 → "182.6k", 200000 → "200k". */
26
+ export declare const formatTokens: (n: number) => string;
27
+ /**
28
+ * The full breakdown of a context window: total used, a segmented bar, a legend per part and a Compact action.
29
+ * When usage drops, the bar glides down and the total counts down to the new value. ContextMeter shows it in a
30
+ * popover; place it on its own in a side panel.
31
+ */
32
+ export declare function ContextBreakdown({ segments, max, model, warnAt, onCompact, className }: ContextBreakdownProps): import("react").JSX.Element;
33
+ /**
34
+ * How much of the model's context window a conversation uses. A compact ring and "62% of 200k" open a breakdown
35
+ * by part with a Compact action. Near the limit the ring turns ink and the label says so in words.
36
+ */
37
+ export declare function ContextMeter({ size, side, align, ...props }: ContextMeterProps): import("react").JSX.Element;
38
+ export default ContextMeter;
@@ -0,0 +1,46 @@
1
+ export interface ModelOption {
2
+ value: string;
3
+ label: string;
4
+ /** Family heading the model sits under, e.g. "Astra 2". Models keep their order inside a group. */
5
+ group?: string;
6
+ /** One line about what it is good at. */
7
+ hint?: string;
8
+ /** Short tag next to the name in the trigger, e.g. "Pro" or "Fast". */
9
+ tag?: string;
10
+ /** 1 to 5. */
11
+ speed: number;
12
+ /** 1 to 5. */
13
+ intelligence: number;
14
+ /** Context window label, e.g. "200K". */
15
+ context?: string;
16
+ isNew?: boolean;
17
+ disabled?: boolean;
18
+ /** Why it is disabled, shown instead of the hint. */
19
+ disabledReason?: string;
20
+ }
21
+ export interface ModelPickerProps {
22
+ models: ModelOption[];
23
+ value?: string;
24
+ defaultValue?: string;
25
+ onChange?: (value: string) => void;
26
+ /** Accessible name of the trigger and the list. */
27
+ label?: string;
28
+ /** Show a search field at the top of the list. Default true. */
29
+ searchable?: boolean;
30
+ /** `field` is a bordered select, `chip` a quiet trigger for toolbars (e.g. inside a prompt composer). */
31
+ variant?: "field" | "chip";
32
+ /** Where the list opens. Default bottom. */
33
+ side?: "bottom" | "top";
34
+ align?: "start" | "end";
35
+ /** Form field name, submitted as a hidden input. */
36
+ name?: string;
37
+ disabled?: boolean;
38
+ className?: string;
39
+ }
40
+ /**
41
+ * A select for AI models. The list is grouped by family and every row shows a one-line hint, speed and
42
+ * intelligence dots, the context size and a New badge. Search filters as you type. Arrows, Home/End,
43
+ * Enter and Escape work, and without search, typing jumps to a model. The selection mark slides between rows.
44
+ */
45
+ export declare function ModelPicker({ models, value, defaultValue, onChange, label, searchable, variant, side, align, name, disabled, className, }: ModelPickerProps): import("react").JSX.Element;
46
+ export default ModelPicker;
@@ -0,0 +1,61 @@
1
+ import { type ReactNode } from "react";
2
+ export interface ComposerMention {
3
+ id: string;
4
+ label: string;
5
+ type: "file" | "person" | "doc";
6
+ /** Muted text on the right, e.g. a path or a role. */
7
+ hint?: string;
8
+ }
9
+ export interface ComposerCommand {
10
+ id: string;
11
+ /** Without the slash, e.g. "summarize". */
12
+ label: string;
13
+ hint?: string;
14
+ }
15
+ export type ComposerPart = {
16
+ type: "text";
17
+ text: string;
18
+ } | {
19
+ type: "mention";
20
+ item: ComposerMention;
21
+ } | {
22
+ type: "command";
23
+ item: ComposerCommand;
24
+ };
25
+ export interface ComposerMessage {
26
+ /** Plain text with tokens written as @label and /label. */
27
+ text: string;
28
+ /** Text and tokens in order, for when you need the ids. */
29
+ parts: ComposerPart[];
30
+ files: File[];
31
+ }
32
+ export interface PromptComposerProps {
33
+ onSend: (message: ComposerMessage) => void;
34
+ /** Called by the Stop button and by Escape while `running`. */
35
+ onStop?: () => void;
36
+ /** The agent is working: Send turns into Stop and a light orbits the border. */
37
+ running?: boolean;
38
+ /** Offered when you type @. */
39
+ mentions?: ComposerMention[];
40
+ /** Offered when you type /. */
41
+ commands?: ComposerCommand[];
42
+ /** A slot in the toolbar, e.g. a `ModelPicker` with variant="chip" side="top". */
43
+ model?: ReactNode;
44
+ placeholder?: string;
45
+ /** Accessible name of the field. Default "Message". */
46
+ label?: string;
47
+ /** `accept` for the file picker. */
48
+ accept?: string;
49
+ /** Bytes. Default 20 MB. */
50
+ maxFileSize?: number;
51
+ disabled?: boolean;
52
+ className?: string;
53
+ }
54
+ /**
55
+ * The input of an agent app. The field grows as you type. @ opens a mention menu for files, people and docs,
56
+ * / opens commands, and a pick becomes a token chip that Backspace removes in one go. Attach files as chips,
57
+ * put a model picker in the toolbar, and press Enter to send (Shift + Enter for a new line). While the agent
58
+ * works, Send turns into Stop and a band of light orbits the border.
59
+ */
60
+ export declare function PromptComposer({ onSend, onStop, running, mentions, commands, model, placeholder, label, accept, maxFileSize, disabled, className, }: PromptComposerProps): import("react").JSX.Element;
61
+ export default PromptComposer;
@@ -0,0 +1,44 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * Reads what was typed into a scrub field without eval: numbers with an optional unit ("12px", "1.5rem", "45°"),
4
+ * + − × ÷ and brackets. A leading +, * or / works on the current value ("+8", "*2"). Returns null when it can't.
5
+ */
6
+ export declare function parseScrubValue(text: string, current: number, unit?: string): number | null;
7
+ export interface ScrubInputProps {
8
+ /** Short prefix you drag to scrub: "X", "W" or a small icon. */
9
+ label: ReactNode;
10
+ /** Full name for screen readers and the tooltip, e.g. "Rotation". Needed when the label is an icon or one letter. */
11
+ title?: string;
12
+ value?: number;
13
+ defaultValue?: number;
14
+ /** Fires on every change, also while scrubbing. */
15
+ onChange?: (value: number) => void;
16
+ min?: number;
17
+ max?: number;
18
+ /** One arrow press, or 2px of drag. Shift is ×10, Alt is ×0.1. */
19
+ step?: number;
20
+ /** Most decimals kept. Trailing zeros are hidden. */
21
+ precision?: number;
22
+ /** Unit of the value: px, rem, °, %, ms… Typed units of the same kind convert ("1.5rem" → 24 in a px field). */
23
+ unit?: string;
24
+ /** Submits the number with a form through a hidden input. */
25
+ name?: string;
26
+ disabled?: boolean;
27
+ size?: "sm" | "md";
28
+ className?: string;
29
+ }
30
+ /**
31
+ * The number field of a design tool. Drag the label left or right to scrub (Shift ×10, Alt ×0.1), or click and
32
+ * type. It reads units and simple sums like "24*2" or "+8" on Enter. Arrow keys step. At min or max the value
33
+ * nudges toward the edge and a short bar shows which limit it hit.
34
+ */
35
+ export declare function ScrubInput({ label, title, value, defaultValue, onChange, min, max, step, precision, unit, name, disabled, size, className }: ScrubInputProps): import("react").JSX.Element;
36
+ export interface ScrubRowProps {
37
+ /** Muted label on the left, e.g. "Position". */
38
+ label?: string;
39
+ cols?: 1 | 2 | 3 | 4;
40
+ children: ReactNode;
41
+ className?: string;
42
+ }
43
+ export declare function ScrubRow({ label, cols, children, className }: ScrubRowProps): import("react").JSX.Element;
44
+ export default ScrubInput;
@@ -0,0 +1,28 @@
1
+ export type ThinkingStatus = "thinking" | "done" | "stopped";
2
+ export interface ThinkingProps {
3
+ /** `thinking` runs the shimmer and the timer. `done` and `stopped` freeze them and fold the panel. */
4
+ status?: ThinkingStatus;
5
+ /** Reasoning summary lines. Append to the array while thinking and each new line fades in. */
6
+ steps?: string[];
7
+ /** One line shown under the header once finished, while folded. Defaults to the last step. */
8
+ summary?: string;
9
+ /** Elapsed seconds, if you track time yourself. Leave it out and the component times itself. */
10
+ seconds?: number;
11
+ /** Label while thinking. */
12
+ label?: string;
13
+ open?: boolean;
14
+ defaultOpen?: boolean;
15
+ onOpenChange?: (open: boolean) => void;
16
+ /** `block` shows a preview line and the panel under the header. `inline` is one line that sits in text, with no panel. */
17
+ variant?: "block" | "inline";
18
+ size?: "sm" | "md";
19
+ className?: string;
20
+ }
21
+ export declare const formatThinkingTime: (s: number) => string;
22
+ /**
23
+ * Shows that a model is reasoning. The label shimmers and a timer counts up while it thinks, and the reasoning
24
+ * summary streams in line by line inside a disclosure. When it finishes the shimmer stops, the label reads
25
+ * "Thought for 12s" and the panel folds down to one summary line you can open again.
26
+ */
27
+ export declare function Thinking({ status, steps, summary, seconds, label, open, defaultOpen, onOpenChange, variant, size, className, }: ThinkingProps): import("react").JSX.Element;
28
+ export default Thinking;
@@ -0,0 +1,43 @@
1
+ export type ToolDecision = "deny" | "once" | "always";
2
+ /** `read` only looks, `write` changes data you can change back, `destructive` can't be undone or reaches people. */
3
+ export type ToolRisk = "read" | "write" | "destructive";
4
+ export type ToolKind = "sql" | "shell" | "file" | "web" | "mail";
5
+ export interface ToolCallRequest {
6
+ id: string;
7
+ /** The tool's name as the agent calls it, e.g. `run_sql`. */
8
+ tool: string;
9
+ /** What the call will do, in one plain sentence. */
10
+ summary?: string;
11
+ /** Where it runs, e.g. "Postgres · billing-prod". */
12
+ source?: string;
13
+ kind?: ToolKind;
14
+ /** Arguments as a key/value list. */
15
+ args?: Record<string, string | number | boolean>;
16
+ /** A query or command, shown as code. Long ones fold after six lines. */
17
+ code?: string;
18
+ /** A file change. Lines start with "+", "-" or a space. */
19
+ diff?: {
20
+ file: string;
21
+ lines: string[];
22
+ };
23
+ risk?: ToolRisk;
24
+ /** Overrides the risk hint text, e.g. "Sends to 214 customers". */
25
+ note?: string;
26
+ }
27
+ export interface ToolApprovalProps {
28
+ /** Calls waiting for a decision, oldest first. Add to the array as the agent asks for more. */
29
+ calls: ToolCallRequest[];
30
+ /** Runs the tool once allowed (or is told it was denied). Return a promise and its time shows on the receipt. Throw to mark it failed. */
31
+ onDecide?: (call: ToolCallRequest, decision: ToolDecision) => void | Promise<unknown>;
32
+ /** Tools that never ask, e.g. remembered from an earlier session. */
33
+ defaultAllowed?: string[];
34
+ className?: string;
35
+ }
36
+ /**
37
+ * A permission card for an agent's tool call. It shows the tool, the arguments as key/value pairs, a query or a
38
+ * diff, and a risk hint in words. Deny, Allow once, or Always allow from the split menu, and the card folds into a
39
+ * one-line receipt with the run time. Enter allows and Esc denies while the card has focus. Queued calls stack
40
+ * behind it, and "Always allow" clears the queued calls to the same tool.
41
+ */
42
+ export declare function ToolApproval({ calls, onDecide, defaultAllowed, className }: ToolApprovalProps): import("react").JSX.Element;
43
+ export default ToolApproval;
@@ -0,0 +1,44 @@
1
+ export type SpanKind = "agent" | "llm" | "tool" | "retrieval";
2
+ export interface TraceSpan {
3
+ id: string;
4
+ /** Nests the span under another one. */
5
+ parentId?: string;
6
+ name: string;
7
+ kind: SpanKind;
8
+ /** Milliseconds from the start of the run. */
9
+ start: number;
10
+ /** Milliseconds. Leave it out while the span is still running (live mode). */
11
+ duration?: number;
12
+ model?: string;
13
+ tokensIn?: number;
14
+ tokensOut?: number;
15
+ /** In US dollars. */
16
+ cost?: number;
17
+ status?: "ok" | "error";
18
+ /** What went wrong, shown in the detail panel. */
19
+ error?: string;
20
+ input?: string;
21
+ output?: string;
22
+ }
23
+ export interface TraceWaterfallProps {
24
+ spans: TraceSpan[];
25
+ title?: string;
26
+ /** Running spans grow with the clock and new spans animate in as you append them. */
27
+ live?: boolean;
28
+ /** When the run started (epoch ms). Needed for live mode. */
29
+ startedAt?: number;
30
+ selected?: string | null;
31
+ defaultSelected?: string | null;
32
+ onSelect?: (id: string | null) => void;
33
+ /** Keeps the layout with placeholder rows. */
34
+ loading?: boolean;
35
+ className?: string;
36
+ }
37
+ /**
38
+ * An agent run as an APM-style waterfall. Spans nest as a tree you can fold, and their bars sit on a shared
39
+ * time axis with tokens, cost and latency beside them. Bars grow in from the left on first paint, and in live
40
+ * mode running spans stretch with the clock while new ones slide in. Select a span to see its input and output.
41
+ * Failed spans say "Error" with an icon. On phones the table scrolls sideways and the span names stay put.
42
+ */
43
+ export declare function TraceWaterfall({ spans, title, live, startedAt, selected, defaultSelected, onSelect, loading, className }: TraceWaterfallProps): import("react").JSX.Element;
44
+ export default TraceWaterfall;
@@ -0,0 +1,2 @@
1
+ /** A lead agent splits a goal into three subagent tasks. They work, report back one by one and merge into a summary. Hover to pause. */
2
+ export default function AgentTeam(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** An autonomy dial for an agent: as it turns, actions glide from "Asks first" to "Runs alone". Drag it, or use the arrows. */
2
+ export default function AutonomyDial(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** A feed of changes an agent made. Undo one and it strikes through, and the changes that depend on it dim. */
2
+ export default function ChangeLedger(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** A request falls through models in order: one times out, one is rate limited, the last answers and the reply streams in. */
2
+ export default function FallbackChain(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/kit/agent-plan";
2
+ export { default } from "../../../components/kit/agent-plan";
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/lab/blocks/AgentTeam";
2
+ export { default } from "../../../components/lab/blocks/AgentTeam";
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/kit/api-keys";
2
+ export { default } from "../../../components/kit/api-keys";
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/lab/blocks/AutonomyDial";
2
+ export { default } from "../../../components/lab/blocks/AutonomyDial";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/agent-plan";
2
+ export { default } from "../../../../components/kit/agent-plan";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/lab/blocks/AgentTeam";
2
+ export { default } from "../../../../components/lab/blocks/AgentTeam";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/api-keys";
2
+ export { default } from "../../../../components/kit/api-keys";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/lab/blocks/AutonomyDial";
2
+ export { default } from "../../../../components/lab/blocks/AutonomyDial";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/lab/blocks/ChangeLedger";
2
+ export { default } from "../../../../components/lab/blocks/ChangeLedger";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/citations";
2
+ export { default } from "../../../../components/kit/citations";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/context-meter";
2
+ export { default } from "../../../../components/kit/context-meter";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/lab/blocks/FallbackChain";
2
+ export { default } from "../../../../components/lab/blocks/FallbackChain";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/model-picker";
2
+ export { default } from "../../../../components/kit/model-picker";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/prompt-composer";
2
+ export { default } from "../../../../components/kit/prompt-composer";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/scrub-input";
2
+ export { default } from "../../../../components/kit/scrub-input";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/thinking";
2
+ export { default } from "../../../../components/kit/thinking";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/tool-approval";
2
+ export { default } from "../../../../components/kit/tool-approval";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../components/kit/trace-waterfall";
2
+ export { default } from "../../../../components/kit/trace-waterfall";
@@ -87,7 +87,7 @@ export { WorkspaceSwitcher } from "../../../components/kit/workspace-switcher";
87
87
  export type { Workspace, WorkspaceSwitcherProps } from "../../../components/kit/workspace-switcher";
88
88
  export { ToolDock } from "../../../components/kit/tool-dock";
89
89
  export type { DockTool, ToolDockProps } from "../../../components/kit/tool-dock";
90
- export { PropertiesPanel, PropSection, PropRow, ScrubInput, ColorField } from "../../../components/kit/properties-panel";
90
+ export { PropertiesPanel, PropSection, PropRow, ScrubInput as PropertiesPanelScrubInput, ColorField } from "../../../components/kit/properties-panel";
91
91
  export type { PropertiesPanelProps, PropSectionProps, PropRowProps, ScrubInputProps, ColorFieldProps } from "../../../components/kit/properties-panel";
92
92
  export { EmptyState } from "../../../components/kit/base/empty-state";
93
93
  export type { EmptyStateVariant, EmptyStateAction, EmptyStateProps } from "../../../components/kit/base/empty-state";
@@ -165,6 +165,26 @@ export { SettingsPanel } from "../../../components/kit/base/settings-panel";
165
165
  export type { Settings, SettingsPanelHandle, SettingsPanelProps } from "../../../components/kit/base/settings-panel";
166
166
  export { Newsletter, Footer } from "../../../components/kit/base/footer";
167
167
  export type { FooterColumn, FooterProps } from "../../../components/kit/base/footer";
168
+ export { formatThinkingTime, Thinking } from "../../../components/kit/thinking";
169
+ export type { ThinkingStatus, ThinkingProps } from "../../../components/kit/thinking";
170
+ export { formatTokens, ContextBreakdown, ContextMeter } from "../../../components/kit/context-meter";
171
+ export type { ContextSegment, ContextBreakdownProps, ContextMeterProps } from "../../../components/kit/context-meter";
172
+ export { parseScrubValue, ScrubInput, ScrubRow } from "../../../components/kit/scrub-input";
173
+ export type { ScrubInputProps as ScrubInputScrubInputProps, ScrubRowProps } from "../../../components/kit/scrub-input";
174
+ export { ModelPicker } from "../../../components/kit/model-picker";
175
+ export type { ModelOption, ModelPickerProps } from "../../../components/kit/model-picker";
176
+ export { Citations } from "../../../components/kit/citations";
177
+ export type { CitationSource, CitationsProps } from "../../../components/kit/citations";
178
+ export { ToolApproval } from "../../../components/kit/tool-approval";
179
+ export type { ToolDecision, ToolRisk, ToolKind, ToolCallRequest, ToolApprovalProps } from "../../../components/kit/tool-approval";
180
+ export { formatStepTime, AgentPlan } from "../../../components/kit/agent-plan";
181
+ export type { PlanStepStatus, PlanStep, AgentPlanProps } from "../../../components/kit/agent-plan";
182
+ export { PromptComposer } from "../../../components/kit/prompt-composer";
183
+ export type { ComposerMention, ComposerCommand, ComposerPart, ComposerMessage, PromptComposerProps } from "../../../components/kit/prompt-composer";
184
+ export { TraceWaterfall } from "../../../components/kit/trace-waterfall";
185
+ export type { SpanKind, TraceSpan, TraceWaterfallProps } from "../../../components/kit/trace-waterfall";
186
+ export { ApiKeys } from "../../../components/kit/api-keys";
187
+ export type { ApiKey, ApiKeyScope, NewApiKey, ApiKeysProps } from "../../../components/kit/api-keys";
168
188
  export { TextareaField, default as TextareaAui001 } from "../../../components/kit/variants/textarea-aui-001";
169
189
  export type { TextareaFieldProps } from "../../../components/kit/variants/textarea-aui-001";
170
190
  export { AutoGrowTextarea, default as TextareaAui002 } from "../../../components/kit/variants/textarea-aui-002";
@@ -330,3 +350,7 @@ export { default as Watchlist } from "../../../components/lab/blocks/Watchlist";
330
350
  export { default as SplitBill } from "../../../components/lab/blocks/SplitBill";
331
351
  export { default as FlashSale } from "../../../components/lab/blocks/FlashSale";
332
352
  export { default as PriceAlert } from "../../../components/lab/blocks/PriceAlert";
353
+ export { default as FallbackChain } from "../../../components/lab/blocks/FallbackChain";
354
+ export { default as AutonomyDial } from "../../../components/lab/blocks/AutonomyDial";
355
+ export { default as AgentTeam } from "../../../components/lab/blocks/AgentTeam";
356
+ export { default as ChangeLedger } from "../../../components/lab/blocks/ChangeLedger";
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/lab/blocks/ChangeLedger";
2
+ export { default } from "../../../components/lab/blocks/ChangeLedger";
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/kit/citations";
2
+ export { default } from "../../../components/kit/citations";
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/kit/context-meter";
2
+ export { default } from "../../../components/kit/context-meter";
@@ -0,0 +1,2 @@
1
+ export * from "../../../components/lab/blocks/FallbackChain";
2
+ export { default } from "../../../components/lab/blocks/FallbackChain";