-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathtypes.ts
More file actions
executable file
·37 lines (32 loc) · 1.02 KB
/
types.ts
File metadata and controls
executable file
·37 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import type { Stagehand, Page } from "@browserbasehq/stagehand";
import { ImageContent, TextContent } from "@modelcontextprotocol/sdk/types.js";
import { Tool } from "../tools/tool.js";
import { InputType } from "../tools/tool.js";
export type StagehandSession = {
id: string; // MCP-side ID
stagehand: Stagehand; // owns the Browserbase session
page: Page;
created: number;
metadata?: Record<string, any>; // optional extras (proxy, contextId, bbSessionId)
};
export type CreateSessionParams = {
apiKey?: string;
projectId?: string;
modelName?: string;
modelApiKey?: string;
browserbaseSessionID?: string;
browserbaseSessionCreateParams?: any;
meta?: Record<string, any>;
};
export type BrowserSession = {
page: Page;
sessionId: string;
stagehand: Stagehand;
};
export type ToolActionResult =
| { content?: (ImageContent | TextContent)[] }
| undefined
| void;
// Type for the tools array used in MCP server registration
export type MCPTool = Tool<InputType>;
export type MCPToolsArray = MCPTool[];