@aphrody/m3-ai 3.3.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Spacedrive
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # @aphrody/m3-ai
2
+
3
+ Material Design 3 components for agent interfaces: tool-call cards, markdown, chat bubbles, the
4
+ chat composer, model selector, worker and branch cards, and the task board. They are the SpaceUI
5
+ `@spacedrive/ai` set, rebuilt on `@aphrody/m3-primitives`, the M3 color roles, typescale, shapes
6
+ and motion of aphrody-os, and Material Symbols icons.
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ bun add @aphrody/m3-ai @aphrody/m3-primitives @aphrody/m3-motion
12
+ ```
13
+
14
+ Peers: `react` and `react-dom` 18 or 19, `tailwindcss` 4.1+.
15
+
16
+ ## CSS setup
17
+
18
+ The components ship Tailwind class names that use the M3 utilities of `@aphrody/m3-theme`. Import
19
+ the tokens, a palette sheet and the M3 utilities, then let Tailwind scan the package output. The
20
+ full recipe is in [`docs/design/SPACEUI-M3-FUSION.md`](../../docs/design/SPACEUI-M3-FUSION.md),
21
+ section "Integration":
22
+
23
+ ```css
24
+ @import "tailwindcss";
25
+ @import "@aphrody/m3-tokens/m3-tokens.css";
26
+ @import "@aphrody/m3-theme/spaceui.css";
27
+ @import "@aphrody/m3-theme/tailwind.css";
28
+
29
+ @source "../node_modules/@aphrody/m3-primitives/dist";
30
+ @source "../node_modules/@aphrody/m3-ai/dist";
31
+ ```
32
+
33
+ Register the Material Symbols font once, for example with `ensureMaterialSymbols()` from
34
+ `@aphrody/material-web/icon/material-symbols.js`.
35
+
36
+ ## Usage
37
+
38
+ ```tsx
39
+ import { ChatComposer, MessageBubble, ToolCall } from "@aphrody/m3-ai";
40
+ import type { ToolCallPair } from "@aphrody/m3-ai";
41
+
42
+ const pair: ToolCallPair = {
43
+ id: "1",
44
+ name: "shell",
45
+ argsRaw: '{"command":"ls"}',
46
+ args: { command: "ls" },
47
+ resultRaw: '{"exit_code":0,"stdout":"README.md"}',
48
+ result: { exit_code: 0, stdout: "README.md" },
49
+ status: "completed",
50
+ };
51
+
52
+ export function Conversation({ draft, setDraft, send }: Props) {
53
+ return (
54
+ <>
55
+ <MessageBubble content="List the files" isUser />
56
+ <ToolCall pair={pair} />
57
+ <MessageBubble content="There is one file: `README.md`." isUser={false} />
58
+ <ChatComposer draft={draft} onDraftChange={setDraft} onSend={send} />
59
+ </>
60
+ );
61
+ }
62
+ ```
63
+
64
+ ## Components
65
+
66
+ | Component | M3 anatomy |
67
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
68
+ | `ToolCall` | Outlined card (`surface-container-low`, medium shape): status icon or circular indicator, `text-label-large` tool name, expandable arguments and result blocks in `font-code` on `surface-container-highest`, error results on `error-container`. |
69
+ | `Markdown` | Prose on the M3 typescale (headline / title / body), `font-code` code blocks, `primary` links, `outline-variant` quotes and tables. `size` picks the body scale; `allowHtml` enables raw HTML for trusted content. |
70
+ | `MessageBubble` | User turn as a `secondary-container` bubble (large shape), assistant turn as markdown on the surface with a standard copy icon button. |
71
+ | `ChatComposer` | Search-bar anatomy: `surface-container-high`, extra-large shape, `text-body-large` input, project pill, model chip, standard mic icon button, filled send / stop icon button. |
72
+ | `ModelSelector` | Pill trigger opening an M3 menu (`surface-container`, extra-small shape, level 2): search field, provider section headers, 48 dp items, selection on `secondary-container`, capability chips. `ModelOptionList` and `groupModelsByProvider` expose the list alone. |
73
+ | `InlineWorkerCard` | Filled card (`surface-container`, medium shape), `text-title-small` header, status chip, circular indicator while running, expandable transcript of `ToolCall`s and markdown. |
74
+ | `InlineBranchCard` | Filled card for a thinking branch: indicator or branch icon, status chip, expandable conclusion. |
75
+ | `TaskStatusIcon` | Material Symbol per status: done `success`, in progress and ready `primary`, pending approval `warning`, backlog `outline`. |
76
+ | `TaskPriorityIcon` | Material Symbol per priority: critical `error`, high `warning`, medium `primary`, low `outline`. |
77
+ | `TaskRow` | Dense M3 list item (48 dp): `text-body-large` headline, `text-body-small` supporting columns, 8 % hover state layer, `secondary-container` selection, overflow menu. |
78
+ | `TaskList` | Tasks grouped by status: collapsible `text-title-small` section headers, `outline-variant` dividers. |
79
+ | `TaskDetail` | Task on an M3 surface: `text-headline-small` title, property grid, subtasks as a checkbox list, markdown description, filled and text buttons. |
80
+ | `TaskCreateForm` | Title and description text fields, priority select, filled `Create` and text `Cancel` buttons. |
81
+
82
+ Helpers from `types.ts`: `pairTranscriptSteps`, `tryParseJson`, `isErrorResult`,
83
+ `TASK_STATUS_ORDER`, `TASK_STATUS_LABEL`, `TASK_PRIORITY_LABEL`, and the transcript, task and
84
+ model types.
85
+
86
+ ## Tests
87
+
88
+ ```sh
89
+ bun test
90
+ ```
91
+
92
+ `test/preload.ts` resolves `@aphrody/m3-primitives` to its sources, so the tests do not need a
93
+ built `dist`.
94
+
95
+ ## Credits
96
+
97
+ Derived from SpaceUI [`@spacedrive/ai`](https://github.com/spacedriveapp/spaceui) (MIT, see
98
+ `LICENSE.spaceui`), rebuilt on Material Design 3. New code is Apache-2.0.
@@ -0,0 +1,45 @@
1
+ import { usePopover } from "@aphrody/m3-primitives";
2
+ import { type ReactNode } from "react";
3
+ import type { ModelOption } from "./types";
4
+ export interface ChatComposerProps {
5
+ /** Current draft text */
6
+ draft: string;
7
+ /** Called when draft changes */
8
+ onDraftChange: (value: string) => void;
9
+ /** Called when user hits send (Enter or send button) */
10
+ onSend: () => void;
11
+ /** Placeholder for the textarea */
12
+ placeholder?: string;
13
+ /** Show an optional heading above the composer */
14
+ heading?: ReactNode;
15
+ /** Disable the composer — draft can still change, but send/voice are blocked */
16
+ isSending?: boolean;
17
+ /** Project selector config — omit to hide */
18
+ projectSelector?: {
19
+ value: string;
20
+ options: string[];
21
+ onChange: (project: string) => void;
22
+ popover: ReturnType<typeof usePopover>;
23
+ };
24
+ /** Model selector config — omit to hide */
25
+ modelSelector?: {
26
+ value: string;
27
+ options: ModelOption[];
28
+ onChange: (model: string) => void;
29
+ };
30
+ /** Voice button handler — omit to hide */
31
+ onOpenVoice?: () => void;
32
+ /** Optional content rendered at the far right of the toolbar (before send) */
33
+ toolbarExtra?: ReactNode;
34
+ /** Stop handler: while `isSending`, the send button becomes an M3 `stop` icon button. */
35
+ onStop?: () => void;
36
+ /** Additional className on the composer container */
37
+ className?: string;
38
+ }
39
+ /**
40
+ * Generic chat composer on the M3 search-bar anatomy: a `surface-container-high` container with
41
+ * the extra-large (28 dp) shape, a `text-body-large` expanding textarea, an optional project
42
+ * pill, model selector chip, a standard mic icon button and a filled send / stop icon button.
43
+ */
44
+ export declare function ChatComposer({ draft, onDraftChange, onSend, placeholder, heading, isSending, projectSelector, modelSelector, onOpenVoice, toolbarExtra, onStop, className, }: ChatComposerProps): import("react").JSX.Element;
45
+ //# s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AAC,EAAE,MAAM,CAAC;CACpB;AAgBD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,MAAM,EACN,WAAgC,EAChC,OAAO,EACP,SAAiB,EACjB,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,EACZ,MAAM,EACN,SAAS,GACV,EAAE,iBAAiB,+BA2JnB"}
@@ -0,0 +1,13 @@
1
+ interface InlineBranchCardProps {
2
+ description: string;
3
+ completedAt: string | null;
4
+ conclusion?: string | null;
5
+ className?: string;
6
+ /** Start expanded (uncontrolled). */
7
+ defaultExpanded?: boolean;
8
+ }
9
+ /** A thinking branch as an M3 filled card: header, status chip, expandable conclusion. */
10
+ declare function InlineBranchCard({ description, completedAt, conclusion, className, defaultExpanded, }: InlineBranchCardProps): import("react").JSX.Element;
11
+ export { InlineBranchCard };
12
+ export type { InlineBranchCardProps };
13
+ //# sourceMappingURL=InlineBranchCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineBranchCard.d.ts","sourceRoot":"","sources":["../src/InlineBranchCard.tsx"],"names":[],"mappings":"AAUA,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,0FAA0F;AAC1F,iBAAS,gBAAgB,CAAC,EACxB,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,EACT,eAAuB,GACxB,EAAE,qBAAqB,+BAmEvB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { TranscriptStep } from "./types";
2
+ interface InlineWorkerCardProps {
3
+ title: string;
4
+ status: string;
5
+ toolCallCount: number;
6
+ liveStatus?: string | null;
7
+ transcript: TranscriptStep[];
8
+ isTranscriptLoading?: boolean;
9
+ onCopyLogs?: () => void;
10
+ onCancel?: () => void;
11
+ className?: string;
12
+ /** Start expanded (uncontrolled). */
13
+ defaultExpanded?: boolean;
14
+ }
15
+ /** A worker run as an M3 filled card: header, status chip, expandable transcript. */
16
+ declare function InlineWorkerCard({ title, status, toolCallCount, liveStatus, transcript, isTranscriptLoading, onCopyLogs, onCancel, className, defaultExpanded, }: InlineWorkerCardProps): import("react").JSX.Element;
17
+ export { InlineWorkerCard };
18
+ export type { InlineWorkerCardProps };
19
+ //# sourceMappingURL=InlineWorkerCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineWorkerCard.d.ts","sourceRoot":"","sources":["../src/InlineWorkerCard.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAS9C,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAiBD,qFAAqF;AACrF,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,eAAuB,GACxB,EAAE,qBAAqB,+BAuHvB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ type MarkdownSize = "small" | "medium" | "large";
2
+ interface MarkdownProps {
3
+ content: string;
4
+ className?: string;
5
+ /** Body typescale of paragraphs and lists: `text-body-small|medium|large`. Default `medium`. */
6
+ size?: MarkdownSize;
7
+ /**
8
+ * Render raw HTML embedded in the markdown (rehype-raw). Off by default: only enable it for
9
+ * trusted content.
10
+ */
11
+ allowHtml?: boolean;
12
+ }
13
+ declare const Markdown: import("react").ForwardRefExoticComponent<MarkdownProps & import("react").RefAttributes<HTMLDivElement>>;
14
+ export { Markdown };
15
+ export type { MarkdownProps };
16
+ //# sourceMappingURL=Markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../src/Markdown.tsx"],"names":[],"mappings":"AASA,KAAK,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAgKD,QAAA,MAAM,QAAQ,0GAiBb,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface MessageBubbleProps {
2
+ content: string;
3
+ isUser: boolean;
4
+ isStreaming?: boolean;
5
+ onCopy?: (content: string) => void;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * One chat turn. The user turn is an M3 bubble (`secondary-container`, large shape), the
10
+ * assistant turn is plain markdown on the surface, as in M3 / Gemini conversations.
11
+ */
12
+ export declare function MessageBubble({ content, isUser, isStreaming, onCopy, className, }: MessageBubbleProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=MessageBubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../src/MessageBubble.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,WAAmB,EACnB,MAAM,EACN,SAAS,GACV,EAAE,kBAAkB,+BAkCpB"}
@@ -0,0 +1,43 @@
1
+ import { usePopover, type SelectPillProps } from "@aphrody/m3-primitives";
2
+ import type { ModelOption } from "./types";
3
+ export interface ModelSelectorProps {
4
+ /** Available models */
5
+ models: ModelOption[];
6
+ /** Currently selected model ID */
7
+ value: string;
8
+ /** Called when a model is selected */
9
+ onChange: (value: string) => void;
10
+ /** Placeholder when nothing selected */
11
+ placeholder?: string;
12
+ /** Search placeholder */
13
+ searchPlaceholder?: string;
14
+ /** SelectPill variant */
15
+ variant?: SelectPillProps["variant"];
16
+ /** SelectPill size */
17
+ size?: SelectPillProps["size"];
18
+ /** Controlled popover (optional) */
19
+ popover?: ReturnType<typeof usePopover>;
20
+ /** Additional trigger className */
21
+ className?: string;
22
+ /** Disabled state */
23
+ disabled?: boolean;
24
+ }
25
+ /** Group models by provider, keeping the order of first appearance. */
26
+ export declare function groupModelsByProvider(models: ModelOption[], search?: string): Record<string, ModelOption[]>;
27
+ export interface ModelOptionListProps {
28
+ /** Models grouped by provider (see {@link groupModelsByProvider}). */
29
+ grouped: Record<string, ModelOption[]>;
30
+ /** Currently selected model ID */
31
+ value: string;
32
+ /** Called when a model is picked */
33
+ onSelect: (value: string) => void;
34
+ className?: string;
35
+ }
36
+ /**
37
+ * The M3 menu list of the model selector: provider section headers (`text-title-small`),
38
+ * 48 dp two-line items (`text-label-large` + `text-body-small` supporting text), the selected
39
+ * item on `secondary-container`, capabilities as small outlined chips.
40
+ */
41
+ export declare function ModelOptionList({ grouped, value, onSelect, className }: ModelOptionListProps): import("react").JSX.Element;
42
+ export declare const ModelSelector: import("react").ForwardRefExoticComponent<ModelSelectorProps & import("react").RefAttributes<HTMLButtonElement>>;
43
+ //# sourceMappingURL=ModelSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelSelector.d.ts","sourceRoot":"","sources":["../src/ModelSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,EAGL,UAAU,EAEV,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB;IACzB,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACrC,sBAAsB;IACtB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,oCAAoC;IACpC,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACxC,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,WAAW,EAAE,EACrB,MAAM,SAAK,GACV,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAc/B;AAED,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACvC,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,oBAAoB,+BA+E5F;AAsCD,eAAO,MAAM,aAAa,kHAqEzB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { TaskPriority } from "./types";
2
+ export interface TaskCreateFormData {
3
+ title: string;
4
+ description: string;
5
+ priority: TaskPriority;
6
+ }
7
+ export interface TaskCreateFormProps {
8
+ onSubmit: (data: TaskCreateFormData) => void;
9
+ onCancel?: () => void;
10
+ defaultPriority?: TaskPriority;
11
+ isSubmitting?: boolean;
12
+ className?: string;
13
+ }
14
+ /**
15
+ * Inline task creation on an M3 surface: title and description text fields, a priority select,
16
+ * and M3 actions (filled `Create`, text `Cancel`).
17
+ */
18
+ export declare function TaskCreateForm({ onSubmit, onCancel, defaultPriority, isSubmitting, className, }: TaskCreateFormProps): import("react").JSX.Element;
19
+ //# sourceMappingURL=TaskCreateForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCreateForm.d.ts","sourceRoot":"","sources":["../src/TaskCreateForm.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,eAA0B,EAC1B,YAAY,EACZ,SAAS,GACV,EAAE,mBAAmB,+BAsFrB"}
@@ -0,0 +1,17 @@
1
+ import type { Task, TaskStatus } from "./types";
2
+ export interface TaskDetailProps {
3
+ task: Task;
4
+ resolveAgentName?: (agentId: string) => string;
5
+ onStatusChange?: (task: Task, status: TaskStatus) => void;
6
+ onSubtaskToggle?: (task: Task, index: number, completed: boolean) => void;
7
+ onDelete?: (task: Task) => void;
8
+ onClose?: () => void;
9
+ className?: string;
10
+ }
11
+ /**
12
+ * A task on an M3 surface: `text-headline-small` title, a property grid, subtasks as an M3 list
13
+ * with checkboxes, markdown description, and actions as M3 buttons (filled for the primary
14
+ * transition, text for the others).
15
+ */
16
+ export declare function TaskDetail({ task, resolveAgentName, onStatusChange, onSubtaskToggle, onDelete, onClose, className, }: TaskDetailProps): import("react").JSX.Element;
17
+ //# sourceMappingURL=TaskDetail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskDetail.d.ts","sourceRoot":"","sources":["../src/TaskDetail.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGhD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1D,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE,eAAe,+BAsKjB"}
@@ -0,0 +1,19 @@
1
+ import type { Task, TaskStatus } from "./types";
2
+ export interface TaskListProps {
3
+ tasks: Task[];
4
+ groups?: TaskStatus[];
5
+ collapsedGroups?: Set<TaskStatus>;
6
+ onToggleGroup?: (status: TaskStatus) => void;
7
+ activeTaskId?: string;
8
+ onTaskClick: (task: Task) => void;
9
+ onStatusChange?: (task: Task, status: TaskStatus) => void;
10
+ onDelete?: (task: Task) => void;
11
+ resolveAgentName?: (agentId: string) => string;
12
+ className?: string;
13
+ }
14
+ /**
15
+ * Tasks grouped by status as an M3 list: a column header in `text-label-medium`, collapsible
16
+ * section headers in `text-title-small`, `outline-variant` dividers.
17
+ */
18
+ export declare function TaskList({ tasks, groups, collapsedGroups, onToggleGroup, activeTaskId, onTaskClick, onStatusChange, onDelete, resolveAgentName, className, }: TaskListProps): import("react").JSX.Element;
19
+ //# sourceMappingURL=TaskList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskList.d.ts","sourceRoot":"","sources":["../src/TaskList.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGhD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAClC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,MAA0B,EAC1B,eAAe,EACf,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,SAAS,GACV,EAAE,aAAa,+BAuFf"}
@@ -0,0 +1,10 @@
1
+ import type { TaskPriority } from "./types";
2
+ export interface TaskPriorityIconProps {
3
+ priority: TaskPriority;
4
+ size?: number;
5
+ className?: string;
6
+ /** Accessible label; defaults to the priority label. Pass `""` for a decorative icon. */
7
+ label?: string;
8
+ }
9
+ export declare function TaskPriorityIcon({ priority, size, className, label }: TaskPriorityIconProps): import("react").JSX.Element;
10
+ //# sourceMappingURL=TaskPriorityIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskPriorityIcon.d.ts","sourceRoot":"","sources":["../src/TaskPriorityIcon.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAW5C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,YAAY,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,IAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,qBAAqB,+BAahG"}
@@ -0,0 +1,21 @@
1
+ import type { Task, TaskStatus } from "./types";
2
+ export interface TaskRowProps {
3
+ task: Task;
4
+ onClick?: (task: Task) => void;
5
+ isActive?: boolean;
6
+ resolveAgentName?: (agentId: string) => string;
7
+ onStatusChange?: (task: Task, status: TaskStatus) => void;
8
+ onDelete?: (task: Task) => void;
9
+ className?: string;
10
+ }
11
+ /** Column template shared with the {@link TaskList} header. */
12
+ export declare const TASK_ROW_GRID = "20px 18px 72px 1fr 56px 96px 40px";
13
+ /** M3 list item height at desktop density (56 dp baseline, two density steps). */
14
+ export declare const TASK_ROW_HEIGHT = 48;
15
+ /**
16
+ * A task as a dense M3 list item: leading status and priority icons, `text-body-large` headline,
17
+ * `text-body-small` supporting columns, `on-surface` 8 % hover, `secondary-container` selection
18
+ * and a trailing overflow-menu icon button.
19
+ */
20
+ export declare function TaskRow({ task, onClick, isActive, resolveAgentName, onStatusChange, onDelete, className, }: TaskRowProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=TaskRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskRow.d.ts","sourceRoot":"","sources":["../src/TaskRow.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGhD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,+DAA+D;AAC/D,eAAO,MAAM,aAAa,sCAAsC,CAAC;AAEjE,kFAAkF;AAClF,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,SAAS,GACV,EAAE,YAAY,+BAwJd"}
@@ -0,0 +1,10 @@
1
+ import type { TaskStatus } from "./types";
2
+ export interface TaskStatusIconProps {
3
+ status: TaskStatus;
4
+ size?: number;
5
+ className?: string;
6
+ /** Accessible label; defaults to the status label. Pass `""` for a decorative icon. */
7
+ label?: string;
8
+ }
9
+ export declare function TaskStatusIcon({ status, size, className, label }: TaskStatusIconProps): import("react").JSX.Element;
10
+ //# sourceMappingURL=TaskStatusIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskStatusIcon.d.ts","sourceRoot":"","sources":["../src/TaskStatusIcon.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAY1C,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,IAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,+BAY1F"}
@@ -0,0 +1,13 @@
1
+ import type { ToolCallPair } from "./types";
2
+ export interface ToolCallProps {
3
+ pair: ToolCallPair;
4
+ /** Start expanded (uncontrolled). */
5
+ defaultExpanded?: boolean;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * A tool invocation as an M3 outlined card: status + tool name header (`text-label-large`),
10
+ * summary, and an expandable body with arguments and result blocks in `font-code`.
11
+ */
12
+ export declare function ToolCall({ pair, defaultExpanded, className }: ToolCallProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=ToolCall.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolCall.d.ts","sourceRoot":"","sources":["../src/ToolCall.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,SAAS,CAAC;AAi0B5D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,qCAAqC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAuB,EAAE,SAAS,EAAE,EAAE,aAAa,+BAiGnF"}
@@ -0,0 +1,29 @@
1
+ export type { ToolCallStatus, ToolCallPair, ActionContent, TranscriptStep, TranscriptItem, TaskInfo, MemoryInfo, CronJobInfo, AgentInfo, ModelOption, TaskStatus, TaskPriority, Subtask, Task, } from "./types";
2
+ export { pairTranscriptSteps, tryParseJson, isErrorResult, TASK_STATUS_ORDER, TASK_STATUS_LABEL, TASK_PRIORITY_LABEL, } from "./types";
3
+ export { ToolCall } from "./ToolCall";
4
+ export type { ToolCallProps } from "./ToolCall";
5
+ export { Markdown } from "./Markdown";
6
+ export type { MarkdownProps } from "./Markdown";
7
+ export { MessageBubble } from "./MessageBubble";
8
+ export type { MessageBubbleProps } from "./MessageBubble";
9
+ export { InlineWorkerCard } from "./InlineWorkerCard";
10
+ export type { InlineWorkerCardProps } from "./InlineWorkerCard";
11
+ export { InlineBranchCard } from "./InlineBranchCard";
12
+ export type { InlineBranchCardProps } from "./InlineBranchCard";
13
+ export { ModelSelector, ModelOptionList, groupModelsByProvider } from "./ModelSelector";
14
+ export type { ModelSelectorProps, ModelOptionListProps } from "./ModelSelector";
15
+ export { ChatComposer } from "./ChatComposer";
16
+ export type { ChatComposerProps } from "./ChatComposer";
17
+ export { TaskStatusIcon } from "./TaskStatusIcon";
18
+ export type { TaskStatusIconProps } from "./TaskStatusIcon";
19
+ export { TaskPriorityIcon } from "./TaskPriorityIcon";
20
+ export type { TaskPriorityIconProps } from "./TaskPriorityIcon";
21
+ export { TaskRow } from "./TaskRow";
22
+ export type { TaskRowProps } from "./TaskRow";
23
+ export { TaskList } from "./TaskList";
24
+ export type { TaskListProps } from "./TaskList";
25
+ export { TaskDetail } from "./TaskDetail";
26
+ export type { TaskDetailProps } from "./TaskDetail";
27
+ export { TaskCreateForm } from "./TaskCreateForm";
28
+ export type { TaskCreateFormProps, TaskCreateFormData } from "./TaskCreateForm";
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,YAAY,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,EACZ,OAAO,EACP,IAAI,GACL,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;A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