ft-scout 9.5.1 → 9.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 (306) hide show
  1. package/README.md +36 -18
  2. package/bin/src/commands/agent.d.ts +41 -0
  3. package/bin/src/commands/agent.js +155 -19
  4. package/bin/src/commands/audit.d.ts +2 -0
  5. package/bin/src/commands/authCommand.d.ts +2 -0
  6. package/bin/src/commands/benchmark.d.ts +20 -0
  7. package/bin/src/commands/benchmark.js +120 -97
  8. package/bin/src/commands/brief.d.ts +4 -0
  9. package/bin/src/commands/checkpoint.d.ts +7 -0
  10. package/bin/src/commands/configCommand.d.ts +7 -0
  11. package/bin/src/commands/dashboard.d.ts +5 -0
  12. package/bin/src/commands/history.d.ts +2 -0
  13. package/bin/src/commands/init.d.ts +8 -0
  14. package/bin/src/commands/login.d.ts +10 -0
  15. package/bin/src/commands/logout.d.ts +6 -0
  16. package/bin/src/commands/mcp.d.ts +49 -0
  17. package/bin/src/commands/owners.d.ts +2 -0
  18. package/bin/src/commands/plan.d.ts +2 -0
  19. package/bin/src/commands/pr.d.ts +11 -0
  20. package/bin/src/commands/quota.d.ts +2 -0
  21. package/bin/src/commands/recommend.d.ts +5 -0
  22. package/bin/src/commands/risky.d.ts +10 -0
  23. package/bin/src/commands/setup.d.ts +2 -0
  24. package/bin/src/commands/signup.d.ts +8 -0
  25. package/bin/src/commands/switchCommand.d.ts +3 -0
  26. package/bin/src/commands/undo.d.ts +2 -0
  27. package/bin/src/commands/watch.d.ts +12 -0
  28. package/bin/src/commands/web.d.ts +8 -0
  29. package/bin/src/discovery/config.d.ts +10 -0
  30. package/bin/src/discovery/display.d.ts +3 -0
  31. package/bin/src/discovery/messages.d.ts +4 -0
  32. package/bin/src/discovery/signals.d.ts +16 -0
  33. package/bin/src/engine/actionVerifier.d.ts +69 -0
  34. package/bin/src/engine/agentEngine.d.ts +110 -0
  35. package/bin/src/engine/agentEngine.js +12 -14
  36. package/bin/src/engine/agentState.d.ts +154 -0
  37. package/bin/src/engine/browser/browserController.d.ts +155 -0
  38. package/bin/src/engine/browser/index.d.ts +2 -0
  39. package/bin/src/engine/checkpoints/checkpointManager.d.ts +48 -0
  40. package/bin/src/engine/computer/computerController.d.ts +130 -0
  41. package/bin/src/engine/computer/computerController.js +8 -0
  42. package/bin/src/engine/computer/computerDiagnostic.d.ts +31 -0
  43. package/bin/src/engine/computer/index.d.ts +4 -0
  44. package/bin/src/engine/computer/mockComputer.d.ts +62 -0
  45. package/bin/src/engine/computer/operatorHud.d.ts +30 -0
  46. package/bin/src/engine/git.d.ts +20 -0
  47. package/bin/src/engine/llm.d.ts +92 -0
  48. package/bin/src/engine/planner.d.ts +21 -0
  49. package/bin/src/engine/runtime/agentRuntime.d.ts +111 -0
  50. package/bin/src/engine/runtime/agentRuntime.js +3 -6
  51. package/bin/src/engine/runtime/index.d.ts +2 -0
  52. package/bin/src/engine/safety.d.ts +55 -0
  53. package/bin/src/engine/scanners.d.ts +2 -0
  54. package/bin/src/engine/subagents/subagentManager.d.ts +106 -0
  55. package/bin/src/engine/subagents/subagentManager.js +275 -3
  56. package/bin/src/engine/toolRegistry.d.ts +38 -0
  57. package/bin/src/engine/verifier.d.ts +47 -0
  58. package/bin/src/engine/voiceEngine.d.ts +26 -0
  59. package/bin/src/engine/web.d.ts +22 -0
  60. package/bin/src/engine/workspace/agentWorkspace.d.ts +112 -0
  61. package/bin/src/engine/workspace/index.d.ts +2 -0
  62. package/bin/src/index.d.ts +2 -0
  63. package/bin/src/index.js +5 -5
  64. package/bin/src/mcp/client.d.ts +62 -0
  65. package/bin/src/mcp/client.js +1 -1
  66. package/bin/src/mcp/cloudSync.d.ts +19 -0
  67. package/bin/src/mcp/discovery.d.ts +22 -0
  68. package/bin/src/mcp/health.d.ts +13 -0
  69. package/bin/src/mcp/index.d.ts +16 -0
  70. package/bin/src/mcp/manager.d.ts +113 -0
  71. package/bin/src/mcp/permissions.d.ts +18 -0
  72. package/bin/src/mcp/persistence.d.ts +44 -0
  73. package/bin/src/mcp/persistence.js +8 -1
  74. package/bin/src/mcp/recovery.d.ts +19 -0
  75. package/bin/src/mcp/telemetry.d.ts +15 -0
  76. package/bin/src/mcp/toolRouter.d.ts +23 -0
  77. package/bin/src/mcp/transport.d.ts +60 -0
  78. package/bin/src/mcp/types.d.ts +130 -0
  79. package/bin/src/server/server.d.ts +6 -0
  80. package/bin/src/utils/admin.d.ts +84 -0
  81. package/bin/src/utils/auditLogger.d.ts +18 -0
  82. package/bin/src/utils/auth.d.ts +132 -0
  83. package/bin/src/utils/branding.d.ts +2 -0
  84. package/bin/src/utils/branding.js +1 -1
  85. package/bin/src/utils/claudeUI.d.ts +131 -0
  86. package/bin/src/utils/claudeUI.js +138 -4
  87. package/bin/src/utils/config.d.ts +46 -0
  88. package/bin/src/utils/email.d.ts +36 -0
  89. package/bin/src/utils/firebaseAuth.d.ts +19 -0
  90. package/bin/src/utils/holoseneAuth.d.ts +18 -0
  91. package/bin/src/utils/interruptHandler.d.ts +32 -0
  92. package/bin/src/utils/language.d.ts +13 -0
  93. package/bin/src/utils/logger.d.ts +2 -0
  94. package/bin/src/utils/markdown.d.ts +19 -0
  95. package/bin/src/utils/payment.d.ts +81 -0
  96. package/bin/src/utils/pricing.d.ts +26 -0
  97. package/bin/src/utils/pricing.js +0 -1
  98. package/bin/src/utils/qrBridge.d.ts +33 -0
  99. package/bin/src/utils/qrBridge.js +1 -1
  100. package/bin/src/utils/razorpay.d.ts +48 -0
  101. package/bin/src/utils/rules.d.ts +24 -0
  102. package/bin/src/utils/session.d.ts +32 -0
  103. package/bin/src/utils/updateCheck.d.ts +3 -0
  104. package/package.json +17 -7
  105. package/.firebase/hosting.d2Vi.cache +0 -16
  106. package/.firebaserc +0 -14
  107. package/.mcp-config.json +0 -19
  108. package/.mft-mcp-config.json +0 -29
  109. package/.scoutrules +0 -13
  110. package/.test-ft/mcp_activity.json +0 -23
  111. package/.test-ft/mcp_credentials.enc +0 -1
  112. package/.test-ft/mcp_servers.json +0 -1
  113. package/bin/src/commands/agent.d.ts.map +0 -1
  114. package/bin/src/commands/agent.js.map +0 -1
  115. package/bin/src/commands/audit.d.ts.map +0 -1
  116. package/bin/src/commands/audit.js.map +0 -1
  117. package/bin/src/commands/authCommand.d.ts.map +0 -1
  118. package/bin/src/commands/authCommand.js.map +0 -1
  119. package/bin/src/commands/benchmark.d.ts.map +0 -1
  120. package/bin/src/commands/benchmark.js.map +0 -1
  121. package/bin/src/commands/brief.d.ts.map +0 -1
  122. package/bin/src/commands/brief.js.map +0 -1
  123. package/bin/src/commands/checkpoint.d.ts.map +0 -1
  124. package/bin/src/commands/checkpoint.js.map +0 -1
  125. package/bin/src/commands/configCommand.d.ts.map +0 -1
  126. package/bin/src/commands/configCommand.js.map +0 -1
  127. package/bin/src/commands/dashboard.d.ts.map +0 -1
  128. package/bin/src/commands/dashboard.js.map +0 -1
  129. package/bin/src/commands/history.d.ts.map +0 -1
  130. package/bin/src/commands/history.js.map +0 -1
  131. package/bin/src/commands/init.d.ts.map +0 -1
  132. package/bin/src/commands/init.js.map +0 -1
  133. package/bin/src/commands/login.d.ts.map +0 -1
  134. package/bin/src/commands/login.js.map +0 -1
  135. package/bin/src/commands/logout.d.ts.map +0 -1
  136. package/bin/src/commands/logout.js.map +0 -1
  137. package/bin/src/commands/mcp.d.ts.map +0 -1
  138. package/bin/src/commands/mcp.js.map +0 -1
  139. package/bin/src/commands/owners.d.ts.map +0 -1
  140. package/bin/src/commands/owners.js.map +0 -1
  141. package/bin/src/commands/plan.d.ts.map +0 -1
  142. package/bin/src/commands/plan.js.map +0 -1
  143. package/bin/src/commands/pr.d.ts.map +0 -1
  144. package/bin/src/commands/pr.js.map +0 -1
  145. package/bin/src/commands/quota.d.ts.map +0 -1
  146. package/bin/src/commands/quota.js.map +0 -1
  147. package/bin/src/commands/recommend.d.ts.map +0 -1
  148. package/bin/src/commands/recommend.js.map +0 -1
  149. package/bin/src/commands/risky.d.ts.map +0 -1
  150. package/bin/src/commands/risky.js.map +0 -1
  151. package/bin/src/commands/setup.d.ts.map +0 -1
  152. package/bin/src/commands/setup.js.map +0 -1
  153. package/bin/src/commands/signup.d.ts.map +0 -1
  154. package/bin/src/commands/signup.js.map +0 -1
  155. package/bin/src/commands/switchCommand.d.ts.map +0 -1
  156. package/bin/src/commands/switchCommand.js.map +0 -1
  157. package/bin/src/commands/undo.d.ts.map +0 -1
  158. package/bin/src/commands/undo.js.map +0 -1
  159. package/bin/src/commands/watch.d.ts.map +0 -1
  160. package/bin/src/commands/watch.js.map +0 -1
  161. package/bin/src/commands/web.d.ts.map +0 -1
  162. package/bin/src/commands/web.js.map +0 -1
  163. package/bin/src/discovery/config.d.ts.map +0 -1
  164. package/bin/src/discovery/config.js.map +0 -1
  165. package/bin/src/discovery/display.d.ts.map +0 -1
  166. package/bin/src/discovery/display.js.map +0 -1
  167. package/bin/src/discovery/messages.d.ts.map +0 -1
  168. package/bin/src/discovery/messages.js.map +0 -1
  169. package/bin/src/discovery/signals.d.ts.map +0 -1
  170. package/bin/src/discovery/signals.js.map +0 -1
  171. package/bin/src/engine/actionVerifier.d.ts.map +0 -1
  172. package/bin/src/engine/actionVerifier.js.map +0 -1
  173. package/bin/src/engine/agentEngine.d.ts.map +0 -1
  174. package/bin/src/engine/agentEngine.js.map +0 -1
  175. package/bin/src/engine/agentState.d.ts.map +0 -1
  176. package/bin/src/engine/agentState.js.map +0 -1
  177. package/bin/src/engine/browser/browserController.d.ts.map +0 -1
  178. package/bin/src/engine/browser/browserController.js.map +0 -1
  179. package/bin/src/engine/browser/index.d.ts.map +0 -1
  180. package/bin/src/engine/browser/index.js.map +0 -1
  181. package/bin/src/engine/checkpoints/checkpointManager.d.ts.map +0 -1
  182. package/bin/src/engine/checkpoints/checkpointManager.js.map +0 -1
  183. package/bin/src/engine/computer/computerController.d.ts.map +0 -1
  184. package/bin/src/engine/computer/computerController.js.map +0 -1
  185. package/bin/src/engine/computer/computerDiagnostic.d.ts.map +0 -1
  186. package/bin/src/engine/computer/computerDiagnostic.js.map +0 -1
  187. package/bin/src/engine/computer/index.d.ts.map +0 -1
  188. package/bin/src/engine/computer/index.js.map +0 -1
  189. package/bin/src/engine/computer/mockComputer.d.ts.map +0 -1
  190. package/bin/src/engine/computer/mockComputer.js.map +0 -1
  191. package/bin/src/engine/computer/operatorHud.d.ts.map +0 -1
  192. package/bin/src/engine/computer/operatorHud.js.map +0 -1
  193. package/bin/src/engine/computer/scout_driver.exe +0 -0
  194. package/bin/src/engine/git.d.ts.map +0 -1
  195. package/bin/src/engine/git.js.map +0 -1
  196. package/bin/src/engine/llm.d.ts.map +0 -1
  197. package/bin/src/engine/llm.js.map +0 -1
  198. package/bin/src/engine/planner.d.ts.map +0 -1
  199. package/bin/src/engine/planner.js.map +0 -1
  200. package/bin/src/engine/runtime/agentRuntime.d.ts.map +0 -1
  201. package/bin/src/engine/runtime/agentRuntime.js.map +0 -1
  202. package/bin/src/engine/runtime/index.d.ts.map +0 -1
  203. package/bin/src/engine/runtime/index.js.map +0 -1
  204. package/bin/src/engine/safety.d.ts.map +0 -1
  205. package/bin/src/engine/safety.js.map +0 -1
  206. package/bin/src/engine/scanners.d.ts.map +0 -1
  207. package/bin/src/engine/scanners.js.map +0 -1
  208. package/bin/src/engine/scoutAudioRecorder.cs +0 -215
  209. package/bin/src/engine/scout_audio_recorder.exe +0 -0
  210. package/bin/src/engine/subagents/subagentManager.d.ts.map +0 -1
  211. package/bin/src/engine/subagents/subagentManager.js.map +0 -1
  212. package/bin/src/engine/toolRegistry.d.ts.map +0 -1
  213. package/bin/src/engine/toolRegistry.js.map +0 -1
  214. package/bin/src/engine/verifier.d.ts.map +0 -1
  215. package/bin/src/engine/verifier.js.map +0 -1
  216. package/bin/src/engine/voiceEngine.d.ts.map +0 -1
  217. package/bin/src/engine/voiceEngine.js.map +0 -1
  218. package/bin/src/engine/web.d.ts.map +0 -1
  219. package/bin/src/engine/web.js.map +0 -1
  220. package/bin/src/engine/workspace/agentWorkspace.d.ts.map +0 -1
  221. package/bin/src/engine/workspace/agentWorkspace.js.map +0 -1
  222. package/bin/src/engine/workspace/index.d.ts.map +0 -1
  223. package/bin/src/engine/workspace/index.js.map +0 -1
  224. package/bin/src/index.d.ts.map +0 -1
  225. package/bin/src/index.js.map +0 -1
  226. package/bin/src/mcp/client.d.ts.map +0 -1
  227. package/bin/src/mcp/client.js.map +0 -1
  228. package/bin/src/mcp/cloudSync.d.ts.map +0 -1
  229. package/bin/src/mcp/cloudSync.js.map +0 -1
  230. package/bin/src/mcp/discovery.d.ts.map +0 -1
  231. package/bin/src/mcp/discovery.js.map +0 -1
  232. package/bin/src/mcp/health.d.ts.map +0 -1
  233. package/bin/src/mcp/health.js.map +0 -1
  234. package/bin/src/mcp/index.d.ts.map +0 -1
  235. package/bin/src/mcp/index.js.map +0 -1
  236. package/bin/src/mcp/manager.d.ts.map +0 -1
  237. package/bin/src/mcp/manager.js.map +0 -1
  238. package/bin/src/mcp/permissions.d.ts.map +0 -1
  239. package/bin/src/mcp/permissions.js.map +0 -1
  240. package/bin/src/mcp/persistence.d.ts.map +0 -1
  241. package/bin/src/mcp/persistence.js.map +0 -1
  242. package/bin/src/mcp/recovery.d.ts.map +0 -1
  243. package/bin/src/mcp/recovery.js.map +0 -1
  244. package/bin/src/mcp/telemetry.d.ts.map +0 -1
  245. package/bin/src/mcp/telemetry.js.map +0 -1
  246. package/bin/src/mcp/toolRouter.d.ts.map +0 -1
  247. package/bin/src/mcp/toolRouter.js.map +0 -1
  248. package/bin/src/mcp/transport.d.ts.map +0 -1
  249. package/bin/src/mcp/transport.js.map +0 -1
  250. package/bin/src/mcp/types.d.ts.map +0 -1
  251. package/bin/src/mcp/types.js.map +0 -1
  252. package/bin/src/server/server.d.ts.map +0 -1
  253. package/bin/src/server/server.js.map +0 -1
  254. package/bin/src/utils/admin.d.ts.map +0 -1
  255. package/bin/src/utils/admin.js.map +0 -1
  256. package/bin/src/utils/auditLogger.d.ts.map +0 -1
  257. package/bin/src/utils/auditLogger.js.map +0 -1
  258. package/bin/src/utils/auth.d.ts.map +0 -1
  259. package/bin/src/utils/auth.js.map +0 -1
  260. package/bin/src/utils/branding.d.ts.map +0 -1
  261. package/bin/src/utils/branding.js.map +0 -1
  262. package/bin/src/utils/claudeUI.d.ts.map +0 -1
  263. package/bin/src/utils/claudeUI.js.map +0 -1
  264. package/bin/src/utils/config.d.ts.map +0 -1
  265. package/bin/src/utils/config.js.map +0 -1
  266. package/bin/src/utils/email.d.ts.map +0 -1
  267. package/bin/src/utils/email.js.map +0 -1
  268. package/bin/src/utils/firebaseAuth.d.ts.map +0 -1
  269. package/bin/src/utils/firebaseAuth.js.map +0 -1
  270. package/bin/src/utils/holoseneAuth.d.ts.map +0 -1
  271. package/bin/src/utils/holoseneAuth.js.map +0 -1
  272. package/bin/src/utils/interruptHandler.d.ts.map +0 -1
  273. package/bin/src/utils/interruptHandler.js.map +0 -1
  274. package/bin/src/utils/language.d.ts.map +0 -1
  275. package/bin/src/utils/language.js.map +0 -1
  276. package/bin/src/utils/logger.d.ts.map +0 -1
  277. package/bin/src/utils/logger.js.map +0 -1
  278. package/bin/src/utils/markdown.d.ts.map +0 -1
  279. package/bin/src/utils/markdown.js.map +0 -1
  280. package/bin/src/utils/payment.d.ts.map +0 -1
  281. package/bin/src/utils/payment.js.map +0 -1
  282. package/bin/src/utils/pricing.d.ts.map +0 -1
  283. package/bin/src/utils/pricing.js.map +0 -1
  284. package/bin/src/utils/qrBridge.d.ts.map +0 -1
  285. package/bin/src/utils/qrBridge.js.map +0 -1
  286. package/bin/src/utils/razorpay.d.ts.map +0 -1
  287. package/bin/src/utils/razorpay.js.map +0 -1
  288. package/bin/src/utils/rules.d.ts.map +0 -1
  289. package/bin/src/utils/rules.js.map +0 -1
  290. package/bin/src/utils/session.d.ts.map +0 -1
  291. package/bin/src/utils/session.js.map +0 -1
  292. package/bin/src/utils/updateCheck.d.ts.map +0 -1
  293. package/bin/src/utils/updateCheck.js.map +0 -1
  294. package/downloads/invoice-2026-03.pdf +0 -1
  295. package/firebase.json +0 -74
  296. package/front-terrain-cli-1.0.0.tgz +0 -0
  297. package/web/ScoutFavicon.png +0 -0
  298. package/web/ScoutOGImage.png +0 -0
  299. package/web/app.js +0 -4510
  300. package/web/ft-logo.png +0 -0
  301. package/web/og-image.png +0 -0
  302. package/web/robots.txt +0 -24
  303. package/web/site.webmanifest +0 -16
  304. package/web/sitemap-tryscout.xml +0 -47
  305. package/web/sitemap.xml +0 -47
  306. package/web/styles.css +0 -3436
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # scout (FrontTerrain CLI v9.5.1)
1
+ # scout (FrontTerrain CLI v9.5.4)
2
2
 
