@mcp-b/react-components 0.46.7 → 0.48.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 (130) hide show
  1. package/dist/{CodeBlock-CcteqDvA.js → CodeBlock-BSJl682D.js} +1 -1
  2. package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
  3. package/dist/{FileTree-jtP9471I.js → FileTree-DvE0hNZu.js} +1 -1
  4. package/dist/{SetupChecklist-BXwSSorj.js → SetupChecklist-DeTU9YpW.js} +1 -1
  5. package/dist/ThinkChat-CwMdEum8.d.ts +185 -0
  6. package/dist/{ThinkChat-qztQ6Clo.js → ThinkChat-DiI6hhDP.js} +14 -14
  7. package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +91 -0
  8. package/dist/{Workspace-DZusrEeP.d.ts → Workspace-LIoU30n7.d.ts} +13 -2
  9. package/dist/{WorkspaceFileView-D0HyoUV8.js → WorkspaceFileView-C_WnYm-a.js} +4 -4
  10. package/dist/{WorkspaceLink-DtH66bAY.js → WorkspaceLink-B1d2GIGl.js} +7 -2
  11. package/dist/WorkspaceLive-DfjH1Ypm.d.ts +61 -0
  12. package/dist/{WorkspaceMessageResponse-CJCmGvTx.js → WorkspaceMessageResponse-BqOezptB.js} +79 -40
  13. package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +48 -0
  14. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  15. package/dist/components/agents-sdk/AgentChat.js +2 -2
  16. package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
  17. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  18. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  19. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
  20. package/dist/components/agents-sdk/ManagerOffice.d.ts +41 -50
  21. package/dist/components/agents-sdk/ManagerOffice.js +359 -978
  22. package/dist/components/agents-sdk/McpConnectionRequest.js +1 -1
  23. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  24. package/dist/components/agents-sdk/McpServerPicker.js +1 -1
  25. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  26. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  27. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  28. package/dist/components/agents-sdk/ThinkChat.d.ts +1 -180
  29. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  30. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1 -1
  31. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  32. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  33. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -1
  34. package/dist/components/agents-sdk/ThinkFullApp.d.ts +12 -3
  35. package/dist/components/agents-sdk/ThinkFullApp.js +15 -3
  36. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
  37. package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
  38. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +1 -1
  39. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +20 -5
  40. package/dist/components/agents-sdk/ThinkSidepanel.js +48 -36
  41. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -90
  42. package/dist/components/agents-sdk/ThinkThreadPicker.js +1 -1
  43. package/dist/components/agents-sdk/Workspace.d.ts +2 -2
  44. package/dist/components/agents-sdk/Workspace.js +13 -10
  45. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  46. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  47. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +45 -0
  48. package/dist/components/agents-sdk/WorkspaceConcept.js +42 -0
  49. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +96 -0
  50. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +429 -0
  51. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +115 -0
  52. package/dist/components/agents-sdk/WorkspaceExecution.js +330 -0
  53. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  54. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -2
  55. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  56. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  57. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  58. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -0
  59. package/dist/components/agents-sdk/WorkspaceLive.js +113 -0
  60. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +2 -2
  61. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +2 -2
  62. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  63. package/dist/components/agents-sdk/WorkspaceProject.d.ts +131 -0
  64. package/dist/components/agents-sdk/WorkspaceProject.js +238 -0
  65. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +47 -0
  66. package/dist/components/agents-sdk/WorkspaceUserScript.js +146 -0
  67. package/dist/components/ai-sdk/Activity.js +1 -1
  68. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  69. package/dist/components/ai-sdk/Approval.js +1 -1
  70. package/dist/components/ai-sdk/Artifact.js +3 -3
  71. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  72. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  73. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  74. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  75. package/dist/components/ai-sdk/ComposerLink.d.ts +4 -1
  76. package/dist/components/ai-sdk/ComposerLink.js +4 -3
  77. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +29 -2
  78. package/dist/components/ai-sdk/ConnectedAppCards.js +78 -103
  79. package/dist/components/ai-sdk/Conversation.js +1 -1
  80. package/dist/components/ai-sdk/Correspondent.d.ts +2 -0
  81. package/dist/components/ai-sdk/Correspondent.js +145 -0
  82. package/dist/components/ai-sdk/Goal.js +1 -1
  83. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  84. package/dist/components/ai-sdk/Message.js +1 -1
  85. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  86. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  87. package/dist/components/ai-sdk/Plan.js +1 -1
  88. package/dist/components/ai-sdk/PromptInput.js +1 -1
  89. package/dist/components/ai-sdk/Queue.js +1 -1
  90. package/dist/components/ai-sdk/Reasoning.js +1 -1
  91. package/dist/components/ai-sdk/Sources.js +1 -1
  92. package/dist/components/ai-sdk/Task.js +1 -1
  93. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  94. package/dist/components/extension/CodexModelSelector.js +1 -1
  95. package/dist/components/extension/ConversationTabPicker.js +1 -1
  96. package/dist/components/foundations/Checkbox.js +1 -1
  97. package/dist/components/foundations/ContextMenu.js +1 -1
  98. package/dist/components/foundations/Menubar.js +1 -1
  99. package/dist/components/foundations/SearchField.js +1 -1
  100. package/dist/components/foundations/Select.js +1 -1
  101. package/dist/components/foundations/Stepper.js +1 -1
  102. package/dist/components/foundations/Toast.js +1 -1
  103. package/dist/components/foundations/icons.d.ts +2 -2
  104. package/dist/components/foundations/icons.js +2 -2
  105. package/dist/components/general-purpose/Commit.js +2 -2
  106. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  107. package/dist/components/general-purpose/FileTree.js +1 -1
  108. package/dist/components/general-purpose/PricingPlanCard.js +1 -1
  109. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  110. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  111. package/dist/components/general-purpose/Terminal.js +2 -2
  112. package/dist/components/general-purpose/TestResults.js +1 -1
  113. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  114. package/dist/components/general-purpose/WebPreview.js +1 -1
  115. package/dist/components/nanites/AgentConnection.js +2 -2
  116. package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
  117. package/dist/components/nanites/AgentToolDetail.js +2 -2
  118. package/dist/{copy-button-BABPlsc-.js → copy-button-Dk2vRe9j.js} +1 -1
  119. package/dist/{icons-ChPpNMmU.d.ts → icons-CCZGYUwU.d.ts} +6 -1
  120. package/dist/{icons-BC4HZqSK.js → icons-CeGfXO21.js} +3 -2
  121. package/dist/styles/base.css +2 -2
  122. package/dist/styles/connected-app-card.css +8 -0
  123. package/dist/styles/correspondent.css +73 -0
  124. package/dist/styles/description-list.css +3 -1
  125. package/dist/styles/index.css +2 -0
  126. package/dist/styles/manager-office.css +380 -1086
  127. package/dist/styles/workspace-concepts.css +28 -0
  128. package/dist/workspace-assets-GqsCYxqT.js +168 -0
  129. package/package.json +2 -2
  130. package/dist/WorkspaceMessageResponse-D66ty4FO.d.ts +0 -24
