@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.
Files changed (311) hide show
  1. package/dist/agent/config/agentConfig.cjs +4 -0
  2. package/dist/agent/config/agentConfig.d.ts +12 -0
  3. package/dist/agent/config/agentConfig.js +4 -0
  4. package/dist/agent/config/toolRegistry.cjs +75 -1
  5. package/dist/agent/config/toolRegistry.d.ts +3 -0
  6. package/dist/agent/config/toolRegistry.js +75 -1
  7. package/dist/agent/middleware/large-tool-results.cjs +207 -0
  8. package/dist/agent/middleware/large-tool-results.d.ts +16 -0
  9. package/dist/agent/middleware/large-tool-results.js +173 -0
  10. package/dist/agent/tools/browser_control.cjs +9 -1231
  11. package/dist/agent/tools/browser_control.d.ts +126 -234
  12. package/dist/agent/tools/browser_control.js +7 -1226
  13. package/dist/agent/tools/browser_runtime.cjs +1189 -0
  14. package/dist/agent/tools/browser_runtime.d.ts +560 -0
  15. package/dist/agent/tools/browser_runtime.js +1122 -0
  16. package/dist/agent/tools/browser_session.cjs +153 -0
  17. package/dist/agent/tools/browser_session.d.ts +741 -0
  18. package/dist/agent/tools/browser_session.js +110 -0
  19. package/dist/agent/tools/browser_session_manager.cjs +202 -0
  20. package/dist/agent/tools/browser_session_manager.d.ts +64 -0
  21. package/dist/agent/tools/browser_session_manager.js +165 -0
  22. package/dist/cli/commands/init.cjs +5 -1
  23. package/dist/cli/commands/init.js +5 -1
  24. package/dist/cli/config/loader.cjs +0 -5
  25. package/dist/cli/config/loader.js +0 -5
  26. package/dist/cli/config/schema.cjs +3 -7
  27. package/dist/cli/config/schema.d.ts +6 -6
  28. package/dist/cli/config/schema.js +3 -7
  29. package/dist/cli/core/agentInvoker.cjs +86 -22
  30. package/dist/cli/core/agentInvoker.d.ts +10 -3
  31. package/dist/cli/core/agentInvoker.js +86 -25
  32. package/dist/cli/core/outputManager.cjs +7 -2
  33. package/dist/cli/core/outputManager.d.ts +2 -2
  34. package/dist/cli/core/outputManager.js +7 -2
  35. package/dist/cli/types.d.ts +2 -1
  36. package/dist/webui/assets/index-XrEnkZiq.css +11 -0
  37. package/dist/webui/assets/index-mDs6HbKM.js +215 -0
  38. package/dist/webui/index.html +2 -2
  39. package/package.json +10 -10
  40. package/templates/agents/README.md +2 -1
  41. package/templates/agents/coding/agent.md +6 -13
  42. package/templates/agents/coding-v2/agent.md +6 -1
  43. package/templates/agents/game-dev/agent.md +8 -2
  44. package/templates/agents/game-dev/game-designer.md +4 -0
  45. package/templates/agents/game-dev/scene-engineer.md +4 -0
  46. package/templates/agents/main/agent.md +5 -0
  47. package/templates/agents/researcher/agent.md +11 -0
  48. package/templates/agents/stock-trader/agent.md +4 -0
  49. package/dist/agent/tests/agentConfig.test.cjs +0 -224
  50. package/dist/agent/tests/agentConfig.test.d.ts +0 -1
  51. package/dist/agent/tests/agentConfig.test.js +0 -218
  52. package/dist/agent/tests/agentLoader.test.cjs +0 -335
  53. package/dist/agent/tests/agentLoader.test.d.ts +0 -1
  54. package/dist/agent/tests/agentLoader.test.js +0 -329
  55. package/dist/agent/tests/backgroundTerminal.test.cjs +0 -70
  56. package/dist/agent/tests/backgroundTerminal.test.d.ts +0 -1
  57. package/dist/agent/tests/backgroundTerminal.test.js +0 -64
  58. package/dist/agent/tests/browserControlHelpers.test.cjs +0 -35
  59. package/dist/agent/tests/browserControlHelpers.test.d.ts +0 -1
  60. package/dist/agent/tests/browserControlHelpers.test.js +0 -29
  61. package/dist/agent/tests/browserControlTool.test.cjs +0 -2117
  62. package/dist/agent/tests/browserControlTool.test.d.ts +0 -1
  63. package/dist/agent/tests/browserControlTool.test.js +0 -2111
  64. package/dist/agent/tests/commandExecuteTool.test.cjs +0 -29
  65. package/dist/agent/tests/commandExecuteTool.test.d.ts +0 -1
  66. package/dist/agent/tests/commandExecuteTool.test.js +0 -23
  67. package/dist/agent/tests/internet_search.test.cjs +0 -107
  68. package/dist/agent/tests/internet_search.test.d.ts +0 -1
  69. package/dist/agent/tests/internet_search.test.js +0 -101
  70. package/dist/agent/tests/mcpClientManager.test.cjs +0 -290
  71. package/dist/agent/tests/mcpClientManager.test.d.ts +0 -1
  72. package/dist/agent/tests/mcpClientManager.test.js +0 -284
  73. package/dist/agent/tests/mcpResourceTools.test.cjs +0 -101
  74. package/dist/agent/tests/mcpResourceTools.test.d.ts +0 -1
  75. package/dist/agent/tests/mcpResourceTools.test.js +0 -95
  76. package/dist/agent/tests/modelFactory.test.cjs +0 -190
  77. package/dist/agent/tests/modelFactory.test.d.ts +0 -1
  78. package/dist/agent/tests/modelFactory.test.js +0 -184
  79. package/dist/agent/tests/terminalSessionManager.test.cjs +0 -121
  80. package/dist/agent/tests/terminalSessionManager.test.d.ts +0 -1
  81. package/dist/agent/tests/terminalSessionManager.test.js +0 -115
  82. package/dist/agent/tests/test-agent-loader.cjs +0 -33
  83. package/dist/agent/tests/test-agent-loader.d.ts +0 -1
  84. package/dist/agent/tests/test-agent-loader.js +0 -27
  85. package/dist/agent/tests/test-subagent-loading.cjs +0 -99
  86. package/dist/agent/tests/test-subagent-loading.d.ts +0 -1
  87. package/dist/agent/tests/test-subagent-loading.js +0 -93
  88. package/dist/agent/tests/toolRegistry.test.cjs +0 -147
  89. package/dist/agent/tests/toolRegistry.test.d.ts +0 -1
  90. package/dist/agent/tests/toolRegistry.test.js +0 -141
  91. package/dist/agent/tests/uiRegistryTools.test.cjs +0 -114
  92. package/dist/agent/tests/uiRegistryTools.test.d.ts +0 -1
  93. package/dist/agent/tests/uiRegistryTools.test.js +0 -105
  94. package/dist/agent/tests/xaiImageModel.test.cjs +0 -194
  95. package/dist/agent/tests/xaiImageModel.test.d.ts +0 -1
  96. package/dist/agent/tests/xaiImageModel.test.js +0 -188
  97. package/dist/tests/additionalMessageMiddleware.test.cjs +0 -216
  98. package/dist/tests/additionalMessageMiddleware.test.d.ts +0 -1
  99. package/dist/tests/additionalMessageMiddleware.test.js +0 -188
  100. package/dist/tests/agent-config-voice.test.cjs +0 -25
  101. package/dist/tests/agent-config-voice.test.d.ts +0 -1
  102. package/dist/tests/agent-config-voice.test.js +0 -19
  103. package/dist/tests/agentInvokerAttachments.test.cjs +0 -190
  104. package/dist/tests/agentInvokerAttachments.test.d.ts +0 -1
  105. package/dist/tests/agentInvokerAttachments.test.js +0 -184
  106. package/dist/tests/agentInvokerSummarization.test.cjs +0 -613
  107. package/dist/tests/agentInvokerSummarization.test.d.ts +0 -1
  108. package/dist/tests/agentInvokerSummarization.test.js +0 -607
  109. package/dist/tests/agentInvokerTokenUsage.test.cjs +0 -124
  110. package/dist/tests/agentInvokerTokenUsage.test.d.ts +0 -1
  111. package/dist/tests/agentInvokerTokenUsage.test.js +0 -118
  112. package/dist/tests/agentInvokerWorkdir.test.cjs +0 -150
  113. package/dist/tests/agentInvokerWorkdir.test.d.ts +0 -1
  114. package/dist/tests/agentInvokerWorkdir.test.js +0 -122
  115. package/dist/tests/agents-api.test.cjs +0 -324
  116. package/dist/tests/agents-api.test.d.ts +0 -1
  117. package/dist/tests/agents-api.test.js +0 -318
  118. package/dist/tests/attachments-utils.test.cjs +0 -46
  119. package/dist/tests/attachments-utils.test.d.ts +0 -1
  120. package/dist/tests/attachments-utils.test.js +0 -40
  121. package/dist/tests/browser-command.test.cjs +0 -264
  122. package/dist/tests/browser-command.test.d.ts +0 -1
  123. package/dist/tests/browser-command.test.js +0 -258
  124. package/dist/tests/browser-relay-server.test.cjs +0 -20
  125. package/dist/tests/browser-relay-server.test.d.ts +0 -1
  126. package/dist/tests/browser-relay-server.test.js +0 -14
  127. package/dist/tests/bunSqliteAdapter.test.cjs +0 -265
  128. package/dist/tests/bunSqliteAdapter.test.d.ts +0 -1
  129. package/dist/tests/bunSqliteAdapter.test.js +0 -259
  130. package/dist/tests/candleRange.test.cjs +0 -48
  131. package/dist/tests/candleRange.test.d.ts +0 -1
  132. package/dist/tests/candleRange.test.js +0 -42
  133. package/dist/tests/cli-config-loader.test.cjs +0 -532
  134. package/dist/tests/cli-config-loader.test.d.ts +0 -1
  135. package/dist/tests/cli-config-loader.test.js +0 -526
  136. package/dist/tests/cli-config-warnings.test.cjs +0 -94
  137. package/dist/tests/cli-config-warnings.test.d.ts +0 -1
  138. package/dist/tests/cli-config-warnings.test.js +0 -88
  139. package/dist/tests/cli-init.test.cjs +0 -225
  140. package/dist/tests/cli-init.test.d.ts +0 -1
  141. package/dist/tests/cli-init.test.js +0 -219
  142. package/dist/tests/cli-workspace-root.test.cjs +0 -114
  143. package/dist/tests/cli-workspace-root.test.d.ts +0 -1
  144. package/dist/tests/cli-workspace-root.test.js +0 -108
  145. package/dist/tests/codex-credentials-precedence.test.cjs +0 -94
  146. package/dist/tests/codex-credentials-precedence.test.d.ts +0 -1
  147. package/dist/tests/codex-credentials-precedence.test.js +0 -88
  148. package/dist/tests/codex-provider.test.cjs +0 -383
  149. package/dist/tests/codex-provider.test.d.ts +0 -1
  150. package/dist/tests/codex-provider.test.js +0 -377
  151. package/dist/tests/config-json-schema.test.cjs +0 -37
  152. package/dist/tests/config-json-schema.test.d.ts +0 -1
  153. package/dist/tests/config-json-schema.test.js +0 -31
  154. package/dist/tests/discord-adapter.test.cjs +0 -89
  155. package/dist/tests/discord-adapter.test.d.ts +0 -1
  156. package/dist/tests/discord-adapter.test.js +0 -83
  157. package/dist/tests/falRuntime.test.cjs +0 -78
  158. package/dist/tests/falRuntime.test.d.ts +0 -1
  159. package/dist/tests/falRuntime.test.js +0 -72
  160. package/dist/tests/falSummary.test.cjs +0 -51
  161. package/dist/tests/falSummary.test.d.ts +0 -1
  162. package/dist/tests/falSummary.test.js +0 -45
  163. package/dist/tests/fs-api.test.cjs +0 -138
  164. package/dist/tests/fs-api.test.d.ts +0 -1
  165. package/dist/tests/fs-api.test.js +0 -132
  166. package/dist/tests/gateway-command-workspace.test.cjs +0 -150
  167. package/dist/tests/gateway-command-workspace.test.d.ts +0 -1
  168. package/dist/tests/gateway-command-workspace.test.js +0 -144
  169. package/dist/tests/gateway-http-security.test.cjs +0 -318
  170. package/dist/tests/gateway-http-security.test.d.ts +0 -1
  171. package/dist/tests/gateway-http-security.test.js +0 -312
  172. package/dist/tests/gateway-node-mode.test.cjs +0 -174
  173. package/dist/tests/gateway-node-mode.test.d.ts +0 -1
  174. package/dist/tests/gateway-node-mode.test.js +0 -168
  175. package/dist/tests/gateway-origin-policy.test.cjs +0 -82
  176. package/dist/tests/gateway-origin-policy.test.d.ts +0 -1
  177. package/dist/tests/gateway-origin-policy.test.js +0 -76
  178. package/dist/tests/gateway-request-execution-overrides.test.cjs +0 -42
  179. package/dist/tests/gateway-request-execution-overrides.test.d.ts +0 -1
  180. package/dist/tests/gateway-request-execution-overrides.test.js +0 -36
  181. package/dist/tests/gateway.test.cjs +0 -700
  182. package/dist/tests/gateway.test.d.ts +0 -1
  183. package/dist/tests/gateway.test.js +0 -694
  184. package/dist/tests/hooks-matcher.test.cjs +0 -309
  185. package/dist/tests/hooks-matcher.test.d.ts +0 -1
  186. package/dist/tests/hooks-matcher.test.js +0 -303
  187. package/dist/tests/hooks-merger.test.cjs +0 -528
  188. package/dist/tests/hooks-merger.test.d.ts +0 -1
  189. package/dist/tests/hooks-merger.test.js +0 -522
  190. package/dist/tests/imagePersistence.test.cjs +0 -169
  191. package/dist/tests/imagePersistence.test.d.ts +0 -1
  192. package/dist/tests/imagePersistence.test.js +0 -163
  193. package/dist/tests/integration/agent-invocation.integration.test.cjs +0 -264
  194. package/dist/tests/integration/agent-invocation.integration.test.d.ts +0 -1
  195. package/dist/tests/integration/agent-invocation.integration.test.js +0 -258
  196. package/dist/tests/integration/finnhub-candles.integration.test.cjs +0 -98
  197. package/dist/tests/integration/finnhub-candles.integration.test.d.ts +0 -1
  198. package/dist/tests/integration/finnhub-candles.integration.test.js +0 -92
  199. package/dist/tests/integration/summarization-e2e.integration.test.cjs +0 -127
  200. package/dist/tests/integration/summarization-e2e.integration.test.d.ts +0 -1
  201. package/dist/tests/integration/summarization-e2e.integration.test.js +0 -121
  202. package/dist/tests/logger.test.cjs +0 -353
  203. package/dist/tests/logger.test.d.ts +0 -1
  204. package/dist/tests/logger.test.js +0 -347
  205. package/dist/tests/mediaCompatibilityMiddleware.test.cjs +0 -106
  206. package/dist/tests/mediaCompatibilityMiddleware.test.d.ts +0 -1
  207. package/dist/tests/mediaCompatibilityMiddleware.test.js +0 -100
  208. package/dist/tests/node-tools.test.cjs +0 -77
  209. package/dist/tests/node-tools.test.d.ts +0 -1
  210. package/dist/tests/node-tools.test.js +0 -71
  211. package/dist/tests/nodes-api.test.cjs +0 -86
  212. package/dist/tests/nodes-api.test.d.ts +0 -1
  213. package/dist/tests/nodes-api.test.js +0 -80
  214. package/dist/tests/outputManagerContextSummarized.test.cjs +0 -43
  215. package/dist/tests/outputManagerContextSummarized.test.d.ts +0 -1
  216. package/dist/tests/outputManagerContextSummarized.test.js +0 -37
  217. package/dist/tests/provider-command-codex.test.cjs +0 -57
  218. package/dist/tests/provider-command-codex.test.d.ts +0 -1
  219. package/dist/tests/provider-command-codex.test.js +0 -51
  220. package/dist/tests/routines-api.test.cjs +0 -107
  221. package/dist/tests/routines-api.test.d.ts +0 -1
  222. package/dist/tests/routines-api.test.js +0 -101
  223. package/dist/tests/run-terminal-bench-official-script.test.cjs +0 -61
  224. package/dist/tests/run-terminal-bench-official-script.test.d.ts +0 -1
  225. package/dist/tests/run-terminal-bench-official-script.test.js +0 -55
  226. package/dist/tests/sessionManager-uionly.test.cjs +0 -50
  227. package/dist/tests/sessionManager-uionly.test.d.ts +0 -1
  228. package/dist/tests/sessionManager-uionly.test.js +0 -44
  229. package/dist/tests/sessionMessageAttachments.test.cjs +0 -197
  230. package/dist/tests/sessionMessageAttachments.test.d.ts +0 -1
  231. package/dist/tests/sessionMessageAttachments.test.js +0 -191
  232. package/dist/tests/sessionMessageRole.test.cjs +0 -44
  233. package/dist/tests/sessionMessageRole.test.d.ts +0 -1
  234. package/dist/tests/sessionMessageRole.test.js +0 -38
  235. package/dist/tests/sessionStateMessages.test.cjs +0 -236
  236. package/dist/tests/sessionStateMessages.test.d.ts +0 -1
  237. package/dist/tests/sessionStateMessages.test.js +0 -230
  238. package/dist/tests/sessions-api.test.cjs +0 -250
  239. package/dist/tests/sessions-api.test.d.ts +0 -1
  240. package/dist/tests/sessions-api.test.js +0 -244
  241. package/dist/tests/skill-activation.test.cjs +0 -86
  242. package/dist/tests/skill-activation.test.d.ts +0 -1
  243. package/dist/tests/skill-activation.test.js +0 -80
  244. package/dist/tests/skill-metadata.test.cjs +0 -119
  245. package/dist/tests/skill-metadata.test.d.ts +0 -1
  246. package/dist/tests/skill-metadata.test.js +0 -113
  247. package/dist/tests/skill-repository.test.cjs +0 -469
  248. package/dist/tests/skill-repository.test.d.ts +0 -1
  249. package/dist/tests/skill-repository.test.js +0 -463
  250. package/dist/tests/skill-security-scanner.test.cjs +0 -126
  251. package/dist/tests/skill-security-scanner.test.d.ts +0 -1
  252. package/dist/tests/skill-security-scanner.test.js +0 -120
  253. package/dist/tests/sms-api.test.cjs +0 -183
  254. package/dist/tests/sms-api.test.d.ts +0 -1
  255. package/dist/tests/sms-api.test.js +0 -177
  256. package/dist/tests/sms-commands.test.cjs +0 -90
  257. package/dist/tests/sms-commands.test.d.ts +0 -1
  258. package/dist/tests/sms-commands.test.js +0 -84
  259. package/dist/tests/sms-policy-store.test.cjs +0 -69
  260. package/dist/tests/sms-policy-store.test.d.ts +0 -1
  261. package/dist/tests/sms-policy-store.test.js +0 -63
  262. package/dist/tests/teams-adapter.test.cjs +0 -58
  263. package/dist/tests/teams-adapter.test.d.ts +0 -1
  264. package/dist/tests/teams-adapter.test.js +0 -52
  265. package/dist/tests/technicalIndicators.test.cjs +0 -82
  266. package/dist/tests/technicalIndicators.test.d.ts +0 -1
  267. package/dist/tests/technicalIndicators.test.js +0 -76
  268. package/dist/tests/terminal-bench-adapters-helpers.test.cjs +0 -64
  269. package/dist/tests/terminal-bench-adapters-helpers.test.d.ts +0 -1
  270. package/dist/tests/terminal-bench-adapters-helpers.test.js +0 -58
  271. package/dist/tests/terminal-bench-cleanup.test.cjs +0 -93
  272. package/dist/tests/terminal-bench-cleanup.test.d.ts +0 -1
  273. package/dist/tests/terminal-bench-cleanup.test.js +0 -87
  274. package/dist/tests/terminal-bench-config.test.cjs +0 -62
  275. package/dist/tests/terminal-bench-config.test.d.ts +0 -1
  276. package/dist/tests/terminal-bench-config.test.js +0 -56
  277. package/dist/tests/terminal-bench-official.test.cjs +0 -194
  278. package/dist/tests/terminal-bench-official.test.d.ts +0 -1
  279. package/dist/tests/terminal-bench-official.test.js +0 -188
  280. package/dist/tests/terminal-bench-runner.test.cjs +0 -82
  281. package/dist/tests/terminal-bench-runner.test.d.ts +0 -1
  282. package/dist/tests/terminal-bench-runner.test.js +0 -76
  283. package/dist/tests/terminal-bench-scoring.test.cjs +0 -128
  284. package/dist/tests/terminal-bench-scoring.test.d.ts +0 -1
  285. package/dist/tests/terminal-bench-scoring.test.js +0 -122
  286. package/dist/tests/terminalProbe.test.cjs +0 -45
  287. package/dist/tests/terminalProbe.test.d.ts +0 -1
  288. package/dist/tests/terminalProbe.test.js +0 -39
  289. package/dist/tests/terminalProbeAuth.test.cjs +0 -85
  290. package/dist/tests/terminalProbeAuth.test.d.ts +0 -1
  291. package/dist/tests/terminalProbeAuth.test.js +0 -79
  292. package/dist/tests/toolDisplayHelpers.test.cjs +0 -46
  293. package/dist/tests/toolDisplayHelpers.test.d.ts +0 -1
  294. package/dist/tests/toolDisplayHelpers.test.js +0 -40
  295. package/dist/tests/uv.test.cjs +0 -47
  296. package/dist/tests/uv.test.d.ts +0 -1
  297. package/dist/tests/uv.test.js +0 -41
  298. package/dist/tests/voice-config.test.cjs +0 -35
  299. package/dist/tests/voice-config.test.d.ts +0 -1
  300. package/dist/tests/voice-config.test.js +0 -29
  301. package/dist/tests/websocket-transport.test.cjs +0 -31
  302. package/dist/tests/websocket-transport.test.d.ts +0 -1
  303. package/dist/tests/websocket-transport.test.js +0 -25
  304. package/dist/tests/yahooCandles.test.cjs +0 -111
  305. package/dist/tests/yahooCandles.test.d.ts +0 -1
  306. package/dist/tests/yahooCandles.test.js +0 -105
  307. package/dist/tools/finance/optionsAnalytics.test.cjs +0 -128
  308. package/dist/tools/finance/optionsAnalytics.test.d.ts +0 -1
  309. package/dist/tools/finance/optionsAnalytics.test.js +0 -122
  310. package/dist/webui/assets/index-D07GBGp0.js +0 -215
  311. 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 {};