@mcp-b/react-components 0.57.0 → 0.58.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.
- package/dist/Card-BPkXIkBz.d.ts +46 -0
- package/dist/{CodeBlock-Dw1z6jc8.js → CodeBlock-Bs_Z03eC.js} +2 -1
- package/dist/{CodeBlock-CPotpyyM.d.ts → CodeBlock-DYp5V_4O.d.ts} +1 -1
- package/dist/{EmployeeChrome-CN99SVfF.d.ts → EmployeeChrome-DsdIek0l.d.ts} +2 -10
- package/dist/ExecutionBoard-DHfMvKlB.d.ts +64 -0
- package/dist/ExecutionResult-BSZsUbrL.js +279 -0
- package/dist/{FileTree-D61EeWRU.js → FileTree-DyLBn7O_.js} +1 -1
- package/dist/{ManagerOffice-D4L_xO4i.js → ManagerOffice-DHcLRhFu.js} +2 -17
- package/dist/{McpConnectorForm-BPWCo9bU.d.ts → McpConnectorForm-D4bY-lm_.d.ts} +1 -1
- package/dist/{McpPluginCatalog-uSh0gGeY.d.ts → McpPluginCatalog-2FZDLCeK.d.ts} +2 -2
- package/dist/{SetupChecklist-DWyifWWg.js → SetupChecklist-CKQ-mKYt.js} +1 -1
- package/dist/{ThinkRoutine-DGlKJbIy.d.ts → ThinkRoutine-DoZjbzyn.d.ts} +15 -3
- package/dist/{Workspace-Cr-aGDfx.d.ts → Workspace-iCkXvQRJ.d.ts} +1 -1
- package/dist/WorkspaceConcept-ByaG-kBq.d.ts +38 -0
- package/dist/WorkspaceExecutionTable-DNhj6YDX.d.ts +239 -0
- package/dist/{WorkspaceFile-DiwiJEwO.d.ts → WorkspaceFile-DkIZKoK6.d.ts} +1 -1
- package/dist/{WorkspaceFileView-DCvGBsI1.js → WorkspaceFileView-M2jC2P4p.js} +217 -139
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +4 -4
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeApp.js +3 -7
- package/dist/components/agents-sdk/EmployeeChat.d.ts +3 -1
- package/dist/components/agents-sdk/EmployeeChat.js +11 -4
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.js +72 -57
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +6 -3
- package/dist/components/agents-sdk/EmployeeSchedules.js +12 -10
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeStartScreen.js +2 -2
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +2 -0
- package/dist/components/agents-sdk/ExecutionBoard.js +648 -0
- package/dist/components/agents-sdk/ManagerAccountActions.js +1 -1
- package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +4 -3
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +1 -1
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +16 -7
- package/dist/components/agents-sdk/McpServerIcon.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.d.ts +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunPanel.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +238 -209
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +13 -34
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkRoutineActions.js +25 -15
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineDetail.d.ts +5 -2
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +13 -7
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +23 -6
- package/dist/components/agents-sdk/ThinkRoutineForm.js +519 -212
- package/dist/components/agents-sdk/ThinkThreadPicker.js +1 -1
- package/dist/components/agents-sdk/TypeSafeConnectionDialog.d.ts +10 -0
- package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +34 -0
- package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +2 -37
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +3 -2
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +2 -92
- package/dist/components/agents-sdk/WorkspaceExecution.js +648 -131
- package/dist/components/agents-sdk/WorkspaceExecutionTable.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceExecutionTable.js +824 -0
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +3 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +4 -3
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +4 -2
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +4 -3
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +3 -2
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +1 -1
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +1 -1
- package/dist/components/ai-sdk/Context.js +2 -2
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +2 -2
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +1 -1
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +2 -2
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/Card.d.ts +2 -45
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +1 -1
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +1 -1
- package/dist/{copy-button-Dk2vRe9j.js → copy-button-M4sAp9xS.js} +1 -1
- package/dist/execution-result-DWVmm-bL.js +80 -0
- package/dist/{icons-CUuD7iEh.d.ts → icons-Dj6id76o.d.ts} +2 -1
- package/dist/{icons-CeGfXO21.js → icons-DvlrWt54.js} +3 -2
- package/dist/{mcp-server-catalog-DgA9BnL0.d.ts → mcp-server-catalog-kaMWaSAL.d.ts} +3 -1
- package/dist/styles/app-top-bar.css +2 -1
- package/dist/styles/base.css +1 -0
- package/dist/styles/chatgpt-sign-in-screen.css +8 -14
- package/dist/styles/context.css +8 -0
- package/dist/styles/description-list.css +12 -9
- package/dist/styles/execution-board.css +383 -0
- package/dist/styles/index.css +3 -0
- package/dist/styles/mcp-plugin-catalog.css +8 -7
- package/dist/styles/think-chat-tool-panels.css +1 -2
- package/dist/styles/think-execution-workbench.css +1 -12
- package/dist/styles/think-routine.css +39 -41
- package/dist/styles/workspace-concepts.css +441 -17
- package/dist/styles/workspace-explorer.css +18 -4
- package/dist/utils/mcp-server-catalog.d.ts +2 -2
- package/dist/utils/mcp-server-catalog.js +18 -1
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-wW_lQLYK.js → workspace-assets-DVn0d-fN.js} +24 -81
- package/dist/workspace-delete-DfloiBWp.js +80 -0
- package/package.json +3 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
//#region src/components/foundations/Card.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Card component.
|
|
5
|
+
*/
|
|
6
|
+
interface CardProps extends useRender.ComponentProps<"div"> {
|
|
7
|
+
/**
|
|
8
|
+
* Enable hover animation effects.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
hover?: boolean;
|
|
12
|
+
/** Compact density for cards embedded in tool and workbench lists. */
|
|
13
|
+
size?: "default" | "sm";
|
|
14
|
+
}
|
|
15
|
+
interface CardHeaderProps extends useRender.ComponentProps<"div"> {}
|
|
16
|
+
interface CardTitleProps extends useRender.ComponentProps<"div"> {}
|
|
17
|
+
interface CardDescriptionProps extends useRender.ComponentProps<"div"> {}
|
|
18
|
+
interface CardActionProps extends useRender.ComponentProps<"div"> {}
|
|
19
|
+
interface CardContentProps extends useRender.ComponentProps<"div"> {}
|
|
20
|
+
interface CardFooterProps extends useRender.ComponentProps<"div"> {}
|
|
21
|
+
/**
|
|
22
|
+
* A container component that provides consistent styling and elevation.
|
|
23
|
+
* Every part accepts Base UI's `render` prop, so semantic elements and existing
|
|
24
|
+
* behavior owners share the same node, props, and refs without an extra wrapper.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Card>
|
|
29
|
+
* <h3>Title</h3>
|
|
30
|
+
* <p>Content</p>
|
|
31
|
+
* </Card>
|
|
32
|
+
*
|
|
33
|
+
* <Card hover render={<a href="/details" />}>View details</Card>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @see {@link https://base-ui.com/react/handbook/composition | Base UI composition}
|
|
37
|
+
*/
|
|
38
|
+
declare function Card({ hover, size, className, render, ref, ...props }: CardProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
39
|
+
declare function CardHeader({ className, render, ref, ...props }: CardHeaderProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
40
|
+
declare function CardTitle({ className, render, ref, ...props }: CardTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
41
|
+
declare function CardDescription({ className, render, ref, ...props }: CardDescriptionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
42
|
+
declare function CardAction({ className, render, ref, ...props }: CardActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
43
|
+
declare function CardContent({ className, render, ref, ...props }: CardContentProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
44
|
+
declare function CardFooter({ className, render, ref, ...props }: CardFooterProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { CardContentProps as a, CardFooter as c, CardHeaderProps as d, CardProps as f, CardContent as i, CardFooterProps as l, CardTitleProps as m, CardAction as n, CardDescription as o, CardTitle as p, CardActionProps as r, CardDescriptionProps as s, Card as t, CardHeader as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { t as CopyButton } from "./copy-button-
|
|
2
|
+
import { t as CopyButton } from "./copy-button-M4sAp9xS.js";
|
|
3
3
|
import { Select } from "./components/foundations/Select.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -54,6 +54,7 @@ function getHighlighterInstance() {
|
|
|
54
54
|
* Loads a Shiki bundled language if it is not already available.
|
|
55
55
|
*/
|
|
56
56
|
async function loadShikiLanguage(highlighter, lang) {
|
|
57
|
+
if (lang === "text") return lang;
|
|
57
58
|
const shikiLang = toShikiLang(lang);
|
|
58
59
|
if (!highlighter.getLoadedLanguages().includes(shikiLang)) await highlighter.loadLanguage(shikiLang);
|
|
59
60
|
return shikiLang;
|
|
@@ -9,7 +9,7 @@ import { BundledLanguage } from "shiki";
|
|
|
9
9
|
* These are the default short aliases shown in the language selector. Full
|
|
10
10
|
* Shiki bundled language names are loaded on demand.
|
|
11
11
|
*/
|
|
12
|
-
type CodeBlockLanguage = BundledLanguage | "ts" | "tsx" | "js" | "jsx" | "css" | "html" | "json" | "bash" | "md";
|
|
12
|
+
type CodeBlockLanguage = BundledLanguage | "text" | "ts" | "tsx" | "js" | "jsx" | "css" | "html" | "json" | "bash" | "md";
|
|
13
13
|
declare const CODE_BLOCK_LANGUAGES: ReadonlyArray<CodeBlockLanguage>;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/components/ai-sdk/CodeBlock.d.ts
|
|
@@ -97,7 +97,7 @@ type EmployeeAgentRun = {
|
|
|
97
97
|
/** A stop already in flight, so the control reads as busy rather than dead. */
|
|
98
98
|
cancelPending?: boolean;
|
|
99
99
|
};
|
|
100
|
-
/** One host
|
|
100
|
+
/** One host-owned destination in the employee's workspace. */
|
|
101
101
|
interface EmployeeWorkbenchItem {
|
|
102
102
|
id: string;
|
|
103
103
|
label: string;
|
|
@@ -108,7 +108,7 @@ interface EmployeeWorkbenchItem {
|
|
|
108
108
|
interface EmployeeMenuProps {
|
|
109
109
|
/** Overrides the default Files/Plugins navigation for shared host shells. */
|
|
110
110
|
navigation?: readonly EmployeeWorkbenchItem[];
|
|
111
|
-
/** Active view
|
|
111
|
+
/** Active view. */
|
|
112
112
|
view?: EmployeeView;
|
|
113
113
|
renderLink: EmployeeRenderLink;
|
|
114
114
|
/** Identity assignment and bind/unbind operations behind the account dialog. */
|
|
@@ -126,13 +126,6 @@ interface EmployeeMenuProps {
|
|
|
126
126
|
}
|
|
127
127
|
/** Employee settings are host-owned state; the menu stores only dialog visibility. */
|
|
128
128
|
declare function EmployeeMenu({ renderLink, view, identity, onModel, onSignOut, companion, passkeys, follow, workbenchNavigation, navigation }: EmployeeMenuProps): React.JSX.Element;
|
|
129
|
-
/** Bar links to Files, Plugins, and host views; the compact overflow carries them instead. */
|
|
130
|
-
declare function EmployeeWorkbenchLinks({ view, renderLink, workbenchNavigation, navigation }: {
|
|
131
|
-
view: EmployeeView;
|
|
132
|
-
renderLink: EmployeeRenderLink;
|
|
133
|
-
workbenchNavigation?: readonly EmployeeWorkbenchItem[];
|
|
134
|
-
navigation?: readonly EmployeeWorkbenchItem[];
|
|
135
|
-
}): React.JSX.Element | null;
|
|
136
129
|
interface EmployeeShellProps<Thread extends ThinkThreadItem = ThinkThreadItem> extends EmployeeMenuProps {
|
|
137
130
|
view: EmployeeView;
|
|
138
131
|
/** Compact workbench back control; the host can return from a file to its workspace. */
|
|
@@ -181,7 +174,6 @@ declare function EmployeeWelcome({ brand, children, suggestions, suggestionsErro
|
|
|
181
174
|
declare const EmployeeChrome: {
|
|
182
175
|
Shell: typeof EmployeeShell;
|
|
183
176
|
Menu: typeof EmployeeMenu;
|
|
184
|
-
WorkbenchLinks: typeof EmployeeWorkbenchLinks;
|
|
185
177
|
Gate: typeof EmployeeGate;
|
|
186
178
|
Welcome: typeof EmployeeWelcome;
|
|
187
179
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/components/agents-sdk/ExecutionBoard.d.ts
|
|
3
|
+
interface ExecutionGraph {
|
|
4
|
+
nodes: readonly {
|
|
5
|
+
id: string;
|
|
6
|
+
stepId: string;
|
|
7
|
+
label: string;
|
|
8
|
+
detail: string;
|
|
9
|
+
path: string;
|
|
10
|
+
line: number;
|
|
11
|
+
kind: "step" | "call" | "fetch" | "branch" | "loop" | "parallel";
|
|
12
|
+
observed: boolean;
|
|
13
|
+
position: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
/** Authored app destinations; these do not imply that a run accessed them. */
|
|
18
|
+
links?: readonly {
|
|
19
|
+
label: string;
|
|
20
|
+
href: string;
|
|
21
|
+
}[];
|
|
22
|
+
}[];
|
|
23
|
+
edges: readonly {
|
|
24
|
+
id: string;
|
|
25
|
+
source: string;
|
|
26
|
+
target: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
}[];
|
|
29
|
+
gaps: readonly string[];
|
|
30
|
+
}
|
|
31
|
+
interface ExecutionStepStats {
|
|
32
|
+
active: number;
|
|
33
|
+
completed: number;
|
|
34
|
+
failed: number;
|
|
35
|
+
durationMs: number;
|
|
36
|
+
yes: number;
|
|
37
|
+
no: number;
|
|
38
|
+
error?: string;
|
|
39
|
+
}
|
|
40
|
+
/** Actual runtime observations; the graph alone never implies that a step ran. */
|
|
41
|
+
interface ExecutionTrace {
|
|
42
|
+
executionId: string;
|
|
43
|
+
path: string;
|
|
44
|
+
graph: ExecutionGraph;
|
|
45
|
+
status: "running" | "completed" | "error" | "aborted" | "interrupted";
|
|
46
|
+
startedAt: number;
|
|
47
|
+
completedAt?: number;
|
|
48
|
+
steps: Readonly<Record<string, ExecutionStepStats>>;
|
|
49
|
+
error?: string;
|
|
50
|
+
result?: unknown;
|
|
51
|
+
logs: readonly string[];
|
|
52
|
+
}
|
|
53
|
+
interface ExecutionBoardProps extends Omit<React.ComponentPropsWithoutRef<"section">, "children"> {
|
|
54
|
+
/** Steps and connections inferred from the executable workflow. */
|
|
55
|
+
graph: ExecutionGraph;
|
|
56
|
+
/** Run status and step results to display over the workflow. */
|
|
57
|
+
trace?: ExecutionTrace;
|
|
58
|
+
/** Hide the result drawer and summary when the surrounding workbench owns Results. */
|
|
59
|
+
showResults?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** A read-only view of executable source, using the automation prototype's React Flow canvas. */
|
|
62
|
+
declare function ExecutionBoard({ graph, trace, showResults, className, ...props }: ExecutionBoardProps): React.JSX.Element;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { ExecutionTrace as a, ExecutionStepStats as i, ExecutionBoardProps as n, ExecutionGraph as r, ExecutionBoard as t };
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { p as ChevronRightIcon } from "./icons-DvlrWt54.js";
|
|
2
|
+
import { IconButton } from "./components/foundations/IconButton.js";
|
|
3
|
+
import { DescriptionList } from "./components/foundations/DescriptionList.js";
|
|
4
|
+
import { a as readExecutionResult, i as executionResultSummary, n as executionResultFiles, r as executionResultPath } from "./execution-result-DWVmm-bL.js";
|
|
5
|
+
import { a as httpUrl, i as WorkspaceComposerLink, r as WebsiteLink } from "./workspace-assets-DVn0d-fN.js";
|
|
6
|
+
import { t as WorkspaceFileLink } from "./WorkspaceLink-BeFAXpbI.js";
|
|
7
|
+
import { useId, useState } from "react";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/_internal/ExecutionResult.tsx
|
|
10
|
+
function executionResultLabel(key) {
|
|
11
|
+
if (key.toLowerCase() === "url") return "Link";
|
|
12
|
+
if (key === key.toUpperCase()) return key;
|
|
13
|
+
const words = key.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ");
|
|
14
|
+
return words.charAt(0).toUpperCase() + words.slice(1).toLowerCase();
|
|
15
|
+
}
|
|
16
|
+
function FileLink({ path, label = "Open result" }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(WorkspaceFileLink, {
|
|
18
|
+
href: path,
|
|
19
|
+
children: /* @__PURE__ */ jsx(WorkspaceComposerLink, {
|
|
20
|
+
value: path,
|
|
21
|
+
label
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function ResultText({ text }) {
|
|
26
|
+
const files = executionResultFiles(text);
|
|
27
|
+
if (!files.length) return /* @__PURE__ */ jsx("span", {
|
|
28
|
+
className: "execution-result__text",
|
|
29
|
+
children: text
|
|
30
|
+
});
|
|
31
|
+
let start = 0;
|
|
32
|
+
const occurrences = /* @__PURE__ */ new Map();
|
|
33
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
34
|
+
className: "execution-result__text",
|
|
35
|
+
children: [files.map((path) => {
|
|
36
|
+
const position = text.indexOf(path, start);
|
|
37
|
+
const before = text.slice(start, position);
|
|
38
|
+
start = position + path.length;
|
|
39
|
+
const occurrence = occurrences.get(path) ?? 0;
|
|
40
|
+
occurrences.set(path, occurrence + 1);
|
|
41
|
+
return /* @__PURE__ */ jsxs("span", { children: [before, /* @__PURE__ */ jsx(FileLink, {
|
|
42
|
+
path,
|
|
43
|
+
label: "saved file"
|
|
44
|
+
})] }, `${path}:${occurrence}`);
|
|
45
|
+
}), text.slice(start)]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function isRecord(value) {
|
|
49
|
+
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
50
|
+
}
|
|
51
|
+
function contentKeys(values) {
|
|
52
|
+
const occurrences = /* @__PURE__ */ new Map();
|
|
53
|
+
return values.map((value) => {
|
|
54
|
+
let content;
|
|
55
|
+
try {
|
|
56
|
+
content = JSON.stringify(value) ?? String(value);
|
|
57
|
+
} catch {
|
|
58
|
+
content = String(value);
|
|
59
|
+
}
|
|
60
|
+
const occurrence = occurrences.get(content) ?? 0;
|
|
61
|
+
occurrences.set(content, occurrence + 1);
|
|
62
|
+
return `${content}:${occurrence}`;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function resultColumns(records, path = []) {
|
|
66
|
+
return [...new Set(records.flatMap((record) => isRecord(record) ? Object.keys(record) : []))].map((key) => {
|
|
67
|
+
const fieldPath = [...path, key];
|
|
68
|
+
const values = records.map((record) => {
|
|
69
|
+
if (!isRecord(record)) return record == null ? record : void 0;
|
|
70
|
+
return Object.hasOwn(record, key) ? readExecutionResult(record[key]) : void 0;
|
|
71
|
+
});
|
|
72
|
+
const children = values.every((value) => value == null || isRecord(value)) ? resultColumns(values, fieldPath) : [];
|
|
73
|
+
return {
|
|
74
|
+
path: fieldPath,
|
|
75
|
+
values,
|
|
76
|
+
children,
|
|
77
|
+
kind: valueKind(values),
|
|
78
|
+
span: children.reduce((sum, child) => sum + child.span, 0) || 1
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function valueKind(items) {
|
|
83
|
+
const values = items.filter((value) => value != null);
|
|
84
|
+
if (values.length && values.every((value) => typeof value === "number")) return "number";
|
|
85
|
+
if (values.some((value) => typeof value === "string" && value.length > 60)) return "prose";
|
|
86
|
+
return "text";
|
|
87
|
+
}
|
|
88
|
+
function hasDetail(value) {
|
|
89
|
+
return value != null && typeof value === "object" && Object.keys(value).length > 0;
|
|
90
|
+
}
|
|
91
|
+
function ResultRow({ columns, index, expandable, headerId }) {
|
|
92
|
+
const [expanded, setExpanded] = useState(false);
|
|
93
|
+
const detailsId = useId();
|
|
94
|
+
const details = columns.filter((column) => hasDetail(column.values[index]));
|
|
95
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("tr", {
|
|
96
|
+
"data-expanded": expanded || void 0,
|
|
97
|
+
children: [expandable ? /* @__PURE__ */ jsx("td", {
|
|
98
|
+
className: "execution-result__toggle-cell",
|
|
99
|
+
children: details.length ? /* @__PURE__ */ jsx(IconButton, {
|
|
100
|
+
className: "execution-result__expand",
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
color: "neutral",
|
|
103
|
+
label: `${expanded ? "Collapse" : "Expand"} row ${index + 1}`,
|
|
104
|
+
"aria-expanded": expanded,
|
|
105
|
+
"aria-controls": expanded ? detailsId : void 0,
|
|
106
|
+
onClick: () => setExpanded(!expanded),
|
|
107
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
108
|
+
}) : null
|
|
109
|
+
}) : null, columns.map((column, columnIndex) => {
|
|
110
|
+
const value = column.values[index];
|
|
111
|
+
const previous = columns[columnIndex - 1];
|
|
112
|
+
return /* @__PURE__ */ jsx("td", {
|
|
113
|
+
"data-kind": column.kind,
|
|
114
|
+
"data-group-start": previous && column.path[0] !== previous.path[0] && (column.path.length > 1 || previous.path.length > 1) || void 0,
|
|
115
|
+
headers: column.path.map((_, depth) => headerId(column.path.slice(0, depth + 1))).join(" "),
|
|
116
|
+
children: value === void 0 ? /* @__PURE__ */ jsx("span", {
|
|
117
|
+
className: "execution-result__muted",
|
|
118
|
+
children: "—"
|
|
119
|
+
}) : hasDetail(value) ? /* @__PURE__ */ jsx("span", {
|
|
120
|
+
className: "execution-result__muted",
|
|
121
|
+
children: Array.isArray(value) ? `${value.length} ${value.length === 1 ? "item" : "items"}` : `${Object.keys(value).length} fields`
|
|
122
|
+
}) : /* @__PURE__ */ jsx(Value, {
|
|
123
|
+
value,
|
|
124
|
+
label: executionResultLabel(column.path.at(-1))
|
|
125
|
+
})
|
|
126
|
+
}, headerId(column.path));
|
|
127
|
+
})]
|
|
128
|
+
}), expanded && details.length ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
|
|
129
|
+
colSpan: columns.length + 1,
|
|
130
|
+
className: "execution-result__detail-cell",
|
|
131
|
+
children: /* @__PURE__ */ jsx("section", {
|
|
132
|
+
id: detailsId,
|
|
133
|
+
className: "execution-result__detail",
|
|
134
|
+
"aria-label": `Row ${index + 1} details`,
|
|
135
|
+
children: details.map((column) => /* @__PURE__ */ jsxs("section", { children: [/* @__PURE__ */ jsx("p", {
|
|
136
|
+
className: "execution-result__detail-title",
|
|
137
|
+
children: column.path.map(executionResultLabel).join(" / ")
|
|
138
|
+
}), /* @__PURE__ */ jsx(Value, {
|
|
139
|
+
value: column.values[index],
|
|
140
|
+
label: column.path.map(executionResultLabel).join(" / ")
|
|
141
|
+
})] }, headerId(column.path)))
|
|
142
|
+
})
|
|
143
|
+
}) }) : null] });
|
|
144
|
+
}
|
|
145
|
+
function ResultTable({ rows, label }) {
|
|
146
|
+
const tableId = useId();
|
|
147
|
+
const rowKeys = contentKeys(rows);
|
|
148
|
+
const columns = resultColumns(rows);
|
|
149
|
+
const levels = [];
|
|
150
|
+
const leaves = [];
|
|
151
|
+
function visit(column, depth) {
|
|
152
|
+
(levels[depth] ??= []).push(column);
|
|
153
|
+
if (column.children.length) column.children.forEach((child) => visit(child, depth + 1));
|
|
154
|
+
else leaves.push(column);
|
|
155
|
+
}
|
|
156
|
+
columns.forEach((column) => visit(column, 0));
|
|
157
|
+
const headerId = (path) => `${tableId}-${encodeURIComponent(JSON.stringify(path))}`;
|
|
158
|
+
const expandable = leaves.some((column) => column.values.some(hasDetail));
|
|
159
|
+
return /* @__PURE__ */ jsx("div", {
|
|
160
|
+
className: "execution-result__scroll",
|
|
161
|
+
role: "region",
|
|
162
|
+
"aria-label": label,
|
|
163
|
+
tabIndex: 0,
|
|
164
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
165
|
+
className: "execution-result__table",
|
|
166
|
+
"aria-label": label,
|
|
167
|
+
children: [/* @__PURE__ */ jsx("thead", { children: levels.map((level, depth) => /* @__PURE__ */ jsxs("tr", { children: [depth === 0 && expandable ? /* @__PURE__ */ jsx("th", {
|
|
168
|
+
className: "execution-result__toggle-cell",
|
|
169
|
+
rowSpan: levels.length,
|
|
170
|
+
scope: "col",
|
|
171
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
172
|
+
className: "sigvelo-visually-hidden",
|
|
173
|
+
children: "Row details"
|
|
174
|
+
})
|
|
175
|
+
}) : null, level.map((column) => /* @__PURE__ */ jsx("th", {
|
|
176
|
+
id: headerId(column.path),
|
|
177
|
+
scope: column.children.length ? "colgroup" : "col",
|
|
178
|
+
colSpan: column.span,
|
|
179
|
+
rowSpan: column.children.length ? 1 : levels.length - depth,
|
|
180
|
+
"data-kind": column.children.length ? void 0 : column.kind,
|
|
181
|
+
children: executionResultLabel(column.path.at(-1))
|
|
182
|
+
}, headerId(column.path)))] }, depth)) }), /* @__PURE__ */ jsx("tbody", { children: rows.map((_, index) => /* @__PURE__ */ jsx(ResultRow, {
|
|
183
|
+
columns: leaves,
|
|
184
|
+
index,
|
|
185
|
+
expandable,
|
|
186
|
+
headerId
|
|
187
|
+
}, rowKeys[index])) })]
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
function ResultList({ items, label }) {
|
|
192
|
+
if (items.length === 0) return /* @__PURE__ */ jsx("span", { children: "None" });
|
|
193
|
+
const rows = items.map(readExecutionResult);
|
|
194
|
+
if (rows.every(isRecord) && rows.some(hasDetail)) return /* @__PURE__ */ jsx(ResultTable, {
|
|
195
|
+
rows,
|
|
196
|
+
label
|
|
197
|
+
});
|
|
198
|
+
const keys = contentKeys(rows);
|
|
199
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
200
|
+
className: "execution-result__list",
|
|
201
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Value, { value: item }) }, keys[index]))
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function ResultFields({ result }) {
|
|
205
|
+
if (Object.keys(result).length === 0) return /* @__PURE__ */ jsx("span", { children: "None" });
|
|
206
|
+
const resultPath = executionResultPath(result);
|
|
207
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DescriptionList.Root, {
|
|
208
|
+
align: "start",
|
|
209
|
+
className: "execution-result__fields",
|
|
210
|
+
children: Object.entries(result).filter(([key]) => key !== "resultPath" || !resultPath).map(([key, item]) => {
|
|
211
|
+
const decoded = readExecutionResult(item);
|
|
212
|
+
return /* @__PURE__ */ jsxs(DescriptionList.Item, {
|
|
213
|
+
className: "execution-result__field",
|
|
214
|
+
"data-number": typeof decoded === "number" || void 0,
|
|
215
|
+
children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: executionResultLabel(key) }), /* @__PURE__ */ jsx(DescriptionList.Details, {
|
|
216
|
+
className: "execution-result__value",
|
|
217
|
+
children: /* @__PURE__ */ jsx(Value, {
|
|
218
|
+
value: decoded,
|
|
219
|
+
label: executionResultLabel(key)
|
|
220
|
+
})
|
|
221
|
+
})]
|
|
222
|
+
}, key);
|
|
223
|
+
})
|
|
224
|
+
}), resultPath ? /* @__PURE__ */ jsx(FileLink, { path: resultPath }) : null] });
|
|
225
|
+
}
|
|
226
|
+
function Value({ value, label = "Results" }) {
|
|
227
|
+
const result = readExecutionResult(value);
|
|
228
|
+
if (result == null) return /* @__PURE__ */ jsx("span", { children: "None" });
|
|
229
|
+
if (typeof result === "boolean") return /* @__PURE__ */ jsx("span", { children: result ? "Yes" : "No" });
|
|
230
|
+
if (typeof result === "number") return /* @__PURE__ */ jsx("span", { children: result.toLocaleString() });
|
|
231
|
+
if (typeof result === "string") {
|
|
232
|
+
const href = httpUrl(result);
|
|
233
|
+
if (href) return /* @__PURE__ */ jsx(WebsiteLink, { href });
|
|
234
|
+
if (result.startsWith("/") && !/\s/.test(result)) return /* @__PURE__ */ jsx(FileLink, { path: result });
|
|
235
|
+
return /* @__PURE__ */ jsx(ResultText, { text: result });
|
|
236
|
+
}
|
|
237
|
+
if (Array.isArray(result)) return /* @__PURE__ */ jsx(ResultList, {
|
|
238
|
+
items: result,
|
|
239
|
+
label
|
|
240
|
+
});
|
|
241
|
+
if (isRecord(result)) return /* @__PURE__ */ jsx(ResultFields, { result });
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
function visibleResult(value, showSummary) {
|
|
245
|
+
const record = isRecord(value);
|
|
246
|
+
const resultPath = executionResultPath(value);
|
|
247
|
+
const summary = record && "summary" in value ? value.summary : value;
|
|
248
|
+
const summaryIsText = typeof readExecutionResult(summary) === "string";
|
|
249
|
+
return {
|
|
250
|
+
value,
|
|
251
|
+
summary,
|
|
252
|
+
summaryHref: typeof summary === "string" ? httpUrl(summary) : void 0,
|
|
253
|
+
fields: record && showSummary ? Object.fromEntries(Object.entries(value).filter(([key]) => (key !== "summary" || !summaryIsText) && (key !== "resultPath" || !resultPath))) : value,
|
|
254
|
+
files: showSummary ? [.../* @__PURE__ */ new Set([...typeof summary === "string" ? executionResultFiles(summary) : [], ...resultPath ? [resultPath] : []])] : []
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
/** Readable outcomes and saved inputs. Payloads are data, never code blocks. */
|
|
258
|
+
function ExecutionResult({ result, showSummary = true }) {
|
|
259
|
+
const { value, summary, summaryHref, fields, files } = visibleResult(readExecutionResult(result), showSummary);
|
|
260
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
261
|
+
className: "execution-result",
|
|
262
|
+
children: [
|
|
263
|
+
showSummary ? /* @__PURE__ */ jsx("p", {
|
|
264
|
+
className: "execution-result__summary",
|
|
265
|
+
children: summaryHref ? /* @__PURE__ */ jsx(Value, { value: summary }) : executionResultSummary(value)
|
|
266
|
+
}) : null,
|
|
267
|
+
!showSummary || hasDetail(fields) ? /* @__PURE__ */ jsx(Value, { value: fields }) : null,
|
|
268
|
+
files.length ? /* @__PURE__ */ jsx("div", {
|
|
269
|
+
className: "sigvelo-cluster",
|
|
270
|
+
children: files.map((path, index) => /* @__PURE__ */ jsx(FileLink, {
|
|
271
|
+
path,
|
|
272
|
+
label: files.length === 1 ? "Open result" : `Open result ${index + 1}`
|
|
273
|
+
}, path))
|
|
274
|
+
}) : null
|
|
275
|
+
]
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
//#endregion
|
|
279
|
+
export { executionResultLabel as n, ExecutionResult as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-
|
|
2
|
+
import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-DvlrWt54.js";
|
|
3
3
|
import { t as NavigationLink } from "./navigation-link-kqMa81v5.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { findCatalogMcpServerCard, getMcpServerIconSrc } from "./utils/mcp-server-catalog.js";
|
|
1
|
+
import { findCatalogMcpServerCard, getMcpServerIconSrc, providerCardForHref } from "./utils/mcp-server-catalog.js";
|
|
2
2
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
3
3
|
import { Collapsible } from "./components/foundations/Collapsible.js";
|
|
4
|
-
import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, L as PauseIcon, P as MonitorIcon, S as FileIcon, T as InfoIcon, _ as DotIcon, d as CheckIcon,
|
|
4
|
+
import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, L as PauseIcon, P as MonitorIcon, S as FileIcon, T as InfoIcon, _ as DotIcon, d as CheckIcon, f as ChevronDownIcon, j as MessageSquareIcon, p as ChevronRightIcon, rt as XIcon, tt as WarningIcon, u as CalendarIcon } from "./icons-DvlrWt54.js";
|
|
5
5
|
import { Button } from "./components/foundations/Button.js";
|
|
6
6
|
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "./components/ai-sdk/AgentAttention.js";
|
|
7
7
|
import { Tooltip } from "./components/foundations/Tooltip.js";
|
|
@@ -613,21 +613,6 @@ function safeHttpUrl(url) {
|
|
|
613
613
|
return;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function providerCardForHref(href) {
|
|
617
|
-
let parsed;
|
|
618
|
-
try {
|
|
619
|
-
parsed = new URL(href);
|
|
620
|
-
} catch {
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
const host = parsed.hostname.toLowerCase();
|
|
624
|
-
if (host === "docs.google.com" || host.endsWith(".docs.google.com")) {
|
|
625
|
-
if (parsed.pathname.includes("/spreadsheets/")) return findCatalogMcpServerCard({ id: "google-sheets" });
|
|
626
|
-
if (parsed.pathname.includes("/document/")) return findCatalogMcpServerCard({ id: "google-docs" });
|
|
627
|
-
if (parsed.pathname.includes("/presentation/")) return findCatalogMcpServerCard({ id: "google-slides" });
|
|
628
|
-
}
|
|
629
|
-
if (host === "drive.google.com" || host.endsWith(".drive.google.com")) return findCatalogMcpServerCard({ id: "google-drive" });
|
|
630
|
-
}
|
|
631
616
|
function workingSetLinkDetail(item) {
|
|
632
617
|
const card = providerCardForHref(item.href);
|
|
633
618
|
if (card) return card.name;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as McpServerSetupAuth, u as McpServerSetupAuthFieldName } from "./mcp-server-catalog-
|
|
1
|
+
import { c as McpServerSetupAuth, u as McpServerSetupAuthFieldName } from "./mcp-server-catalog-kaMWaSAL.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/components/agents-sdk/McpConnectorForm.d.ts
|
|
4
4
|
type CredentialFieldName = Exclude<McpServerSetupAuthFieldName, "redirectUrl">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as DialogProps } from "./Dialog-D5AVE3IN.js";
|
|
2
|
-
import { o as McpServerCard } from "./mcp-server-catalog-
|
|
3
|
-
import { r as McpConnectorFormValues } from "./McpConnectorForm-
|
|
2
|
+
import { o as McpServerCard } from "./mcp-server-catalog-kaMWaSAL.js";
|
|
3
|
+
import { r as McpConnectorFormValues } from "./McpConnectorForm-D4bY-lm_.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { MCPServersState } from "agents";
|
|
6
6
|
//#region src/components/agents-sdk/McpPluginCatalog.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { B as PlusIcon, d as CheckIcon,
|
|
2
|
+
import { B as PlusIcon, d as CheckIcon, f as ChevronDownIcon, tt as WarningIcon } from "./icons-DvlrWt54.js";
|
|
3
3
|
import { Menu } from "./components/foundations/Menu.js";
|
|
4
4
|
import { IconButton } from "./components/foundations/IconButton.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { t as ThinkExecutionRun } from "./ThinkExecutionRun-CPeYVneQ.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as WorkspaceExecutionTableInvocation } from "./WorkspaceExecutionTable-DNhj6YDX.js";
|
|
3
|
+
import { JSONValue } from "ai";
|
|
4
|
+
import { ThinkScheduledTask, ThinkScheduledTaskSchedule } from "@cloudflare/think";
|
|
3
5
|
import { Schedule } from "agents";
|
|
4
6
|
//#region src/components/agents-sdk/ThinkRoutine.d.ts
|
|
7
|
+
/** Saved program invoked by the host's existing execution runtime. */
|
|
8
|
+
interface ThinkRoutineScript {
|
|
9
|
+
path: string;
|
|
10
|
+
args?: Record<string, JSONValue>;
|
|
11
|
+
/** Reuses the prepared table source and input mapping on each occurrence. */
|
|
12
|
+
table?: WorkspaceExecutionTableInvocation["table"];
|
|
13
|
+
}
|
|
5
14
|
/** App-owned identity for the Think agent that owns a routine. */
|
|
6
15
|
interface ThinkRoutineOwner {
|
|
7
16
|
id: string;
|
|
@@ -18,7 +27,10 @@ interface ThinkRoutine {
|
|
|
18
27
|
description?: string;
|
|
19
28
|
enabled: boolean;
|
|
20
29
|
owner: ThinkRoutineOwner;
|
|
21
|
-
task: ThinkScheduledTask
|
|
30
|
+
task: ThinkScheduledTask | {
|
|
31
|
+
schedule: ThinkScheduledTaskSchedule;
|
|
32
|
+
script: ThinkRoutineScript;
|
|
33
|
+
};
|
|
22
34
|
schedule?: Schedule<unknown> | null;
|
|
23
35
|
runs: readonly ThinkExecutionRun[];
|
|
24
36
|
}
|
|
@@ -26,4 +38,4 @@ interface ThinkRoutine {
|
|
|
26
38
|
type ThinkRoutineRunOf<TRoutine extends ThinkRoutine = ThinkRoutine> = TRoutine["runs"][number];
|
|
27
39
|
declare function getThinkRoutineNextRun(routine: ThinkRoutine): string | null;
|
|
28
40
|
//#endregion
|
|
29
|
-
export { getThinkRoutineNextRun as i, ThinkRoutineOwner as n, ThinkRoutineRunOf as r, ThinkRoutine as t };
|
|
41
|
+
export { getThinkRoutineNextRun as a, ThinkRoutineScript as i, ThinkRoutineOwner as n, ThinkRoutineRunOf as r, ThinkRoutine as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-
|
|
1
|
+
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-DkIZKoK6.js";
|
|
2
2
|
import { DataTag, QueryClient, QueryKey, UnusedSkipTokenOptions } from "@tanstack/react-query";
|
|
3
3
|
import { FileInfo, Workspace, WorkspaceFsLike } from "@cloudflare/shell";
|
|
4
4
|
//#region src/components/agents-sdk/Workspace.d.ts
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { _ as WorkspaceQueryOptions, g as WorkspaceQueryKey } from "./Workspace-iCkXvQRJ.js";
|
|
2
|
+
import { QueryClient, QueryFunction } from "@tanstack/react-query";
|
|
3
|
+
//#region src/components/agents-sdk/WorkspaceConcept.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Concept query identity is what the data is: source, root, concept, scope.
|
|
6
|
+
* Freshness never lives in the key — external changes arrive as invalidation
|
|
7
|
+
* through `useWorkspaceLiveQueries` (native observer events or the host's
|
|
8
|
+
* `revision` tick), so cards keep their data, mutation state, and typed form
|
|
9
|
+
* drafts across refreshes.
|
|
10
|
+
*/
|
|
11
|
+
type WorkspaceConceptQueryKey = readonly [...WorkspaceQueryKey, "concept", concept: string, scope: string];
|
|
12
|
+
type WorkspaceConceptQueryOptions<TData> = WorkspaceQueryOptions<TData, WorkspaceConceptQueryKey>;
|
|
13
|
+
interface WorkspaceConceptQueryInput<TData> {
|
|
14
|
+
sourceKey: string;
|
|
15
|
+
/**
|
|
16
|
+
* The host's workspace boundary. Required, and never defaulted: concept keys
|
|
17
|
+
* and live invalidation must agree on one root, and a silent `"/"` default on
|
|
18
|
+
* either side leaves a host with a nested root receiving zero invalidations.
|
|
19
|
+
*/
|
|
20
|
+
root: string;
|
|
21
|
+
concept: string;
|
|
22
|
+
/** The workspace path (file or directory) this projection reads. */
|
|
23
|
+
scope: string;
|
|
24
|
+
queryFn: QueryFunction<TData, WorkspaceConceptQueryKey>;
|
|
25
|
+
}
|
|
26
|
+
declare function workspaceConceptQueryPrefix(sourceKey: string, root: string): readonly ["workspace", string, string, "concept"];
|
|
27
|
+
declare function workspaceConceptQueryKey(sourceKey: string, root: string, concept: string, scope: string): WorkspaceConceptQueryKey;
|
|
28
|
+
/** Shared concept options for design-system components and host loaders. */
|
|
29
|
+
declare function workspaceConceptQueryOptions<TData>({ sourceKey, root, concept, scope, queryFn }: WorkspaceConceptQueryInput<TData>): WorkspaceConceptQueryOptions<TData>;
|
|
30
|
+
declare function workspacePathsOverlap(left: string, right: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Invalidate active concept queries touched by an external workspace change.
|
|
33
|
+
* `root` is required and must be the same root the concept options were built
|
|
34
|
+
* with — the prefix is derived from it, so a mismatch invalidates nothing.
|
|
35
|
+
*/
|
|
36
|
+
declare function invalidateWorkspaceConceptQueries(queryClient: QueryClient, sourceKey: string, root: string, changedPaths?: readonly string[]): Promise<void>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { workspaceConceptQueryKey as a, workspacePathsOverlap as c, invalidateWorkspaceConceptQueries as i, WorkspaceConceptQueryKey as n, workspaceConceptQueryOptions as o, WorkspaceConceptQueryOptions as r, workspaceConceptQueryPrefix as s, WorkspaceConceptQueryInput as t };
|