@@ -0,0 +1,238 @@
1
+ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { $ as UserIcon, C as FolderIcon, D as LinkIcon, K as SpinnerIcon, S as FileIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-CeGfXO21.js";
3
+ import { Button } from "../foundations/Button.js";
4
+ import { IconButton } from "../foundations/IconButton.js";
5
+ import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
6
+ import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
7
+ import { DescriptionList } from "../foundations/DescriptionList.js";
8
+ import { EmptyState } from "../foundations/EmptyState.js";
9
+ import { LinkButton } from "../foundations/LinkButton.js";
10
+ import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-GqsCYxqT.js";
11
+ import * as React from "react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ import { useQuery } from "@tanstack/react-query";
14
+ //#region src/components/agents-sdk/WorkspaceProject.tsx
15
+ const ORIGIN_LABEL = {
16
+ user: "From you",
17
+ routine: "Schedule",
18
+ messenger: "Messenger"
19
+ };
20
+ const ORIGIN_ICON = {
21
+ user: /* @__PURE__ */ jsx(UserIcon, {}),
22
+ routine: /* @__PURE__ */ jsx(CalendarIcon, {}),
23
+ messenger: /* @__PURE__ */ jsx(MessageSquareIcon, {})
24
+ };
25
+ const ORIGIN_ORDER = [
26
+ "user",
27
+ "routine",
28
+ "messenger"
29
+ ];
30
+ function LinkList({ items }) {
31
+ if (items.length === 1) {
32
+ const item = items[0];
33
+ return /* @__PURE__ */ jsx(WorkspaceComposerLink, {
34
+ kind: "tab",
35
+ value: item.key,
36
+ label: item.label,
37
+ icon: item.icon,
38
+ hint: item.hint,
39
+ onOpen: item.onOpen
40
+ });
41
+ }
42
+ return /* @__PURE__ */ jsx("ul", {
43
+ className: "sigvelo-stack-list",
44
+ children: items.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceComposerLink, {
45
+ kind: "tab",
46
+ value: item.key,
47
+ label: item.label,
48
+ icon: item.icon,
49
+ hint: item.hint,
50
+ onOpen: item.onOpen
51
+ }) }, item.key))
52
+ });
53
+ }
54
+ function ProjectDetails({ project }) {
55
+ const referencedFiles = new Set((project.sections ?? []).flatMap(({ items }) => items.flatMap((item) => item.kind === "file" ? [item.path] : [])));
56
+ const files = (project.files ?? []).filter((file) => !file.path.endsWith("/PROJECT.md") && !referencedFiles.has(file.path));
57
+ const sections = (project.sections ?? []).filter(({ items }) => items.length > 0);
58
+ const threads = project.threads ?? [];
59
+ if (files.length === 0 && sections.length === 0 && threads.length === 0) return null;
60
+ return /* @__PURE__ */ jsxs(DescriptionList.Root, {
61
+ align: "start",
62
+ variant: "divided",
63
+ children: [
64
+ sections.map((section) => /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: section.label }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx("div", {
65
+ className: "sigvelo-cluster",
66
+ children: section.items.map((item) => item.kind === "file" ? /* @__PURE__ */ jsx(WorkspaceComposerLink, {
67
+ value: item.path,
68
+ label: item.label,
69
+ hint: item.path,
70
+ onOpen: item.onOpen
71
+ }, `${item.kind}:${item.path}`) : item.kind === "link" ? /* @__PURE__ */ jsxs(LinkButton, {
72
+ href: item.href,
73
+ target: "_blank",
74
+ rel: "noreferrer",
75
+ variant: "link",
76
+ color: "neutral",
77
+ size: "xs",
78
+ children: [/* @__PURE__ */ jsx(FaviconMark, {
79
+ href: item.href,
80
+ fallback: /* @__PURE__ */ jsx(LinkIcon, {})
81
+ }), item.label]
82
+ }, `${item.kind}:${item.href}`) : /* @__PURE__ */ jsx("span", { children: item.label }, `${item.kind}:${item.label}`))
83
+ }) })] }, section.label)),
84
+ files.length > 0 ? /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: "Contents" }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx("div", {
85
+ className: "sigvelo-cluster",
86
+ children: files.map((file) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
87
+ value: file.path,
88
+ label: file.label,
89
+ hint: file.path,
90
+ onOpen: file.onOpen
91
+ }, file.path))
92
+ }) })] }) : null,
93
+ ORIGIN_ORDER.map((origin) => {
94
+ const grouped = threads.filter((thread) => thread.origin === origin);
95
+ if (grouped.length === 0) return null;
96
+ return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: ORIGIN_LABEL[origin] }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx(LinkList, { items: grouped.map((thread) => ({
97
+ key: thread.id,
98
+ label: thread.title,
99
+ icon: thread.icon ?? ORIGIN_ICON[origin],
100
+ onOpen: thread.onOpen
101
+ })) }) })] }, origin);
102
+ })
103
+ ]
104
+ });
105
+ }
106
+ function WorkspaceProjectCard({ className, project, ref, ...props }) {
107
+ const titleId = React.useId();
108
+ const ariaLabel = props["aria-label"];
109
+ const ariaLabelledBy = props["aria-labelledby"] ?? (ariaLabel ? void 0 : titleId);
110
+ return /* @__PURE__ */ jsxs(Card, {
111
+ ...props,
112
+ ref,
113
+ role: props.role ?? "article",
114
+ "aria-labelledby": ariaLabelledBy,
115
+ "data-slot": "workspace-project-card",
116
+ size: "sm",
117
+ className: cx("connected-app-card", className),
118
+ children: [/* @__PURE__ */ jsxs(CardHeader, { children: [
119
+ /* @__PURE__ */ jsxs(CardTitle, {
120
+ id: titleId,
121
+ className: "connected-app-card__title",
122
+ render: /* @__PURE__ */ jsx("h3", {}),
123
+ children: [/* @__PURE__ */ jsx("span", {
124
+ className: "connected-app-card__icon",
125
+ "aria-hidden": "true",
126
+ children: project.icon ?? /* @__PURE__ */ jsx(FolderIcon, {})
127
+ }), project.name]
128
+ }),
129
+ project.description ? /* @__PURE__ */ jsx(CardDescription, { children: project.description }) : null,
130
+ project.onOpen || project.onDelete ? /* @__PURE__ */ jsxs(CardAction, {
131
+ className: "sigvelo-cluster",
132
+ children: [project.onOpen ? /* @__PURE__ */ jsx(IconButton, {
133
+ label: `Open ${project.name}`,
134
+ tooltip: project.path,
135
+ variant: "ghost",
136
+ color: "neutral",
137
+ onClick: project.onOpen,
138
+ children: /* @__PURE__ */ jsx(FileIcon, {})
139
+ }) : null, project.onDelete ? /* @__PURE__ */ jsx(WorkspaceDeleteControl, {
140
+ name: project.name,
141
+ onDelete: project.onDelete
142
+ }) : null]
143
+ }) : null
144
+ ] }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(ProjectDetails, { project }) })]
145
+ });
146
+ }
147
+ /**
148
+ * Compact inline card for one queried PROJECT.md. Identity plus contents — no status.
149
+ */
150
+ function WorkspaceProjectFileCard({ fallback = null, path, source, ...props }) {
151
+ const project = useWorkspaceProjects(source).find((candidate) => candidate.path === path);
152
+ return project ? /* @__PURE__ */ jsx(WorkspaceProjectCard, {
153
+ ...props,
154
+ project: projectWithSource(project, source)
155
+ }) : fallback;
156
+ }
157
+ /** Design-system-owned project query shared by panels, cards, and composer context. */
158
+ function useWorkspaceProjects(source) {
159
+ return useQuery(source.queryOptions).data ?? [];
160
+ }
161
+ /**
162
+ * Workbench list of queried projects. Same card as the inline placement. A
163
+ * query failure with nothing loaded renders as a quiet inline error, never as
164
+ * an empty library.
165
+ */
166
+ function WorkspaceProjectsPanel({ className, error, loading = false, projects, onRetry, ref, ...props }) {
167
+ return /* @__PURE__ */ jsx("section", {
168
+ ref,
169
+ "data-slot": "workspace-projects-panel",
170
+ className: cx("workspace-concept-panel", className),
171
+ ...props,
172
+ "aria-label": props["aria-label"] ?? "Projects",
173
+ children: projects.length > 0 ? /* @__PURE__ */ jsx("ul", {
174
+ className: "sigvelo-stack-list sigvelo-stack",
175
+ children: projects.map((project) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceProjectCard, { project }) }, project.path))
176
+ }) : error !== void 0 ? /* @__PURE__ */ jsx(EmptyState, {
177
+ icon: /* @__PURE__ */ jsx(FolderIcon, {}),
178
+ title: "Projects unavailable",
179
+ description: error,
180
+ children: onRetry ? /* @__PURE__ */ jsx(Button, {
181
+ size: "sm",
182
+ variant: "outline",
183
+ color: "neutral",
184
+ onClick: onRetry,
185
+ children: "Retry"
186
+ }) : null
187
+ }) : loading ? /* @__PURE__ */ jsx(EmptyState, {
188
+ icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
189
+ title: "Loading projects"
190
+ }) : /* @__PURE__ */ jsx(EmptyState, {
191
+ icon: /* @__PURE__ */ jsx(FolderIcon, {}),
192
+ title: "No projects"
193
+ })
194
+ });
195
+ }
196
+ function projectWithSource(project, source) {
197
+ return {
198
+ ...project,
199
+ files: project.files?.map((file) => ({
200
+ ...file,
201
+ onOpen: source.onOpenFile ? () => source.onOpenFile?.(file.path) : void 0
202
+ })),
203
+ sections: project.sections?.map((section) => ({
204
+ ...section,
205
+ items: section.items.map((item) => item.kind === "file" ? {
206
+ ...item,
207
+ onOpen: source.onOpenFile ? () => source.onOpenFile?.(item.path) : void 0
208
+ } : item)
209
+ })),
210
+ threads: project.threads?.map((thread) => ({
211
+ ...thread,
212
+ onOpen: source.onOpenThread ? () => source.onOpenThread?.(thread.id) : void 0
213
+ })),
214
+ onOpen: source.onOpenFile ? () => source.onOpenFile?.(project.path) : void 0,
215
+ onDelete: source.onDelete ? () => source.onDelete?.(project.path) : void 0
216
+ };
217
+ }
218
+ function WorkspaceProjectSourcePanel({ source }) {
219
+ const query = useQuery(source.queryOptions);
220
+ return /* @__PURE__ */ jsx(WorkspaceProjectsPanel, {
221
+ projects: (query.data ?? []).map((project) => projectWithSource(project, source)),
222
+ error: query.isError ? formatErrorMessage(query.error) : void 0,
223
+ loading: query.isPending,
224
+ onRetry: query.isError ? () => void query.refetch() : void 0,
225
+ "aria-busy": query.isFetching || void 0
226
+ });
227
+ }
228
+ /** Canonical workbench descriptor; hosts supply only the source adapter. */
229
+ function workspaceProjectsPanel(source) {
230
+ return {
231
+ id: "projects",
232
+ label: "Projects",
233
+ icon: /* @__PURE__ */ jsx(FolderIcon, {}),
234
+ render: () => /* @__PURE__ */ jsx(WorkspaceProjectSourcePanel, { source })
235
+ };
236
+ }
237
+ //#endregion
238
+ export { WorkspaceProjectCard, WorkspaceProjectFileCard, WorkspaceProjectsPanel, useWorkspaceProjects, workspaceProjectsPanel };
@@ -0,0 +1,47 @@
1
+ import { CardProps } from "../foundations/Card.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/agents-sdk/WorkspaceUserScript.d.ts
5
+ interface WorkspaceUserScript {
6
+ /** Workspace path of the `.user.js` file. */
7
+ path: string;
8
+ name: string;
9
+ description?: string;
10
+ /** `@match` patterns from the file metadata. Displayed as hostnames. */
11
+ matches: readonly string[];
12
+ enabled: boolean;
13
+ /** Brand mark. Defaults to the favicon of the first `@match` origin. */
14
+ icon?: React.ReactNode;
15
+ onEnabledChange?: (enabled: boolean) => void;
16
+ onOpen?: () => void;
17
+ onDelete?: () => void | Promise<void>;
18
+ }
19
+ interface WorkspaceUserScriptCardProps extends Omit<CardProps, "children" | "hover" | "size" | "title"> {
20
+ script: WorkspaceUserScript;
21
+ }
22
+ interface WorkspaceUserScriptsPanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
23
+ /** Projected user scripts to list; an empty list renders the empty state. */
24
+ scripts: readonly WorkspaceUserScript[];
25
+ }
26
+ declare function WorkspaceUserScriptCard({
27
+ className,
28
+ script,
29
+ ref,
30
+ ...props
31
+ }: WorkspaceUserScriptCardProps & {
32
+ ref?: React.Ref<HTMLDivElement>;
33
+ }): React.JSX.Element;
34
+ /**
35
+ * Workbench list of user-script cards, one per projected script. Renders a
36
+ * quiet empty state when nothing is projected.
37
+ */
38
+ declare function WorkspaceUserScriptsPanel({
39
+ className,
40
+ ref,
41
+ scripts,
42
+ ...props
43
+ }: WorkspaceUserScriptsPanelProps & {
44
+ ref?: React.Ref<HTMLElement>;
45
+ }): React.JSX.Element;
46
+ //#endregion
47
+ export { WorkspaceUserScript, WorkspaceUserScriptCard, WorkspaceUserScriptCardProps, WorkspaceUserScriptsPanel, WorkspaceUserScriptsPanelProps };
@@ -0,0 +1,146 @@
1
+ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { P as MonitorIcon, S as FileIcon, m as CodeIcon } from "../../icons-CeGfXO21.js";
3
+ import { IconButton } from "../foundations/IconButton.js";
4
+ import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
5
+ import { DescriptionList } from "../foundations/DescriptionList.js";
6
+ import { EmptyState } from "../foundations/EmptyState.js";
7
+ import { Switch } from "../foundations/Switch.js";
8
+ import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-GqsCYxqT.js";
9
+ import * as React from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ //#region src/components/agents-sdk/WorkspaceUserScript.tsx
12
+ function matchAsUrl(match) {
13
+ const withoutGlobs = match.replace(/^\*:/, "https:").replaceAll("*", "");
14
+ const candidate = withoutGlobs.includes("://") ? withoutGlobs : `https://${withoutGlobs}`;
15
+ try {
16
+ return new URL(candidate);
17
+ } catch {
18
+ return;
19
+ }
20
+ }
21
+ function siteFromMatch(match) {
22
+ const trimmed = match.trim();
23
+ if (!trimmed) return void 0;
24
+ if (trimmed === "*" || trimmed === "*://*" || trimmed === "*://*/*" || trimmed === "<all_urls>") return "All sites";
25
+ return matchAsUrl(trimmed)?.hostname.replace(/^\./, "").replace(/^www\./, "") || void 0;
26
+ }
27
+ function sitesFromMatches(matches) {
28
+ const sites = [];
29
+ for (const match of matches) {
30
+ const site = siteFromMatch(match);
31
+ if (!site || sites.some((item) => item.site === site)) continue;
32
+ sites.push({
33
+ site,
34
+ match,
35
+ href: matchAsUrl(match)?.href
36
+ });
37
+ }
38
+ return sites;
39
+ }
40
+ function ScriptIcon({ script }) {
41
+ if (script.icon) return script.icon;
42
+ return /* @__PURE__ */ jsx(FaviconMark, {
43
+ href: script.matches.map((match) => matchAsUrl(match)?.href).find(Boolean),
44
+ fallback: /* @__PURE__ */ jsx(CodeIcon, {})
45
+ });
46
+ }
47
+ function ScriptSwitch({ script }) {
48
+ return /* @__PURE__ */ jsx(Switch.Root, {
49
+ size: "sm",
50
+ checked: script.enabled,
51
+ disabled: script.onEnabledChange == null,
52
+ "aria-label": `${script.enabled ? "Disable" : "Enable"} ${script.name}`,
53
+ onCheckedChange: (checked) => {
54
+ if (typeof checked === "boolean") script.onEnabledChange?.(checked);
55
+ },
56
+ children: /* @__PURE__ */ jsx(Switch.Thumb, {})
57
+ });
58
+ }
59
+ function SiteList({ matches }) {
60
+ const sites = sitesFromMatches(matches);
61
+ if (sites.length === 0) return null;
62
+ return /* @__PURE__ */ jsx(DescriptionList.Root, {
63
+ align: "start",
64
+ variant: "divided",
65
+ children: /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: "Sites" }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx("div", {
66
+ className: "sigvelo-cluster",
67
+ children: sites.map(({ href, match, site }) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
68
+ kind: "tab",
69
+ value: site,
70
+ label: site,
71
+ hint: match,
72
+ icon: /* @__PURE__ */ jsx(FaviconMark, {
73
+ href,
74
+ fallback: /* @__PURE__ */ jsx(MonitorIcon, {})
75
+ })
76
+ }, site))
77
+ }) })] })
78
+ });
79
+ }
80
+ function WorkspaceUserScriptCard({ className, script, ref, ...props }) {
81
+ const titleId = React.useId();
82
+ const ariaLabel = props["aria-label"];
83
+ const ariaLabelledBy = props["aria-labelledby"] ?? (ariaLabel ? void 0 : titleId);
84
+ return /* @__PURE__ */ jsxs(Card, {
85
+ ...props,
86
+ ref,
87
+ role: props.role ?? "article",
88
+ "aria-labelledby": ariaLabelledBy,
89
+ "data-slot": "workspace-user-script-card",
90
+ size: "sm",
91
+ className: cx("connected-app-card", className),
92
+ children: [/* @__PURE__ */ jsxs(CardHeader, { children: [
93
+ /* @__PURE__ */ jsxs(CardTitle, {
94
+ id: titleId,
95
+ className: "connected-app-card__title",
96
+ render: /* @__PURE__ */ jsx("h3", {}),
97
+ children: [/* @__PURE__ */ jsx("span", {
98
+ className: "connected-app-card__icon",
99
+ "aria-hidden": "true",
100
+ children: /* @__PURE__ */ jsx(ScriptIcon, { script })
101
+ }), script.name]
102
+ }),
103
+ script.description ? /* @__PURE__ */ jsx(CardDescription, { children: script.description }) : null,
104
+ /* @__PURE__ */ jsxs(CardAction, {
105
+ className: "sigvelo-cluster",
106
+ children: [
107
+ /* @__PURE__ */ jsx(ScriptSwitch, { script }),
108
+ script.onOpen ? /* @__PURE__ */ jsx(IconButton, {
109
+ label: `Open ${script.name}`,
110
+ tooltip: script.path,
111
+ variant: "ghost",
112
+ color: "neutral",
113
+ onClick: script.onOpen,
114
+ children: /* @__PURE__ */ jsx(FileIcon, {})
115
+ }) : null,
116
+ script.onDelete ? /* @__PURE__ */ jsx(WorkspaceDeleteControl, {
117
+ name: script.name,
118
+ onDelete: script.onDelete
119
+ }) : null
120
+ ]
121
+ })
122
+ ] }), script.matches.length > 0 ? /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(SiteList, { matches: script.matches }) }) : null]
123
+ });
124
+ }
125
+ /**
126
+ * Workbench list of user-script cards, one per projected script. Renders a
127
+ * quiet empty state when nothing is projected.
128
+ */
129
+ function WorkspaceUserScriptsPanel({ className, ref, scripts, ...props }) {
130
+ return /* @__PURE__ */ jsx("section", {
131
+ ref,
132
+ "data-slot": "workspace-user-scripts-panel",
133
+ className: cx("workspace-concept-panel", className),
134
+ ...props,
135
+ "aria-label": props["aria-label"] ?? "User scripts",
136
+ children: scripts.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
137
+ icon: /* @__PURE__ */ jsx(CodeIcon, {}),
138
+ title: "No scripts"
139
+ }) : /* @__PURE__ */ jsx("ul", {
140
+ className: "sigvelo-stack-list sigvelo-stack",
141
+ children: scripts.map((script) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceUserScriptCard, { script }) }, script.path))
142
+ })
143
+ });
144
+ }
145
+ //#endregion
146
+ export { WorkspaceUserScriptCard, WorkspaceUserScriptsPanel };
@@ -1,7 +1,7 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "../foundations/Collapsible.js";
3
3
  import { useExpansionState } from "./ExpansionState.js";