3
3
  **FrontTerrain (`scout`)** The Autonomous AI Principal Software Engineer & Codebase Co-Pilot in your terminal.
4
4
 
@@ -11,14 +11,16 @@ Scout executes autonomous multi-step engineering loops, builds complete projects
11
11
  Install globally using npm:
12
12
 
13
13
  ```bash
14
- npm install -g scout@latest
14
+ npm install -g ft-scout@latest
15
+ # Or run instantly without installation:
16
+ npx -y ft-scout@latest
15
17
  ```
16
18
 
17
19
  ---
18
20
 
19
21
  ## Quick Start & Commands
20
22
 
21
- Once installed, use `scout` in any project directory:
23
+ Once installed, use `scout` or `ft-scout` in any project directory:
22
24
 
23
25
  ### Autonomous Computer-Use Operator & AI Agent Sessions
24
26
 
@@ -32,12 +34,8 @@ scout goal "Refactor database query logic" -y
32
34
  ### Interactive Scout Agent Session (Persistent operator loop with Slash Commands & full tool execution)
33
35
  scout agent
34
36
 
35
- # Optional voice interaction flags:
36
- scout agent -V # Launch with Audio Voice mode (Microphone STT)
37
- scout agent --voice
38
-
39
37
  # Inside session:
40
- # Slash commands: /help /checkpoint /rollback /checkpoints /hud /delegate /voice /speak /tree /stats /test /explain /export /diff /undo /clear /history /exit
38
+ # Slash commands: /help /checkpoint /rollback /checkpoints /hud /delegate /tree /stats /test /explain /export /diff /undo /clear /history /exit
41
39
 
