@wingman-ai/gateway 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/.wingman/agents/README.md +161 -0
  2. package/.wingman/agents/coding/agent.md +147 -0
  3. package/.wingman/agents/coding/implementor.md +56 -0
  4. package/.wingman/agents/main/agent.md +19 -0
  5. package/.wingman/agents/researcher/agent.md +62 -0
  6. package/.wingman/agents/stock-trader/agent.md +223 -0
  7. package/.wingman/agents/stock-trader/chain-curator.md +24 -0
  8. package/.wingman/agents/stock-trader/goal-translator.md +42 -0
  9. package/.wingman/agents/stock-trader/guardrails-veto.md +11 -0
  10. package/.wingman/agents/stock-trader/path-planner.md +23 -0
  11. package/.wingman/agents/stock-trader/regime-analyst.md +15 -0
  12. package/.wingman/agents/stock-trader/risk.md +20 -0
  13. package/.wingman/agents/stock-trader/selection.md +22 -0
  14. package/.wingman/agents/stock-trader/strategy-composer.md +38 -0
  15. package/.wingman/agents/wingman/agent.json +12 -0
  16. package/bin/wingman +7 -0
  17. package/dist/agent/config/agentConfig.cjs +95 -0
  18. package/dist/agent/config/agentConfig.d.ts +187 -0
  19. package/dist/agent/config/agentConfig.js +52 -0
  20. package/dist/agent/config/agentLoader.cjs +242 -0
  21. package/dist/agent/config/agentLoader.d.ts +42 -0
  22. package/dist/agent/config/agentLoader.js +208 -0
  23. package/dist/agent/config/mcpClientManager.cjs +168 -0
  24. package/dist/agent/config/mcpClientManager.d.ts +41 -0
  25. package/dist/agent/config/mcpClientManager.js +134 -0
  26. package/dist/agent/config/modelFactory.cjs +175 -0
  27. package/dist/agent/config/modelFactory.d.ts +33 -0
  28. package/dist/agent/config/modelFactory.js +141 -0
  29. package/dist/agent/config/toolRegistry.cjs +111 -0
  30. package/dist/agent/config/toolRegistry.d.ts +25 -0
  31. package/dist/agent/config/toolRegistry.js +71 -0
  32. package/dist/agent/middleware/additional-messages.cjs +60 -0
  33. package/dist/agent/middleware/additional-messages.d.ts +7 -0
  34. package/dist/agent/middleware/additional-messages.js +26 -0
  35. package/dist/agent/middleware/hooks/executor.cjs +137 -0
  36. package/dist/agent/middleware/hooks/executor.d.ts +52 -0
  37. package/dist/agent/middleware/hooks/executor.js +103 -0
  38. package/dist/agent/middleware/hooks/input-builder.cjs +55 -0
  39. package/dist/agent/middleware/hooks/input-builder.d.ts +15 -0
  40. package/dist/agent/middleware/hooks/input-builder.js +21 -0
  41. package/dist/agent/middleware/hooks/matcher.cjs +59 -0
  42. package/dist/agent/middleware/hooks/matcher.d.ts +27 -0
  43. package/dist/agent/middleware/hooks/matcher.js +22 -0
  44. package/dist/agent/middleware/hooks/merger.cjs +54 -0
  45. package/dist/agent/middleware/hooks/merger.d.ts +18 -0
  46. package/dist/agent/middleware/hooks/merger.js +20 -0
  47. package/dist/agent/middleware/hooks/types.cjs +62 -0
  48. package/dist/agent/middleware/hooks/types.d.ts +82 -0
  49. package/dist/agent/middleware/hooks/types.js +19 -0
  50. package/dist/agent/middleware/hooks.cjs +79 -0
  51. package/dist/agent/middleware/hooks.d.ts +19 -0
  52. package/dist/agent/middleware/hooks.js +45 -0
  53. package/dist/agent/middleware/media-compat.cjs +80 -0
  54. package/dist/agent/middleware/media-compat.d.ts +7 -0
  55. package/dist/agent/middleware/media-compat.js +46 -0
  56. package/dist/agent/tests/agentConfig.test.cjs +132 -0
  57. package/dist/agent/tests/agentConfig.test.d.ts +1 -0
  58. package/dist/agent/tests/agentConfig.test.js +126 -0
  59. package/dist/agent/tests/agentLoader.test.cjs +235 -0
  60. package/dist/agent/tests/agentLoader.test.d.ts +1 -0
  61. package/dist/agent/tests/agentLoader.test.js +229 -0
  62. package/dist/agent/tests/modelFactory.test.cjs +114 -0
  63. package/dist/agent/tests/modelFactory.test.d.ts +1 -0
  64. package/dist/agent/tests/modelFactory.test.js +108 -0
  65. package/dist/agent/tests/test-agent-loader.cjs +33 -0
  66. package/dist/agent/tests/test-agent-loader.d.ts +1 -0
  67. package/dist/agent/tests/test-agent-loader.js +27 -0
  68. package/dist/agent/tests/test-subagent-loading.cjs +99 -0
  69. package/dist/agent/tests/test-subagent-loading.d.ts +1 -0
  70. package/dist/agent/tests/test-subagent-loading.js +93 -0
  71. package/dist/agent/tests/toolRegistry.test.cjs +109 -0
  72. package/dist/agent/tests/toolRegistry.test.d.ts +1 -0
  73. package/dist/agent/tests/toolRegistry.test.js +103 -0
  74. package/dist/agent/tools/code_search.cjs +108 -0
  75. package/dist/agent/tools/code_search.d.ts +24 -0
  76. package/dist/agent/tools/code_search.js +74 -0
  77. package/dist/agent/tools/command_execute.cjs +136 -0
  78. package/dist/agent/tools/command_execute.d.ts +12 -0
  79. package/dist/agent/tools/command_execute.js +99 -0
  80. package/dist/agent/tools/git_status.cjs +126 -0
  81. package/dist/agent/tools/git_status.d.ts +15 -0
  82. package/dist/agent/tools/git_status.js +92 -0
  83. package/dist/agent/tools/internet_search.cjs +93 -0
  84. package/dist/agent/tools/internet_search.d.ts +25 -0
  85. package/dist/agent/tools/internet_search.js +56 -0
  86. package/dist/agent/tools/think.cjs +53 -0
  87. package/dist/agent/tools/think.d.ts +26 -0
  88. package/dist/agent/tools/think.js +16 -0
  89. package/dist/agent/tools/web_crawler.cjs +180 -0
  90. package/dist/agent/tools/web_crawler.d.ts +31 -0
  91. package/dist/agent/tools/web_crawler.js +143 -0
  92. package/dist/agent/utils.cjs +54 -0
  93. package/dist/agent/utils.d.ts +1 -0
  94. package/dist/agent/utils.js +10 -0
  95. package/dist/cli/commands/agent.cjs +169 -0
  96. package/dist/cli/commands/agent.d.ts +15 -0
  97. package/dist/cli/commands/agent.js +125 -0
  98. package/dist/cli/commands/gateway.cjs +601 -0
  99. package/dist/cli/commands/gateway.d.ts +12 -0
  100. package/dist/cli/commands/gateway.js +567 -0
  101. package/dist/cli/commands/init.cjs +681 -0
  102. package/dist/cli/commands/init.d.ts +10 -0
  103. package/dist/cli/commands/init.js +634 -0
  104. package/dist/cli/commands/provider.cjs +208 -0
  105. package/dist/cli/commands/provider.d.ts +5 -0
  106. package/dist/cli/commands/provider.js +174 -0
  107. package/dist/cli/commands/skill.cjs +145 -0
  108. package/dist/cli/commands/skill.d.ts +10 -0
  109. package/dist/cli/commands/skill.js +111 -0
  110. package/dist/cli/config/loader.cjs +143 -0
  111. package/dist/cli/config/loader.d.ts +14 -0
  112. package/dist/cli/config/loader.js +109 -0
  113. package/dist/cli/config/schema.cjs +262 -0
  114. package/dist/cli/config/schema.d.ts +268 -0
  115. package/dist/cli/config/schema.js +213 -0
  116. package/dist/cli/core/agentInvoker.cjs +284 -0
  117. package/dist/cli/core/agentInvoker.d.ts +77 -0
  118. package/dist/cli/core/agentInvoker.js +247 -0
  119. package/dist/cli/core/commandHandler.cjs +257 -0
  120. package/dist/cli/core/commandHandler.d.ts +62 -0
  121. package/dist/cli/core/commandHandler.js +223 -0
  122. package/dist/cli/core/database/bunSqliteAdapter.cjs +87 -0
  123. package/dist/cli/core/database/bunSqliteAdapter.d.ts +34 -0
  124. package/dist/cli/core/database/bunSqliteAdapter.js +53 -0
  125. package/dist/cli/core/loggerBridge.cjs +42 -0
  126. package/dist/cli/core/loggerBridge.d.ts +8 -0
  127. package/dist/cli/core/loggerBridge.js +8 -0
  128. package/dist/cli/core/outputManager.cjs +106 -0
  129. package/dist/cli/core/outputManager.d.ts +43 -0
  130. package/dist/cli/core/outputManager.js +72 -0
  131. package/dist/cli/core/sessionManager.cjs +535 -0
  132. package/dist/cli/core/sessionManager.d.ts +111 -0
  133. package/dist/cli/core/sessionManager.js +486 -0
  134. package/dist/cli/core/streamParser.cjs +328 -0
  135. package/dist/cli/core/streamParser.d.ts +42 -0
  136. package/dist/cli/core/streamParser.js +288 -0
  137. package/dist/cli/index.cjs +211 -0
  138. package/dist/cli/index.d.ts +2 -0
  139. package/dist/cli/index.js +205 -0
  140. package/dist/cli/services/skillRepository.cjs +178 -0
  141. package/dist/cli/services/skillRepository.d.ts +35 -0
  142. package/dist/cli/services/skillRepository.js +144 -0
  143. package/dist/cli/services/skillService.cjs +336 -0
  144. package/dist/cli/services/skillService.d.ts +48 -0
  145. package/dist/cli/services/skillService.js +302 -0
  146. package/dist/cli/types/gateway.cjs +18 -0
  147. package/dist/cli/types/gateway.d.ts +18 -0
  148. package/dist/cli/types/gateway.js +0 -0
  149. package/dist/cli/types/init.cjs +18 -0
  150. package/dist/cli/types/init.d.ts +13 -0
  151. package/dist/cli/types/init.js +0 -0
  152. package/dist/cli/types/provider.cjs +18 -0
  153. package/dist/cli/types/provider.d.ts +9 -0
  154. package/dist/cli/types/provider.js +0 -0
  155. package/dist/cli/types/skill.cjs +18 -0
  156. package/dist/cli/types/skill.d.ts +71 -0
  157. package/dist/cli/types/skill.js +0 -0
  158. package/dist/cli/types.cjs +18 -0
  159. package/dist/cli/types.d.ts +175 -0
  160. package/dist/cli/types.js +0 -0
  161. package/dist/cli/ui/AgentOutput.cjs +82 -0
  162. package/dist/cli/ui/AgentOutput.d.ts +8 -0
  163. package/dist/cli/ui/AgentOutput.js +38 -0
  164. package/dist/cli/ui/App.cjs +285 -0
  165. package/dist/cli/ui/App.d.ts +6 -0
  166. package/dist/cli/ui/App.js +241 -0
  167. package/dist/cli/ui/ErrorDisplay.cjs +65 -0
  168. package/dist/cli/ui/ErrorDisplay.d.ts +8 -0
  169. package/dist/cli/ui/ErrorDisplay.js +21 -0
  170. package/dist/cli/ui/LogDisplay.cjs +74 -0
  171. package/dist/cli/ui/LogDisplay.d.ts +13 -0
  172. package/dist/cli/ui/LogDisplay.js +30 -0
  173. package/dist/cli/ui/SessionListDisplay.cjs +135 -0
  174. package/dist/cli/ui/SessionListDisplay.d.ts +9 -0
  175. package/dist/cli/ui/SessionListDisplay.js +91 -0
  176. package/dist/cli/ui/blockHelpers.cjs +80 -0
  177. package/dist/cli/ui/blockHelpers.d.ts +21 -0
  178. package/dist/cli/ui/blockHelpers.js +40 -0
  179. package/dist/cli/ui/components/ToolCallDisplay.cjs +207 -0
  180. package/dist/cli/ui/components/ToolCallDisplay.d.ts +7 -0
  181. package/dist/cli/ui/components/ToolCallDisplay.js +162 -0
  182. package/dist/cli/ui/components/ToolResultDisplay.cjs +86 -0
  183. package/dist/cli/ui/components/ToolResultDisplay.d.ts +8 -0
  184. package/dist/cli/ui/components/ToolResultDisplay.js +42 -0
  185. package/dist/cli/ui/toolDisplayHelpers.cjs +112 -0
  186. package/dist/cli/ui/toolDisplayHelpers.d.ts +3 -0
  187. package/dist/cli/ui/toolDisplayHelpers.js +72 -0
  188. package/dist/gateway/adapters/discord.cjs +298 -0
  189. package/dist/gateway/adapters/discord.d.ts +42 -0
  190. package/dist/gateway/adapters/discord.js +246 -0
  191. package/dist/gateway/auth.cjs +94 -0
  192. package/dist/gateway/auth.d.ts +36 -0
  193. package/dist/gateway/auth.js +60 -0
  194. package/dist/gateway/broadcast.cjs +131 -0
  195. package/dist/gateway/broadcast.d.ts +76 -0
  196. package/dist/gateway/broadcast.js +97 -0
  197. package/dist/gateway/client.cjs +282 -0
  198. package/dist/gateway/client.d.ts +141 -0
  199. package/dist/gateway/client.js +248 -0
  200. package/dist/gateway/daemon.cjs +195 -0
  201. package/dist/gateway/daemon.d.ts +67 -0
  202. package/dist/gateway/daemon.js +161 -0
  203. package/dist/gateway/discovery/index.cjs +72 -0
  204. package/dist/gateway/discovery/index.d.ts +3 -0
  205. package/dist/gateway/discovery/index.js +3 -0
  206. package/dist/gateway/discovery/mdns.cjs +221 -0
  207. package/dist/gateway/discovery/mdns.d.ts +37 -0
  208. package/dist/gateway/discovery/mdns.js +177 -0
  209. package/dist/gateway/discovery/tailscale.cjs +140 -0
  210. package/dist/gateway/discovery/tailscale.d.ts +31 -0
  211. package/dist/gateway/discovery/tailscale.js +106 -0
  212. package/dist/gateway/discovery/types.cjs +18 -0
  213. package/dist/gateway/discovery/types.d.ts +41 -0
  214. package/dist/gateway/discovery/types.js +0 -0
  215. package/dist/gateway/env.cjs +45 -0
  216. package/dist/gateway/env.d.ts +2 -0
  217. package/dist/gateway/env.js +8 -0
  218. package/dist/gateway/hooks/loader.cjs +137 -0
  219. package/dist/gateway/hooks/loader.d.ts +10 -0
  220. package/dist/gateway/hooks/loader.js +103 -0
  221. package/dist/gateway/hooks/registry.cjs +128 -0
  222. package/dist/gateway/hooks/registry.d.ts +13 -0
  223. package/dist/gateway/hooks/registry.js +94 -0
  224. package/dist/gateway/hooks/types.cjs +58 -0
  225. package/dist/gateway/hooks/types.d.ts +50 -0
  226. package/dist/gateway/hooks/types.js +18 -0
  227. package/dist/gateway/http/agents.cjs +280 -0
  228. package/dist/gateway/http/agents.d.ts +2 -0
  229. package/dist/gateway/http/agents.js +246 -0
  230. package/dist/gateway/http/fs.cjs +81 -0
  231. package/dist/gateway/http/fs.d.ts +2 -0
  232. package/dist/gateway/http/fs.js +47 -0
  233. package/dist/gateway/http/providers.cjs +120 -0
  234. package/dist/gateway/http/providers.d.ts +2 -0
  235. package/dist/gateway/http/providers.js +86 -0
  236. package/dist/gateway/http/routines.cjs +196 -0
  237. package/dist/gateway/http/routines.d.ts +20 -0
  238. package/dist/gateway/http/routines.js +159 -0
  239. package/dist/gateway/http/sessions.cjs +241 -0
  240. package/dist/gateway/http/sessions.d.ts +2 -0
  241. package/dist/gateway/http/sessions.js +207 -0
  242. package/dist/gateway/http/types.cjs +18 -0
  243. package/dist/gateway/http/types.d.ts +25 -0
  244. package/dist/gateway/http/types.js +0 -0
  245. package/dist/gateway/http/voice.cjs +167 -0
  246. package/dist/gateway/http/voice.d.ts +2 -0
  247. package/dist/gateway/http/voice.js +133 -0
  248. package/dist/gateway/http/webhooks.cjs +353 -0
  249. package/dist/gateway/http/webhooks.d.ts +22 -0
  250. package/dist/gateway/http/webhooks.js +313 -0
  251. package/dist/gateway/index.cjs +119 -0
  252. package/dist/gateway/index.d.ts +8 -0
  253. package/dist/gateway/index.js +9 -0
  254. package/dist/gateway/node.cjs +218 -0
  255. package/dist/gateway/node.d.ts +112 -0
  256. package/dist/gateway/node.js +184 -0
  257. package/dist/gateway/router.cjs +85 -0
  258. package/dist/gateway/router.d.ts +9 -0
  259. package/dist/gateway/router.js +51 -0
  260. package/dist/gateway/rpcClient.cjs +152 -0
  261. package/dist/gateway/rpcClient.d.ts +24 -0
  262. package/dist/gateway/rpcClient.js +118 -0
  263. package/dist/gateway/server.cjs +1175 -0
  264. package/dist/gateway/server.d.ts +185 -0
  265. package/dist/gateway/server.js +1138 -0
  266. package/dist/gateway/transport/http.cjs +153 -0
  267. package/dist/gateway/transport/http.d.ts +25 -0
  268. package/dist/gateway/transport/http.js +119 -0
  269. package/dist/gateway/transport/index.cjs +40 -0
  270. package/dist/gateway/transport/index.d.ts +3 -0
  271. package/dist/gateway/transport/index.js +3 -0
  272. package/dist/gateway/transport/types.cjs +18 -0
  273. package/dist/gateway/transport/types.d.ts +59 -0
  274. package/dist/gateway/transport/types.js +0 -0
  275. package/dist/gateway/transport/websocket.cjs +132 -0
  276. package/dist/gateway/transport/websocket.d.ts +21 -0
  277. package/dist/gateway/transport/websocket.js +98 -0
  278. package/dist/gateway/types.cjs +18 -0
  279. package/dist/gateway/types.d.ts +215 -0
  280. package/dist/gateway/types.js +0 -0
  281. package/dist/gateway/validation.cjs +225 -0
  282. package/dist/gateway/validation.d.ts +157 -0
  283. package/dist/gateway/validation.js +158 -0
  284. package/dist/index.cjs +95 -0
  285. package/dist/index.d.ts +6 -0
  286. package/dist/index.js +6 -0
  287. package/dist/logger.cjs +270 -0
  288. package/dist/logger.d.ts +54 -0
  289. package/dist/logger.js +215 -0
  290. package/dist/providers/copilot.cjs +148 -0
  291. package/dist/providers/copilot.d.ts +3 -0
  292. package/dist/providers/copilot.js +114 -0
  293. package/dist/providers/credentials.cjs +154 -0
  294. package/dist/providers/credentials.d.ts +26 -0
  295. package/dist/providers/credentials.js +99 -0
  296. package/dist/providers/oauth.cjs +279 -0
  297. package/dist/providers/oauth.d.ts +13 -0
  298. package/dist/providers/oauth.js +245 -0
  299. package/dist/providers/registry.cjs +138 -0
  300. package/dist/providers/registry.d.ts +32 -0
  301. package/dist/providers/registry.js +98 -0
  302. package/dist/tests/additionalMessageMiddleware.test.cjs +45 -0
  303. package/dist/tests/additionalMessageMiddleware.test.d.ts +1 -0
  304. package/dist/tests/additionalMessageMiddleware.test.js +39 -0
  305. package/dist/tests/agent-config-voice.test.cjs +25 -0
  306. package/dist/tests/agent-config-voice.test.d.ts +1 -0
  307. package/dist/tests/agent-config-voice.test.js +19 -0
  308. package/dist/tests/agentInvokerAttachments.test.cjs +67 -0
  309. package/dist/tests/agentInvokerAttachments.test.d.ts +1 -0
  310. package/dist/tests/agentInvokerAttachments.test.js +61 -0
  311. package/dist/tests/attachments-utils.test.cjs +46 -0
  312. package/dist/tests/attachments-utils.test.d.ts +1 -0
  313. package/dist/tests/attachments-utils.test.js +40 -0
  314. package/dist/tests/bunSqliteAdapter.test.cjs +265 -0
  315. package/dist/tests/bunSqliteAdapter.test.d.ts +1 -0
  316. package/dist/tests/bunSqliteAdapter.test.js +259 -0
  317. package/dist/tests/candleRange.test.cjs +48 -0
  318. package/dist/tests/candleRange.test.d.ts +1 -0
  319. package/dist/tests/candleRange.test.js +42 -0
  320. package/dist/tests/cli-config-loader.test.cjs +364 -0
  321. package/dist/tests/cli-config-loader.test.d.ts +1 -0
  322. package/dist/tests/cli-config-loader.test.js +358 -0
  323. package/dist/tests/cli-init.test.cjs +82 -0
  324. package/dist/tests/cli-init.test.d.ts +1 -0
  325. package/dist/tests/cli-init.test.js +76 -0
  326. package/dist/tests/discord-adapter.test.cjs +55 -0
  327. package/dist/tests/discord-adapter.test.d.ts +1 -0
  328. package/dist/tests/discord-adapter.test.js +49 -0
  329. package/dist/tests/gateway.test.cjs +319 -0
  330. package/dist/tests/gateway.test.d.ts +1 -0
  331. package/dist/tests/gateway.test.js +313 -0
  332. package/dist/tests/hooks-matcher.test.cjs +309 -0
  333. package/dist/tests/hooks-matcher.test.d.ts +1 -0
  334. package/dist/tests/hooks-matcher.test.js +303 -0
  335. package/dist/tests/hooks-merger.test.cjs +528 -0
  336. package/dist/tests/hooks-merger.test.d.ts +1 -0
  337. package/dist/tests/hooks-merger.test.js +522 -0
  338. package/dist/tests/integration/agent-invocation.integration.test.cjs +264 -0
  339. package/dist/tests/integration/agent-invocation.integration.test.d.ts +1 -0
  340. package/dist/tests/integration/agent-invocation.integration.test.js +258 -0
  341. package/dist/tests/integration/finnhub-candles.integration.test.cjs +98 -0
  342. package/dist/tests/integration/finnhub-candles.integration.test.d.ts +1 -0
  343. package/dist/tests/integration/finnhub-candles.integration.test.js +92 -0
  344. package/dist/tests/logger.test.cjs +353 -0
  345. package/dist/tests/logger.test.d.ts +1 -0
  346. package/dist/tests/logger.test.js +347 -0
  347. package/dist/tests/mediaCompatibilityMiddleware.test.cjs +106 -0
  348. package/dist/tests/mediaCompatibilityMiddleware.test.d.ts +1 -0
  349. package/dist/tests/mediaCompatibilityMiddleware.test.js +100 -0
  350. package/dist/tests/routines-api.test.cjs +107 -0
  351. package/dist/tests/routines-api.test.d.ts +1 -0
  352. package/dist/tests/routines-api.test.js +101 -0
  353. package/dist/tests/sessionMessageAttachments.test.cjs +108 -0
  354. package/dist/tests/sessionMessageAttachments.test.d.ts +1 -0
  355. package/dist/tests/sessionMessageAttachments.test.js +102 -0
  356. package/dist/tests/sessionMessageRole.test.cjs +44 -0
  357. package/dist/tests/sessionMessageRole.test.d.ts +1 -0
  358. package/dist/tests/sessionMessageRole.test.js +38 -0
  359. package/dist/tests/sessionStateMessages.test.cjs +72 -0
  360. package/dist/tests/sessionStateMessages.test.d.ts +1 -0
  361. package/dist/tests/sessionStateMessages.test.js +66 -0
  362. package/dist/tests/sessions-api.test.cjs +68 -0
  363. package/dist/tests/sessions-api.test.d.ts +1 -0
  364. package/dist/tests/sessions-api.test.js +62 -0
  365. package/dist/tests/technicalIndicators.test.cjs +82 -0
  366. package/dist/tests/technicalIndicators.test.d.ts +1 -0
  367. package/dist/tests/technicalIndicators.test.js +76 -0
  368. package/dist/tests/toolDisplayHelpers.test.cjs +43 -0
  369. package/dist/tests/toolDisplayHelpers.test.d.ts +1 -0
  370. package/dist/tests/toolDisplayHelpers.test.js +37 -0
  371. package/dist/tests/voice-config.test.cjs +35 -0
  372. package/dist/tests/voice-config.test.d.ts +1 -0
  373. package/dist/tests/voice-config.test.js +29 -0
  374. package/dist/tests/yahooCandles.test.cjs +111 -0
  375. package/dist/tests/yahooCandles.test.d.ts +1 -0
  376. package/dist/tests/yahooCandles.test.js +105 -0
  377. package/dist/tools/finance/candleRange.cjs +71 -0
  378. package/dist/tools/finance/candleRange.d.ts +21 -0
  379. package/dist/tools/finance/candleRange.js +28 -0
  380. package/dist/tools/finance/optionsAnalytics.cjs +222 -0
  381. package/dist/tools/finance/optionsAnalytics.d.ts +44 -0
  382. package/dist/tools/finance/optionsAnalytics.js +188 -0
  383. package/dist/tools/finance/optionsAnalytics.test.cjs +128 -0
  384. package/dist/tools/finance/optionsAnalytics.test.d.ts +1 -0
  385. package/dist/tools/finance/optionsAnalytics.test.js +122 -0
  386. package/dist/tools/finance/technicalIndicators.cjs +111 -0
  387. package/dist/tools/finance/technicalIndicators.d.ts +15 -0
  388. package/dist/tools/finance/technicalIndicators.js +68 -0
  389. package/dist/tools/finance/yahooCandles.cjs +125 -0
  390. package/dist/tools/finance/yahooCandles.d.ts +41 -0
  391. package/dist/tools/finance/yahooCandles.js +85 -0
  392. package/dist/tools/mcp-finance.cjs +649 -0
  393. package/dist/tools/mcp-finance.d.ts +1 -0
  394. package/dist/tools/mcp-finance.js +631 -0
  395. package/dist/types/agents.cjs +18 -0
  396. package/dist/types/agents.d.ts +11 -0
  397. package/dist/types/agents.js +0 -0
  398. package/dist/types/hooks.cjs +18 -0
  399. package/dist/types/hooks.d.ts +82 -0
  400. package/dist/types/hooks.js +0 -0
  401. package/dist/types/mcp.cjs +86 -0
  402. package/dist/types/mcp.d.ts +107 -0
  403. package/dist/types/mcp.js +40 -0
  404. package/dist/types/voice.cjs +103 -0
  405. package/dist/types/voice.d.ts +117 -0
  406. package/dist/types/voice.js +51 -0
  407. package/dist/utils/attachments.cjs +46 -0
  408. package/dist/utils/attachments.d.ts +7 -0
  409. package/dist/utils/attachments.js +12 -0
  410. package/dist/voice/config.cjs +52 -0
  411. package/dist/voice/config.d.ts +8 -0
  412. package/dist/voice/config.js +18 -0
  413. package/dist/webui/assets/index-BA0HaStz.css +1 -0
  414. package/dist/webui/assets/index-NHgTZsWN.js +112 -0
  415. package/dist/webui/assets/wingman_icon-DOy91UEF.webp +0 -0
  416. package/dist/webui/assets/wingman_logo-Cogyt3qm.webp +0 -0
  417. package/dist/webui/index.html +19 -0
  418. package/package.json +130 -0
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.r = (exports1)=>{
5
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
6
+ value: 'Module'
7
+ });
8
+ Object.defineProperty(exports1, '__esModule', {
9
+ value: true
10
+ });
11
+ };
12
+ })();
13
+ var __webpack_exports__ = {};
14
+ __webpack_require__.r(__webpack_exports__);
15
+ for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
16
+ Object.defineProperty(exports, '__esModule', {
17
+ value: true
18
+ });
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Hooks System Types
3
+ *
4
+ * Following Claude Code's hooks pattern for consistency.
5
+ * Hooks are user-configurable shell commands that execute at specific lifecycle points.
6
+ */
7
+ /**
8
+ * Hook type - currently only "command" is supported
9
+ */
10
+ export type HookType = "command";
11
+ /**
12
+ * Individual hook configuration
13
+ */
14
+ export interface Hook {
15
+ /** Type of hook - currently only "command" is supported */
16
+ type: HookType;
17
+ /** Shell command to execute */
18
+ command: string;
19
+ /** Timeout in seconds (default: 60) */
20
+ timeout?: number;
21
+ }
22
+ /**
23
+ * Hook matcher for tool-specific hooks (PreToolUse, PostToolUse)
24
+ * Supports pattern matching to selectively execute hooks
25
+ */
26
+ export interface HookMatcher {
27
+ /**
28
+ * Pattern to match tool names. Supports:
29
+ * - Pipe-separated tool names: "write_file|edit_file"
30
+ * - Single tool name: "command_execute"
31
+ * - Wildcard: "*" or empty string
32
+ * - Regex patterns: ".*_file"
33
+ *
34
+ * Case-sensitive matching
35
+ */
36
+ matcher?: string;
37
+ /** Array of hooks to execute when pattern matches */
38
+ hooks: Hook[];
39
+ }
40
+ /**
41
+ * Stop hook configuration (no matcher needed)
42
+ */
43
+ export interface StopHook {
44
+ /** Array of hooks to execute when agent stops */
45
+ hooks: Hook[];
46
+ }
47
+ /**
48
+ * Complete hooks configuration
49
+ * Can be defined globally in wingman.config.json or per-agent in agent.json
50
+ */
51
+ export interface HooksConfig {
52
+ /** Hooks that fire before tool execution (can block) */
53
+ PreToolUse?: HookMatcher[];
54
+ /** Hooks that fire after tool completes successfully (non-blocking) */
55
+ PostToolUse?: HookMatcher[];
56
+ /** Hooks that fire when agent completes (non-blocking) */
57
+ Stop?: StopHook[];
58
+ }
59
+ /**
60
+ * Hook event names
61
+ */
62
+ export type HookEventName = "PreToolUse" | "PostToolUse" | "Stop";
63
+ /**
64
+ * Input data passed to hooks via stdin as JSON
65
+ * Following Claude Code's HookInput format
66
+ */
67
+ export interface HookInput {
68
+ /** Unique session identifier */
69
+ session_id: string;
70
+ /** Current working directory */
71
+ cwd: string;
72
+ /** Name of the hook event that triggered this hook */
73
+ hook_event_name: HookEventName;
74
+ /** Tool name (for PreToolUse/PostToolUse hooks) */
75
+ tool_name?: string;
76
+ /** Tool input parameters (for PreToolUse/PostToolUse hooks) */
77
+ tool_input?: Record<string, unknown>;
78
+ /** Tool use ID (for PreToolUse/PostToolUse hooks) */
79
+ tool_use_id?: string;
80
+ /** Tool output (for PostToolUse hooks only) */
81
+ tool_output?: unknown;
82
+ }
File without changes
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ MCPServerConfigSchema: ()=>MCPServerConfigSchema,
28
+ MCPStdioConfigSchema: ()=>MCPStdioConfigSchema,
29
+ validateMCPConfig: ()=>validateMCPConfig,
30
+ MCPSSEConfigSchema: ()=>MCPSSEConfigSchema,
31
+ MCPServersConfigSchema: ()=>MCPServersConfigSchema
32
+ });
33
+ const external_zod_namespaceObject = require("zod");
34
+ const MCPStdioConfigSchema = external_zod_namespaceObject.z.object({
35
+ name: external_zod_namespaceObject.z.string().min(1).describe("Unique server name"),
36
+ transport: external_zod_namespaceObject.z.literal("stdio"),
37
+ command: external_zod_namespaceObject.z.string().min(1).describe("Command to execute (e.g., 'node', 'python')"),
38
+ args: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).optional().describe("Command arguments"),
39
+ env: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), external_zod_namespaceObject.z.string()).optional().describe("Environment variables")
40
+ });
41
+ const MCPSSEConfigSchema = external_zod_namespaceObject.z.object({
42
+ name: external_zod_namespaceObject.z.string().min(1).describe("Unique server name"),
43
+ transport: external_zod_namespaceObject.z.literal("sse"),
44
+ url: external_zod_namespaceObject.z.string().url().describe("Server URL"),
45
+ headers: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), external_zod_namespaceObject.z.string()).optional().describe("HTTP headers for authentication")
46
+ });
47
+ const MCPServerConfigSchema = external_zod_namespaceObject.z.union([
48
+ MCPStdioConfigSchema,
49
+ MCPSSEConfigSchema
50
+ ]);
51
+ const MCPServersConfigSchema = external_zod_namespaceObject.z.object({
52
+ servers: external_zod_namespaceObject.z.array(MCPServerConfigSchema).optional().describe("List of MCP servers")
53
+ });
54
+ function validateMCPConfig(config) {
55
+ try {
56
+ const validated = MCPServersConfigSchema.parse(config);
57
+ return {
58
+ success: true,
59
+ data: validated
60
+ };
61
+ } catch (error) {
62
+ if (error instanceof external_zod_namespaceObject.z.ZodError) return {
63
+ success: false,
64
+ error: error.issues.map((e)=>`${e.path.join(".")}: ${e.message}`).join(", ")
65
+ };
66
+ return {
67
+ success: false,
68
+ error: String(error)
69
+ };
70
+ }
71
+ }
72
+ exports.MCPSSEConfigSchema = __webpack_exports__.MCPSSEConfigSchema;
73
+ exports.MCPServerConfigSchema = __webpack_exports__.MCPServerConfigSchema;
74
+ exports.MCPServersConfigSchema = __webpack_exports__.MCPServersConfigSchema;
75
+ exports.MCPStdioConfigSchema = __webpack_exports__.MCPStdioConfigSchema;
76
+ exports.validateMCPConfig = __webpack_exports__.validateMCPConfig;
77
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
78
+ "MCPSSEConfigSchema",
79
+ "MCPServerConfigSchema",
80
+ "MCPServersConfigSchema",
81
+ "MCPStdioConfigSchema",
82
+ "validateMCPConfig"
83
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
84
+ Object.defineProperty(exports, '__esModule', {
85
+ value: true
86
+ });
@@ -0,0 +1,107 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Transport type for MCP server connection
4
+ */
5
+ export type MCPTransport = "stdio" | "sse";
6
+ /**
7
+ * Base MCP server configuration
8
+ */
9
+ export interface MCPServerConfig {
10
+ /** Unique server identifier/name */
11
+ name: string;
12
+ /** Transport protocol */
13
+ transport: MCPTransport;
14
+ }
15
+ /**
16
+ * Stdio transport configuration (for local subprocess)
17
+ */
18
+ export interface MCPStdioConfig extends MCPServerConfig {
19
+ transport: "stdio";
20
+ /** Command to execute (e.g., "node", "python") */
21
+ command: string;
22
+ /** Command arguments (e.g., ["/path/to/server.js"]) */
23
+ args?: string[];
24
+ /** Environment variables for the subprocess */
25
+ env?: Record<string, string>;
26
+ }
27
+ /**
28
+ * SSE transport configuration (for HTTP/remote servers)
29
+ */
30
+ export interface MCPSSEConfig extends MCPServerConfig {
31
+ transport: "sse";
32
+ /** Server URL (e.g., "http://localhost:8000/mcp") */
33
+ url: string;
34
+ /** Optional headers for authentication */
35
+ headers?: Record<string, string>;
36
+ }
37
+ /**
38
+ * Union type for all MCP server configurations
39
+ */
40
+ export type MCPServerConfiguration = MCPStdioConfig | MCPSSEConfig;
41
+ /**
42
+ * Container for multiple MCP servers
43
+ */
44
+ export interface MCPServersConfig {
45
+ /** List of MCP server configurations */
46
+ servers?: MCPServerConfiguration[];
47
+ }
48
+ /**
49
+ * Zod schema for Stdio transport configuration
50
+ */
51
+ export declare const MCPStdioConfigSchema: z.ZodObject<{
52
+ name: z.ZodString;
53
+ transport: z.ZodLiteral<"stdio">;
54
+ command: z.ZodString;
55
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
57
+ }, z.core.$strip>;
58
+ /**
59
+ * Zod schema for SSE transport configuration
60
+ */
61
+ export declare const MCPSSEConfigSchema: z.ZodObject<{
62
+ name: z.ZodString;
63
+ transport: z.ZodLiteral<"sse">;
64
+ url: z.ZodString;
65
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
66
+ }, z.core.$strip>;
67
+ /**
68
+ * Zod schema for MCP server configuration (discriminated union)
69
+ */
70
+ export declare const MCPServerConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
71
+ name: z.ZodString;
72
+ transport: z.ZodLiteral<"stdio">;
73
+ command: z.ZodString;
74
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ name: z.ZodString;
78
+ transport: z.ZodLiteral<"sse">;
79
+ url: z.ZodString;
80
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
81
+ }, z.core.$strip>]>;
82
+ /**
83
+ * Zod schema for MCP servers configuration container
84
+ */
85
+ export declare const MCPServersConfigSchema: z.ZodObject<{
86
+ servers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
87
+ name: z.ZodString;
88
+ transport: z.ZodLiteral<"stdio">;
89
+ command: z.ZodString;
90
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ name: z.ZodString;
94
+ transport: z.ZodLiteral<"sse">;
95
+ url: z.ZodString;
96
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
97
+ }, z.core.$strip>]>>>;
98
+ }, z.core.$strip>;
99
+ export type MCPServersConfigType = z.infer<typeof MCPServersConfigSchema>;
100
+ /**
101
+ * Validate MCP server configuration
102
+ */
103
+ export declare function validateMCPConfig(config: unknown): {
104
+ success: boolean;
105
+ data?: MCPServersConfigType;
106
+ error?: string;
107
+ };
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ const MCPStdioConfigSchema = z.object({
3
+ name: z.string().min(1).describe("Unique server name"),
4
+ transport: z.literal("stdio"),
5
+ command: z.string().min(1).describe("Command to execute (e.g., 'node', 'python')"),
6
+ args: z.array(z.string()).optional().describe("Command arguments"),
7
+ env: z.record(z.string(), z.string()).optional().describe("Environment variables")
8
+ });
9
+ const MCPSSEConfigSchema = z.object({
10
+ name: z.string().min(1).describe("Unique server name"),
11
+ transport: z.literal("sse"),
12
+ url: z.string().url().describe("Server URL"),
13
+ headers: z.record(z.string(), z.string()).optional().describe("HTTP headers for authentication")
14
+ });
15
+ const MCPServerConfigSchema = z.union([
16
+ MCPStdioConfigSchema,
17
+ MCPSSEConfigSchema
18
+ ]);
19
+ const MCPServersConfigSchema = z.object({
20
+ servers: z.array(MCPServerConfigSchema).optional().describe("List of MCP servers")
21
+ });
22
+ function validateMCPConfig(config) {
23
+ try {
24
+ const validated = MCPServersConfigSchema.parse(config);
25
+ return {
26
+ success: true,
27
+ data: validated
28
+ };
29
+ } catch (error) {
30
+ if (error instanceof z.ZodError) return {
31
+ success: false,
32
+ error: error.issues.map((e)=>`${e.path.join(".")}: ${e.message}`).join(", ")
33
+ };
34
+ return {
35
+ success: false,
36
+ error: String(error)
37
+ };
38
+ }
39
+ }
40
+ export { MCPSSEConfigSchema, MCPServerConfigSchema, MCPServersConfigSchema, MCPStdioConfigSchema, validateMCPConfig };
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ WebSpeechOptionsSchema: ()=>WebSpeechOptionsSchema,
28
+ AgentVoiceConfigSchema: ()=>AgentVoiceConfigSchema,
29
+ VoiceConfigSchema: ()=>VoiceConfigSchema,
30
+ VoiceConfigUpdateSchema: ()=>VoiceConfigUpdateSchema,
31
+ VoicePolicySchema: ()=>VoicePolicySchema,
32
+ VoiceProviderSchema: ()=>VoiceProviderSchema,
33
+ ElevenLabsOptionsSchema: ()=>ElevenLabsOptionsSchema
34
+ });
35
+ const external_zod_namespaceObject = require("zod");
36
+ const VoiceProviderSchema = external_zod_namespaceObject.z["enum"]([
37
+ "web_speech",
38
+ "elevenlabs"
39
+ ]);
40
+ const VoicePolicySchema = external_zod_namespaceObject.z["enum"]([
41
+ "off",
42
+ "manual",
43
+ "auto"
44
+ ]);
45
+ const WebSpeechOptionsSchema = external_zod_namespaceObject.z.object({
46
+ voiceName: external_zod_namespaceObject.z.string().optional(),
47
+ lang: external_zod_namespaceObject.z.string().optional(),
48
+ rate: external_zod_namespaceObject.z.number().min(0.1).max(4).optional(),
49
+ pitch: external_zod_namespaceObject.z.number().min(0).max(2).optional(),
50
+ volume: external_zod_namespaceObject.z.number().min(0).max(1).optional()
51
+ });
52
+ const ElevenLabsOptionsSchema = external_zod_namespaceObject.z.object({
53
+ voiceId: external_zod_namespaceObject.z.string().optional(),
54
+ modelId: external_zod_namespaceObject.z.string().optional(),
55
+ stability: external_zod_namespaceObject.z.number().min(0).max(1).optional(),
56
+ similarityBoost: external_zod_namespaceObject.z.number().min(0).max(1).optional(),
57
+ style: external_zod_namespaceObject.z.number().min(0).max(1).optional(),
58
+ speakerBoost: external_zod_namespaceObject.z.boolean().optional(),
59
+ speed: external_zod_namespaceObject.z.number().min(0.25).max(4).optional(),
60
+ outputFormat: external_zod_namespaceObject.z.string().optional(),
61
+ optimizeStreamingLatency: external_zod_namespaceObject.z.number().min(0).max(4).optional()
62
+ });
63
+ const VoiceConfigSchema = external_zod_namespaceObject.z.object({
64
+ provider: VoiceProviderSchema.default("web_speech"),
65
+ defaultPolicy: VoicePolicySchema.default("off"),
66
+ webSpeech: WebSpeechOptionsSchema.optional().default({}),
67
+ elevenlabs: ElevenLabsOptionsSchema.optional().default({})
68
+ }).default({
69
+ provider: "web_speech",
70
+ defaultPolicy: "off",
71
+ webSpeech: {},
72
+ elevenlabs: {}
73
+ });
74
+ const AgentVoiceConfigSchema = external_zod_namespaceObject.z.object({
75
+ provider: VoiceProviderSchema.optional(),
76
+ webSpeech: WebSpeechOptionsSchema.optional(),
77
+ elevenlabs: ElevenLabsOptionsSchema.optional()
78
+ });
79
+ const VoiceConfigUpdateSchema = external_zod_namespaceObject.z.object({
80
+ provider: VoiceProviderSchema.optional(),
81
+ defaultPolicy: VoicePolicySchema.optional(),
82
+ webSpeech: WebSpeechOptionsSchema.optional(),
83
+ elevenlabs: ElevenLabsOptionsSchema.optional()
84
+ });
85
+ exports.AgentVoiceConfigSchema = __webpack_exports__.AgentVoiceConfigSchema;
86
+ exports.ElevenLabsOptionsSchema = __webpack_exports__.ElevenLabsOptionsSchema;
87
+ exports.VoiceConfigSchema = __webpack_exports__.VoiceConfigSchema;
88
+ exports.VoiceConfigUpdateSchema = __webpack_exports__.VoiceConfigUpdateSchema;
89
+ exports.VoicePolicySchema = __webpack_exports__.VoicePolicySchema;
90
+ exports.VoiceProviderSchema = __webpack_exports__.VoiceProviderSchema;
91
+ exports.WebSpeechOptionsSchema = __webpack_exports__.WebSpeechOptionsSchema;
92
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
93
+ "AgentVoiceConfigSchema",
94
+ "ElevenLabsOptionsSchema",
95
+ "VoiceConfigSchema",
96
+ "VoiceConfigUpdateSchema",
97
+ "VoicePolicySchema",
98
+ "VoiceProviderSchema",
99
+ "WebSpeechOptionsSchema"
100
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
101
+ Object.defineProperty(exports, '__esModule', {
102
+ value: true
103
+ });
@@ -0,0 +1,117 @@
1
+ import { z } from "zod";
2
+ export declare const VoiceProviderSchema: z.ZodEnum<{
3
+ web_speech: "web_speech";
4
+ elevenlabs: "elevenlabs";
5
+ }>;
6
+ export type VoiceProvider = z.infer<typeof VoiceProviderSchema>;
7
+ export declare const VoicePolicySchema: z.ZodEnum<{
8
+ off: "off";
9
+ manual: "manual";
10
+ auto: "auto";
11
+ }>;
12
+ export type VoicePolicy = z.infer<typeof VoicePolicySchema>;
13
+ export declare const WebSpeechOptionsSchema: z.ZodObject<{
14
+ voiceName: z.ZodOptional<z.ZodString>;
15
+ lang: z.ZodOptional<z.ZodString>;
16
+ rate: z.ZodOptional<z.ZodNumber>;
17
+ pitch: z.ZodOptional<z.ZodNumber>;
18
+ volume: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>;
20
+ export type WebSpeechOptions = z.infer<typeof WebSpeechOptionsSchema>;
21
+ export declare const ElevenLabsOptionsSchema: z.ZodObject<{
22
+ voiceId: z.ZodOptional<z.ZodString>;
23
+ modelId: z.ZodOptional<z.ZodString>;
24
+ stability: z.ZodOptional<z.ZodNumber>;
25
+ similarityBoost: z.ZodOptional<z.ZodNumber>;
26
+ style: z.ZodOptional<z.ZodNumber>;
27
+ speakerBoost: z.ZodOptional<z.ZodBoolean>;
28
+ speed: z.ZodOptional<z.ZodNumber>;
29
+ outputFormat: z.ZodOptional<z.ZodString>;
30
+ optimizeStreamingLatency: z.ZodOptional<z.ZodNumber>;
31
+ }, z.core.$strip>;
32
+ export type ElevenLabsOptions = z.infer<typeof ElevenLabsOptionsSchema>;
33
+ export declare const VoiceConfigSchema: z.ZodDefault<z.ZodObject<{
34
+ provider: z.ZodDefault<z.ZodEnum<{
35
+ web_speech: "web_speech";
36
+ elevenlabs: "elevenlabs";
37
+ }>>;
38
+ defaultPolicy: z.ZodDefault<z.ZodEnum<{
39
+ off: "off";
40
+ manual: "manual";
41
+ auto: "auto";
42
+ }>>;
43
+ webSpeech: z.ZodDefault<z.ZodOptional<z.ZodObject<{
44
+ voiceName: z.ZodOptional<z.ZodString>;
45
+ lang: z.ZodOptional<z.ZodString>;
46
+ rate: z.ZodOptional<z.ZodNumber>;
47
+ pitch: z.ZodOptional<z.ZodNumber>;
48
+ volume: z.ZodOptional<z.ZodNumber>;
49
+ }, z.core.$strip>>>;
50
+ elevenlabs: z.ZodDefault<z.ZodOptional<z.ZodObject<{
51
+ voiceId: z.ZodOptional<z.ZodString>;
52
+ modelId: z.ZodOptional<z.ZodString>;
53
+ stability: z.ZodOptional<z.ZodNumber>;
54
+ similarityBoost: z.ZodOptional<z.ZodNumber>;
55
+ style: z.ZodOptional<z.ZodNumber>;
56
+ speakerBoost: z.ZodOptional<z.ZodBoolean>;
57
+ speed: z.ZodOptional<z.ZodNumber>;
58
+ outputFormat: z.ZodOptional<z.ZodString>;
59
+ optimizeStreamingLatency: z.ZodOptional<z.ZodNumber>;
60
+ }, z.core.$strip>>>;
61
+ }, z.core.$strip>>;
62
+ export type VoiceConfig = z.infer<typeof VoiceConfigSchema>;
63
+ export declare const AgentVoiceConfigSchema: z.ZodObject<{
64
+ provider: z.ZodOptional<z.ZodEnum<{
65
+ web_speech: "web_speech";
66
+ elevenlabs: "elevenlabs";
67
+ }>>;
68
+ webSpeech: z.ZodOptional<z.ZodObject<{
69
+ voiceName: z.ZodOptional<z.ZodString>;
70
+ lang: z.ZodOptional<z.ZodString>;
71
+ rate: z.ZodOptional<z.ZodNumber>;
72
+ pitch: z.ZodOptional<z.ZodNumber>;
73
+ volume: z.ZodOptional<z.ZodNumber>;
74
+ }, z.core.$strip>>;
75
+ elevenlabs: z.ZodOptional<z.ZodObject<{
76
+ voiceId: z.ZodOptional<z.ZodString>;
77
+ modelId: z.ZodOptional<z.ZodString>;
78
+ stability: z.ZodOptional<z.ZodNumber>;
79
+ similarityBoost: z.ZodOptional<z.ZodNumber>;
80
+ style: z.ZodOptional<z.ZodNumber>;
81
+ speakerBoost: z.ZodOptional<z.ZodBoolean>;
82
+ speed: z.ZodOptional<z.ZodNumber>;
83
+ outputFormat: z.ZodOptional<z.ZodString>;
84
+ optimizeStreamingLatency: z.ZodOptional<z.ZodNumber>;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>;
87
+ export type AgentVoiceConfig = z.infer<typeof AgentVoiceConfigSchema>;
88
+ export declare const VoiceConfigUpdateSchema: z.ZodObject<{
89
+ provider: z.ZodOptional<z.ZodEnum<{
90
+ web_speech: "web_speech";
91
+ elevenlabs: "elevenlabs";
92
+ }>>;
93
+ defaultPolicy: z.ZodOptional<z.ZodEnum<{
94
+ off: "off";
95
+ manual: "manual";
96
+ auto: "auto";
97
+ }>>;
98
+ webSpeech: z.ZodOptional<z.ZodObject<{
99
+ voiceName: z.ZodOptional<z.ZodString>;
100
+ lang: z.ZodOptional<z.ZodString>;
101
+ rate: z.ZodOptional<z.ZodNumber>;
102
+ pitch: z.ZodOptional<z.ZodNumber>;
103
+ volume: z.ZodOptional<z.ZodNumber>;
104
+ }, z.core.$strip>>;
105
+ elevenlabs: z.ZodOptional<z.ZodObject<{
106
+ voiceId: z.ZodOptional<z.ZodString>;
107
+ modelId: z.ZodOptional<z.ZodString>;
108
+ stability: z.ZodOptional<z.ZodNumber>;
109
+ similarityBoost: z.ZodOptional<z.ZodNumber>;
110
+ style: z.ZodOptional<z.ZodNumber>;
111
+ speakerBoost: z.ZodOptional<z.ZodBoolean>;
112
+ speed: z.ZodOptional<z.ZodNumber>;
113
+ outputFormat: z.ZodOptional<z.ZodString>;
114
+ optimizeStreamingLatency: z.ZodOptional<z.ZodNumber>;
115
+ }, z.core.$strip>>;
116
+ }, z.core.$strip>;
117
+ export type VoiceConfigUpdate = z.infer<typeof VoiceConfigUpdateSchema>;
@@ -0,0 +1,51 @@
1
+ import { z } from "zod";
2
+ const VoiceProviderSchema = z["enum"]([
3
+ "web_speech",
4
+ "elevenlabs"
5
+ ]);
6
+ const VoicePolicySchema = z["enum"]([
7
+ "off",
8
+ "manual",
9
+ "auto"
10
+ ]);
11
+ const WebSpeechOptionsSchema = z.object({
12
+ voiceName: z.string().optional(),
13
+ lang: z.string().optional(),
14
+ rate: z.number().min(0.1).max(4).optional(),
15
+ pitch: z.number().min(0).max(2).optional(),
16
+ volume: z.number().min(0).max(1).optional()
17
+ });
18
+ const ElevenLabsOptionsSchema = z.object({
19
+ voiceId: z.string().optional(),
20
+ modelId: z.string().optional(),
21
+ stability: z.number().min(0).max(1).optional(),
22
+ similarityBoost: z.number().min(0).max(1).optional(),
23
+ style: z.number().min(0).max(1).optional(),
24
+ speakerBoost: z.boolean().optional(),
25
+ speed: z.number().min(0.25).max(4).optional(),
26
+ outputFormat: z.string().optional(),
27
+ optimizeStreamingLatency: z.number().min(0).max(4).optional()
28
+ });
29
+ const VoiceConfigSchema = z.object({
30
+ provider: VoiceProviderSchema.default("web_speech"),
31
+ defaultPolicy: VoicePolicySchema.default("off"),
32
+ webSpeech: WebSpeechOptionsSchema.optional().default({}),
33
+ elevenlabs: ElevenLabsOptionsSchema.optional().default({})
34
+ }).default({
35
+ provider: "web_speech",
36
+ defaultPolicy: "off",
37
+ webSpeech: {},
38
+ elevenlabs: {}
39
+ });
40
+ const AgentVoiceConfigSchema = z.object({
41
+ provider: VoiceProviderSchema.optional(),
42
+ webSpeech: WebSpeechOptionsSchema.optional(),
43
+ elevenlabs: ElevenLabsOptionsSchema.optional()
44
+ });
45
+ const VoiceConfigUpdateSchema = z.object({
46
+ provider: VoiceProviderSchema.optional(),
47
+ defaultPolicy: VoicePolicySchema.optional(),
48
+ webSpeech: WebSpeechOptionsSchema.optional(),
49
+ elevenlabs: ElevenLabsOptionsSchema.optional()
50
+ });
51
+ export { AgentVoiceConfigSchema, ElevenLabsOptionsSchema, VoiceConfigSchema, VoiceConfigUpdateSchema, VoicePolicySchema, VoiceProviderSchema, WebSpeechOptionsSchema };
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ extractImageFiles: ()=>extractImageFiles
28
+ });
29
+ function extractImageFiles(items) {
30
+ const files = [];
31
+ if (!items) return files;
32
+ for(let i = 0; i < items.length; i += 1){
33
+ const item = items[i];
34
+ if (!item || "file" !== item.kind || !item.type.startsWith("image/")) continue;
35
+ const file = item.getAsFile?.();
36
+ if (file) files.push(file);
37
+ }
38
+ return files;
39
+ }
40
+ exports.extractImageFiles = __webpack_exports__.extractImageFiles;
41
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
42
+ "extractImageFiles"
43
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
44
+ Object.defineProperty(exports, '__esModule', {
45
+ value: true
46
+ });
@@ -0,0 +1,7 @@
1
+ type ClipboardItemLike = {
2
+ kind: string;
3
+ type: string;
4
+ getAsFile?: () => File | null;
5
+ };
6
+ export declare function extractImageFiles(items?: ArrayLike<ClipboardItemLike> | null): File[];
7
+ export {};
@@ -0,0 +1,12 @@
1
+ function extractImageFiles(items) {
2
+ const files = [];
3
+ if (!items) return files;
4
+ for(let i = 0; i < items.length; i += 1){
5
+ const item = items[i];
6
+ if (!item || "file" !== item.kind || !item.type.startsWith("image/")) continue;
7
+ const file = item.getAsFile?.();
8
+ if (file) files.push(file);
9
+ }
10
+ return files;
11
+ }
12
+ export { extractImageFiles };