@actioneer/ads 0.3.0 → 0.4.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 (35) hide show
  1. package/components/ai-elements/agent-trace.d.ts +87 -0
  2. package/components/ai-elements/agent-trace.js +180 -0
  3. package/components/ai-elements/chain-of-thought.d.ts +25 -5
  4. package/components/ai-elements/chain-of-thought.js +227 -183
  5. package/components/ai-elements/index.d.ts +1 -0
  6. package/components/ai-elements/research-activity.d.ts +17 -0
  7. package/components/ai-elements/research-activity.js +125 -107
  8. package/components/ai-elements/task.d.ts +7 -3
  9. package/components/ai-elements/task.js +84 -52
  10. package/components/ai-elements/tool.js +19 -19
  11. package/components/ai-elements/voice.d.ts +28 -12
  12. package/components/ai-elements/voice.js +270 -649
  13. package/components/alert.js +28 -16
  14. package/components/assistant-ui/composer-harness.js +5 -4
  15. package/components/code-block.d.ts +11 -5
  16. package/components/code-block.js +161 -62
  17. package/components/index.js +259 -257
  18. package/components/scroll-area.js +10 -10
  19. package/components/sidebar.js +1 -1
  20. package/components/stepper.d.ts +17 -9
  21. package/components/stepper.js +85 -96
  22. package/lib/icons.js +2 -2
  23. package/lib/motion.d.ts +2 -0
  24. package/lib/motion.js +21 -20
  25. package/llms.txt +7 -1
  26. package/manifest.json +69 -6
  27. package/package.json +1 -1
  28. package/styles.css +110 -4
  29. package/theme.css +12 -4
  30. package/components/agents-ui/agent-audio-visualizer-aura.d.ts +0 -11
  31. package/components/agents-ui/agent-audio-visualizer-aura.js +0 -277
  32. package/components/agents-ui/agent-audio-visualizer-wave.d.ts +0 -12
  33. package/components/agents-ui/agent-audio-visualizer-wave.js +0 -203
  34. package/components/agents-ui/react-shader-toy.d.ts +0 -87
  35. package/components/agents-ui/react-shader-toy.js +0 -531
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { jsx as o, jsxs as l } from "react/jsx-runtime";
3
3
  import { isValidElement as c } from "react";
4
- import { Collapsible as u, CollapsibleContent as m, CollapsibleTrigger as p } from "../collapsible.js";
4
+ import { Collapsible as u, CollapsibleTrigger as m, CollapsibleContent as p } from "../collapsible.js";
5
5
  import { Badge as f } from "../badge.js";
6
6
  import { Wrench as g, ChevronDown as h, CloseCircle as x, CheckCircle as b, Clock as N, CircleDashed as v } from "../../lib/icons.js";