42
40
  # Generate and create a new source code file
43
41
  scout agent --create src/utils/math.ts "Create helper functions for sum, average, and array chunking"
@@ -450,16 +448,14 @@ Scout is built for uninterrupted autonomy across multiple LLM providers:
450
448
 
451
449
  ---
452
450
 
453
- ## Conversational Voice Co-Pilot & Audio Engine
451
+ ## Intelligent Multi-Model Fallback & High-Resilience Engine
454
452
 
455
- When starting interactive sessions in `scout agent` (`-V` or `--voice`), `scout init` (ask mode), or `scout search`, Scout presents full two-way audio dialogue:
453
+ Scout features a multi-tiered, latency-optimized model failover pipeline tested against live endpoints:
456
454
 
457
- 1. **Native C# High-Performance Audio Capture**: Built-in standalone Win32 `waveIn` audio recording engine (`scout_audio_recorder.exe`) compiled directly via native Windows toolchain without requiring Python or external heavy runtime dependencies.
458
- 2. **Real-Time Voice Activity Detection (VAD)**: Intelligent RMS audio power monitoring with a 2.5-second silence debounce cutoff, allowing developers to speak natural multi-sentence thoughts without mid-sentence interruptions.
459
- 3. **Neural Whisper STT with Developer Vocabulary Hints**: High-accuracy speech-to-text powered by `whisper-1` with technical prompt biasing (e.g., *Scout, Chrome, Notepad, VS Code, TypeScript, Python*) to prevent mishearing developer commands.
460
- 4. **Whisper Neural Microphone Voice Input (STT)**:
461
- - High-accuracy in-terminal speech-to-text powered by `whisper-1` with automatic Voice Activity Detection (VAD) and technical vocabulary hints.
462
- 5. **Conversational Co-Pilot Persona**: Instant spoken acknowledgment (e.g., *"On it! Opening Chrome for you."*) and warm conversational completion summaries rather than dry robotic execution logs.
455
+ 1. **Ultra-Fast Primary Execution (`nvidia/nemotron-3.5-bolt-e4b`)**: Sub-second execution (~600–800ms) with zero reasoning bottleneck, ideal for instant code modifications and rapid tool invocations.
456
+ 2. **Deep Reasoning MoE Fallback (`nvidia/nemotron-3.5-lightning-30b-a3b` & `nvidia/nemotron-3-ultra-550b-a55b`)**: 30B MoE and 550B flagship reasoning engines for complex multi-file architectural tasks.
457
+ 3. **Bring Your Own Key (BYOK) Multi-Provider**: Seamlessly plug in Gemini (`gemini-2.5-flash`, `gemini-2.0-flash`) or OpenAI (`gpt-4o-mini`, `gpt-4o`) via `scout config --byok` or environment keys.
458
+ 4. **Autonomous Reasoning Fallback Extractor**: If a deep-reasoning model emits tokens under `reasoning_content` without terminal markdown formatting, Scout's internal LLM proxy automatically extracts and forwards the solution payload without failing the step.
463
459
 