4
- import { p as ChevronRightIcon } from "../../icons-BC4HZqSK.js";
4
+ import { p as ChevronRightIcon } from "../../icons-CeGfXO21.js";
5
5
  import * as React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/components/ai-sdk/Activity.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { tt as XIcon } from "../../icons-BC4HZqSK.js";
2
+ import { nt as XIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { PromptInputTray } from "./PromptInput.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { R as PencilIcon } from "../../icons-BC4HZqSK.js";
2
+ import { R as PencilIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { Kbd } from "../foundations/Kbd.js";
5
5
  import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
@@ -1,9 +1,9 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, K as SpinnerIcon, tt as XIcon } from "../../icons-BC4HZqSK.js";
2
+ import { K as SpinnerIcon, et as WarningIcon, nt as XIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button, buttonVariants } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
6
- import "react";
6
+ import * as React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/ai-sdk/Artifact.tsx
9
9
  /**
@@ -136,7 +136,7 @@ function ArtifactPreview({ className, label, sourceLink, state, ref, ...props })
136
136
  /* @__PURE__ */ jsx(ArtifactHeader, {
137
137
  className: "artifact-preview__header",
138
138
  children: /* @__PURE__ */ jsx(NavigationLink, {
139
- render: sourceLink,
139
+ render: React.cloneElement(sourceLink, {}, "View source"),
140
140
  className: buttonVariants({
141
141
  variant: "ghost",
142
142
  color: "neutral",
@@ -1,5 +1,5 @@
1
1
  import { Collapsible } from "../foundations/Collapsible.js";
2
- import { E as IconProps } from "../../icons-ChPpNMmU.js";
2
+ import { E as IconProps } from "../../icons-CCZGYUwU.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/ai-sdk/ChainOfThought.d.ts
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "../foundations/Collapsible.js";
3
- import { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-BC4HZqSK.js";
3
+ import { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-CeGfXO21.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/ai-sdk/ChainOfThought.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { s as BookmarkIcon } from "../../icons-BC4HZqSK.js";
2
+ import { s as BookmarkIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Marker, MarkerIcon } from "../foundations/Marker.js";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,2 +1,2 @@
1
- import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-CcteqDvA.js";
1
+ import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-BSJl682D.js";
2
2
  export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle };
@@ -21,7 +21,10 @@ declare function ComposerLink({
21
21
  children,
22
22
  onClick,
23
23
  style,
24
+ ref,
24
25
  ...props
25
- }: ComposerLinkProps): React.JSX.Element;
26
+ }: ComposerLinkProps & {
27
+ ref?: React.Ref<HTMLAnchorElement>;
28
+ }): React.JSX.Element;
26
29
  //#endregion
27
30
  export { ComposerLink, ComposerLinkProps, composerLinkAccent, composerLinkIconSrc, composerLinkUsesCube };
@@ -1,7 +1,8 @@
1
1
  import { brandHexFromIconSrc, parseComposerHref, sampleImageAccent } from "../../utils/composer-link.js";
2
2
  import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
3
3
  import { t as cx } from "../../class-names-BiMDVpUo.js";
4
- import { c as BoxIcon } from "../../icons-BC4HZqSK.js";
4
+ import { c as BoxIcon } from "../../icons-CeGfXO21.js";
5
+ import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
5
6
  import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
6
7
  import * as React from "react";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -74,7 +75,7 @@ function ComposerLinkIcon({ icon, parts }) {
74
75
  * skills, tabs, and files. The href is the source of truth; the visible node
75
76
  * is text plus an optional brand mark, not a button chip.
76
77
  */
77
- function ComposerLink({ href, icon, className, children, onClick, style, ...props }) {
78
+ function ComposerLink({ href, icon, className, children, onClick, style, ref, ...props }) {
78
79
  const parts = parseComposerHref(href);
79
80
  const kind = parts?.kind;
80
81
  const accent = composerLinkAccent(parts);
@@ -84,7 +85,7 @@ function ComposerLink({ href, icon, className, children, onClick, style, ...prop
84
85
  if (link) bindSampledIconColor(link, accent);
85
86
  }, [accent, href]);
86
87
  return /* @__PURE__ */ jsxs("a", {
87
- ref: linkRef,
88
+ ref: mergeRefs(linkRef, ref),
88
89
  className: cx("composer-link", className),
89
90
  "data-composer-link": kind,
90
91
  href,
@@ -1,11 +1,32 @@
1
+ import { t as Correspondent } from "../../Correspondent-7K6uNLUm.js";
1
2
  import { CardProps } from "../foundations/Card.js";
2
3
  import * as React from "react";
3
4
 
4
5
  //#region src/components/ai-sdk/ConnectedAppCards.d.ts
5
6
  type ConnectedAppCardState = "pending" | "sent" | "denied";
7
+ /**
8
+ * Lifecycle of persisting the visible draft. Absent means saved. While a save
9
+ * is in flight or failed the card's release action is disabled, and a failed
10
+ * save is shown inline with its retry affordance — a draft must never release
11
+ * content the backing store does not hold.
12
+ */
13
+ type ConnectedAppCardSaveState = {
14
+ status: "saving";
15
+ } | {
16
+ status: "error";
17
+ message: string;
18
+ onRetry?: () => void;
19
+ };
6
20
  type ConnectedAppCardProps = Omit<CardProps, "children" | "hover" | "size" | "title" | "onChange"> & {
7
- /** Lifecycle of the draft. Pending can be edited; sent and denied are settled. */state?: ConnectedAppCardState; /** Optional provider mark. The domain's generic icon is used by default. */
21
+ /** Lifecycle of the draft. Pending can be edited; sent and denied are settled. */state?: ConnectedAppCardState; /** Persistence lifecycle of the visible draft. Absent means saved. */
22
+ saveState?: ConnectedAppCardSaveState; /** Optional provider mark. The domain's generic icon is used by default. */
8
23
  icon?: React.ReactNode;
24
+ /**
25
+ * File-level controls rendered beside the status in the header, such as Open
26
+ * and Delete. The header grid owns exactly one action cell, so these share it
27
+ * with the status rather than competing for a second one.
28
+ */
29
+ headerActions?: React.ReactNode;
9
30
  };
10
31
  interface EmailMessageDraft {
11
32
  from?: string;
@@ -14,6 +35,8 @@ interface EmailMessageDraft {
14
35
  body?: string;
15
36
  }
16
37
  interface EmailMessageCardProps extends ConnectedAppCardProps, EmailMessageDraft {
38
+ /** Person-shaped To. The address string remains the route. */
39
+ correspondent?: Correspondent;
17
40
  onChange?: (next: EmailMessageDraft) => void;
18
41
  onDiscard?: () => void | Promise<void>;
19
42
  onReject?: (reason: string) => void | Promise<void>;
@@ -25,6 +48,7 @@ interface EmailMessageCardProps extends ConnectedAppCardProps, EmailMessageDraft
25
48
  */
26
49
  declare function EmailMessageCard({
27
50
  body,
51
+ correspondent,
28
52
  from,
29
53
  icon,
30
54
  onChange,
@@ -46,6 +70,8 @@ interface SlackMessageDraft {
46
70
  message: string;
47
71
  }
48
72
  interface SlackMessageCardProps extends ConnectedAppCardProps, SlackMessageDraft {
73
+ /** Person-shaped To. Rooms stay the destination string. */
74
+ correspondent?: Correspondent;
49
75
  onChange?: (next: SlackMessageDraft) => void;
50
76
  onDiscard?: () => void | Promise<void>;
51
77
  onReject?: (reason: string) => void | Promise<void>;
@@ -53,6 +79,7 @@ interface SlackMessageCardProps extends ConnectedAppCardProps, SlackMessageDraft
53
79
  }
54
80
  /** Slack draft or posted message with workspace, destination, and thread fields. */
55
81
  declare function SlackMessageCard({
82
+ correspondent,
56
83
  icon,
57
84
  message,
58
85
  onChange,
@@ -103,4 +130,4 @@ declare function CalendarEventCard({
103
130
  ref?: React.Ref<HTMLDivElement>;
104
131
  }): React.JSX.Element;
105
132
  //#endregion
106
- export { CalendarEventCard, CalendarEventCardProps, CalendarEventDraft, ConnectedAppCardState, EmailMessageCard, EmailMessageCardProps, EmailMessageDraft, SlackMessageCard, SlackMessageCardProps, SlackMessageDraft };
133
+ export { CalendarEventCard, CalendarEventCardProps, CalendarEventDraft, ConnectedAppCardSaveState, ConnectedAppCardState, EmailMessageCard, EmailMessageCardProps, EmailMessageDraft, SlackMessageCard, SlackMessageCardProps, SlackMessageDraft };