7
- import { cn as r } from "../../lib/cn.js";
7
+ import { cn as n } from "../../lib/cn.js";
8
8
  const w = ({ className: e, ...t }) => /* @__PURE__ */ o(
9
9
  u,
10
10
  {
11
- className: r(
11
+ className: n(
12
12
  "not-prose group/tool w-full overflow-hidden rounded-xl bg-card",
13
13
  e
14
14
  ),
@@ -22,12 +22,12 @@ const y = {
22
22
  "output-available": { label: "Completed", color: "success", icon: b },
23
23
  "output-error": { label: "Error", color: "danger", icon: x }
24
24
  }, C = ({ state: e }) => {
25
- const { label: t, color: n, icon: a, pulse: i } = y[e];
26
- return /* @__PURE__ */ l(f, { variant: "soft", color: n, children: [
25
+ const { label: t, color: r, icon: a, pulse: i } = y[e];
26
+ return /* @__PURE__ */ l(f, { variant: "soft", color: r, children: [
27
27
  /* @__PURE__ */ o(
28
28
  a,
29
29
  {
30
- className: r(
30
+ className: n(
31
31
  "size-3",
32
32
  i && "animate-pulse motion-reduce:animate-none"
33
33
  ),
@@ -43,14 +43,14 @@ function T(e) {
43
43
  const S = ({
44
44
  className: e,
45
45
  title: t,
46
- type: n,
46
+ type: r,
47
47
  state: a,
48
48
  ...i
49
49
  }) => /* @__PURE__ */ l(
50
- p,
50
+ m,
51
51
  {
52
- className: r(
53
- "group/tool-header flex w-full items-center justify-between gap-4 px-4 py-3 text-left transition-colors hover:bg-muted motion-reduce:transition-none",
52
+ className: n(
53
+ "group/tool-header flex w-full items-center justify-between gap-4 py-3 text-left transition-colors hover:text-primary motion-reduce:transition-none",
54
54
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
55
55
  e
56
56
  ),
@@ -58,7 +58,7 @@ const S = ({
58
58
  children: [
59
59
  /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
60
60
  /* @__PURE__ */ o(g, { className: "size-4 shrink-0 text-tertiary", "aria-hidden": !0 }),
61
- /* @__PURE__ */ o("span", { className: "font-medium text-base", children: t ?? T(n) }),
61
+ /* @__PURE__ */ o("span", { className: "font-medium text-base", children: t ?? T(r) }),
62
62
  /* @__PURE__ */ o(C, { state: a })
63
63
  ] }),
64
64
  /* @__PURE__ */ o(
@@ -73,9 +73,9 @@ const S = ({
73
73
  );
74
74
  S.displayName = "ToolHeader";
75
75
  const j = ({ className: e, ...t }) => /* @__PURE__ */ o(
76
- m,
76
+ p,
77
77
  {
78
- className: r(
78
+ className: n(
79
79
  "overflow-hidden text-foreground outline-none",
80
80
  "data-[state=closed]:pointer-events-none",
81
81
  e
@@ -90,13 +90,13 @@ const s = ({
90
90
  }) => /* @__PURE__ */ o(
91
91
  "pre",
92
92
  {
93
- className: r(
93
+ className: n(
94
94
  "overflow-x-auto rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground tabular-nums",
95
95
  t
96
96
  ),
97
97
  children: /* @__PURE__ */ o("code", { children: e })
98
98
  }
99
- ), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), k = ({ className: e, input: t, ...n }) => /* @__PURE__ */ l("div", { className: r("space-y-2 overflow-hidden p-4", e), ...n, children: [
99
+ ), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), k = ({ className: e, input: t, ...r }) => /* @__PURE__ */ l("div", { className: n("space-y-2 overflow-hidden p-4", e), ...r, children: [
100
100
  /* @__PURE__ */ o(d, { children: "Parameters" }),
101
101
  /* @__PURE__ */ o(s, { code: JSON.stringify(t, null, 2) })
102
102
  ] });
@@ -104,11 +104,11 @@ k.displayName = "ToolInput";
104
104
  const O = (e) => typeof e == "object" && e !== null && !c(e) ? /* @__PURE__ */ o(s, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ o("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground whitespace-pre-wrap", children: e }) : e, P = ({
105
105
  className: e,
106
106
  output: t,
107
- errorText: n,
107
+ errorText: r,
108
108
  ...a
109
- }) => t || n ? /* @__PURE__ */ l("div", { className: r("space-y-2 p-4", e), ...a, children: [
110
- /* @__PURE__ */ o(d, { children: n ? "Error" : "Result" }),
111
- n ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: n }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-foreground [&_table]:w-full", children: O(t) })
109
+ }) => t || r ? /* @__PURE__ */ l("div", { className: n("space-y-2 p-4", e), ...a, children: [
110
+ /* @__PURE__ */ o(d, { children: r ? "Error" : "Result" }),
111
+ r ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: r }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-foreground [&_table]:w-full", children: O(t) })
112
112
  ] }) : null;
113
113
  P.displayName = "ToolOutput";
114
114
  export {
@@ -1,35 +1,51 @@
1
1
  import * as React from "react";
2
2
  /**
3
- * Voice — the approved ADS voice visualizers and controls.
3
+ * Voice — the ADS voice orb and its session controls.
4
4
  *
5
- * `Voice` renders three volume-reactive WebGL visuals: the original ADS orb,
6
- * plus LiveKit Agents UI's Aura and Wave shaders. All are driven by props, so
7
- * consumers keep a transport-neutral integration surface.
5
+ * `Voice` renders one volume-reactive WebGL orb, driven entirely by props so
6
+ * consumers keep a transport-neutral integration surface. Its colourway is set
7
+ * by `palette`; every palette is chromatic — the orb never renders greyscale —
8
+ * and an optional `seed` gives each agent/voice a distinct hue through the
9
+ * `identity` palette, so a list of voices reads as distinct rather than repeated.
8
10
  *
9
11
  * The controls (VoiceControl + friends) are standalone and props-driven — no
10
12
  * assistant-ui runtime — so they compose with any transport.
11
13
  *
12
- * Reduced motion: honored through `<MotionConfig reducedMotion="user">` for the
13
- * personas and a `reduced` freeze for every shader.
14
+ * Reduced motion: the shader freezes its noise field and drops volume
15
+ * reactivity, keeping the static coloured orb.
14
16
  */
15
17
  export type VoiceState = "idle" | "connecting" | "listening" | "thinking" | "speaking" | "muted" | "asleep";
16
- export type VoiceVariant = "orb" | "aura" | "wave";
17
- export declare const VOICE_PALETTES: readonly ["default", "blue", "violet", "emerald", "sunset"];
18
+ /** The orb is the sole visual; `variant` is retained for API stability. */
19
+ export type VoiceVariant = "orb";
20
+ export declare const VOICE_PALETTES: readonly ["default", "identity", "blue", "violet", "emerald", "sunset"];
18
21
  export type VoicePalette = (typeof VOICE_PALETTES)[number];
19
22
  /** Backwards-compatible name for the palette type originally used by Orb. */
20
23
  export type VoiceOrbPalette = VoicePalette;
21
- export declare const VOICE_VARIANTS: readonly ["orb", "aura", "wave"];
24
+ export declare const VOICE_VARIANTS: readonly ["orb"];
22
25
  export declare const VOICE_STATES: readonly ["idle", "connecting", "listening", "thinking", "speaking", "muted", "asleep"];
23
26
  export interface VoiceProps extends React.HTMLAttributes<HTMLDivElement> {
24
27
  /** Reactive animation state. */
25
28
  state?: VoiceState;
26
- /** Visualizer style. */
29
+ /** Visualizer style. The orb is the only visual. */
27
30
  variant?: VoiceVariant;
28
31
  className?: string;
29
- /** Normalized audio energy 0–1, shared by every visualizer. Default 0. */
32
+ /** Normalized audio energy 0–1. Default 0. */
30
33
  volume?: number;
31
- /** Shared shader colorway. Default "default". */
34
+ /** Shader colorway. Every palette is chromatic. Default "default". */
32
35
  palette?: VoiceOrbPalette;
36
+ /**
37
+ * Optional identity. With `palette="identity"`, the seed becomes a distinct
38
+ * hue per subject, so a list of agents/voices reads as distinct rather than
39
+ * repeated. Omit for the generic orb.
40
+ */
41
+ seed?: string | number;
42
+ /**
43
+ * Fill the box. By default the orb disc occupies ~42% of its box (a legacy
44
+ * proportion left from when a glow halo filled the surround); at avatar sizes
45
+ * that leaves the disc tiny inside empty padding. Set `fill` so the disc
46
+ * fills its box — the correct choice for any small/avatar-sized orb.
47
+ */
48
+ fill?: boolean;
33
49
  /** Fired once on mount (API parity with the old Persona `onReady`). */
34
50
  onReady?: () => void;
35
51
  "aria-label"?: string;