@wingman-ai/gateway 0.5.2 → 0.5.4
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/agent/config/agentConfig.cjs +4 -0
- package/dist/agent/config/agentConfig.d.ts +12 -0
- package/dist/agent/config/agentConfig.js +4 -0
- package/dist/agent/config/toolRegistry.cjs +75 -1
- package/dist/agent/config/toolRegistry.d.ts +3 -0
- package/dist/agent/config/toolRegistry.js +75 -1
- package/dist/agent/middleware/large-tool-results.cjs +207 -0
- package/dist/agent/middleware/large-tool-results.d.ts +16 -0
- package/dist/agent/middleware/large-tool-results.js +173 -0
- package/dist/agent/tools/browser_control.cjs +9 -1231
- package/dist/agent/tools/browser_control.d.ts +126 -234
- package/dist/agent/tools/browser_control.js +7 -1226
- package/dist/agent/tools/browser_runtime.cjs +1189 -0
- package/dist/agent/tools/browser_runtime.d.ts +560 -0
- package/dist/agent/tools/browser_runtime.js +1122 -0
- package/dist/agent/tools/browser_session.cjs +153 -0
- package/dist/agent/tools/browser_session.d.ts +741 -0
- package/dist/agent/tools/browser_session.js +110 -0
- package/dist/agent/tools/browser_session_manager.cjs +202 -0
- package/dist/agent/tools/browser_session_manager.d.ts +64 -0
- package/dist/agent/tools/browser_session_manager.js +165 -0
- package/dist/cli/commands/init.cjs +5 -1
- package/dist/cli/commands/init.js +5 -1
- package/dist/cli/config/loader.cjs +0 -5
- package/dist/cli/config/loader.js +0 -5
- package/dist/cli/config/schema.cjs +3 -7
- package/dist/cli/config/schema.d.ts +6 -6
- package/dist/cli/config/schema.js +3 -7
- package/dist/cli/core/agentInvoker.cjs +86 -22
- package/dist/cli/core/agentInvoker.d.ts +10 -3
- package/dist/cli/core/agentInvoker.js +86 -25
- package/dist/cli/core/outputManager.cjs +7 -2
- package/dist/cli/core/outputManager.d.ts +2 -2
- package/dist/cli/core/outputManager.js +7 -2
- package/dist/cli/types.d.ts +2 -1
- package/dist/webui/assets/index-XrEnkZiq.css +11 -0
- package/dist/webui/assets/index-mDs6HbKM.js +215 -0
- package/dist/webui/index.html +2 -2
- package/package.json +10 -10
- package/templates/agents/README.md +2 -1
- package/templates/agents/coding/agent.md +6 -13
- package/templates/agents/coding-v2/agent.md +6 -1
- package/templates/agents/game-dev/agent.md +8 -2
- package/templates/agents/game-dev/game-designer.md +4 -0
- package/templates/agents/game-dev/scene-engineer.md +4 -0
- package/templates/agents/main/agent.md +5 -0
- package/templates/agents/researcher/agent.md +11 -0
- package/templates/agents/stock-trader/agent.md +4 -0
- package/dist/agent/tests/agentConfig.test.cjs +0 -224
- package/dist/agent/tests/agentConfig.test.d.ts +0 -1
- package/dist/agent/tests/agentConfig.test.js +0 -218
- package/dist/agent/tests/agentLoader.test.cjs +0 -335
- package/dist/agent/tests/agentLoader.test.d.ts +0 -1
- package/dist/agent/tests/agentLoader.test.js +0 -329
- package/dist/agent/tests/backgroundTerminal.test.cjs +0 -70
- package/dist/agent/tests/backgroundTerminal.test.d.ts +0 -1
- package/dist/agent/tests/backgroundTerminal.test.js +0 -64
- package/dist/agent/tests/browserControlHelpers.test.cjs +0 -35
- package/dist/agent/tests/browserControlHelpers.test.d.ts +0 -1
- package/dist/agent/tests/browserControlHelpers.test.js +0 -29
- package/dist/agent/tests/browserControlTool.test.cjs +0 -2117
- package/dist/agent/tests/browserControlTool.test.d.ts +0 -1
- package/dist/agent/tests/browserControlTool.test.js +0 -2111
- package/dist/agent/tests/commandExecuteTool.test.cjs +0 -29
- package/dist/agent/tests/commandExecuteTool.test.d.ts +0 -1
- package/dist/agent/tests/commandExecuteTool.test.js +0 -23
- package/dist/agent/tests/internet_search.test.cjs +0 -107
- package/dist/agent/tests/internet_search.test.d.ts +0 -1
- package/dist/agent/tests/internet_search.test.js +0 -101
- package/dist/agent/tests/mcpClientManager.test.cjs +0 -290
- package/dist/agent/tests/mcpClientManager.test.d.ts +0 -1
- package/dist/agent/tests/mcpClientManager.test.js +0 -284
- package/dist/agent/tests/mcpResourceTools.test.cjs +0 -101
- package/dist/agent/tests/mcpResourceTools.test.d.ts +0 -1
- package/dist/agent/tests/mcpResourceTools.test.js +0 -95
- package/dist/agent/tests/modelFactory.test.cjs +0 -190
- package/dist/agent/tests/modelFactory.test.d.ts +0 -1
- package/dist/agent/tests/modelFactory.test.js +0 -184
- package/dist/agent/tests/terminalSessionManager.test.cjs +0 -121
- package/dist/agent/tests/terminalSessionManager.test.d.ts +0 -1
- package/dist/agent/tests/terminalSessionManager.test.js +0 -115
- package/dist/agent/tests/test-agent-loader.cjs +0 -33
- package/dist/agent/tests/test-agent-loader.d.ts +0 -1
- package/dist/agent/tests/test-agent-loader.js +0 -27
- package/dist/agent/tests/test-subagent-loading.cjs +0 -99
- package/dist/agent/tests/test-subagent-loading.d.ts +0 -1
- package/dist/agent/tests/test-subagent-loading.js +0 -93
- package/dist/agent/tests/toolRegistry.test.cjs +0 -147
- package/dist/agent/tests/toolRegistry.test.d.ts +0 -1
- package/dist/agent/tests/toolRegistry.test.js +0 -141
- package/dist/agent/tests/uiRegistryTools.test.cjs +0 -114
- package/dist/agent/tests/uiRegistryTools.test.d.ts +0 -1
- package/dist/agent/tests/uiRegistryTools.test.js +0 -105
- package/dist/agent/tests/xaiImageModel.test.cjs +0 -194
- package/dist/agent/tests/xaiImageModel.test.d.ts +0 -1
- package/dist/agent/tests/xaiImageModel.test.js +0 -188
- package/dist/tests/additionalMessageMiddleware.test.cjs +0 -216
- package/dist/tests/additionalMessageMiddleware.test.d.ts +0 -1
- package/dist/tests/additionalMessageMiddleware.test.js +0 -188
- package/dist/tests/agent-config-voice.test.cjs +0 -25
- package/dist/tests/agent-config-voice.test.d.ts +0 -1
- package/dist/tests/agent-config-voice.test.js +0 -19
- package/dist/tests/agentInvokerAttachments.test.cjs +0 -190
- package/dist/tests/agentInvokerAttachments.test.d.ts +0 -1
- package/dist/tests/agentInvokerAttachments.test.js +0 -184
- package/dist/tests/agentInvokerSummarization.test.cjs +0 -613
- package/dist/tests/agentInvokerSummarization.test.d.ts +0 -1
- package/dist/tests/agentInvokerSummarization.test.js +0 -607
- package/dist/tests/agentInvokerTokenUsage.test.cjs +0 -124
- package/dist/tests/agentInvokerTokenUsage.test.d.ts +0 -1
- package/dist/tests/agentInvokerTokenUsage.test.js +0 -118
- package/dist/tests/agentInvokerWorkdir.test.cjs +0 -150
- package/dist/tests/agentInvokerWorkdir.test.d.ts +0 -1
- package/dist/tests/agentInvokerWorkdir.test.js +0 -122
- package/dist/tests/agents-api.test.cjs +0 -324
- package/dist/tests/agents-api.test.d.ts +0 -1
- package/dist/tests/agents-api.test.js +0 -318
- package/dist/tests/attachments-utils.test.cjs +0 -46
- package/dist/tests/attachments-utils.test.d.ts +0 -1
- package/dist/tests/attachments-utils.test.js +0 -40
- package/dist/tests/browser-command.test.cjs +0 -264
- package/dist/tests/browser-command.test.d.ts +0 -1
- package/dist/tests/browser-command.test.js +0 -258
- package/dist/tests/browser-relay-server.test.cjs +0 -20
- package/dist/tests/browser-relay-server.test.d.ts +0 -1
- package/dist/tests/browser-relay-server.test.js +0 -14
- package/dist/tests/bunSqliteAdapter.test.cjs +0 -265
- package/dist/tests/bunSqliteAdapter.test.d.ts +0 -1
- package/dist/tests/bunSqliteAdapter.test.js +0 -259
- package/dist/tests/candleRange.test.cjs +0 -48
- package/dist/tests/candleRange.test.d.ts +0 -1
- package/dist/tests/candleRange.test.js +0 -42
- package/dist/tests/cli-config-loader.test.cjs +0 -532
- package/dist/tests/cli-config-loader.test.d.ts +0 -1
- package/dist/tests/cli-config-loader.test.js +0 -526
- package/dist/tests/cli-config-warnings.test.cjs +0 -94
- package/dist/tests/cli-config-warnings.test.d.ts +0 -1
- package/dist/tests/cli-config-warnings.test.js +0 -88
- package/dist/tests/cli-init.test.cjs +0 -225
- package/dist/tests/cli-init.test.d.ts +0 -1
- package/dist/tests/cli-init.test.js +0 -219
- package/dist/tests/cli-workspace-root.test.cjs +0 -114
- package/dist/tests/cli-workspace-root.test.d.ts +0 -1
- package/dist/tests/cli-workspace-root.test.js +0 -108
- package/dist/tests/codex-credentials-precedence.test.cjs +0 -94
- package/dist/tests/codex-credentials-precedence.test.d.ts +0 -1
- package/dist/tests/codex-credentials-precedence.test.js +0 -88
- package/dist/tests/codex-provider.test.cjs +0 -383
- package/dist/tests/codex-provider.test.d.ts +0 -1
- package/dist/tests/codex-provider.test.js +0 -377
- package/dist/tests/config-json-schema.test.cjs +0 -37
- package/dist/tests/config-json-schema.test.d.ts +0 -1
- package/dist/tests/config-json-schema.test.js +0 -31
- package/dist/tests/discord-adapter.test.cjs +0 -89
- package/dist/tests/discord-adapter.test.d.ts +0 -1
- package/dist/tests/discord-adapter.test.js +0 -83
- package/dist/tests/falRuntime.test.cjs +0 -78
- package/dist/tests/falRuntime.test.d.ts +0 -1
- package/dist/tests/falRuntime.test.js +0 -72
- package/dist/tests/falSummary.test.cjs +0 -51
- package/dist/tests/falSummary.test.d.ts +0 -1
- package/dist/tests/falSummary.test.js +0 -45
- package/dist/tests/fs-api.test.cjs +0 -138
- package/dist/tests/fs-api.test.d.ts +0 -1
- package/dist/tests/fs-api.test.js +0 -132
- package/dist/tests/gateway-command-workspace.test.cjs +0 -150
- package/dist/tests/gateway-command-workspace.test.d.ts +0 -1
- package/dist/tests/gateway-command-workspace.test.js +0 -144
- package/dist/tests/gateway-http-security.test.cjs +0 -318
- package/dist/tests/gateway-http-security.test.d.ts +0 -1
- package/dist/tests/gateway-http-security.test.js +0 -312
- package/dist/tests/gateway-node-mode.test.cjs +0 -174
- package/dist/tests/gateway-node-mode.test.d.ts +0 -1
- package/dist/tests/gateway-node-mode.test.js +0 -168
- package/dist/tests/gateway-origin-policy.test.cjs +0 -82
- package/dist/tests/gateway-origin-policy.test.d.ts +0 -1
- package/dist/tests/gateway-origin-policy.test.js +0 -76
- package/dist/tests/gateway-request-execution-overrides.test.cjs +0 -42
- package/dist/tests/gateway-request-execution-overrides.test.d.ts +0 -1
- package/dist/tests/gateway-request-execution-overrides.test.js +0 -36
- package/dist/tests/gateway.test.cjs +0 -700
- package/dist/tests/gateway.test.d.ts +0 -1
- package/dist/tests/gateway.test.js +0 -694
- package/dist/tests/hooks-matcher.test.cjs +0 -309
- package/dist/tests/hooks-matcher.test.d.ts +0 -1
- package/dist/tests/hooks-matcher.test.js +0 -303
- package/dist/tests/hooks-merger.test.cjs +0 -528
- package/dist/tests/hooks-merger.test.d.ts +0 -1
- package/dist/tests/hooks-merger.test.js +0 -522
- package/dist/tests/imagePersistence.test.cjs +0 -169
- package/dist/tests/imagePersistence.test.d.ts +0 -1
- package/dist/tests/imagePersistence.test.js +0 -163
- package/dist/tests/integration/agent-invocation.integration.test.cjs +0 -264
- package/dist/tests/integration/agent-invocation.integration.test.d.ts +0 -1
- package/dist/tests/integration/agent-invocation.integration.test.js +0 -258
- package/dist/tests/integration/finnhub-candles.integration.test.cjs +0 -98
- package/dist/tests/integration/finnhub-candles.integration.test.d.ts +0 -1
- package/dist/tests/integration/finnhub-candles.integration.test.js +0 -92
- package/dist/tests/integration/summarization-e2e.integration.test.cjs +0 -127
- package/dist/tests/integration/summarization-e2e.integration.test.d.ts +0 -1
- package/dist/tests/integration/summarization-e2e.integration.test.js +0 -121
- package/dist/tests/logger.test.cjs +0 -353
- package/dist/tests/logger.test.d.ts +0 -1
- package/dist/tests/logger.test.js +0 -347
- package/dist/tests/mediaCompatibilityMiddleware.test.cjs +0 -106
- package/dist/tests/mediaCompatibilityMiddleware.test.d.ts +0 -1
- package/dist/tests/mediaCompatibilityMiddleware.test.js +0 -100
- package/dist/tests/node-tools.test.cjs +0 -77
- package/dist/tests/node-tools.test.d.ts +0 -1
- package/dist/tests/node-tools.test.js +0 -71
- package/dist/tests/nodes-api.test.cjs +0 -86
- package/dist/tests/nodes-api.test.d.ts +0 -1
- package/dist/tests/nodes-api.test.js +0 -80
- package/dist/tests/outputManagerContextSummarized.test.cjs +0 -43
- package/dist/tests/outputManagerContextSummarized.test.d.ts +0 -1
- package/dist/tests/outputManagerContextSummarized.test.js +0 -37
- package/dist/tests/provider-command-codex.test.cjs +0 -57
- package/dist/tests/provider-command-codex.test.d.ts +0 -1
- package/dist/tests/provider-command-codex.test.js +0 -51
- package/dist/tests/routines-api.test.cjs +0 -107
- package/dist/tests/routines-api.test.d.ts +0 -1
- package/dist/tests/routines-api.test.js +0 -101
- package/dist/tests/run-terminal-bench-official-script.test.cjs +0 -61
- package/dist/tests/run-terminal-bench-official-script.test.d.ts +0 -1
- package/dist/tests/run-terminal-bench-official-script.test.js +0 -55
- package/dist/tests/sessionManager-uionly.test.cjs +0 -50
- package/dist/tests/sessionManager-uionly.test.d.ts +0 -1
- package/dist/tests/sessionManager-uionly.test.js +0 -44
- package/dist/tests/sessionMessageAttachments.test.cjs +0 -197
- package/dist/tests/sessionMessageAttachments.test.d.ts +0 -1
- package/dist/tests/sessionMessageAttachments.test.js +0 -191
- package/dist/tests/sessionMessageRole.test.cjs +0 -44
- package/dist/tests/sessionMessageRole.test.d.ts +0 -1
- package/dist/tests/sessionMessageRole.test.js +0 -38
- package/dist/tests/sessionStateMessages.test.cjs +0 -236
- package/dist/tests/sessionStateMessages.test.d.ts +0 -1
- package/dist/tests/sessionStateMessages.test.js +0 -230
- package/dist/tests/sessions-api.test.cjs +0 -250
- package/dist/tests/sessions-api.test.d.ts +0 -1
- package/dist/tests/sessions-api.test.js +0 -244
- package/dist/tests/skill-activation.test.cjs +0 -86
- package/dist/tests/skill-activation.test.d.ts +0 -1
- package/dist/tests/skill-activation.test.js +0 -80
- package/dist/tests/skill-metadata.test.cjs +0 -119
- package/dist/tests/skill-metadata.test.d.ts +0 -1
- package/dist/tests/skill-metadata.test.js +0 -113
- package/dist/tests/skill-repository.test.cjs +0 -469
- package/dist/tests/skill-repository.test.d.ts +0 -1
- package/dist/tests/skill-repository.test.js +0 -463
- package/dist/tests/skill-security-scanner.test.cjs +0 -126
- package/dist/tests/skill-security-scanner.test.d.ts +0 -1
- package/dist/tests/skill-security-scanner.test.js +0 -120
- package/dist/tests/sms-api.test.cjs +0 -183
- package/dist/tests/sms-api.test.d.ts +0 -1
- package/dist/tests/sms-api.test.js +0 -177
- package/dist/tests/sms-commands.test.cjs +0 -90
- package/dist/tests/sms-commands.test.d.ts +0 -1
- package/dist/tests/sms-commands.test.js +0 -84
- package/dist/tests/sms-policy-store.test.cjs +0 -69
- package/dist/tests/sms-policy-store.test.d.ts +0 -1
- package/dist/tests/sms-policy-store.test.js +0 -63
- package/dist/tests/teams-adapter.test.cjs +0 -58
- package/dist/tests/teams-adapter.test.d.ts +0 -1
- package/dist/tests/teams-adapter.test.js +0 -52
- package/dist/tests/technicalIndicators.test.cjs +0 -82
- package/dist/tests/technicalIndicators.test.d.ts +0 -1
- package/dist/tests/technicalIndicators.test.js +0 -76
- package/dist/tests/terminal-bench-adapters-helpers.test.cjs +0 -64
- package/dist/tests/terminal-bench-adapters-helpers.test.d.ts +0 -1
- package/dist/tests/terminal-bench-adapters-helpers.test.js +0 -58
- package/dist/tests/terminal-bench-cleanup.test.cjs +0 -93
- package/dist/tests/terminal-bench-cleanup.test.d.ts +0 -1
- package/dist/tests/terminal-bench-cleanup.test.js +0 -87
- package/dist/tests/terminal-bench-config.test.cjs +0 -62
- package/dist/tests/terminal-bench-config.test.d.ts +0 -1
- package/dist/tests/terminal-bench-config.test.js +0 -56
- package/dist/tests/terminal-bench-official.test.cjs +0 -194
- package/dist/tests/terminal-bench-official.test.d.ts +0 -1
- package/dist/tests/terminal-bench-official.test.js +0 -188
- package/dist/tests/terminal-bench-runner.test.cjs +0 -82
- package/dist/tests/terminal-bench-runner.test.d.ts +0 -1
- package/dist/tests/terminal-bench-runner.test.js +0 -76
- package/dist/tests/terminal-bench-scoring.test.cjs +0 -128
- package/dist/tests/terminal-bench-scoring.test.d.ts +0 -1
- package/dist/tests/terminal-bench-scoring.test.js +0 -122
- package/dist/tests/terminalProbe.test.cjs +0 -45
- package/dist/tests/terminalProbe.test.d.ts +0 -1
- package/dist/tests/terminalProbe.test.js +0 -39
- package/dist/tests/terminalProbeAuth.test.cjs +0 -85
- package/dist/tests/terminalProbeAuth.test.d.ts +0 -1
- package/dist/tests/terminalProbeAuth.test.js +0 -79
- package/dist/tests/toolDisplayHelpers.test.cjs +0 -46
- package/dist/tests/toolDisplayHelpers.test.d.ts +0 -1
- package/dist/tests/toolDisplayHelpers.test.js +0 -40
- package/dist/tests/uv.test.cjs +0 -47
- package/dist/tests/uv.test.d.ts +0 -1
- package/dist/tests/uv.test.js +0 -41
- package/dist/tests/voice-config.test.cjs +0 -35
- package/dist/tests/voice-config.test.d.ts +0 -1
- package/dist/tests/voice-config.test.js +0 -29
- package/dist/tests/websocket-transport.test.cjs +0 -31
- package/dist/tests/websocket-transport.test.d.ts +0 -1
- package/dist/tests/websocket-transport.test.js +0 -25
- package/dist/tests/yahooCandles.test.cjs +0 -111
- package/dist/tests/yahooCandles.test.d.ts +0 -1
- package/dist/tests/yahooCandles.test.js +0 -105
- package/dist/tools/finance/optionsAnalytics.test.cjs +0 -128
- package/dist/tools/finance/optionsAnalytics.test.d.ts +0 -1
- package/dist/tools/finance/optionsAnalytics.test.js +0 -122
- package/dist/webui/assets/index-D07GBGp0.js +0 -215
- package/dist/webui/assets/index-DV8IYeOw.css +0 -11
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const DEFAULT_ACTION_TIMEOUT_MS = 30000;
|
|
3
|
+
export declare const BrowserTransportPreferenceSchema: z.ZodEnum<{
|
|
4
|
+
auto: "auto";
|
|
5
|
+
playwright: "playwright";
|
|
6
|
+
relay: "relay";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"navigate">;
|
|
10
|
+
url: z.ZodString;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"url">;
|
|
13
|
+
url: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<"open">;
|
|
16
|
+
url: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<"goto">;
|
|
19
|
+
url: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<"click">;
|
|
22
|
+
selector: z.ZodString;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"type">;
|
|
25
|
+
selector: z.ZodString;
|
|
26
|
+
text: z.ZodString;
|
|
27
|
+
submit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"press">;
|
|
30
|
+
key: z.ZodString;
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"wait">;
|
|
33
|
+
ms: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
35
|
+
url: z.ZodOptional<z.ZodString>;
|
|
36
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
load: "load";
|
|
38
|
+
domcontentloaded: "domcontentloaded";
|
|
39
|
+
networkidle: "networkidle";
|
|
40
|
+
}>>;
|
|
41
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
42
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
type: z.ZodLiteral<"ms">;
|
|
45
|
+
ms: z.ZodNumber;
|
|
46
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
+
type: z.ZodLiteral<"sleep">;
|
|
48
|
+
ms: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"pause">;
|
|
51
|
+
ms: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
54
|
+
url: z.ZodOptional<z.ZodString>;
|
|
55
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
load: "load";
|
|
57
|
+
domcontentloaded: "domcontentloaded";
|
|
58
|
+
networkidle: "networkidle";
|
|
59
|
+
}>>;
|
|
60
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
61
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
type: z.ZodLiteral<"wait_for">;
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
65
|
+
url: z.ZodOptional<z.ZodString>;
|
|
66
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
load: "load";
|
|
68
|
+
domcontentloaded: "domcontentloaded";
|
|
69
|
+
networkidle: "networkidle";
|
|
70
|
+
}>>;
|
|
71
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
72
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
type: z.ZodLiteral<"wait_until">;
|
|
74
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
+
type: z.ZodLiteral<"extract_text">;
|
|
76
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
77
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
type: z.ZodLiteral<"selector">;
|
|
80
|
+
selector: z.ZodString;
|
|
81
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<"extract">;
|
|
84
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
85
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
86
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"getContent">;
|
|
88
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
89
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"get_content">;
|
|
92
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
93
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
94
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"querySelector">;
|
|
96
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
97
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
type: z.ZodLiteral<"query_selector">;
|
|
100
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
101
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<"screenshot">;
|
|
104
|
+
path: z.ZodOptional<z.ZodString>;
|
|
105
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"path">;
|
|
108
|
+
path: z.ZodString;
|
|
109
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
type: z.ZodLiteral<"snapshot">;
|
|
112
|
+
path: z.ZodString;
|
|
113
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<"capture">;
|
|
116
|
+
path: z.ZodString;
|
|
117
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
119
|
+
type: z.ZodLiteral<"evaluate">;
|
|
120
|
+
expression: z.ZodString;
|
|
121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
122
|
+
type: z.ZodLiteral<"expression">;
|
|
123
|
+
expression: z.ZodString;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<"js">;
|
|
126
|
+
expression: z.ZodString;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"script">;
|
|
129
|
+
expression: z.ZodString;
|
|
130
|
+
}, z.core.$strip>], "type">;
|
|
131
|
+
export declare const BrowserControlInputSchema: z.ZodObject<{
|
|
132
|
+
url: z.ZodOptional<z.ZodString>;
|
|
133
|
+
actions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
134
|
+
type: z.ZodLiteral<"navigate">;
|
|
135
|
+
url: z.ZodString;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
type: z.ZodLiteral<"url">;
|
|
138
|
+
url: z.ZodString;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"open">;
|
|
141
|
+
url: z.ZodString;
|
|
142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"goto">;
|
|
144
|
+
url: z.ZodString;
|
|
145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
+
type: z.ZodLiteral<"click">;
|
|
147
|
+
selector: z.ZodString;
|
|
148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
149
|
+
type: z.ZodLiteral<"type">;
|
|
150
|
+
selector: z.ZodString;
|
|
151
|
+
text: z.ZodString;
|
|
152
|
+
submit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
type: z.ZodLiteral<"press">;
|
|
155
|
+
key: z.ZodString;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
type: z.ZodLiteral<"wait">;
|
|
158
|
+
ms: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
160
|
+
url: z.ZodOptional<z.ZodString>;
|
|
161
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
load: "load";
|
|
163
|
+
domcontentloaded: "domcontentloaded";
|
|
164
|
+
networkidle: "networkidle";
|
|
165
|
+
}>>;
|
|
166
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
167
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
type: z.ZodLiteral<"ms">;
|
|
170
|
+
ms: z.ZodNumber;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
type: z.ZodLiteral<"sleep">;
|
|
173
|
+
ms: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
175
|
+
type: z.ZodLiteral<"pause">;
|
|
176
|
+
ms: z.ZodNumber;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
179
|
+
url: z.ZodOptional<z.ZodString>;
|
|
180
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
181
|
+
load: "load";
|
|
182
|
+
domcontentloaded: "domcontentloaded";
|
|
183
|
+
networkidle: "networkidle";
|
|
184
|
+
}>>;
|
|
185
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
186
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
type: z.ZodLiteral<"wait_for">;
|
|
188
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
189
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
190
|
+
url: z.ZodOptional<z.ZodString>;
|
|
191
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
192
|
+
load: "load";
|
|
193
|
+
domcontentloaded: "domcontentloaded";
|
|
194
|
+
networkidle: "networkidle";
|
|
195
|
+
}>>;
|
|
196
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
197
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
type: z.ZodLiteral<"wait_until">;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
type: z.ZodLiteral<"extract_text">;
|
|
201
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
202
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
203
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
204
|
+
type: z.ZodLiteral<"selector">;
|
|
205
|
+
selector: z.ZodString;
|
|
206
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
+
type: z.ZodLiteral<"extract">;
|
|
209
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
210
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
211
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
212
|
+
type: z.ZodLiteral<"getContent">;
|
|
213
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
214
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
215
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
216
|
+
type: z.ZodLiteral<"get_content">;
|
|
217
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
218
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
219
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
220
|
+
type: z.ZodLiteral<"querySelector">;
|
|
221
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
222
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
type: z.ZodLiteral<"query_selector">;
|
|
225
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
226
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
+
type: z.ZodLiteral<"screenshot">;
|
|
229
|
+
path: z.ZodOptional<z.ZodString>;
|
|
230
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
type: z.ZodLiteral<"path">;
|
|
233
|
+
path: z.ZodString;
|
|
234
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
236
|
+
type: z.ZodLiteral<"snapshot">;
|
|
237
|
+
path: z.ZodString;
|
|
238
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
+
type: z.ZodLiteral<"capture">;
|
|
241
|
+
path: z.ZodString;
|
|
242
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
+
type: z.ZodLiteral<"evaluate">;
|
|
245
|
+
expression: z.ZodString;
|
|
246
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
247
|
+
type: z.ZodLiteral<"expression">;
|
|
248
|
+
expression: z.ZodString;
|
|
249
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
250
|
+
type: z.ZodLiteral<"js">;
|
|
251
|
+
expression: z.ZodString;
|
|
252
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<"script">;
|
|
254
|
+
expression: z.ZodString;
|
|
255
|
+
}, z.core.$strip>], "type">>>>;
|
|
256
|
+
headless: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
+
timeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
258
|
+
executablePath: z.ZodOptional<z.ZodString>;
|
|
259
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
260
|
+
auto: "auto";
|
|
261
|
+
playwright: "playwright";
|
|
262
|
+
relay: "relay";
|
|
263
|
+
}>>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
export declare const BrowserSessionActionInputSchema: z.ZodObject<{
|
|
266
|
+
session_id: z.ZodString;
|
|
267
|
+
url: z.ZodOptional<z.ZodString>;
|
|
268
|
+
actions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
269
|
+
type: z.ZodLiteral<"navigate">;
|
|
270
|
+
url: z.ZodString;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
type: z.ZodLiteral<"url">;
|
|
273
|
+
url: z.ZodString;
|
|
274
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
+
type: z.ZodLiteral<"open">;
|
|
276
|
+
url: z.ZodString;
|
|
277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
+
type: z.ZodLiteral<"goto">;
|
|
279
|
+
url: z.ZodString;
|
|
280
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
281
|
+
type: z.ZodLiteral<"click">;
|
|
282
|
+
selector: z.ZodString;
|
|
283
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
+
type: z.ZodLiteral<"type">;
|
|
285
|
+
selector: z.ZodString;
|
|
286
|
+
text: z.ZodString;
|
|
287
|
+
submit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
288
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
+
type: z.ZodLiteral<"press">;
|
|
290
|
+
key: z.ZodString;
|
|
291
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
292
|
+
type: z.ZodLiteral<"wait">;
|
|
293
|
+
ms: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
295
|
+
url: z.ZodOptional<z.ZodString>;
|
|
296
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
297
|
+
load: "load";
|
|
298
|
+
domcontentloaded: "domcontentloaded";
|
|
299
|
+
networkidle: "networkidle";
|
|
300
|
+
}>>;
|
|
301
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
302
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
304
|
+
type: z.ZodLiteral<"ms">;
|
|
305
|
+
ms: z.ZodNumber;
|
|
306
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
307
|
+
type: z.ZodLiteral<"sleep">;
|
|
308
|
+
ms: z.ZodNumber;
|
|
309
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
310
|
+
type: z.ZodLiteral<"pause">;
|
|
311
|
+
ms: z.ZodNumber;
|
|
312
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
313
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
314
|
+
url: z.ZodOptional<z.ZodString>;
|
|
315
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
316
|
+
load: "load";
|
|
317
|
+
domcontentloaded: "domcontentloaded";
|
|
318
|
+
networkidle: "networkidle";
|
|
319
|
+
}>>;
|
|
320
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
321
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
type: z.ZodLiteral<"wait_for">;
|
|
323
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
324
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
325
|
+
url: z.ZodOptional<z.ZodString>;
|
|
326
|
+
load: z.ZodOptional<z.ZodEnum<{
|
|
327
|
+
load: "load";
|
|
328
|
+
domcontentloaded: "domcontentloaded";
|
|
329
|
+
networkidle: "networkidle";
|
|
330
|
+
}>>;
|
|
331
|
+
fn: z.ZodOptional<z.ZodString>;
|
|
332
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
type: z.ZodLiteral<"wait_until">;
|
|
334
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
335
|
+
type: z.ZodLiteral<"extract_text">;
|
|
336
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
337
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
338
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
339
|
+
type: z.ZodLiteral<"selector">;
|
|
340
|
+
selector: z.ZodString;
|
|
341
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
342
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
343
|
+
type: z.ZodLiteral<"extract">;
|
|
344
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
345
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
+
type: z.ZodLiteral<"getContent">;
|
|
348
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
349
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
350
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
351
|
+
type: z.ZodLiteral<"get_content">;
|
|
352
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
353
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
354
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
355
|
+
type: z.ZodLiteral<"querySelector">;
|
|
356
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
357
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
358
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
359
|
+
type: z.ZodLiteral<"query_selector">;
|
|
360
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
361
|
+
maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
type: z.ZodLiteral<"screenshot">;
|
|
364
|
+
path: z.ZodOptional<z.ZodString>;
|
|
365
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
366
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
367
|
+
type: z.ZodLiteral<"path">;
|
|
368
|
+
path: z.ZodString;
|
|
369
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
370
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
+
type: z.ZodLiteral<"snapshot">;
|
|
372
|
+
path: z.ZodString;
|
|
373
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
374
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
375
|
+
type: z.ZodLiteral<"capture">;
|
|
376
|
+
path: z.ZodString;
|
|
377
|
+
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
378
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
379
|
+
type: z.ZodLiteral<"evaluate">;
|
|
380
|
+
expression: z.ZodString;
|
|
381
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
382
|
+
type: z.ZodLiteral<"expression">;
|
|
383
|
+
expression: z.ZodString;
|
|
384
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
385
|
+
type: z.ZodLiteral<"js">;
|
|
386
|
+
expression: z.ZodString;
|
|
387
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
388
|
+
type: z.ZodLiteral<"script">;
|
|
389
|
+
expression: z.ZodString;
|
|
390
|
+
}, z.core.$strip>], "type">>>>;
|
|
391
|
+
timeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
392
|
+
}, z.core.$strip>;
|
|
393
|
+
export type BrowserControlInput = z.infer<typeof BrowserControlInputSchema>;
|
|
394
|
+
export type BrowserSessionActionInput = z.infer<typeof BrowserSessionActionInputSchema>;
|
|
395
|
+
export type BrowserAction = z.infer<typeof BrowserActionSchema>;
|
|
396
|
+
export type BrowserTransportPreference = z.infer<typeof BrowserTransportPreferenceSchema>;
|
|
397
|
+
export type BrowserPageLike = {
|
|
398
|
+
goto: (url: string, options?: {
|
|
399
|
+
waitUntil?: "domcontentloaded";
|
|
400
|
+
timeout?: number;
|
|
401
|
+
}) => Promise<unknown>;
|
|
402
|
+
bringToFront?: () => Promise<unknown>;
|
|
403
|
+
click: (selector: string, options?: {
|
|
404
|
+
timeout?: number;
|
|
405
|
+
}) => Promise<unknown>;
|
|
406
|
+
fill: (selector: string, text: string, options?: {
|
|
407
|
+
timeout?: number;
|
|
408
|
+
}) => Promise<unknown>;
|
|
409
|
+
keyboard: {
|
|
410
|
+
press: (key: string) => Promise<unknown>;
|
|
411
|
+
};
|
|
412
|
+
waitForTimeout: (ms: number) => Promise<unknown>;
|
|
413
|
+
waitForSelector?: (selector: string, options?: {
|
|
414
|
+
state?: "attached" | "detached" | "visible" | "hidden";
|
|
415
|
+
timeout?: number;
|
|
416
|
+
}) => Promise<unknown>;
|
|
417
|
+
waitForURL?: (url: string | RegExp, options?: {
|
|
418
|
+
timeout?: number;
|
|
419
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle";
|
|
420
|
+
}) => Promise<unknown>;
|
|
421
|
+
waitForLoadState?: (state?: "load" | "domcontentloaded" | "networkidle", options?: {
|
|
422
|
+
timeout?: number;
|
|
423
|
+
}) => Promise<unknown>;
|
|
424
|
+
waitForFunction?: (expression: string, arg?: unknown, options?: {
|
|
425
|
+
timeout?: number;
|
|
426
|
+
}) => Promise<unknown>;
|
|
427
|
+
textContent: (selector: string, options?: {
|
|
428
|
+
timeout?: number;
|
|
429
|
+
}) => Promise<string | null>;
|
|
430
|
+
evaluate: (expression: string) => Promise<unknown>;
|
|
431
|
+
screenshot: (options: {
|
|
432
|
+
path: string;
|
|
433
|
+
fullPage?: boolean;
|
|
434
|
+
}) => Promise<unknown>;
|
|
435
|
+
title: () => Promise<string>;
|
|
436
|
+
url: () => string;
|
|
437
|
+
};
|
|
438
|
+
export type BrowserContextLike = {
|
|
439
|
+
pages: () => BrowserPageLike[];
|
|
440
|
+
newPage: () => Promise<BrowserPageLike>;
|
|
441
|
+
close?: () => Promise<unknown>;
|
|
442
|
+
};
|
|
443
|
+
type BrowserLike = {
|
|
444
|
+
contexts: () => BrowserContextLike[];
|
|
445
|
+
close: () => Promise<unknown>;
|
|
446
|
+
};
|
|
447
|
+
type LaunchPersistentContextOptions = {
|
|
448
|
+
executablePath?: string;
|
|
449
|
+
headless?: boolean;
|
|
450
|
+
timeout?: number;
|
|
451
|
+
args?: string[];
|
|
452
|
+
ignoreDefaultArgs?: string[];
|
|
453
|
+
};
|
|
454
|
+
type PlaywrightLike = {
|
|
455
|
+
chromium: {
|
|
456
|
+
connectOverCDP: (wsEndpoint: string, options?: {
|
|
457
|
+
timeout?: number;
|
|
458
|
+
}) => Promise<BrowserLike>;
|
|
459
|
+
launchPersistentContext?: (userDataDir: string, options?: LaunchPersistentContextOptions) => Promise<BrowserContextLike>;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
interface StartChromeInput {
|
|
463
|
+
executablePath?: string;
|
|
464
|
+
headless: boolean;
|
|
465
|
+
launchTimeoutMs: number;
|
|
466
|
+
userDataDir: string;
|
|
467
|
+
chromeArgs?: string[];
|
|
468
|
+
}
|
|
469
|
+
interface StartedChromeSession {
|
|
470
|
+
wsEndpoint: string;
|
|
471
|
+
close: () => Promise<void>;
|
|
472
|
+
}
|
|
473
|
+
export type BrowserRuntimeTransport = "cdp" | "persistent-context" | "relay-cdp";
|
|
474
|
+
type BrowserRelayRuntimeConfig = {
|
|
475
|
+
enabled?: boolean;
|
|
476
|
+
host?: string;
|
|
477
|
+
port?: number;
|
|
478
|
+
requireAuth?: boolean;
|
|
479
|
+
authToken?: string;
|
|
480
|
+
};
|
|
481
|
+
type ResolvedBrowserRelayConfig = {
|
|
482
|
+
host: string;
|
|
483
|
+
port: number;
|
|
484
|
+
requireAuth: boolean;
|
|
485
|
+
authToken?: string;
|
|
486
|
+
};
|
|
487
|
+
export interface BrowserControlDependencies {
|
|
488
|
+
importPlaywright: () => Promise<PlaywrightLike>;
|
|
489
|
+
startChrome: (input: StartChromeInput) => Promise<StartedChromeSession>;
|
|
490
|
+
resolveRelayWsEndpoint: (config: ResolvedBrowserRelayConfig, timeoutMs: number) => Promise<string>;
|
|
491
|
+
mkTempDir: () => string;
|
|
492
|
+
removeDir: (target: string) => void;
|
|
493
|
+
now: () => number;
|
|
494
|
+
}
|
|
495
|
+
export interface BrowserControlToolOptions {
|
|
496
|
+
workspace?: string;
|
|
497
|
+
configWorkspace?: string;
|
|
498
|
+
launchTimeoutMs?: number;
|
|
499
|
+
defaultExecutablePath?: string;
|
|
500
|
+
browserProfile?: string;
|
|
501
|
+
browserTransport?: BrowserTransportPreference;
|
|
502
|
+
relayConfig?: BrowserRelayRuntimeConfig;
|
|
503
|
+
profilesRootDir?: string;
|
|
504
|
+
profilePaths?: Record<string, string>;
|
|
505
|
+
browserExtensions?: string[];
|
|
506
|
+
extensionsRootDir?: string;
|
|
507
|
+
extensionPaths?: Record<string, string>;
|
|
508
|
+
defaultExtensions?: string[];
|
|
509
|
+
preferPersistentLaunch?: boolean;
|
|
510
|
+
}
|
|
511
|
+
export type BrowserUserDataDirSelection = {
|
|
512
|
+
userDataDir: string;
|
|
513
|
+
persistentProfile: boolean;
|
|
514
|
+
profileId?: string;
|
|
515
|
+
releaseLock?: () => void;
|
|
516
|
+
};
|
|
517
|
+
export interface BrowserSessionRuntime {
|
|
518
|
+
workspace: string;
|
|
519
|
+
configWorkspace: string;
|
|
520
|
+
now: () => number;
|
|
521
|
+
headless: boolean;
|
|
522
|
+
context: BrowserContextLike;
|
|
523
|
+
userDataDirSelection: BrowserUserDataDirSelection;
|
|
524
|
+
browserTransport: BrowserRuntimeTransport;
|
|
525
|
+
transportRequested: BrowserTransportPreference;
|
|
526
|
+
transportFallbackReason: string | null;
|
|
527
|
+
reusedExistingCdpSession: boolean;
|
|
528
|
+
extensionIds: string[];
|
|
529
|
+
launchedContext: BrowserContextLike | null;
|
|
530
|
+
browser: BrowserLike | null;
|
|
531
|
+
chromeSession: StartedChromeSession | null;
|
|
532
|
+
closed: boolean;
|
|
533
|
+
}
|
|
534
|
+
export interface BrowserExecutionSummary {
|
|
535
|
+
browser: "chrome-cdp" | "chrome-playwright" | "chrome-relay";
|
|
536
|
+
transport: BrowserRuntimeTransport;
|
|
537
|
+
transportRequested: BrowserTransportPreference;
|
|
538
|
+
transportUsed: BrowserRuntimeTransport;
|
|
539
|
+
fallbackReason: string | null;
|
|
540
|
+
mode: "headless" | "headed";
|
|
541
|
+
persistentProfile: boolean;
|
|
542
|
+
profileId: string | null;
|
|
543
|
+
profilePath: string | null;
|
|
544
|
+
reusedExistingSession: boolean;
|
|
545
|
+
executionWorkspace: string;
|
|
546
|
+
configWorkspace: string;
|
|
547
|
+
extensions: string[];
|
|
548
|
+
finalUrl: string;
|
|
549
|
+
title: string;
|
|
550
|
+
actionResults: Record<string, unknown>[];
|
|
551
|
+
}
|
|
552
|
+
type BrowserSessionOpenInput = Partial<Pick<BrowserControlInput, "headless" | "timeoutMs" | "executablePath" | "transport">>;
|
|
553
|
+
type BrowserSessionExecutionInput = Partial<Pick<BrowserControlInput, "url" | "actions" | "timeoutMs">>;
|
|
554
|
+
export declare const createBrowserDependencies: (dependencies?: Partial<BrowserControlDependencies>) => BrowserControlDependencies;
|
|
555
|
+
export declare function clearStaleDevtoolsArtifacts(userDataDir: string): void;
|
|
556
|
+
export declare function runBrowserAction(page: BrowserPageLike, action: BrowserAction, timeoutMs: number, workspace: string, now: () => number, actionIndex: number): Promise<Record<string, unknown>>;
|
|
557
|
+
export declare function openBrowserSessionRuntime(options?: BrowserControlToolOptions, dependencies?: Partial<BrowserControlDependencies>, input?: BrowserSessionOpenInput): Promise<BrowserSessionRuntime>;
|
|
558
|
+
export declare function executeBrowserSessionRuntime(runtime: BrowserSessionRuntime, input?: BrowserSessionExecutionInput): Promise<BrowserExecutionSummary>;
|
|
559
|
+
export declare function closeBrowserSessionRuntime(runtime: BrowserSessionRuntime, dependencies?: Partial<BrowserControlDependencies>): Promise<void>;
|
|
560
|
+
export {};
|