erosolar-cli 1.7.339 → 1.7.341

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 (323) hide show
  1. package/README.md +148 -24
  2. package/dist/alpha-zero/agentWrapper.d.ts +84 -0
  3. package/dist/alpha-zero/agentWrapper.d.ts.map +1 -0
  4. package/dist/alpha-zero/agentWrapper.js +171 -0
  5. package/dist/alpha-zero/agentWrapper.js.map +1 -0
  6. package/dist/alpha-zero/codeEvaluator.d.ts +25 -0
  7. package/dist/alpha-zero/codeEvaluator.d.ts.map +1 -0
  8. package/dist/alpha-zero/codeEvaluator.js +273 -0
  9. package/dist/alpha-zero/codeEvaluator.js.map +1 -0
  10. package/dist/alpha-zero/competitiveRunner.d.ts +66 -0
  11. package/dist/alpha-zero/competitiveRunner.d.ts.map +1 -0
  12. package/dist/alpha-zero/competitiveRunner.js +224 -0
  13. package/dist/alpha-zero/competitiveRunner.js.map +1 -0
  14. package/dist/alpha-zero/index.d.ts +67 -0
  15. package/dist/alpha-zero/index.d.ts.map +1 -0
  16. package/dist/alpha-zero/index.js +99 -0
  17. package/dist/alpha-zero/index.js.map +1 -0
  18. package/dist/alpha-zero/introspection.d.ts +128 -0
  19. package/dist/alpha-zero/introspection.d.ts.map +1 -0
  20. package/dist/alpha-zero/introspection.js +300 -0
  21. package/dist/alpha-zero/introspection.js.map +1 -0
  22. package/dist/alpha-zero/metricsTracker.d.ts +71 -0
  23. package/dist/alpha-zero/metricsTracker.d.ts.map +1 -0
  24. package/dist/{core → alpha-zero}/metricsTracker.js +5 -2
  25. package/dist/alpha-zero/metricsTracker.js.map +1 -0
  26. package/dist/alpha-zero/security/core.d.ts +125 -0
  27. package/dist/alpha-zero/security/core.d.ts.map +1 -0
  28. package/dist/alpha-zero/security/core.js +271 -0
  29. package/dist/alpha-zero/security/core.js.map +1 -0
  30. package/dist/alpha-zero/security/google.d.ts +125 -0
  31. package/dist/alpha-zero/security/google.d.ts.map +1 -0
  32. package/dist/alpha-zero/security/google.js +311 -0
  33. package/dist/alpha-zero/security/google.js.map +1 -0
  34. package/dist/alpha-zero/security/googleLoader.d.ts +17 -0
  35. package/dist/alpha-zero/security/googleLoader.d.ts.map +1 -0
  36. package/dist/alpha-zero/security/googleLoader.js +41 -0
  37. package/dist/alpha-zero/security/googleLoader.js.map +1 -0
  38. package/dist/alpha-zero/security/index.d.ts +29 -0
  39. package/dist/alpha-zero/security/index.d.ts.map +1 -0
  40. package/dist/alpha-zero/security/index.js +32 -0
  41. package/dist/alpha-zero/security/index.js.map +1 -0
  42. package/dist/alpha-zero/security/simulation.d.ts +124 -0
  43. package/dist/alpha-zero/security/simulation.d.ts.map +1 -0
  44. package/dist/alpha-zero/security/simulation.js +277 -0
  45. package/dist/alpha-zero/security/simulation.js.map +1 -0
  46. package/dist/alpha-zero/selfModification.d.ts +109 -0
  47. package/dist/alpha-zero/selfModification.d.ts.map +1 -0
  48. package/dist/alpha-zero/selfModification.js +233 -0
  49. package/dist/alpha-zero/selfModification.js.map +1 -0
  50. package/dist/alpha-zero/types.d.ts +170 -0
  51. package/dist/alpha-zero/types.d.ts.map +1 -0
  52. package/dist/alpha-zero/types.js +31 -0
  53. package/dist/alpha-zero/types.js.map +1 -0
  54. package/dist/bin/erosolar.js +21 -5
  55. package/dist/bin/erosolar.js.map +1 -1
  56. package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -1
  57. package/dist/capabilities/agentSpawningCapability.js +31 -56
  58. package/dist/capabilities/agentSpawningCapability.js.map +1 -1
  59. package/dist/capabilities/securityTestingCapability.d.ts +13 -0
  60. package/dist/capabilities/securityTestingCapability.d.ts.map +1 -0
  61. package/dist/capabilities/securityTestingCapability.js +25 -0
  62. package/dist/capabilities/securityTestingCapability.js.map +1 -0
  63. package/dist/contracts/agent-schemas.json +15 -0
  64. package/dist/contracts/tools.schema.json +9 -0
  65. package/dist/core/agent.d.ts +2 -2
  66. package/dist/core/agent.d.ts.map +1 -1
  67. package/dist/core/agent.js.map +1 -1
  68. package/dist/core/aiFlowOptimizer.d.ts +26 -0
  69. package/dist/core/aiFlowOptimizer.d.ts.map +1 -0
  70. package/dist/core/aiFlowOptimizer.js +31 -0
  71. package/dist/core/aiFlowOptimizer.js.map +1 -0
  72. package/dist/core/aiOptimizationEngine.d.ts +158 -0
  73. package/dist/core/aiOptimizationEngine.d.ts.map +1 -0
  74. package/dist/core/aiOptimizationEngine.js +428 -0
  75. package/dist/core/aiOptimizationEngine.js.map +1 -0
  76. package/dist/core/aiOptimizationIntegration.d.ts +93 -0
  77. package/dist/core/aiOptimizationIntegration.d.ts.map +1 -0
  78. package/dist/core/aiOptimizationIntegration.js +250 -0
  79. package/dist/core/aiOptimizationIntegration.js.map +1 -0
  80. package/dist/core/customCommands.d.ts +0 -1
  81. package/dist/core/customCommands.d.ts.map +1 -1
  82. package/dist/core/customCommands.js +0 -3
  83. package/dist/core/customCommands.js.map +1 -1
  84. package/dist/core/enhancedErrorRecovery.d.ts +100 -0
  85. package/dist/core/enhancedErrorRecovery.d.ts.map +1 -0
  86. package/dist/core/enhancedErrorRecovery.js +345 -0
  87. package/dist/core/enhancedErrorRecovery.js.map +1 -0
  88. package/dist/core/hooksSystem.d.ts +65 -0
  89. package/dist/core/hooksSystem.d.ts.map +1 -0
  90. package/dist/core/hooksSystem.js +273 -0
  91. package/dist/core/hooksSystem.js.map +1 -0
  92. package/dist/core/memorySystem.d.ts +48 -0
  93. package/dist/core/memorySystem.d.ts.map +1 -0
  94. package/dist/core/memorySystem.js +271 -0
  95. package/dist/core/memorySystem.js.map +1 -0
  96. package/dist/core/toolPreconditions.d.ts.map +1 -1
  97. package/dist/core/toolPreconditions.js +14 -0
  98. package/dist/core/toolPreconditions.js.map +1 -1
  99. package/dist/core/toolRuntime.d.ts +1 -22
  100. package/dist/core/toolRuntime.d.ts.map +1 -1
  101. package/dist/core/toolRuntime.js +5 -0
  102. package/dist/core/toolRuntime.js.map +1 -1
  103. package/dist/core/toolValidation.d.ts.map +1 -1
  104. package/dist/core/toolValidation.js +3 -14
  105. package/dist/core/toolValidation.js.map +1 -1
  106. package/dist/core/unified/errors.d.ts +189 -0
  107. package/dist/core/unified/errors.d.ts.map +1 -0
  108. package/dist/core/unified/errors.js +497 -0
  109. package/dist/core/unified/errors.js.map +1 -0
  110. package/dist/core/unified/index.d.ts +19 -0
  111. package/dist/core/unified/index.d.ts.map +1 -0
  112. package/dist/core/unified/index.js +68 -0
  113. package/dist/core/unified/index.js.map +1 -0
  114. package/dist/core/unified/schema.d.ts +101 -0
  115. package/dist/core/unified/schema.d.ts.map +1 -0
  116. package/dist/core/unified/schema.js +350 -0
  117. package/dist/core/unified/schema.js.map +1 -0
  118. package/dist/core/unified/toolRuntime.d.ts +179 -0
  119. package/dist/core/unified/toolRuntime.d.ts.map +1 -0
  120. package/dist/core/unified/toolRuntime.js +517 -0
  121. package/dist/core/unified/toolRuntime.js.map +1 -0
  122. package/dist/core/unified/tools.d.ts +127 -0
  123. package/dist/core/unified/tools.d.ts.map +1 -0
  124. package/dist/core/unified/tools.js +1333 -0
  125. package/dist/core/unified/tools.js.map +1 -0
  126. package/dist/core/unified/types.d.ts +352 -0
  127. package/dist/core/unified/types.d.ts.map +1 -0
  128. package/dist/core/unified/types.js +12 -0
  129. package/dist/core/unified/types.js.map +1 -0
  130. package/dist/core/unified/version.d.ts +209 -0
  131. package/dist/core/unified/version.d.ts.map +1 -0
  132. package/dist/core/unified/version.js +454 -0
  133. package/dist/core/unified/version.js.map +1 -0
  134. package/dist/core/validationRunner.d.ts +3 -1
  135. package/dist/core/validationRunner.d.ts.map +1 -1
  136. package/dist/core/validationRunner.js.map +1 -1
  137. package/dist/headless/headlessApp.d.ts.map +1 -1
  138. package/dist/headless/headlessApp.js +0 -21
  139. package/dist/headless/headlessApp.js.map +1 -1
  140. package/dist/mcp/sseClient.d.ts.map +1 -1
  141. package/dist/mcp/sseClient.js +18 -9
  142. package/dist/mcp/sseClient.js.map +1 -1
  143. package/dist/plugins/tools/build/buildPlugin.d.ts +6 -0
  144. package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
  145. package/dist/plugins/tools/build/buildPlugin.js +10 -4
  146. package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
  147. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  148. package/dist/plugins/tools/nodeDefaults.js +2 -0
  149. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  150. package/dist/plugins/tools/security/securityPlugin.d.ts +3 -0
  151. package/dist/plugins/tools/security/securityPlugin.d.ts.map +1 -0
  152. package/dist/plugins/tools/security/securityPlugin.js +12 -0
  153. package/dist/plugins/tools/security/securityPlugin.js.map +1 -0
  154. package/dist/runtime/agentSession.d.ts +2 -2
  155. package/dist/runtime/agentSession.d.ts.map +1 -1
  156. package/dist/runtime/agentSession.js +2 -2
  157. package/dist/runtime/agentSession.js.map +1 -1
  158. package/dist/security/active-stack-security.d.ts +112 -0
  159. package/dist/security/active-stack-security.d.ts.map +1 -0
  160. package/dist/security/active-stack-security.js +296 -0
  161. package/dist/security/active-stack-security.js.map +1 -0
  162. package/dist/security/advanced-persistence-research.d.ts +92 -0
  163. package/dist/security/advanced-persistence-research.d.ts.map +1 -0
  164. package/dist/security/advanced-persistence-research.js +195 -0
  165. package/dist/security/advanced-persistence-research.js.map +1 -0
  166. package/dist/security/advanced-targeting.d.ts +119 -0
  167. package/dist/security/advanced-targeting.d.ts.map +1 -0
  168. package/dist/security/advanced-targeting.js +233 -0
  169. package/dist/security/advanced-targeting.js.map +1 -0
  170. package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
  171. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
  172. package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
  173. package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
  174. package/dist/security/authorization/securityAuthorization.d.ts +88 -0
  175. package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
  176. package/dist/security/authorization/securityAuthorization.js +172 -0
  177. package/dist/security/authorization/securityAuthorization.js.map +1 -0
  178. package/dist/security/comprehensive-targeting.d.ts +85 -0
  179. package/dist/security/comprehensive-targeting.d.ts.map +1 -0
  180. package/dist/security/comprehensive-targeting.js +438 -0
  181. package/dist/security/comprehensive-targeting.js.map +1 -0
  182. package/dist/security/global-security-integration.d.ts +91 -0
  183. package/dist/security/global-security-integration.d.ts.map +1 -0
  184. package/dist/security/global-security-integration.js +218 -0
  185. package/dist/security/global-security-integration.js.map +1 -0
  186. package/dist/security/index.d.ts +38 -0
  187. package/dist/security/index.d.ts.map +1 -0
  188. package/dist/security/index.js +47 -0
  189. package/dist/security/index.js.map +1 -0
  190. package/dist/security/persistence-analyzer.d.ts +56 -0
  191. package/dist/security/persistence-analyzer.d.ts.map +1 -0
  192. package/dist/security/persistence-analyzer.js +187 -0
  193. package/dist/security/persistence-analyzer.js.map +1 -0
  194. package/dist/security/persistence-cli.d.ts +36 -0
  195. package/dist/security/persistence-cli.d.ts.map +1 -0
  196. package/dist/security/persistence-cli.js +160 -0
  197. package/dist/security/persistence-cli.js.map +1 -0
  198. package/dist/security/persistence-research.d.ts +92 -0
  199. package/dist/security/persistence-research.d.ts.map +1 -0
  200. package/dist/security/persistence-research.js +364 -0
  201. package/dist/security/persistence-research.js.map +1 -0
  202. package/dist/security/research/persistenceResearch.d.ts +97 -0
  203. package/dist/security/research/persistenceResearch.d.ts.map +1 -0
  204. package/dist/security/research/persistenceResearch.js +282 -0
  205. package/dist/security/research/persistenceResearch.js.map +1 -0
  206. package/dist/security/security-integration.d.ts +74 -0
  207. package/dist/security/security-integration.d.ts.map +1 -0
  208. package/dist/security/security-integration.js +137 -0
  209. package/dist/security/security-integration.js.map +1 -0
  210. package/dist/security/security-testing-framework.d.ts +112 -0
  211. package/dist/security/security-testing-framework.d.ts.map +1 -0
  212. package/dist/security/security-testing-framework.js +364 -0
  213. package/dist/security/security-testing-framework.js.map +1 -0
  214. package/dist/security/simulation/attackSimulation.d.ts +93 -0
  215. package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
  216. package/dist/security/simulation/attackSimulation.js +341 -0
  217. package/dist/security/simulation/attackSimulation.js.map +1 -0
  218. package/dist/security/strategic-operations.d.ts +100 -0
  219. package/dist/security/strategic-operations.d.ts.map +1 -0
  220. package/dist/security/strategic-operations.js +276 -0
  221. package/dist/security/strategic-operations.js.map +1 -0
  222. package/dist/security/tool-security-wrapper.d.ts +58 -0
  223. package/dist/security/tool-security-wrapper.d.ts.map +1 -0
  224. package/dist/security/tool-security-wrapper.js +156 -0
  225. package/dist/security/tool-security-wrapper.js.map +1 -0
  226. package/dist/shell/claudeCodeStreamHandler.d.ts +145 -0
  227. package/dist/shell/claudeCodeStreamHandler.d.ts.map +1 -0
  228. package/dist/shell/claudeCodeStreamHandler.js +322 -0
  229. package/dist/shell/claudeCodeStreamHandler.js.map +1 -0
  230. package/dist/shell/inputQueueManager.d.ts +144 -0
  231. package/dist/shell/inputQueueManager.d.ts.map +1 -0
  232. package/dist/shell/inputQueueManager.js +290 -0
  233. package/dist/shell/inputQueueManager.js.map +1 -0
  234. package/dist/shell/interactiveShell.d.ts +7 -16
  235. package/dist/shell/interactiveShell.d.ts.map +1 -1
  236. package/dist/shell/interactiveShell.js +166 -235
  237. package/dist/shell/interactiveShell.js.map +1 -1
  238. package/dist/shell/metricsTracker.d.ts +60 -0
  239. package/dist/shell/metricsTracker.d.ts.map +1 -0
  240. package/dist/shell/metricsTracker.js +119 -0
  241. package/dist/shell/metricsTracker.js.map +1 -0
  242. package/dist/shell/shellApp.d.ts +0 -2
  243. package/dist/shell/shellApp.d.ts.map +1 -1
  244. package/dist/shell/shellApp.js +9 -40
  245. package/dist/shell/shellApp.js.map +1 -1
  246. package/dist/shell/streamingOutputManager.d.ts +115 -0
  247. package/dist/shell/streamingOutputManager.d.ts.map +1 -0
  248. package/dist/shell/streamingOutputManager.js +225 -0
  249. package/dist/shell/streamingOutputManager.js.map +1 -0
  250. package/dist/shell/systemPrompt.d.ts.map +1 -1
  251. package/dist/shell/systemPrompt.js +4 -1
  252. package/dist/shell/systemPrompt.js.map +1 -1
  253. package/dist/shell/terminalInput.d.ts +119 -149
  254. package/dist/shell/terminalInput.d.ts.map +1 -1
  255. package/dist/shell/terminalInput.js +532 -639
  256. package/dist/shell/terminalInput.js.map +1 -1
  257. package/dist/shell/terminalInputAdapter.d.ts +21 -79
  258. package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
  259. package/dist/shell/terminalInputAdapter.js +30 -99
  260. package/dist/shell/terminalInputAdapter.js.map +1 -1
  261. package/dist/subagents/taskRunner.d.ts +1 -7
  262. package/dist/subagents/taskRunner.d.ts.map +1 -1
  263. package/dist/subagents/taskRunner.js +47 -180
  264. package/dist/subagents/taskRunner.js.map +1 -1
  265. package/dist/tools/securityTools.d.ts +22 -0
  266. package/dist/tools/securityTools.d.ts.map +1 -0
  267. package/dist/tools/securityTools.js +448 -0
  268. package/dist/tools/securityTools.js.map +1 -0
  269. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  270. package/dist/ui/ShellUIAdapter.js +12 -13
  271. package/dist/ui/ShellUIAdapter.js.map +1 -1
  272. package/dist/ui/display.d.ts +45 -24
  273. package/dist/ui/display.d.ts.map +1 -1
  274. package/dist/ui/display.js +259 -140
  275. package/dist/ui/display.js.map +1 -1
  276. package/dist/ui/persistentPrompt.d.ts +50 -0
  277. package/dist/ui/persistentPrompt.d.ts.map +1 -0
  278. package/dist/ui/persistentPrompt.js +92 -0
  279. package/dist/ui/persistentPrompt.js.map +1 -0
  280. package/dist/ui/terminalUISchema.d.ts +195 -0
  281. package/dist/ui/terminalUISchema.d.ts.map +1 -0
  282. package/dist/ui/terminalUISchema.js +113 -0
  283. package/dist/ui/terminalUISchema.js.map +1 -0
  284. package/dist/ui/theme.d.ts.map +1 -1
  285. package/dist/ui/theme.js +8 -6
  286. package/dist/ui/theme.js.map +1 -1
  287. package/dist/ui/toolDisplay.d.ts +158 -0
  288. package/dist/ui/toolDisplay.d.ts.map +1 -1
  289. package/dist/ui/toolDisplay.js +348 -0
  290. package/dist/ui/toolDisplay.js.map +1 -1
  291. package/dist/ui/unified/layout.d.ts +0 -1
  292. package/dist/ui/unified/layout.d.ts.map +1 -1
  293. package/dist/ui/unified/layout.js +179 -25
  294. package/dist/ui/unified/layout.js.map +1 -1
  295. package/package.json +4 -4
  296. package/scripts/deploy-security-capabilities.js +178 -0
  297. package/dist/core/hooks.d.ts +0 -113
  298. package/dist/core/hooks.d.ts.map +0 -1
  299. package/dist/core/hooks.js +0 -267
  300. package/dist/core/hooks.js.map +0 -1
  301. package/dist/core/metricsTracker.d.ts +0 -122
  302. package/dist/core/metricsTracker.d.ts.map +0 -1
  303. package/dist/core/metricsTracker.js.map +0 -1
  304. package/dist/core/securityAssessment.d.ts +0 -91
  305. package/dist/core/securityAssessment.d.ts.map +0 -1
  306. package/dist/core/securityAssessment.js +0 -580
  307. package/dist/core/securityAssessment.js.map +0 -1
  308. package/dist/core/verification.d.ts +0 -137
  309. package/dist/core/verification.d.ts.map +0 -1
  310. package/dist/core/verification.js +0 -323
  311. package/dist/core/verification.js.map +0 -1
  312. package/dist/subagents/agentConfig.d.ts +0 -27
  313. package/dist/subagents/agentConfig.d.ts.map +0 -1
  314. package/dist/subagents/agentConfig.js +0 -89
  315. package/dist/subagents/agentConfig.js.map +0 -1
  316. package/dist/subagents/agentRegistry.d.ts +0 -33
  317. package/dist/subagents/agentRegistry.d.ts.map +0 -1
  318. package/dist/subagents/agentRegistry.js +0 -162
  319. package/dist/subagents/agentRegistry.js.map +0 -1
  320. package/dist/utils/frontmatter.d.ts +0 -10
  321. package/dist/utils/frontmatter.d.ts.map +0 -1
  322. package/dist/utils/frontmatter.js +0 -78
  323. package/dist/utils/frontmatter.js.map +0 -1