464
460
  ---
465
461
 
@@ -473,8 +469,6 @@ Inside an active `scout agent` interactive session, type any slash command to tr
473
469
  - `/checkpoints` List all available time-machine checkpoints.
474
470
  - `/hud [on|off]` Toggle the Visual Operator HUD desktop aura overlay & click beacons.
475
471
  - `/delegate <role> <task>` Delegate a task to an autonomous specialist subagent swarm (`architect`, `coder`, `tester`, `reviewer`).
476
- - `/voice` Activate microphone Speech-to-Text (STT) listener to speak your prompt into CLI.
477
- - `/speak <text>` Display entered text feedback directly in terminal.
478
472
  - `/tree [dir]` Render an interactive visual directory tree of any workspace folder.
479
473
  - `/status` or `/stats` View real-time session telemetry (steps executed, tool call count, modified files, elapsed time, branch info).
480
474
  - `/test [cmd]` Auto-detect and run project verification test suite directly inside session context.
@@ -488,6 +482,30 @@ Inside an active `scout agent` interactive session, type any slash command to tr
488
482
 
489
483
  ---
490
484
 
485
+ ## 👥 Grok-Style Multi-Agent Personas & Team Swarm (@mentions)
486
+
487
+ Seamlessly collaborate with specialized autonomous subagent personas inside any interactive session or direct CLI goal using simple `@mentions`:
488
+
489
+ ```bash
490
+ # Direct specialist personas:
491
+ scout agent "@architect Design a modular caching layer with Redis and memory fallback"
492
+ scout agent "@coder Implement JWT verification middleware in src/auth.ts"
493
+ scout agent "@tester Write unit tests for payment webhook handling and verify edge cases"
494
+ scout agent "@reviewer Audit uncommitted git diff for security vulnerabilities"
495
+
496
+ # Collaborative Grok-Style Team Swarm Relay:
497
+ scout agent "@team Refactor user onboarding flow and verify with automated tests"
498
+ ```
499
+
500
+ Inside an active interactive `scout agent` session:
501
+ - `@architect <task>`: Decomposes systems, defines data models, schema, and API contracts.
502
+ - `@coder <task>`: Executes surgical code implementations, bug fixes, and refactoring.
503
+ - `@tester <task>`: Writes and executes test suites, diagnoses failures, and guards regressions.
504
+ - `@reviewer <task>`: Audits code quality, diffs, security boundaries, and anti-patterns.
505
+ - `@team <task>` or `@swarm <task>`: Launches a 3-stage collaborative relay (**Architect** blueprint ➔ **Coder** implementation ➔ **Tester** validation) concluded with a consolidated Claude Code-style team completion card.
506
+
507
+ ---
508
+
491
509
  ## ⚡ Supercharged Engineering Capabilities
492
510
 
493
511
  ### 1. 🎯 Live Visual Operator HUD
