@wingman-ai/gateway 0.5.3 → 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-BMf95nv5.js +0 -215
  311. package/dist/webui/assets/index-DhJQ8Mbn.css +0 -11
@@ -1,248 +1,139 @@
1
- import * as z from "zod";
2
- type BrowserPageLike = {
3
- goto: (url: string, options?: {
4
- waitUntil?: "domcontentloaded";
5
- timeout?: number;
6
- }) => Promise<unknown>;
7
- bringToFront?: () => Promise<unknown>;
8
- click: (selector: string, options?: {
9
- timeout?: number;
10
- }) => Promise<unknown>;
11
- fill: (selector: string, text: string, options?: {
12
- timeout?: number;
13
- }) => Promise<unknown>;
14
- keyboard: {
15
- press: (key: string) => Promise<unknown>;
16
- };
17
- waitForTimeout: (ms: number) => Promise<unknown>;
18
- waitForSelector?: (selector: string, options?: {
19
- state?: "attached" | "detached" | "visible" | "hidden";
20
- timeout?: number;
21
- }) => Promise<unknown>;
22
- waitForURL?: (url: string | RegExp, options?: {
23
- timeout?: number;
24
- waitUntil?: "load" | "domcontentloaded" | "networkidle";
25
- }) => Promise<unknown>;
26
- waitForLoadState?: (state?: "load" | "domcontentloaded" | "networkidle", options?: {
27
- timeout?: number;
28
- }) => Promise<unknown>;
29
- waitForFunction?: (expression: string, arg?: unknown, options?: {
30
- timeout?: number;
31
- }) => Promise<unknown>;
32
- textContent: (selector: string, options?: {
33
- timeout?: number;
34
- }) => Promise<string | null>;
35
- evaluate: (expression: string) => Promise<unknown>;
36
- screenshot: (options: {
37
- path: string;
38
- fullPage?: boolean;
39
- }) => Promise<unknown>;
40
- title: () => Promise<string>;
41
- url: () => string;
42
- };
43
- type BrowserContextLike = {
44
- pages: () => BrowserPageLike[];
45
- newPage: () => Promise<BrowserPageLike>;
46
- close?: () => Promise<unknown>;
47
- };
48
- type BrowserLike = {
49
- contexts: () => BrowserContextLike[];
50
- close: () => Promise<unknown>;
51
- };
52
- type LaunchPersistentContextOptions = {
53
- executablePath?: string;
54
- headless?: boolean;
55
- timeout?: number;
56
- args?: string[];
57
- ignoreDefaultArgs?: string[];
58
- };
59
- type PlaywrightLike = {
60
- chromium: {
61
- connectOverCDP: (wsEndpoint: string, options?: {
62
- timeout?: number;
63
- }) => Promise<BrowserLike>;
64
- launchPersistentContext?: (userDataDir: string, options?: LaunchPersistentContextOptions) => Promise<BrowserContextLike>;
65
- };
66
- };
67
- interface StartChromeInput {
68
- executablePath?: string;
69
- headless: boolean;
70
- launchTimeoutMs: number;
71
- userDataDir: string;
72
- chromeArgs?: string[];
73
- }
74
- interface StartedChromeSession {
75
- wsEndpoint: string;
76
- close: () => Promise<void>;
77
- }
78
- type BrowserTransportPreference = "auto" | "playwright" | "relay";
79
- type BrowserRelayRuntimeConfig = {
80
- enabled?: boolean;
81
- host?: string;
82
- port?: number;
83
- requireAuth?: boolean;
84
- authToken?: string;
85
- };
86
- type ResolvedBrowserRelayConfig = {
87
- host: string;
88
- port: number;
89
- requireAuth: boolean;
90
- authToken?: string;
91
- };
92
- interface BrowserControlDependencies {
93
- importPlaywright: () => Promise<PlaywrightLike>;
94
- startChrome: (input: StartChromeInput) => Promise<StartedChromeSession>;
95
- resolveRelayWsEndpoint: (config: ResolvedBrowserRelayConfig, timeoutMs: number) => Promise<string>;
96
- mkTempDir: () => string;
97
- removeDir: (target: string) => void;
98
- now: () => number;
99
- }
100
- export interface BrowserControlToolOptions {
101
- workspace?: string;
102
- configWorkspace?: string;
103
- launchTimeoutMs?: number;
104
- defaultExecutablePath?: string;
105
- browserProfile?: string;
106
- browserTransport?: BrowserTransportPreference;
107
- relayConfig?: BrowserRelayRuntimeConfig;
108
- profilesRootDir?: string;
109
- profilePaths?: Record<string, string>;
110
- browserExtensions?: string[];
111
- extensionsRootDir?: string;
112
- extensionPaths?: Record<string, string>;
113
- defaultExtensions?: string[];
114
- preferPersistentLaunch?: boolean;
115
- }
116
- export declare function clearStaleDevtoolsArtifacts(userDataDir: string): void;
117
- export declare const createBrowserControlTool: (options?: BrowserControlToolOptions, dependencies?: Partial<BrowserControlDependencies>) => import("langchain").DynamicStructuredTool<z.ZodObject<{
118
- url: z.ZodOptional<z.ZodString>;
119
- actions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
120
- type: z.ZodLiteral<"navigate">;
121
- url: z.ZodString;
122
- }, z.core.$strip>, z.ZodObject<{
123
- type: z.ZodLiteral<"url">;
124
- url: z.ZodString;
125
- }, z.core.$strip>, z.ZodObject<{
126
- type: z.ZodLiteral<"open">;
127
- url: z.ZodString;
128
- }, z.core.$strip>, z.ZodObject<{
129
- type: z.ZodLiteral<"goto">;
130
- url: z.ZodString;
131
- }, z.core.$strip>, z.ZodObject<{
132
- type: z.ZodLiteral<"click">;
133
- selector: z.ZodString;
134
- }, z.core.$strip>, z.ZodObject<{
135
- type: z.ZodLiteral<"type">;
136
- selector: z.ZodString;
137
- text: z.ZodString;
138
- submit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
139
- }, z.core.$strip>, z.ZodObject<{
140
- type: z.ZodLiteral<"press">;
141
- key: z.ZodString;
142
- }, z.core.$strip>, z.ZodObject<{
143
- type: z.ZodLiteral<"wait">;
144
- ms: z.ZodOptional<z.ZodNumber>;
145
- selector: z.ZodOptional<z.ZodString>;
146
- url: z.ZodOptional<z.ZodString>;
147
- load: z.ZodOptional<z.ZodEnum<{
1
+ import { type BrowserControlDependencies, type BrowserControlToolOptions, clearStaleDevtoolsArtifacts } from "./browser_runtime.js";
2
+ export { clearStaleDevtoolsArtifacts };
3
+ export declare const createBrowserControlTool: (options?: BrowserControlToolOptions, dependencies?: Partial<BrowserControlDependencies>) => import("langchain").DynamicStructuredTool<import("zod").ZodObject<{
4
+ url: import("zod").ZodOptional<import("zod").ZodString>;
5
+ actions: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
6
+ type: import("zod").ZodLiteral<"navigate">;
7
+ url: import("zod").ZodString;
8
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
9
+ type: import("zod").ZodLiteral<"url">;
10
+ url: import("zod").ZodString;
11
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
12
+ type: import("zod").ZodLiteral<"open">;
13
+ url: import("zod").ZodString;
14
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
15
+ type: import("zod").ZodLiteral<"goto">;
16
+ url: import("zod").ZodString;
17
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
18
+ type: import("zod").ZodLiteral<"click">;
19
+ selector: import("zod").ZodString;
20
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
21
+ type: import("zod").ZodLiteral<"type">;
22
+ selector: import("zod").ZodString;
23
+ text: import("zod").ZodString;
24
+ submit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
25
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
26
+ type: import("zod").ZodLiteral<"press">;
27
+ key: import("zod").ZodString;
28
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
29
+ type: import("zod").ZodLiteral<"wait">;
30
+ ms: import("zod").ZodOptional<import("zod").ZodNumber>;
31
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
32
+ url: import("zod").ZodOptional<import("zod").ZodString>;
33
+ load: import("zod").ZodOptional<import("zod").ZodEnum<{
148
34
  load: "load";
149
35
  domcontentloaded: "domcontentloaded";
150
36
  networkidle: "networkidle";
151
37
  }>>;
152
- fn: z.ZodOptional<z.ZodString>;
153
- timeoutMs: z.ZodOptional<z.ZodNumber>;
154
- }, z.core.$strip>, z.ZodObject<{
155
- type: z.ZodLiteral<"ms">;
156
- ms: z.ZodNumber;
157
- }, z.core.$strip>, z.ZodObject<{
158
- type: z.ZodLiteral<"sleep">;
159
- ms: z.ZodNumber;
160
- }, z.core.$strip>, z.ZodObject<{
161
- type: z.ZodLiteral<"pause">;
162
- ms: z.ZodNumber;
163
- }, z.core.$strip>, z.ZodObject<{
164
- selector: z.ZodOptional<z.ZodString>;
165
- url: z.ZodOptional<z.ZodString>;
166
- load: z.ZodOptional<z.ZodEnum<{
38
+ fn: import("zod").ZodOptional<import("zod").ZodString>;
39
+ timeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
40
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
41
+ type: import("zod").ZodLiteral<"ms">;
42
+ ms: import("zod").ZodNumber;
43
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
44
+ type: import("zod").ZodLiteral<"sleep">;
45
+ ms: import("zod").ZodNumber;
46
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
47
+ type: import("zod").ZodLiteral<"pause">;
48
+ ms: import("zod").ZodNumber;
49
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
50
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
51
+ url: import("zod").ZodOptional<import("zod").ZodString>;
52
+ load: import("zod").ZodOptional<import("zod").ZodEnum<{
167
53
  load: "load";
168
54
  domcontentloaded: "domcontentloaded";
169
55
  networkidle: "networkidle";
170
56
  }>>;
171
- fn: z.ZodOptional<z.ZodString>;
172
- timeoutMs: z.ZodOptional<z.ZodNumber>;
173
- type: z.ZodLiteral<"wait_for">;
174
- }, z.core.$strip>, z.ZodObject<{
175
- selector: z.ZodOptional<z.ZodString>;
176
- url: z.ZodOptional<z.ZodString>;
177
- load: z.ZodOptional<z.ZodEnum<{
57
+ fn: import("zod").ZodOptional<import("zod").ZodString>;
58
+ timeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
59
+ type: import("zod").ZodLiteral<"wait_for">;
60
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
61
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
62
+ url: import("zod").ZodOptional<import("zod").ZodString>;
63
+ load: import("zod").ZodOptional<import("zod").ZodEnum<{
178
64
  load: "load";
179
65
  domcontentloaded: "domcontentloaded";
180
66
  networkidle: "networkidle";
181
67
  }>>;
182
- fn: z.ZodOptional<z.ZodString>;
183
- timeoutMs: z.ZodOptional<z.ZodNumber>;
184
- type: z.ZodLiteral<"wait_until">;
185
- }, z.core.$strip>, z.ZodObject<{
186
- type: z.ZodLiteral<"extract_text">;
187
- selector: z.ZodOptional<z.ZodString>;
188
- maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
189
- }, z.core.$strip>, z.ZodObject<{
190
- type: z.ZodLiteral<"selector">;
191
- selector: z.ZodString;
192
- maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
193
- }, z.core.$strip>, z.ZodObject<{
194
- type: z.ZodLiteral<"extract">;
195
- selector: z.ZodOptional<z.ZodString>;
196
- maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
197
- }, z.core.$strip>, z.ZodObject<{
198
- type: z.ZodLiteral<"getContent">;
199
- selector: z.ZodOptional<z.ZodString>;
200
- maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
201
- }, z.core.$strip>, z.ZodObject<{
202
- type: z.ZodLiteral<"get_content">;
203
- selector: z.ZodOptional<z.ZodString>;
204
- maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
205
- }, z.core.$strip>, z.ZodObject<{
206
- type: z.ZodLiteral<"querySelector">;
207
- selector: z.ZodOptional<z.ZodString>;
208
- maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
209
- }, z.core.$strip>, z.ZodObject<{
210
- type: z.ZodLiteral<"query_selector">;
211
- selector: z.ZodOptional<z.ZodString>;
212
- maxChars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
213
- }, z.core.$strip>, z.ZodObject<{
214
- type: z.ZodLiteral<"screenshot">;
215
- path: z.ZodOptional<z.ZodString>;
216
- fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
217
- }, z.core.$strip>, z.ZodObject<{
218
- type: z.ZodLiteral<"path">;
219
- path: z.ZodString;
220
- fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
221
- }, z.core.$strip>, z.ZodObject<{
222
- type: z.ZodLiteral<"snapshot">;
223
- path: z.ZodString;
224
- fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
225
- }, z.core.$strip>, z.ZodObject<{
226
- type: z.ZodLiteral<"capture">;
227
- path: z.ZodString;
228
- fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
229
- }, z.core.$strip>, z.ZodObject<{
230
- type: z.ZodLiteral<"evaluate">;
231
- expression: z.ZodString;
232
- }, z.core.$strip>, z.ZodObject<{
233
- type: z.ZodLiteral<"expression">;
234
- expression: z.ZodString;
235
- }, z.core.$strip>, z.ZodObject<{
236
- type: z.ZodLiteral<"js">;
237
- expression: z.ZodString;
238
- }, z.core.$strip>, z.ZodObject<{
239
- type: z.ZodLiteral<"script">;
240
- expression: z.ZodString;
241
- }, z.core.$strip>], "type">>>>;
242
- headless: z.ZodOptional<z.ZodBoolean>;
243
- timeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
244
- executablePath: z.ZodOptional<z.ZodString>;
245
- }, z.core.$strip>, {
68
+ fn: import("zod").ZodOptional<import("zod").ZodString>;
69
+ timeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
70
+ type: import("zod").ZodLiteral<"wait_until">;
71
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
72
+ type: import("zod").ZodLiteral<"extract_text">;
73
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
74
+ maxChars: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
75
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
76
+ type: import("zod").ZodLiteral<"selector">;
77
+ selector: import("zod").ZodString;
78
+ maxChars: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
79
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
80
+ type: import("zod").ZodLiteral<"extract">;
81
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
82
+ maxChars: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
83
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
84
+ type: import("zod").ZodLiteral<"getContent">;
85
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
86
+ maxChars: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
87
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
88
+ type: import("zod").ZodLiteral<"get_content">;
89
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
90
+ maxChars: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
91
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
92
+ type: import("zod").ZodLiteral<"querySelector">;
93
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
94
+ maxChars: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
95
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
96
+ type: import("zod").ZodLiteral<"query_selector">;
97
+ selector: import("zod").ZodOptional<import("zod").ZodString>;
98
+ maxChars: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
99
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
100
+ type: import("zod").ZodLiteral<"screenshot">;
101
+ path: import("zod").ZodOptional<import("zod").ZodString>;
102
+ fullPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
103
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
104
+ type: import("zod").ZodLiteral<"path">;
105
+ path: import("zod").ZodString;
106
+ fullPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
107
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
108
+ type: import("zod").ZodLiteral<"snapshot">;
109
+ path: import("zod").ZodString;
110
+ fullPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
111
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
112
+ type: import("zod").ZodLiteral<"capture">;
113
+ path: import("zod").ZodString;
114
+ fullPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
115
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
116
+ type: import("zod").ZodLiteral<"evaluate">;
117
+ expression: import("zod").ZodString;
118
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
119
+ type: import("zod").ZodLiteral<"expression">;
120
+ expression: import("zod").ZodString;
121
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
122
+ type: import("zod").ZodLiteral<"js">;
123
+ expression: import("zod").ZodString;
124
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
125
+ type: import("zod").ZodLiteral<"script">;
126
+ expression: import("zod").ZodString;
127
+ }, import("zod/v4/core").$strip>], "type">>>>;
128
+ headless: import("zod").ZodOptional<import("zod").ZodBoolean>;
129
+ timeoutMs: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
130
+ executablePath: import("zod").ZodOptional<import("zod").ZodString>;
131
+ transport: import("zod").ZodOptional<import("zod").ZodEnum<{
132
+ auto: "auto";
133
+ playwright: "playwright";
134
+ relay: "relay";
135
+ }>>;
136
+ }, import("zod/v4/core").$strip>, {
246
137
  actions: ({
247
138
  type: "wait";
248
139
  ms?: number | undefined;
@@ -358,6 +249,7 @@ export declare const createBrowserControlTool: (options?: BrowserControlToolOpti
358
249
  url?: string | undefined;
359
250
  headless?: boolean | undefined;
360
251
  executablePath?: string | undefined;
252
+ transport?: "auto" | "playwright" | "relay" | undefined;
361
253
  }, {
362
254
  url?: string | undefined;
363
255
  actions?: ({
@@ -474,5 +366,5 @@ export declare const createBrowserControlTool: (options?: BrowserControlToolOpti
474
366
  headless?: boolean | undefined;
475
367
  timeoutMs?: number | undefined;
476
368
  executablePath?: string | undefined;
369
+ transport?: "auto" | "playwright" | "relay" | undefined;
477
370
  }, string, "browser_control">;
478
- export {};