@@ -18,14 +18,7 @@ interface StatusLineContextInfo {
18
18
  type ActionStatus = 'pending' | 'success' | 'error' | 'info' | 'warning';
19
19
  interface OutputInterceptor {
20
20
  beforeWrite?: () => void;
21
- afterWrite?: (content?: string) => void;
22
- }
23
- type CommandPaletteTone = 'info' | 'warn' | 'success' | 'muted';
24
- interface CommandPaletteItem {
25
- command: string;
26
- description: string;
27
- category?: string | null;
28
- tone?: CommandPaletteTone;
21
+ afterWrite?: () => void;
29
22
  }
30
23
  /**
31
24
  * Display class manages all terminal UI output for the application.
@@ -118,6 +111,36 @@ export declare class Display {
118
111
  */
119
112
  getPinnedHeaderLines(): number;
120
113
  private getColumnWidth;
114
+ private bannerState;
115
+ private bannerContext;
116
+ /**
117
+ * Stores banner information. When silent=true, only stores state without writing.
118
+ * The banner can then be rendered later via renderBannerToContent().
119
+ *
120
+ * @param silent If true, only store state without writing to stdout (default: true)
121
+ */
122
+ showWelcome(profileLabel: string, profileName: string, model: string, provider: string, workingDir: string, version?: string, silent?: boolean): void;
123
+ /**
124
+ * Get the current version string (if set during showWelcome).
125
+ */
126
+ getVersion(): string | undefined;
127
+ /**
128
+ * Get the current banner content as a string.
129
+ * Used by TerminalInput to re-render the banner inside the scroll region.
130
+ * Returns null if no banner has been displayed yet.
131
+ */
132
+ getBannerContent(): string | null;
133
+ /**
134
+ * Render banner directly to stdout (for unified UI re-rendering).
135
+ * This writes the banner without updating tracking state.
136
+ * Returns the number of lines written.
137
+ */
138
+ renderBannerToContent(): number;
139
+ /**
140
+ * Updates the session information banner with new model/provider by appending
141
+ * a new banner entry in the scroll region (no pinned header rewriting).
142
+ */
143
+ updateSessionInfo(model: string, provider: string): void;
121
144
  showThinking(message?: string): void;
122
145
  /**
123
146
  * Format elapsed seconds as human-readable time (e.g., "5s", "1m 23s")
@@ -209,13 +232,6 @@ export declare class Display {
209
232
  name: string;
210
233
  description: string;
211
234
  }>): void;
212
- /**
213
- * Show a compact launch panel of slash commands with wrapped descriptions.
214
- */
215
- showCommandPalette(commands: CommandPaletteItem[], options?: {
216
- title?: string;
217
- intro?: string;
218
- }): void;
219
235
  /**
220
236
  * Show ready message with keyboard shortcuts hint (compact)
221
237
  * Note: Commands are now shown in the banner, so this is a no-op
@@ -231,8 +247,8 @@ export declare class Display {
231
247
  error?: string;
232
248
  }>): void;
233
249
  /**
234
- * Show unified status bar - Claude Code style (minimal)
235
- * Note: No-op - status is shown in mode controls line
250
+ * Show unified status bar - Now a no-op.
251
+ * Status is shown in the inline input area's mode controls line.
236
252
  */
237
253
  showUnifiedStatusBar(_providers?: Array<{
238
254
  provider: string;
@@ -241,9 +257,10 @@ export declare class Display {
241
257
  error?: string;
242
258
  }>): void;
243
259
  /**
244
- * Show streaming header - no-op, banner is streamed as content
260
+ * Show streaming header in a unified frame with model/provider/workspace context.
261
+ * Keeps the streaming section visually connected to the launch banner.
245
262
  */
246
- showStreamingHeader(_options?: {
263
+ showStreamingHeader(options?: {
247
264
  spaceAbove?: boolean;
248
265
  spaceBelow?: boolean;
249
266
  }): void;
@@ -255,17 +272,21 @@ export declare class Display {
255
272
  showPlanningStep(step: string, index: number, total: number): void;
256
273
  clear(): void;
257
274
  newLine(): void;
275
+ private getBannerWidth;
276
+ private measureBannerHeight;
277
+ /**
278
+ * Attempts to rewrite the banner in place using terminal cursor manipulation.
279
+ * Returns true if successful, false if rewrite is not possible.
280
+ */
281
+ private tryRewriteBanner;
282
+ private renderAndStoreBanner;
258
283
  private formatModelLabel;
259
284
  private compactPath;
260
285
  private buildChatBox;
261
286
  private resolveMessageWidth;
262
287
  private formatTelemetryLine;
263
288
  private formatElapsed;
264
- private buildCommandPalette;
265
- private groupPaletteCommands;
266
- private computeCommandColumnWidth;
267
- private formatPaletteCategory;
268
- private colorizePaletteText;
289
+ private buildClaudeStyleBanner;
269
290
  /**
270
291
  * Wraps text with a prefix on the first line and optional continuation prefix.
271
292
  * Handles multi-line text and word wrapping intelligently.
@@ -1 +1 @@
1
- {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/ui/display.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOtD,KAAK,YAAY,GAAG,MAAM,C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;IAOrB;;;OAGG;IACH,OAAO,CAAC,SAAS;CAMlB;AAED,eAAO,MAAM,OAAO,SAAgB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { createSpinner } from 'nanospinner';
2
- import { clearScreenDown, cursorTo } from 'node:readline';
2
+ import { clearScreenDown, cursorTo, moveCursor } from 'node:readline';
3
3
  import { theme, icons } from './theme.js';
4
4
  import { formatRichContent, renderMessagePanel, renderMessageBody } from './richText.js';
5
5
  import { getTerminalColumns } from './layout.js';
@@ -7,7 +7,7 @@ import { highlightError } from './textHighlighter.js';
7
7
  import { renderSectionHeading } from './designSystem.js';
8
8
  import { isPlainOutputMode } from './outputMode.js';
9
9
  import { writeLock } from './writeLock.js';
10
- import { renderStatusLine } from './unified/layout.js';
10
+ import { renderSessionFrame, renderStatusLine } from './unified/layout.js';
11
11
  import { isStreamingMode } from './globalWriteLock.js';
12
12
  /**
13
13
  * Output lock to prevent race conditions during spinner/stream output.
@@ -254,10 +254,10 @@ export class Display {
254
254
  interceptor.beforeWrite?.();
255
255
  }
256
256
  }
257
- notifyAfterOutput(content) {
257
+ notifyAfterOutput() {
258
258
  const interceptors = Array.from(this.outputInterceptors);
259
259
  for (let index = interceptors.length - 1; index >= 0; index -= 1) {
260
- interceptors[index]?.afterWrite?.(content);
260
+ interceptors[index]?.afterWrite?.();
261
261
  }
262
262
  }
263
263
  write(value, target = this.outputStream) {
@@ -286,36 +286,29 @@ export class Display {
286
286
  if (typeof content !== 'string' || !content) {
287
287
  return;
288
288
  }
289
- // Normalize carriage returns to avoid overwriting streamed content on the same line.
290
- // Some providers emit '\r' when streaming; convert to '\n' so we append instead of rewriting.
291
- const normalized = content.includes('\r')
292
- ? content.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
293
- : content;
294
- // During streaming, use withLock to prevent interleaving with escape codes.
295
- // This ensures the before/write/after sequence is atomic.
289
+ // During streaming mode, write directly without locks for smooth output
290
+ // StdoutLineTracker patches outputStream.write, so lines are tracked automatically
296
291
  if (isStreamingMode()) {
297
- writeLock.withLock(() => {
298
- this.notifyBeforeOutput();
299
- try {
300
- this.outputStream.write(normalized);
301
- }
302
- catch {
303
- // Ignore write failures to keep UI resilient
304
- }
305
- finally {
306
- this.notifyAfterOutput(normalized);
307
- }
308
- }, 'display.writeRaw.streaming');
292
+ this.notifyBeforeOutput();
293
+ try {
294
+ this.outputStream.write(content);
295
+ }
296
+ catch {
297
+ // Ignore write failures to keep UI resilient
298
+ }
299
+ finally {
300
+ this.notifyAfterOutput();
301
+ }
309
302
  return;
310
303
  }
311
304
  // Outside streaming mode, use locks to coordinate with other UI
312
305
  writeLock.withLock(() => {
313
306
  this.notifyBeforeOutput();
314
307
  try {
315
- this.write(normalized);
308
+ this.write(content);
316
309
  }
317
310
  finally {
318
- this.notifyAfterOutput(normalized);
311
+ this.notifyAfterOutput();
319
312
  }
320
313
  }, 'display.writeRaw');
321
314
  }
@@ -360,7 +353,125 @@ export class Display {
360
353
  }
361
354
  return getTerminalColumns();
362
355
  }
363
- // Banner is now streamed by the shell - no storage needed
356
+ bannerState = null;
357
+ bannerContext = null;
358
+ /**
359
+ * Stores banner information. When silent=true, only stores state without writing.
360
+ * The banner can then be rendered later via renderBannerToContent().
361
+ *
362
+ * @param silent If true, only store state without writing to stdout (default: true)
363
+ */
364
+ showWelcome(profileLabel, profileName, model, provider, workingDir, version, silent = true) {
365
+ // Validate required inputs
366
+ if (!model?.trim() || !provider?.trim() || !workingDir?.trim()) {
367
+ return;
368
+ }
369
+ const width = this.getBannerWidth();
370
+ const banner = this.buildClaudeStyleBanner(profileLabel ?? '', profileName ?? '', model, provider, workingDir, width, version);
371
+ if (!banner) {
372
+ return;
373
+ }
374
+ const height = this.measureBannerHeight(banner);
375
+ this.bannerState = {
376
+ startLine: 0, // Will be set when actually rendered
377
+ height,
378
+ width,
379
+ workingDir,
380
+ version: version?.trim() || undefined,
381
+ model,
382
+ provider,
383
+ profileLabel: profileLabel ?? '',
384
+ profileName: profileName ?? '',
385
+ };
386
+ this.bannerContext = {
387
+ workingDir,
388
+ model,
389
+ provider,
390
+ profileLabel: profileLabel ?? '',
391
+ profileName: profileName ?? '',
392
+ version: version?.trim() || undefined,
393
+ };
394
+ // Only write to stdout if not silent
395
+ if (!silent) {
396
+ const startLine = this.stdoutTracker.totalLines;
397
+ this.withOutput(() => {
398
+ this.writeLine(banner);
399
+ });
400
+ this.bannerState.startLine = startLine;
401
+ }
402
+ }
403
+ /**
404
+ * Get the current version string (if set during showWelcome).
405
+ */
406
+ getVersion() {
407
+ return this.bannerContext?.version;
408
+ }
409
+ /**
410
+ * Get the current banner content as a string.
411
+ * Used by TerminalInput to re-render the banner inside the scroll region.
412
+ * Returns null if no banner has been displayed yet.
413
+ */
414
+ getBannerContent() {
415
+ const state = this.bannerState;
416
+ if (!state) {
417
+ return null;
418
+ }
419
+ const width = this.getBannerWidth();
420
+ return this.buildClaudeStyleBanner(state.profileLabel, state.profileName, state.model, state.provider, state.workingDir, width, state.version);
421
+ }
422
+ /**
423
+ * Render banner directly to stdout (for unified UI re-rendering).
424
+ * This writes the banner without updating tracking state.
425
+ * Returns the number of lines written.
426
+ */
427
+ renderBannerToContent() {
428
+ const banner = this.getBannerContent();
429
+ if (!banner) {
430
+ return 0;
431
+ }
432
+ this.withOutput(() => {
433
+ this.writeLine(banner);
434
+ });
435
+ return this.measureBannerHeight(banner);
436
+ }
437
+ /**
438
+ * Updates the session information banner with new model/provider by appending
439
+ * a new banner entry in the scroll region (no pinned header rewriting).
440
+ */
441
+ updateSessionInfo(model, provider) {
442
+ const state = this.bannerState;
443
+ if (!state) {
444
+ return;
445
+ }
446
+ const width = this.getBannerWidth();
447
+ const banner = this.buildClaudeStyleBanner(state.profileLabel, state.profileName, model, provider, state.workingDir, width, state.version);
448
+ const height = this.measureBannerHeight(banner);
449
+ // If height changed or rewrite failed, do full re-render
450
+ if (height !== state.height || !this.tryRewriteBanner(state, banner)) {
451
+ this.renderAndStoreBanner(state, model, provider);
452
+ this.bannerContext = {
453
+ workingDir: state.workingDir,
454
+ model: state.model,
455
+ provider: state.provider,
456
+ profileLabel: state.profileLabel,
457
+ profileName: state.profileName,
458
+ version: state.version,
459
+ };
460
+ return;
461
+ }
462
+ state.model = model;
463
+ state.provider = provider;
464
+ state.width = width;
465
+ state.height = height;
466
+ this.bannerContext = {
467
+ workingDir: state.workingDir,
468
+ model,
469
+ provider,
470
+ profileLabel: state.profileLabel,
471
+ profileName: state.profileName,
472
+ version: state.version,
473
+ };
474
+ }
364
475
  showThinking(message = 'Thinking...') {
365
476
  // If we already have a spinner, just update its text instead of creating a new one
366
477
  if (this.activeSpinner) {
@@ -740,23 +851,6 @@ export class Display {
740
851
  // Tools are available but not listed verbosely on startup
741
852
  // Parameter prefixed with underscore to indicate intentionally unused
742
853
  }
743
- /**
744
- * Show a compact launch panel of slash commands with wrapped descriptions.
745
- */
746
- showCommandPalette(commands, options) {
747
- if (!commands || commands.length === 0) {
748
- return;
749
- }
750
- const panel = this.buildCommandPalette(commands, options);
751
- if (!panel.trim()) {
752
- return;
753
- }
754
- this.withOutput(() => {
755
- this.writeLine();
756
- this.writeLine(panel);
757
- this.writeLine();
758
- });
759
- }
760
854
  /**
761
855
  * Show ready message with keyboard shortcuts hint (compact)
762
856
  * Note: Commands are now shown in the banner, so this is a no-op
@@ -775,17 +869,58 @@ export class Display {
775
869
  // Claude Code style: don't show providers on startup, keep it minimal
776
870
  }
777
871
  /**
778
- * Show unified status bar - Claude Code style (minimal)
779
- * Note: No-op - status is shown in mode controls line
872
+ * Show unified status bar - Now a no-op.
873
+ * Status is shown in the inline input area's mode controls line.
780
874
  */
781
875
  showUnifiedStatusBar(_providers) {
782
- // No-op - banner is streamed as content, status shown in control bar
876
+ // No-op: Status is shown in the inline input area's mode controls line
783
877
  }
784
878
  /**
785
- * Show streaming header - no-op, banner is streamed as content
879
+ * Show streaming header in a unified frame with model/provider/workspace context.
880
+ * Keeps the streaming section visually connected to the launch banner.
786
881
  */
787
- showStreamingHeader(_options) {
788
- // No-op - banner is streamed as content by the shell
882
+ showStreamingHeader(options) {
883
+ const banner = this.bannerState;
884
+ const model = banner ? this.formatModelLabel(banner.model) : null;
885
+ const provider = banner?.provider ?? '';
886
+ const workspace = banner?.workingDir ?? '';
887
+ if (!model && !provider && !workspace) {
888
+ return;
889
+ }
890
+ const width = Math.min(this.getColumnWidth() - 4, DISPLAY_CONSTANTS.MAX_MESSAGE_WIDTH);
891
+ const spaceAbove = options?.spaceAbove ?? true;
892
+ const spaceBelow = options?.spaceBelow ?? true;
893
+ // Plain output keeps the header lightweight
894
+ if (isPlainOutputMode()) {
895
+ const label = model ? `Streaming ${model}` : 'Streaming response';
896
+ this.withOutput(() => {
897
+ if (spaceAbove) {
898
+ this.writeLine();
899
+ }
900
+ this.writeLine(`--- ${label} ---`);
901
+ if (spaceBelow) {
902
+ this.writeLine();
903
+ }
904
+ });
905
+ return;
906
+ }
907
+ const sessionFrame = renderSessionFrame({
908
+ profileLabel: banner?.profileLabel ?? '',
909
+ profileName: banner?.profileName ?? '',
910
+ model: model ?? '',
911
+ provider,
912
+ workspace,
913
+ width,
914
+ });
915
+ this.withOutput(() => {
916
+ if (spaceAbove) {
917
+ this.writeLine();
918
+ }
919
+ this.writeLine(sessionFrame);
920
+ if (spaceBelow) {
921
+ this.writeLine();
922
+ }
923
+ });
789
924
  }
790
925
  /**
791
926
  * Show model commands help
@@ -850,14 +985,78 @@ export class Display {
850
985
  }
851
986
  });
852
987
  this.stdoutTracker.reset();
853
- // Banner is streamed content - no re-render on clear
988
+ if (this.bannerState) {
989
+ this.renderAndStoreBanner(this.bannerState, this.bannerState.model, this.bannerState.provider);
990
+ }
854
991
  }
855
992
  newLine() {
856
993
  this.withOutput(() => {
857
994
  this.writeLine();
858
995
  });
859
996
  }
860
- // Legacy banner methods removed - banner is streamed as content by the shell
997
+ getBannerWidth() {
998
+ const availableColumns = this.getColumnWidth();
999
+ const effectiveWidth = Math.max(DISPLAY_CONSTANTS.MIN_BANNER_WIDTH, availableColumns - DISPLAY_CONSTANTS.BANNER_PADDING);
1000
+ return Math.min(Math.max(effectiveWidth, DISPLAY_CONSTANTS.MIN_BANNER_WIDTH), DISPLAY_CONSTANTS.MAX_BANNER_WIDTH);
1001
+ }
1002
+ measureBannerHeight(banner) {
1003
+ if (!banner) {
1004
+ return 0;
1005
+ }
1006
+ return banner.split('\n').length;
1007
+ }
1008
+ /**
1009
+ * Attempts to rewrite the banner in place using terminal cursor manipulation.
1010
+ * Returns true if successful, false if rewrite is not possible.
1011
+ */
1012
+ tryRewriteBanner(state, banner) {
1013
+ if (!this.outputStream.isTTY) {
1014
+ return false;
1015
+ }
1016
+ if (!banner || state.height <= 0) {
1017
+ return false;
1018
+ }
1019
+ const linesWritten = this.stdoutTracker.totalLines;
1020
+ const linesAfterBanner = linesWritten - (state.startLine + state.height);
1021
+ if (linesAfterBanner < 0) {
1022
+ return false;
1023
+ }
1024
+ const totalOffset = linesAfterBanner + state.height;
1025
+ const maxRows = this.outputStream.rows;
1026
+ if (typeof maxRows === 'number' && maxRows > 0 && totalOffset > maxRows) {
1027
+ return false;
1028
+ }
1029
+ try {
1030
+ this.withOutput(() => {
1031
+ moveCursor(this.outputStream, 0, -totalOffset);
1032
+ cursorTo(this.outputStream, 0);
1033
+ this.stdoutTracker.withSuspended(() => {
1034
+ this.outputStream.write(`${banner}\n`);
1035
+ });
1036
+ if (linesAfterBanner > 0) {
1037
+ moveCursor(this.outputStream, 0, linesAfterBanner);
1038
+ }
1039
+ cursorTo(this.outputStream, 0);
1040
+ });
1041
+ return true;
1042
+ }
1043
+ catch {
1044
+ return false;
1045
+ }
1046
+ }
1047
+ renderAndStoreBanner(state, model, provider) {
1048
+ const width = this.getBannerWidth();
1049
+ const banner = this.buildClaudeStyleBanner(state.profileLabel, state.profileName, model, provider, state.workingDir, width, state.version);
1050
+ const startLine = this.stdoutTracker.totalLines;
1051
+ this.withOutput(() => {
1052
+ this.writeLine(banner);
1053
+ });
1054
+ state.startLine = startLine;
1055
+ state.height = this.measureBannerHeight(banner);
1056
+ state.width = width;
1057
+ state.model = model;
1058
+ state.provider = provider;
1059
+ }
861
1060
  formatModelLabel(model) {
862
1061
  if (/gpt-5\.1-?codex/i.test(model)) {
863
1062
  return model;
@@ -955,96 +1154,16 @@ export class Display {
955
1154
  }
956
1155
  return `${seconds}s`;
957
1156
  }
958
- buildCommandPalette(commands, options) {
959
- if (!commands.length) {
960
- return '';
961
- }
962
- const width = Math.max(DISPLAY_CONSTANTS.MIN_MESSAGE_WIDTH, Math.min(this.getColumnWidth() - 2, DISPLAY_CONSTANTS.MAX_MESSAGE_WIDTH));
963
- const indent = ' ';
964
- const grouped = this.groupPaletteCommands(commands);
965
- const commandWidth = this.computeCommandColumnWidth(commands, width, indent.length);
966
- const descWidth = Math.max(DISPLAY_CONSTANTS.MIN_WRAP_WIDTH, width - indent.length - commandWidth - 1);
967
- const title = options?.title ?? 'Slash commands';
968
- const intro = options?.intro ?? 'Describe a task or pick a command below:';
969
- const lines = [];
970
- lines.push(theme.gradient.primary(title));
971
- const introLines = this.wrapLine(intro, width);
972
- for (const line of introLines) {
973
- lines.push(theme.ui.muted(line));
974
- }
975
- lines.push('');
976
- grouped.forEach(({ category, items }, index) => {
977
- const label = this.formatPaletteCategory(category);
978
- if (label) {
979
- lines.push(theme.bold(label));
980
- }
981
- for (const item of items) {
982
- const wrappedDesc = this.wrapLine(item.description, descWidth);
983
- const paddedCommand = item.command.padEnd(commandWidth);
984
- const commandLabel = theme.primary(paddedCommand);
985
- const firstLine = wrappedDesc[0] ?? '';
986
- lines.push(`${indent}${commandLabel} ${this.colorizePaletteText(firstLine, item.tone)}`);
987
- for (const extra of wrappedDesc.slice(1)) {
988
- lines.push(`${indent}${' '.repeat(commandWidth)} ${this.colorizePaletteText(extra, item.tone)}`);
989
- }
990
- }
991
- if (index < grouped.length - 1) {
992
- lines.push('');
993
- }
1157
+ buildClaudeStyleBanner(_profileLabel, _profileName, model, provider, workingDir, _width, version) {
1158
+ return renderSessionFrame({
1159
+ profileLabel: _profileLabel,
1160
+ profileName: _profileName,
1161
+ model: this.formatModelLabel(model),
1162
+ provider,
1163
+ workspace: workingDir,
1164
+ version,
1165
+ width: _width,
994
1166
  });
995
- return lines.join('\n').trimEnd();
996
- }
997
- groupPaletteCommands(commands) {
998
- const FALLBACK = 'other';
999
- const groups = new Map();
1000
- for (const item of commands) {
1001
- const key = (item.category ?? FALLBACK).toLowerCase();
1002
- const bucket = groups.get(key) ?? [];
1003
- bucket.push(item);
1004
- groups.set(key, bucket);
1005
- }
1006
- const order = ['configuration', 'workspace', 'diagnostics', 'other'];
1007
- const orderedKeys = [
1008
- ...order.filter((key) => groups.has(key)),
1009
- ...Array.from(groups.keys()).filter((key) => !order.includes(key)),
1010
- ];
1011
- return orderedKeys.map((category) => ({ category, items: groups.get(category) ?? [] }));
1012
- }
1013
- computeCommandColumnWidth(commands, totalWidth, indentWidth) {
1014
- const longest = commands.reduce((max, item) => Math.max(max, this.visibleLength(item.command)), 0);
1015
- const maxAllowed = Math.max(12, Math.min(longest + 2, Math.floor(totalWidth * 0.35)));
1016
- const budget = Math.max(10, totalWidth - indentWidth - DISPLAY_CONSTANTS.MIN_WRAP_WIDTH);
1017
- return Math.min(maxAllowed, budget);
1018
- }
1019
- formatPaletteCategory(category) {
1020
- if (!category) {
1021
- return 'Other';
1022
- }
1023
- switch (category.toLowerCase()) {
1024
- case 'configuration':
1025
- return 'Configuration';
1026
- case 'workspace':
1027
- return 'Workspace';
1028
- case 'diagnostics':
1029
- return 'Diagnostics';
1030
- case 'other':
1031
- return 'Other';
1032
- default:
1033
- return category[0]?.toUpperCase() + category.slice(1);
1034
- }
1035
- }
1036
- colorizePaletteText(text, tone) {
1037
- switch (tone) {
1038
- case 'warn':
1039
- return theme.warning(text);
1040
- case 'success':
1041
- return theme.success(text);
1042
- case 'info':
1043
- return theme.info(text);
1044
- case 'muted':
1045
- default:
1046
- return theme.ui.muted(text);
1047
- }
1048
1167
  }
1049
1168
  /**
1050
1169
  * Wraps text with a prefix on the first line and optional continuation prefix.