@@ -0,0 +1,41 @@
1
+ export interface ScannedIssue {
2
+ id: number;
3
+ title: string;
4
+ file: string;
5
+ severity: 'high' | 'medium' | 'low';
6
+ description: string;
7
+ }
8
+ export declare function saveScanReport(issues: ScannedIssue[]): void;
9
+ export declare function loadScanReport(): ScannedIssue[];
10
+ export interface AgentOptions {
11
+ goal?: string | undefined;
12
+ create?: string | undefined;
13
+ file?: string | undefined;
14
+ issue?: string | number | undefined;
15
+ run?: string | string[] | undefined;
16
+ scan?: boolean | undefined;
17
+ add?: string | undefined;
18
+ plan?: string | undefined;
19
+ verifyCmd?: string | undefined;
20
+ maxRetries?: number | undefined;
21
+ steps?: number | undefined;
22
+ maxSteps?: number | undefined;
23
+ lang?: string | undefined;
24
+ native?: boolean | undefined;
25
+ yes?: boolean | undefined;
26
+ voice?: boolean | undefined;
27
+ resume?: string | undefined;
28
+ }
29
+ export declare function extractCreateTargetFiles(rawGoal: string): string[];
30
+ export declare function extractCreateTargetFile(rawGoal: string): string | undefined;
31
+ export interface ParsedUserIntent {
32
+ cleanGoal: string;
33
+ intentType: 'question' | 'create' | 'modify' | 'scan' | 'plan' | 'run';
34
+ targetFile?: string | undefined;
35
+ targetFiles?: string[] | undefined;
36
+ }
37
+ export declare function parseUserPromptIntent(rawGoal: string, filesList: string[]): ParsedUserIntent;
38
+ export declare function findTargetFilesFromPrompt(userPrompt: string, specifiedFile: string | undefined, filesList: string[]): string[];
39
+ export declare function getAgentGoalInput(placeholderStr: string): Promise<string | symbol>;
40
+ export declare function handleAgent(goalInput?: string, options?: AgentOptions): Promise<void>;
41
+ //# sourceMappingURL=agent.d.ts.map
@@ -13,8 +13,9 @@ import { consumeCredit, checkTierAccess, loadAuthConfig, isProOrHigher } from '.
13
13
  import { handleUndo } from './undo.js';
14
14
  import { handleCheckpoint, handleRollback, handleListCheckpoints } from './checkpoint.js';
15
15
  import { OperatorHud } from '../engine/computer/operatorHud.js';
16
- import { SubagentManager } from '../engine/subagents/subagentManager.js';
16
+ import { SubagentManager, parseMentionedRole, isCrossAppIntent } from '../engine/subagents/subagentManager.js';
17
17
  import { AgentExecutionLoop, buildDirectoryTree, AGENT_TOOLS } from '../engine/agentEngine.js';
18
+ import { renderTeamSwarmCard, renderCrossAppSwarmCard } from '../utils/claudeUI.js';
18
19
  import { verifyAndSelfHealFiles, executeSmartCommand, runProjectVerification } from '../engine/verifier.js';
19
20
  import { speakText, listenSpeechToText, cleanTextForSpeech } from '../engine/voiceEngine.js';
20
21
  import { exec } from 'child_process';
@@ -518,29 +519,18 @@ ${chalk.cyan('/exit')} - Exit session
518
519
  - \`/undo\`: Revert last file modifications.
519
520
  - \`/history\`: View recent Scout action logs.
520
521
  - \`/plan\`: Generate implementation roadmap.
521
- - \`/voice\`: Speak goal into microphone (STT).
522
- - \`/speak <text>\`: Speak text out loud (TTS).
523
522
  - \`/exit\`: End Scout Agent session.
523
+
524
+ ### 👥 Multi-Agent Personas & Grok-Style @Mentions
525
+ - \`@architect <task>\`: System decomposition, modular design, schema & API contracts.
526
+ - \`@coder <task>\`: Surgical implementation, bug fixing, refactoring, and feature builds.
527
+ - \`@tester <task>\`: Test engineering, writing tests, diagnosing failures, regression checks.
528
+ - \`@reviewer <task>\`: Code review, security audits, diff inspection, and anti-patterns.
529
+ - \`@team <task>\` or \`@swarm <task>\`: Coordinated multi-agent relay (Architect ➔ Coder ➔ Tester).
524
530
  `.trim();
525
531
  safeNote(renderMarkdown(helpText), ' Scout Slash Commands & Tools');
526
532
  continue;
527
533
  }
528
- if (trimmedInput.toLowerCase().startsWith('/speak')) {
529
- safeNote(chalk.yellow('TTS audio speech synthesis has been removed from Scout. Text output is displayed directly in the terminal.'), ' Scout Voice TTS');
530
- continue;
531
- }
532
- if (trimmedInput.toLowerCase() === '/voice') {
533
- safeNote(chalk.cyan(' Listening to your microphone via browser Web Speech API... Speak your goal clearly!'), ' Scout Voice STT');
534
- const transcript = await listenSpeechToText();
535
- if (transcript && transcript.trim()) {
536
- safeNote(` Voice Received: "${chalk.bold.green(transcript.trim())}"`, ' Scout STT Transcript');
537
- trimmedInput = transcript.trim();
538
- }
539
- else {
540
- safeNote(chalk.yellow('No speech transcript detected or listener timed out.'), ' Scout Voice STT');
541
- continue;
542
- }
543
- }
544
534
  if (trimmedInput.toLowerCase() === '/tasks') {
545
535
  const tasks = agentLoop.getStateManager().listSavedTasks();
546
536
  if (tasks.length === 0) {
@@ -798,6 +788,85 @@ ${history.slice(0, 15).map(h => `- [${h.timestamp}] ${h.command}: ${h.descriptio
798
788
  `\n*Steps Used: ${res.stepsUsed}*`, res.success ? ' Subagent Swarm Completed' : '️ Subagent Error');
799
789
  continue;
800
790
  }
791
+ // Grok & Strawberry-style @mentions parser (@architect, @coder, @tester, @reviewer, @operator, @researcher, @crossapp, @team)
792
+ const mention = parseMentionedRole(trimmedInput);
793
+ if (mention.isMention && mention.role) {
794
+ const subagentMgr = SubagentManager.getInstance();
795
+ if (mention.role === 'team') {
796
+ if (!mention.task) {
797
+ safeNote(chalk.yellow('Usage: @team <complex task description to execute in swarm relay>'), ' Team Swarm');
798
+ continue;
799
+ }
800
+ const startTime = Date.now();
801
+ const swarmRes = await subagentMgr.runTeamSwarm(mention.task, { tier: userTier });
802
+ const elapsed = Date.now() - startTime;
803
+ renderTeamSwarmCard({
804
+ objective: mention.task,
805
+ architectSummary: swarmRes.architectOutput,
806
+ coderSummary: swarmRes.coderOutput,
807
+ testerSummary: swarmRes.testerOutput,
808
+ modifiedFiles: swarmRes.modifiedFiles,
809
+ totalSteps: swarmRes.totalStepsUsed,
810
+ durationMs: elapsed,
811
+ tier: userTier,
812
+ });
813
+ continue;
814
+ }
815
+ else if (mention.role === 'crossapp') {
816
+ if (!mention.task) {
817
+ safeNote(chalk.yellow('Usage: @crossapp <cross-app task, e.g. from Chrome to VS Code>'), ' Cross-App Swarm');
818
+ continue;
819
+ }
820
+ const startTime = Date.now();
821
+ const crossRes = await subagentMgr.runCrossAppSwarm(mention.task, { tier: userTier });
822
+ const elapsed = Date.now() - startTime;
823
+ renderCrossAppSwarmCard({
824
+ objective: mention.task,
825
+ sourceApp: crossRes.sourceApp,
826
+ targetApp: crossRes.targetApp,
827
+ researcherSummary: crossRes.researcherOutput,
828
+ operatorSummary: crossRes.operatorOutput,
829
+ verifierSummary: crossRes.verifierOutput,
830
+ modifiedFiles: crossRes.modifiedFiles,
831
+ totalSteps: crossRes.totalStepsUsed,
832
+ durationMs: elapsed,
833
+ tier: userTier,
834
+ });
835
+ continue;
836
+ }
837
+ else {
838
+ if (!mention.task) {
839
+ safeNote(chalk.yellow(`Usage: @${mention.role} <task description>`), ` Specialist @${mention.role}`);
840
+ continue;
841
+ }
842
+ const res = await subagentMgr.delegate({ role: mention.role, task: mention.task, tier: userTier });
843
+ safeNote(`### Specialist [@${res.role.toUpperCase()}] Result\n${res.summary}\n\n` +
844
+ (res.modifiedFiles.length > 0 ? `### Modified Files\n${res.modifiedFiles.map(f => ` • \`${f}\``).join('\n')}\n` : '') +
845
+ `\n*Steps Used: ${res.stepsUsed}*`, res.success ? ` Specialist [@${res.role.toUpperCase()}] Completed` : '️ Subagent Error');
846
+ continue;
847
+ }
848
+ }
849
+ // Auto-detect natural cross-app goals in interactive session
850
+ if (!mention.isMention && isCrossAppIntent(trimmedInput)) {
851
+ console.log(chalk.cyan.bold('\n🌐 [Auto-Detected Cross-App Workflow]: Launching Strawberry-style Multi-Agent Relay across apps...'));
852
+ const subagentMgr = SubagentManager.getInstance();
853
+ const startTime = Date.now();
854
+ const crossRes = await subagentMgr.runCrossAppSwarm(trimmedInput, { tier: userTier });
855
+ const elapsed = Date.now() - startTime;
856
+ renderCrossAppSwarmCard({
857
+ objective: trimmedInput,
858
+ sourceApp: crossRes.sourceApp,
859
+ targetApp: crossRes.targetApp,
860
+ researcherSummary: crossRes.researcherOutput,
861
+ operatorSummary: crossRes.operatorOutput,
862
+ verifierSummary: crossRes.verifierOutput,
863
+ modifiedFiles: crossRes.modifiedFiles,
864
+ totalSteps: crossRes.totalStepsUsed,
865
+ durationMs: elapsed,
866
+ tier: userTier,
867
+ });
868
+ continue;
869
+ }
801
870
  rawGoal = trimmedInput;
802
871
  }
803
872
  if (!rawGoal || !rawGoal.trim()) {
@@ -1126,6 +1195,73 @@ ${filePreviews}
1126
1195
  }
1127
1196
  }
1128
1197
  }
1198
+ // Grok & Strawberry-style @mentions direct execution from CLI argument
1199
+ const directMention = parseMentionedRole(finalGoal);
1200
+ if (directMention.isMention && directMention.role) {
1201
+ const subagentMgr = SubagentManager.getInstance();
1202
+ if (directMention.role === 'team') {
1203
+ const startTime = Date.now();
1204
+ const swarmRes = await subagentMgr.runTeamSwarm(directMention.task, { tier: userTier });
1205
+ const elapsed = Date.now() - startTime;
1206
+ renderTeamSwarmCard({
1207
+ objective: directMention.task,
1208
+ architectSummary: swarmRes.architectOutput,
1209
+ coderSummary: swarmRes.coderOutput,
1210
+ testerSummary: swarmRes.testerOutput,
1211
+ modifiedFiles: swarmRes.modifiedFiles,
1212
+ totalSteps: swarmRes.totalStepsUsed,
1213
+ durationMs: elapsed,
1214
+ tier: userTier,
1215
+ });
1216
+ return;
1217
+ }
1218
+ else if (directMention.role === 'crossapp') {
1219
+ const startTime = Date.now();
1220
+ const crossRes = await subagentMgr.runCrossAppSwarm(directMention.task, { tier: userTier });
1221
+ const elapsed = Date.now() - startTime;
1222
+ renderCrossAppSwarmCard({
1223
+ objective: directMention.task,
1224
+ sourceApp: crossRes.sourceApp,
1225
+ targetApp: crossRes.targetApp,
1226
+ researcherSummary: crossRes.researcherOutput,
1227
+ operatorSummary: crossRes.operatorOutput,
1228
+ verifierSummary: crossRes.verifierOutput,
1229
+ modifiedFiles: crossRes.modifiedFiles,
1230
+ totalSteps: crossRes.totalStepsUsed,
1231
+ durationMs: elapsed,
1232
+ tier: userTier,
1233
+ });
1234
+ return;
1235
+ }
1236
+ else {
1237
+ const res = await subagentMgr.delegate({ role: directMention.role, task: directMention.task, tier: userTier });
1238
+ safeNote(`### Specialist [@${res.role.toUpperCase()}] Result\n${res.summary}\n\n` +
1239
+ (res.modifiedFiles.length > 0 ? `### Modified Files\n${res.modifiedFiles.map(f => ` • \`${f}\``).join('\n')}\n` : '') +
1240
+ `\n*Steps Used: ${res.stepsUsed}*`, res.success ? ` Specialist [@${res.role.toUpperCase()}] Completed` : '️ Subagent Error');
1241
+ return;
1242
+ }
1243
+ }
1244
+ // Auto-detect natural cross-app goals in CLI argument
1245
+ if (!directMention.isMention && isCrossAppIntent(finalGoal)) {
1246
+ console.log(chalk.cyan.bold('\n🌐 [Auto-Detected Cross-App Workflow]: Launching Strawberry-style Multi-Agent Relay across apps...'));
1247
+ const subagentMgr = SubagentManager.getInstance();
1248
+ const startTime = Date.now();
1249
+ const crossRes = await subagentMgr.runCrossAppSwarm(finalGoal, { tier: userTier });
1250
+ const elapsed = Date.now() - startTime;
1251
+ renderCrossAppSwarmCard({
1252
+ objective: finalGoal,
1253
+ sourceApp: crossRes.sourceApp,
1254
+ targetApp: crossRes.targetApp,
1255
+ researcherSummary: crossRes.researcherOutput,
1256
+ operatorSummary: crossRes.operatorOutput,
1257
+ verifierSummary: crossRes.verifierOutput,
1258
+ modifiedFiles: crossRes.modifiedFiles,
1259
+ totalSteps: crossRes.totalStepsUsed,
1260
+ durationMs: elapsed,
1261
+ tier: userTier,
1262
+ });
1263
+ return;
1264
+ }
1129
1265
  // Standard Agent Goal Execution: Pre-scan & identify target files ONLY if goal is a code modification task
1130
1266
  const hasModificationIntent = /\b(fix|edit|modify|update|refactor|patch|change|debug|error|bug|issue|solve|repair)\b/i.test(finalGoal) &&
1131
1267
  !/\b(lookup|look\s*up|who|what|why|where|how|explain|describe|tell|status|check|github|mcp|open|launch)\b/i.test(finalGoal);
@@ -0,0 +1,2 @@
1
+ export declare function handleAudit(): Promise<void>;
2
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function handleAuthStatus(): Promise<void>;
2
+ //# sourceMappingURL=authCommand.d.ts.map
@@ -0,0 +1,20 @@
1
+ export interface BenchmarkTarget {
2
+ id: string;
3
+ label: string;
4
+ provider: 'NVIDIA' | 'Google' | 'OpenAI' | 'BYOK';
5
+ apiKeyEnv: string;
6
+ }
7
+ export declare const BENCHMARK_MODELS: BenchmarkTarget[];
8
+ export interface BenchmarkResult {
9
+ model: string;
10
+ label: string;
11
+ provider: string;
12
+ configured: boolean;
13
+ latencyMs: number;
14
+ tokens: number;
15
+ tokensPerSec: number;
16
+ status: '200_OK' | 'skipped_no_key' | 'error';
17
+ error?: string;
18
+ }
19
+ export declare function handleBenchmark(): Promise<BenchmarkResult[]>;
20
+ //# sourceMappingURL=benchmark.d.ts.map
@@ -2,129 +2,152 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import chalk from 'chalk';
4
4
  import { spinner } from '@clack/prompts';
5
+ import { getClientForModel } from '../engine/llm.js';
5
6
  import { loadAuthConfig } from '../utils/auth.js';
6
- import { loadContext } from '../utils/config.js';
7
- import OpenAI from 'openai';
8
7
  const FT_DIR = path.join(process.cwd(), '.ft', 'scout');
9
8
  const BENCHMARK_DIR = path.join(FT_DIR);
10
9
  const BENCHMARK_FILE = path.join(BENCHMARK_DIR, 'benchmark.json');
11
- const MODELS = [
12
- { name: 'Nemotron', pattern: /^nvidia\//, apiKeyEnv: 'NVIDIA_API_KEY' },
13
- { name: 'Gemini', pattern: /^gemini-/, apiKeyEnv: 'GEMINI_API_KEY' },
14
- { name: 'GPT-4', pattern: /^gpt-4/, apiKeyEnv: 'OPENAI_API_KEY' },
15
- { name: 'GPT-3.5', pattern: /^gpt-3\.5/, apiKeyEnv: 'OPENAI_API_KEY' },
10
+ export const BENCHMARK_MODELS = [
11
+ { id: 'nvidia/nemotron-3.5-bolt-e4b', label: 'Nemotron 3.5 Bolt (Primary)', provider: 'NVIDIA', apiKeyEnv: 'NVIDIA_API_KEY' },
12
+ { id: 'nvidia/nemotron-3.5-lightning-30b-a3b', label: 'Nemotron 3.5 Lightning 30B', provider: 'NVIDIA', apiKeyEnv: 'NVIDIA_API_KEY' },
13
+ { id: 'nvidia/nemotron-3-ultra-550b-a55b', label: 'Nemotron 3 Ultra 550B', provider: 'NVIDIA', apiKeyEnv: 'NVIDIA_API_KEY' },
14
+ { id: 'gemini-2.5-flash', label: 'Gemini 2.5 Flash', provider: 'Google', apiKeyEnv: 'GEMINI_API_KEY' },
15
+ { id: 'gpt-4o-mini', label: 'GPT-4o Mini', provider: 'OpenAI', apiKeyEnv: 'OPENAI_API_KEY' },
16
16
  ];
17
- async function getModelInfo(modelName) {
18
- const modelLower = modelName.toLowerCase();
19
- // Check NVIDIA/Nemotron
20
- if (modelLower.startsWith('nvidia/') || modelLower.includes('nemotron') || modelLower.startsWith('deepseek-ai/')) {
21
- return { name: 'Nemotron', apiKey: process.env.NVIDIA_API_KEY || process.env.NVCF_API_KEY };
22
- }
23
- // Check Gemini
24
- if (modelLower.startsWith('gemini-')) {
25
- return { name: 'Gemini', apiKey: process.env.GEMINI_API_KEY };
26
- }
27
- // Check GPT
28
- if (modelLower.startsWith('gpt-') || modelLower.startsWith('openai/')) {
29
- return { name: 'GPT', apiKey: process.env.OPENAI_API_KEY };
30
- }
31
- return { name: modelName, apiKey: undefined };
32
- }
33
- async function measureLatency(modelName, apiKey) {
34
- if (!apiKey) {
35
- return { tokens: 0, latencyMs: 0 };
17
+ async function measureModelPerformance(target) {
18
+ const auth = loadAuthConfig();
19
+ const hasKey = Boolean(process.env[target.apiKeyEnv] ||
20
+ process.env.NVCF_API_KEY ||
21
+ (auth.byokEnabled && auth.customApiKey));
22
+ if (!hasKey) {
23
+ return {
24
+ model: target.id,
25
+ label: target.label,
26
+ provider: target.provider,
27
+ configured: false,
28
+ latencyMs: 0,
29
+ tokens: 0,
30
+ tokensPerSec: 0,
31
+ status: 'skipped_no_key',
32
+ };
36
33
  }
37
34
  const startTime = Date.now();
38
35
  try {
39
- const client = new OpenAI({ apiKey, baseURL: undefined });
40
- // Send a minimal completion request to measure latency
36
+ const client = getClientForModel(target.id);
41
37
  const completion = await client.chat.completions.create({
42
- model: modelName,
43
- messages: [{ role: 'user', content: 'Benchmark test' }],
44
- max_tokens: 1,
45
- temperature: 0,
38
+ model: target.id,
39
+ messages: [{ role: 'user', content: 'Explain recursion in one concise sentence.' }],
40
+ max_tokens: 35,
41
+ temperature: 0.2,
46
42
  });
47
43
  const latencyMs = Date.now() - startTime;
48
- // Estimate tokens from the response
49
- const tokens = completion.usage?.completion_tokens || 1;
50
- return { tokens, latencyMs };
44
+ const msg = completion.choices?.[0]?.message;
45
+ const content = msg?.content || msg?.reasoning_content || '';
46
+ const tokens = completion.usage?.completion_tokens || Math.max(1, Math.round(content.split(/\s+/).length * 1.3));
47
+ const tokensPerSec = latencyMs > 0 ? Math.round(tokens / (latencyMs / 1000)) : 0;
48
+ return {
49
+ model: target.id,
50
+ label: target.label,
51
+ provider: target.provider,
52
+ configured: true,
53
+ latencyMs,
54
+ tokens,
55
+ tokensPerSec,
56
+ status: '200_OK',
57
+ };
51
58
  }
52
- catch (error) {
53
- console.error(`Error measuring ${modelName}:`, error.message);
54
- return { tokens: 0, latencyMs: 0 };
59
+ catch (err) {
60
+ const latencyMs = Date.now() - startTime;
61
+ return {
62
+ model: target.id,
63
+ label: target.label,
64
+ provider: target.provider,
65
+ configured: true,
66
+ latencyMs,
67
+ tokens: 0,
68
+ tokensPerSec: 0,
69
+ status: 'error',
70
+ error: err.message?.slice(0, 80) || 'Unknown error',
71
+ };
55
72
  }
56
73
  }
57
74
  export async function handleBenchmark() {
58
- const context = loadContext();
59
- const authConfig = loadAuthConfig();
60
- // Ensure .ft/scout directory exists
61
75
  if (!fs.existsSync(BENCHMARK_DIR)) {
62
76
  fs.mkdirSync(BENCHMARK_DIR, { recursive: true });
63
77
  }
64
- const benchmarkSpinner = spinner();
65
- benchmarkSpinner.start('Running LLM benchmark across all configured models...');
78
+ console.log(chalk.bold.cyan('\n╔════════════════════════════════════════════════════════════════════╗'));
79
+ console.log(chalk.bold.cyan('║ ⚡ FRONTTERRAIN SCOUT: LLM PERFORMANCE BENCHMARK ║'));
80
+ console.log(chalk.bold.cyan('╚════════════════════════════════════════════════════════════════════╝\n'));
81
+ const bSpinner = spinner();
82
+ bSpinner.start('Benchmarking latency and token throughput across model hierarchy...');
66
83
  const results = [];
67
- // Benchmark each model
68
- for (const modelInfo of MODELS) {
69
- const apiKey = modelInfo.apiKeyEnv ? process.env[modelInfo.apiKeyEnv] : undefined;
70
- if (!apiKey) {
71
- results.push({
72
- model: modelInfo.name,
73
- apiKeyConfigured: false,
74
- tokens: 0,
75
- latencyMs: 0,
76
- tokensPerSec: 0,
77
- status: 'skipped_no_key',
78
- });
79
- continue;
84
+ for (const target of BENCHMARK_MODELS) {
85
+ bSpinner.message(`Pinging ${target.label} [${target.provider}]...`);
86
+ const res = await measureModelPerformance(target);
87
+ results.push(res);
88
+ }
89
+ bSpinner.stop('Benchmark measurements completed.');
90
+ // Render Claude Code-style Rich Table
91
+ console.log();
92
+ const width = 84;
93
+ console.log(chalk.cyan('╭' + '─'.repeat(width) + '╮'));
94
+ console.log(`${chalk.cyan('│')} ${chalk.bold.white('MODEL / PROVIDER'.padEnd(32))} ` +
95
+ `${chalk.bold.cyan('LATENCY'.padEnd(12))} ` +
96
+ `${chalk.bold.yellow('SPEED'.padEnd(14))} ` +
97
+ `${chalk.bold.green('STATUS'.padEnd(18))} ${chalk.cyan('│')}`);
98
+ console.log(chalk.cyan('├' + '─'.repeat(width) + '┤'));
99
+ for (const r of results) {
100
+ const nameCol = chalk.bold(r.label.slice(0, 31).padEnd(32));
101
+ const latencyCol = r.status === '200_OK'
102
+ ? chalk.cyan(`${r.latencyMs}ms`.padEnd(12))
103
+ : chalk.dim('—'.padEnd(12));
104
+ const speedCol = r.status === '200_OK'
105
+ ? chalk.yellow(`${r.tokensPerSec} tok/s`.padEnd(14))
106
+ : chalk.dim('—'.padEnd(14));
107
+ let statusCol = '';
108
+ if (r.status === '200_OK') {
109
+ statusCol = chalk.bold.green('✔ 200 OK'.padEnd(18));
80
110
  }
81
- const model = await getModelInfo(modelInfo.name);
82
- const { tokens, latencyMs } = await measureLatency(model.name, apiKey);
83
- const tokensPerSec = latencyMs > 0 ? Math.round(tokens / (latencyMs / 1000)) : 0;
84
- results.push({
85
- model: model.name,
86
- apiKeyConfigured: true,
87
- tokens,
88
- latencyMs,
89
- tokensPerSec,
90
- status: 'completed',
91
- });
111
+ else if (r.status === 'skipped_no_key') {
112
+ statusCol = chalk.dim('○ No API Key'.padEnd(18));
113
+ }
114
+ else {
115
+ statusCol = chalk.bold.red('✖ Quota/Error'.padEnd(18));
116
+ }
117
+ console.log(`${chalk.cyan('│')} ${nameCol} ${latencyCol} ${speedCol} ${statusCol} ${chalk.cyan('│')}`);
92
118
  }
93
- // Calculate averages
94
- const validResults = results.filter(r => r.tokensPerSec > 0);
95
- const avgTokensPerSec = validResults.length > 0
96
- ? Math.round(validResults.reduce((sum, r) => sum + r.tokensPerSec, 0) / validResults.length)
119
+ console.log(chalk.cyan('├' + '─'.repeat(width) + '┤'));
120
+ const activeModels = results.filter(r => r.status === '200_OK');
121
+ const avgLatency = activeModels.length > 0
122
+ ? Math.round(activeModels.reduce((acc, r) => acc + r.latencyMs, 0) / activeModels.length)
123
+ : 0;
124
+ const avgSpeed = activeModels.length > 0
125
+ ? Math.round(activeModels.reduce((acc, r) => acc + r.tokensPerSec, 0) / activeModels.length)
97
126
  : 0;
98
- // Create formatted table
99
- const tableLines = [
100
- chalk.bold.cyan('=== LLM Benchmark Results ==='),
101
- '',
102
- ...results.map(r => {
103
- const statusColor = r.status === 'completed' ? chalk.green : chalk.yellow;
104
- return [
105
- `Model: ${r.model}`,
106
- `Tokens: ${r.tokens}`,
107
- `Latency: ${r.latencyMs}ms`,
108
- `Tokens/sec: ${r.tokensPerSec}`,
109
- `Status: ${statusColor(r.status)}`,
110
- '',
111
- ].join(' | ');
112
- }),
113
- '',
114
- chalk.bold.green(`Average Tokens/sec: ${avgTokensPerSec}`),
115
- '',
116
- ];
117
- benchmarkSpinner.stop('Benchmark complete.');
118
- // Output formatted table to terminal
119
- console.log(tableLines.join('\n'));
127
+ const bestModel = [...activeModels].sort((a, b) => a.latencyMs - b.latencyMs)[0];
128
+ const summaryLine = `⚡ Active: ${chalk.green(activeModels.length + '/' + results.length)} • ` +
129
+ `Avg Latency: ${chalk.cyan(avgLatency + 'ms')} • ` +
130
+ `Avg Speed: ${chalk.yellow(avgSpeed + ' tok/s')} • ` +
131
+ `Fastest: ${chalk.bold.green(bestModel ? bestModel.label.split(' ')[0] : 'N/A')}`;
132
+ const stripAnsi = (str) => str.replace(/\u001B\[\d+m/g, '');
133
+ const visibleLen = stripAnsi(summaryLine).length;
134
+ const padSpaces = Math.max(0, width - 4 - visibleLen);
135
+ console.log(`${chalk.cyan('│')} ${summaryLine}${' '.repeat(padSpaces)} ${chalk.cyan('│')}`);
136
+ console.log(chalk.cyan('╰' + '─'.repeat(width) + '╯'));
137
+ console.log();
120
138
  // Save JSON benchmark results
121
139
  const benchmarkData = {
122
140
  timestamp: new Date().toISOString(),
123
141
  models: results,
124
- averageTokensPerSec: avgTokensPerSec,
142
+ summary: {
143
+ activeCount: activeModels.length,
144
+ averageLatencyMs: avgLatency,
145
+ averageTokensPerSec: avgSpeed,
146
+ fastestModel: bestModel?.model || null,
147
+ },
125
148
  };
126
- const benchmarkJson = JSON.stringify(benchmarkData, null, 2);
127
- fs.writeFileSync(BENCHMARK_FILE, benchmarkJson, 'utf-8');
128
- console.log(`\nBenchmark data saved to: ${chalk.cyan(BENCHMARK_FILE)}`);
149
+ fs.writeFileSync(BENCHMARK_FILE, JSON.stringify(benchmarkData, null, 2), 'utf-8');
150
+ console.log(chalk.dim(`Telemetry benchmark saved to ${BENCHMARK_FILE}`));
151
+ return results;
129
152
  }
130
153
  //# sourceMappingURL=benchmark.js.map
@@ -0,0 +1,4 @@
1
+ export declare function handleBrief(options?: {
2
+ export?: boolean | string;
3
+ }): Promise<void>;
4
+ //# sourceMappingURL=brief.d.ts.map