osagent-cli 0.1.38 → 0.1.87

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 (278) hide show
  1. package/dist/package.json +4 -3
  2. package/dist/src/commands/doctor.js +27 -4
  3. package/dist/src/commands/doctor.js.map +1 -1
  4. package/dist/src/config/keyBindings.d.ts +2 -1
  5. package/dist/src/config/keyBindings.js +4 -0
  6. package/dist/src/config/keyBindings.js.map +1 -1
  7. package/dist/src/config/settings.d.ts +1 -1
  8. package/dist/src/config/settings.js +1 -1
  9. package/dist/src/config/settings.js.map +1 -1
  10. package/dist/src/config/settingsSchema.d.ts +9 -0
  11. package/dist/src/config/settingsSchema.js +9 -0
  12. package/dist/src/config/settingsSchema.js.map +1 -1
  13. package/dist/src/config/trustedFolders.d.ts +1 -1
  14. package/dist/src/config/trustedFolders.js +1 -1
  15. package/dist/src/config/trustedFolders.js.map +1 -1
  16. package/dist/src/core/initializer.js +24 -0
  17. package/dist/src/core/initializer.js.map +1 -1
  18. package/dist/src/gemini.js +6 -3
  19. package/dist/src/gemini.js.map +1 -1
  20. package/dist/src/generated/git-commit.d.ts +2 -2
  21. package/dist/src/generated/git-commit.js +2 -2
  22. package/dist/src/services/SystemDetectionService.d.ts +56 -0
  23. package/dist/src/services/SystemDetectionService.js +248 -0
  24. package/dist/src/services/SystemDetectionService.js.map +1 -0
  25. package/dist/src/ui/App.js +2 -1
  26. package/dist/src/ui/App.js.map +1 -1
  27. package/dist/src/ui/AppContainer.js +156 -17
  28. package/dist/src/ui/AppContainer.js.map +1 -1
  29. package/dist/src/ui/IdeIntegrationNudge.d.ts +3 -1
  30. package/dist/src/ui/IdeIntegrationNudge.js +6 -7
  31. package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
  32. package/dist/src/ui/auth/AuthDialog.js +9 -6
  33. package/dist/src/ui/auth/AuthDialog.js.map +1 -1
  34. package/dist/src/ui/auth/AuthInProgress.d.ts +3 -1
  35. package/dist/src/ui/auth/AuthInProgress.js +5 -6
  36. package/dist/src/ui/auth/AuthInProgress.js.map +1 -1
  37. package/dist/src/ui/auth/useAuth.js +48 -10
  38. package/dist/src/ui/auth/useAuth.js.map +1 -1
  39. package/dist/src/ui/commands/doctorCommand.js +282 -108
  40. package/dist/src/ui/commands/doctorCommand.js.map +1 -1
  41. package/dist/src/ui/commands/initCommand.js +80 -28
  42. package/dist/src/ui/commands/initCommand.js.map +1 -1
  43. package/dist/src/ui/commands/viewCommand.js +1 -1
  44. package/dist/src/ui/commands/viewCommand.js.map +1 -1
  45. package/dist/src/ui/components/ApprovalModeDialog.d.ts +2 -0
  46. package/dist/src/ui/components/ApprovalModeDialog.js +10 -7
  47. package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -1
  48. package/dist/src/ui/components/AsciiArt.d.ts +12 -0
  49. package/dist/src/ui/components/AsciiArt.js +41 -30
  50. package/dist/src/ui/components/AsciiArt.js.map +1 -1
  51. package/dist/src/ui/components/CollapsibleOutput.d.ts +31 -0
  52. package/dist/src/ui/components/CollapsibleOutput.js +49 -0
  53. package/dist/src/ui/components/CollapsibleOutput.js.map +1 -0
  54. package/dist/src/ui/components/CompactionStatusDisplay.d.ts +22 -0
  55. package/dist/src/ui/components/CompactionStatusDisplay.js +49 -0
  56. package/dist/src/ui/components/CompactionStatusDisplay.js.map +1 -0
  57. package/dist/src/ui/components/Composer.js +1 -1
  58. package/dist/src/ui/components/Composer.js.map +1 -1
  59. package/dist/src/ui/components/ConsultationDisplay.d.ts +1 -1
  60. package/dist/src/ui/components/ConsultationDisplay.js +1 -0
  61. package/dist/src/ui/components/ConsultationDisplay.js.map +1 -1
  62. package/dist/src/ui/components/ConsultationPanel.js +1 -0
  63. package/dist/src/ui/components/ConsultationPanel.js.map +1 -1
  64. package/dist/src/ui/components/ContextCompactionIndicator.d.ts +17 -0
  65. package/dist/src/ui/components/ContextCompactionIndicator.js +47 -0
  66. package/dist/src/ui/components/ContextCompactionIndicator.js.map +1 -0
  67. package/dist/src/ui/components/ContextUsageDisplay.js +5 -4
  68. package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -1
  69. package/dist/src/ui/components/DebugProfiler.d.ts +6 -1
  70. package/dist/src/ui/components/DebugProfiler.js +2 -2
  71. package/dist/src/ui/components/DebugProfiler.js.map +1 -1
  72. package/dist/src/ui/components/EditorSettingsDialog.d.ts +2 -0
  73. package/dist/src/ui/components/EditorSettingsDialog.js +10 -7
  74. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
  75. package/dist/src/ui/components/FolderTrustDialog.js +8 -6
  76. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
  77. package/dist/src/ui/components/Footer.js +6 -3
  78. package/dist/src/ui/components/Footer.js.map +1 -1
  79. package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +3 -1
  80. package/dist/src/ui/components/IdeTrustChangeDialog.js +5 -6
  81. package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -1
  82. package/dist/src/ui/components/InitDisplay.d.ts +26 -0
  83. package/dist/src/ui/components/InitDisplay.js +82 -0
  84. package/dist/src/ui/components/InitDisplay.js.map +1 -0
  85. package/dist/src/ui/components/InputPrompt.d.ts +1 -1
  86. package/dist/src/ui/components/InputPrompt.js +44 -13
  87. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  88. package/dist/src/ui/components/LoadingIndicator.js +5 -2
  89. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  90. package/dist/src/ui/components/LoopDetectionConfirmation.js +8 -6
  91. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -1
  92. package/dist/src/ui/components/MainContent.js +21 -4
  93. package/dist/src/ui/components/MainContent.js.map +1 -1
  94. package/dist/src/ui/components/ModelDialog.js +28 -13
  95. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  96. package/dist/src/ui/components/ModelSwitchDialog.d.ts +2 -0
  97. package/dist/src/ui/components/ModelSwitchDialog.js +8 -6
  98. package/dist/src/ui/components/ModelSwitchDialog.js.map +1 -1
  99. package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +3 -1
  100. package/dist/src/ui/components/OpenAIKeyPrompt.js +18 -53
  101. package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -1
  102. package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +2 -0
  103. package/dist/src/ui/components/PermissionsModifyTrustDialog.js +9 -7
  104. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -1
  105. package/dist/src/ui/components/PlanApprovalDisplay.d.ts +18 -0
  106. package/dist/src/ui/components/PlanApprovalDisplay.js +97 -0
  107. package/dist/src/ui/components/PlanApprovalDisplay.js.map +1 -0
  108. package/dist/src/ui/components/PrepareLabel.d.ts +1 -0
  109. package/dist/src/ui/components/PrepareLabel.js +4 -4
  110. package/dist/src/ui/components/PrepareLabel.js.map +1 -1
  111. package/dist/src/ui/components/ProQuotaDialog.js +8 -6
  112. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
  113. package/dist/src/ui/components/QueueStatusBar.d.ts +17 -0
  114. package/dist/src/ui/components/QueueStatusBar.js +25 -0
  115. package/dist/src/ui/components/QueueStatusBar.js.map +1 -0
  116. package/dist/src/ui/components/QuitConfirmationDialog.js +8 -6
  117. package/dist/src/ui/components/QuitConfirmationDialog.js.map +1 -1
  118. package/dist/src/ui/components/QwenOAuthProgress.d.ts +3 -1
  119. package/dist/src/ui/components/QwenOAuthProgress.js +5 -6
  120. package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -1
  121. package/dist/src/ui/components/SettingsDialog.js +30 -35
  122. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  123. package/dist/src/ui/components/ShellConfirmationDialog.js +8 -6
  124. package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
  125. package/dist/src/ui/components/StatusBar.js +40 -13
  126. package/dist/src/ui/components/StatusBar.js.map +1 -1
  127. package/dist/src/ui/components/SuggestionsDisplay.js +5 -4
  128. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  129. package/dist/src/ui/components/TaskMasterPanel.js +75 -38
  130. package/dist/src/ui/components/TaskMasterPanel.js.map +1 -1
  131. package/dist/src/ui/components/ThemeDialog.js +11 -8
  132. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  133. package/dist/src/ui/components/TodoDisplay.js +9 -6
  134. package/dist/src/ui/components/TodoDisplay.js.map +1 -1
  135. package/dist/src/ui/components/TreeToolDisplay.d.ts +37 -0
  136. package/dist/src/ui/components/TreeToolDisplay.js +179 -0
  137. package/dist/src/ui/components/TreeToolDisplay.js.map +1 -0
  138. package/dist/src/ui/components/WelcomeBackDialog.js +8 -6
  139. package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -1
  140. package/dist/src/ui/components/WorkspaceMigrationDialog.js +8 -6
  141. package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -1
  142. package/dist/src/ui/components/messages/CompressionMessage.d.ts +3 -1
  143. package/dist/src/ui/components/messages/CompressionMessage.js +14 -2
  144. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
  145. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +5 -5
  146. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  147. package/dist/src/ui/components/messages/ToolGroupMessage.js +120 -12
  148. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  149. package/dist/src/ui/components/messages/ToolMessage.js +45 -9
  150. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
  151. package/dist/src/ui/components/messages/UserMessage.d.ts +4 -0
  152. package/dist/src/ui/components/messages/UserMessage.js +96 -2
  153. package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
  154. package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +2 -0
  155. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +9 -6
  156. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -1
  157. package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +3 -1
  158. package/dist/src/ui/components/subagents/create/ColorSelector.js +2 -2
  159. package/dist/src/ui/components/subagents/create/ColorSelector.js.map +1 -1
  160. package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +1 -1
  161. package/dist/src/ui/components/subagents/create/CreationSummary.js +6 -7
  162. package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -1
  163. package/dist/src/ui/components/subagents/create/DescriptionInput.js +4 -10
  164. package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -1
  165. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +1 -1
  166. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +2 -2
  167. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -1
  168. package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +1 -1
  169. package/dist/src/ui/components/subagents/create/LocationSelector.js +2 -2
  170. package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -1
  171. package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +3 -1
  172. package/dist/src/ui/components/subagents/create/ToolSelector.js +2 -2
  173. package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -1
  174. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +3 -1
  175. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +2 -2
  176. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -1
  177. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +3 -1
  178. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +15 -14
  179. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -1
  180. package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +3 -1
  181. package/dist/src/ui/components/subagents/manage/AgentEditStep.js +2 -2
  182. package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -1
  183. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +3 -1
  184. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +7 -9
  185. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -1
  186. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +2 -0
  187. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +11 -8
  188. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -1
  189. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.d.ts +2 -0
  190. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +6 -7
  191. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +1 -1
  192. package/dist/src/ui/components/subagents/runtime/MultiAgentSummary.d.ts +51 -0
  193. package/dist/src/ui/components/subagents/runtime/MultiAgentSummary.js +126 -0
  194. package/dist/src/ui/components/subagents/runtime/MultiAgentSummary.js.map +1 -0
  195. package/dist/src/ui/components/subagents/types.d.ts +4 -0
  196. package/dist/src/ui/components/subagents/types.js.map +1 -1
  197. package/dist/src/ui/contexts/ConsultationContext.d.ts +1 -1
  198. package/dist/src/ui/contexts/ConsultationContext.js +38 -13
  199. package/dist/src/ui/contexts/ConsultationContext.js.map +1 -1
  200. package/dist/src/ui/contexts/FocusContext.d.ts +114 -0
  201. package/dist/src/ui/contexts/FocusContext.js +129 -0
  202. package/dist/src/ui/contexts/FocusContext.js.map +1 -0
  203. package/dist/src/ui/contexts/KeypressContext.js +23 -2
  204. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  205. package/dist/src/ui/contexts/RoadmapContext.js +21 -3
  206. package/dist/src/ui/contexts/RoadmapContext.js.map +1 -1
  207. package/dist/src/ui/contexts/TodoContext.d.ts +4 -0
  208. package/dist/src/ui/contexts/TodoContext.js +7 -1
  209. package/dist/src/ui/contexts/TodoContext.js.map +1 -1
  210. package/dist/src/ui/contexts/UIActionsContext.d.ts +1 -0
  211. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  212. package/dist/src/ui/contexts/UIStateContext.d.ts +2 -0
  213. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  214. package/dist/src/ui/contexts/VimModeContext.js +18 -8
  215. package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
  216. package/dist/src/ui/hooks/useAutoCompaction.d.ts +44 -0
  217. package/dist/src/ui/hooks/useAutoCompaction.js +141 -0
  218. package/dist/src/ui/hooks/useAutoCompaction.js.map +1 -0
  219. package/dist/src/ui/hooks/useAutoProjectContext.d.ts +34 -0
  220. package/dist/src/ui/hooks/useAutoProjectContext.js +194 -0
  221. package/dist/src/ui/hooks/useAutoProjectContext.js.map +1 -0
  222. package/dist/src/ui/hooks/useConsultationGenerator.js +148 -105
  223. package/dist/src/ui/hooks/useConsultationGenerator.js.map +1 -1
  224. package/dist/src/ui/hooks/useEpisodicMemory.d.ts +33 -0
  225. package/dist/src/ui/hooks/useEpisodicMemory.js +182 -0
  226. package/dist/src/ui/hooks/useEpisodicMemory.js.map +1 -0
  227. package/dist/src/ui/hooks/useFocusScope.d.ts +69 -0
  228. package/dist/src/ui/hooks/useFocusScope.js +121 -0
  229. package/dist/src/ui/hooks/useFocusScope.js.map +1 -0
  230. package/dist/src/ui/hooks/useGeminiStream.js +34 -5
  231. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  232. package/dist/src/ui/hooks/useHistoryManager.js +35 -6
  233. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
  234. package/dist/src/ui/hooks/useKeypress.d.ts +6 -0
  235. package/dist/src/ui/hooks/useKeypress.js +27 -4
  236. package/dist/src/ui/hooks/useKeypress.js.map +1 -1
  237. package/dist/src/ui/hooks/useMessageQueue.js +16 -5
  238. package/dist/src/ui/hooks/useMessageQueue.js.map +1 -1
  239. package/dist/src/ui/hooks/useOrchestrationTracker.d.ts +24 -0
  240. package/dist/src/ui/hooks/useOrchestrationTracker.js +50 -0
  241. package/dist/src/ui/hooks/useOrchestrationTracker.js.map +1 -0
  242. package/dist/src/ui/hooks/useOrchestratorExecutor.d.ts +21 -0
  243. package/dist/src/ui/hooks/useOrchestratorExecutor.js +110 -0
  244. package/dist/src/ui/hooks/useOrchestratorExecutor.js.map +1 -0
  245. package/dist/src/ui/hooks/useSelectionList.js +10 -8
  246. package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
  247. package/dist/src/ui/hooks/useSkillPlugins.d.ts +26 -0
  248. package/dist/src/ui/hooks/useSkillPlugins.js +72 -0
  249. package/dist/src/ui/hooks/useSkillPlugins.js.map +1 -0
  250. package/dist/src/ui/hooks/useSubagentHooksRegistration.d.ts +16 -0
  251. package/dist/src/ui/hooks/useSubagentHooksRegistration.js +53 -0
  252. package/dist/src/ui/hooks/useSubagentHooksRegistration.js.map +1 -0
  253. package/dist/src/ui/hooks/useVectorMemory.d.ts +33 -0
  254. package/dist/src/ui/hooks/useVectorMemory.js +92 -0
  255. package/dist/src/ui/hooks/useVectorMemory.js.map +1 -0
  256. package/dist/src/ui/keyMatchers.test.js +1 -0
  257. package/dist/src/ui/keyMatchers.test.js.map +1 -1
  258. package/dist/src/ui/models/availableModels.d.ts +3 -1
  259. package/dist/src/ui/models/availableModels.js +14 -7
  260. package/dist/src/ui/models/availableModels.js.map +1 -1
  261. package/dist/src/ui/themes/theme.js +2 -2
  262. package/dist/src/ui/themes/theme.js.map +1 -1
  263. package/dist/src/ui/types.d.ts +20 -0
  264. package/dist/src/ui/types.js.map +1 -1
  265. package/dist/src/validateNonInterActiveAuth.js +12 -0
  266. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  267. package/dist/src/zed-integration/schema.d.ts +306 -306
  268. package/dist/tsconfig.tsbuildinfo +1 -1
  269. package/package.json +4 -3
  270. package/dist/src/ui/contexts/IntelligentOrchestratorContext.d.ts +0 -87
  271. package/dist/src/ui/contexts/IntelligentOrchestratorContext.js +0 -336
  272. package/dist/src/ui/contexts/IntelligentOrchestratorContext.js.map +0 -1
  273. package/dist/src/ui/contexts/TaskmasterContext.d.ts +0 -87
  274. package/dist/src/ui/contexts/TaskmasterContext.js +0 -184
  275. package/dist/src/ui/contexts/TaskmasterContext.js.map +0 -1
  276. package/dist/src/ui/hooks/useTaskmasterOrchestrator.d.ts +0 -35
  277. package/dist/src/ui/hooks/useTaskmasterOrchestrator.js +0 -177
  278. package/dist/src/ui/hooks/useTaskmasterOrchestrator.js.map +0 -1
@@ -3,5 +3,5 @@
3
3
  * Copyright 2025 OSAgent OC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export declare const GIT_COMMIT_INFO = "14879cd";
7
- export declare const CLI_VERSION = "0.1.38";
6
+ export declare const GIT_COMMIT_INFO = "c6bc49f";
7
+ export declare const CLI_VERSION = "0.1.86";
@@ -5,6 +5,6 @@
5
5
  */
6
6
  // This file is auto-generated by the build script (scripts/generate-git-commit-info.js)
7
7
  // Do not edit this file manually.
8
- export const GIT_COMMIT_INFO = '14879cd';
9
- export const CLI_VERSION = '0.1.38';
8
+ export const GIT_COMMIT_INFO = 'c6bc49f';
9
+ export const CLI_VERSION = '0.1.86';
10
10
  //# sourceMappingURL=git-commit.js.map
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 OSAgent OC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type ProjectAnalysis } from './ProjectAnalyzerService.js';
7
+ /**
8
+ * System environment information
9
+ */
10
+ export interface SystemInfo {
11
+ os: {
12
+ platform: string;
13
+ version: string;
14
+ displayName: string;
15
+ };
16
+ shell: string;
17
+ nodeVersion: string | null;
18
+ workspaceName: string;
19
+ workspacePath: string;
20
+ hasGit: boolean;
21
+ detectedTools: string[];
22
+ }
23
+ /**
24
+ * Complete initialization analysis combining system info with project analysis
25
+ */
26
+ export interface InitAnalysis {
27
+ system: SystemInfo;
28
+ project: ProjectAnalysis | null;
29
+ isFirstRun: boolean;
30
+ analyzedAt: number;
31
+ }
32
+ /**
33
+ * Service that performs system detection for the init experience.
34
+ * Combines OS/shell detection with project analysis.
35
+ */
36
+ export declare class SystemDetectionService {
37
+ private static instance;
38
+ private analysis;
39
+ private workspacePath;
40
+ private constructor();
41
+ static getInstance(workspacePath?: string): SystemDetectionService;
42
+ static resetInstance(): void;
43
+ getAnalysis(isFirstRun?: boolean): Promise<InitAnalysis>;
44
+ private analyze;
45
+ private detectSystemInfo;
46
+ private detectOS;
47
+ private detectShell;
48
+ private detectNodeVersion;
49
+ private getWorkspaceName;
50
+ private checkGit;
51
+ private detectTools;
52
+ /**
53
+ * Format the analysis as a display-ready tree structure
54
+ */
55
+ formatAsTree(analysis: InitAnalysis): string[];
56
+ }
@@ -0,0 +1,248 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 OSAgent OC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import * as os from 'node:os';
7
+ import * as fs from 'node:fs';
8
+ import * as path from 'node:path';
9
+ import { execSync } from 'node:child_process';
10
+ import { ProjectAnalyzerService } from './ProjectAnalyzerService.js';
11
+ /**
12
+ * Service that performs system detection for the init experience.
13
+ * Combines OS/shell detection with project analysis.
14
+ */
15
+ export class SystemDetectionService {
16
+ static instance = null;
17
+ analysis = null;
18
+ workspacePath;
19
+ constructor(workspacePath) {
20
+ this.workspacePath = workspacePath;
21
+ }
22
+ static getInstance(workspacePath = process.cwd()) {
23
+ if (!SystemDetectionService.instance) {
24
+ SystemDetectionService.instance = new SystemDetectionService(workspacePath);
25
+ }
26
+ return SystemDetectionService.instance;
27
+ }
28
+ static resetInstance() {
29
+ SystemDetectionService.instance = null;
30
+ }
31
+ async getAnalysis(isFirstRun = false) {
32
+ if (this.analysis) {
33
+ return this.analysis;
34
+ }
35
+ this.analysis = await this.analyze(isFirstRun);
36
+ return this.analysis;
37
+ }
38
+ async analyze(isFirstRun) {
39
+ const system = this.detectSystemInfo();
40
+ let project = null;
41
+ try {
42
+ const projectAnalyzer = ProjectAnalyzerService.getInstance(this.workspacePath);
43
+ project = await projectAnalyzer.getAnalysis();
44
+ }
45
+ catch {
46
+ // Project analysis is optional
47
+ }
48
+ return {
49
+ system,
50
+ project,
51
+ isFirstRun,
52
+ analyzedAt: Date.now(),
53
+ };
54
+ }
55
+ detectSystemInfo() {
56
+ return {
57
+ os: this.detectOS(),
58
+ shell: this.detectShell(),
59
+ nodeVersion: this.detectNodeVersion(),
60
+ workspaceName: this.getWorkspaceName(),
61
+ workspacePath: this.workspacePath,
62
+ hasGit: this.checkGit(),
63
+ detectedTools: this.detectTools(),
64
+ };
65
+ }
66
+ detectOS() {
67
+ const platformName = os.platform();
68
+ const release = os.release();
69
+ let displayName = platformName;
70
+ let version = release;
71
+ if (platformName === 'darwin') {
72
+ displayName = 'macOS';
73
+ // Try to get macOS version name
74
+ try {
75
+ const swVers = execSync('sw_vers -productVersion', { encoding: 'utf-8' }).trim();
76
+ version = swVers;
77
+ const major = parseInt(swVers.split('.')[0], 10);
78
+ const macNames = {
79
+ 15: 'Sequoia',
80
+ 14: 'Sonoma',
81
+ 13: 'Ventura',
82
+ 12: 'Monterey',
83
+ 11: 'Big Sur',
84
+ };
85
+ if (macNames[major]) {
86
+ displayName = `macOS ${version} (${macNames[major]})`;
87
+ }
88
+ else {
89
+ displayName = `macOS ${version}`;
90
+ }
91
+ }
92
+ catch {
93
+ displayName = `macOS ${release}`;
94
+ }
95
+ }
96
+ else if (platformName === 'win32') {
97
+ displayName = 'Windows';
98
+ // Extract Windows version
99
+ const releaseNum = parseInt(release.split('.')[0], 10);
100
+ if (releaseNum >= 10) {
101
+ displayName = `Windows ${releaseNum >= 10 ? '10/11' : releaseNum}`;
102
+ }
103
+ }
104
+ else if (platformName === 'linux') {
105
+ displayName = 'Linux';
106
+ // Try to get distribution name
107
+ try {
108
+ if (fs.existsSync('/etc/os-release')) {
109
+ const osRelease = fs.readFileSync('/etc/os-release', 'utf-8');
110
+ const prettyName = osRelease.match(/PRETTY_NAME="([^"]+)"/);
111
+ if (prettyName) {
112
+ displayName = prettyName[1];
113
+ }
114
+ }
115
+ }
116
+ catch {
117
+ // Use generic Linux name
118
+ }
119
+ }
120
+ return { platform: platformName, version, displayName };
121
+ }
122
+ detectShell() {
123
+ const shellEnv = process.env['SHELL'] || process.env['ComSpec'] || '';
124
+ const shellName = path.basename(shellEnv);
125
+ // Normalize shell names
126
+ if (shellName.includes('zsh'))
127
+ return 'zsh';
128
+ if (shellName.includes('bash'))
129
+ return 'bash';
130
+ if (shellName.includes('fish'))
131
+ return 'fish';
132
+ if (shellName.includes('powershell') || shellName.includes('pwsh'))
133
+ return 'PowerShell';
134
+ if (shellName.includes('cmd'))
135
+ return 'cmd';
136
+ return shellName || 'unknown';
137
+ }
138
+ detectNodeVersion() {
139
+ try {
140
+ return process.versions.node;
141
+ }
142
+ catch {
143
+ return null;
144
+ }
145
+ }
146
+ getWorkspaceName() {
147
+ return path.basename(this.workspacePath);
148
+ }
149
+ checkGit() {
150
+ const gitPath = path.join(this.workspacePath, '.git');
151
+ try {
152
+ return fs.existsSync(gitPath);
153
+ }
154
+ catch {
155
+ return false;
156
+ }
157
+ }
158
+ detectTools() {
159
+ const tools = [];
160
+ // Check for common tools by looking for config files and dependencies
161
+ const checks = [
162
+ { name: 'node', indicators: ['package.json', 'node_modules'] },
163
+ { name: 'typescript', indicators: ['tsconfig.json', 'tsconfig.base.json'] },
164
+ { name: 'python', indicators: ['requirements.txt', 'pyproject.toml', 'setup.py', 'Pipfile'] },
165
+ { name: 'rust', indicators: ['Cargo.toml'] },
166
+ { name: 'go', indicators: ['go.mod', 'go.sum'] },
167
+ { name: 'docker', indicators: ['Dockerfile', 'docker-compose.yml', 'docker-compose.yaml'] },
168
+ { name: 'postgres', indicators: ['.env'] }, // Will check content
169
+ { name: 'redis', indicators: ['.env'] },
170
+ { name: 'mongodb', indicators: ['.env'] },
171
+ ];
172
+ for (const check of checks) {
173
+ for (const indicator of check.indicators) {
174
+ const fullPath = path.join(this.workspacePath, indicator);
175
+ if (fs.existsSync(fullPath)) {
176
+ if (!tools.includes(check.name)) {
177
+ // Special handling for database detection via .env
178
+ if (indicator === '.env' && ['postgres', 'redis', 'mongodb'].includes(check.name)) {
179
+ try {
180
+ const envContent = fs.readFileSync(fullPath, 'utf-8').toLowerCase();
181
+ if (check.name === 'postgres' && (envContent.includes('postgres') || envContent.includes('pg_'))) {
182
+ tools.push(check.name);
183
+ }
184
+ else if (check.name === 'redis' && envContent.includes('redis')) {
185
+ tools.push(check.name);
186
+ }
187
+ else if (check.name === 'mongodb' && (envContent.includes('mongo') || envContent.includes('mongodb'))) {
188
+ tools.push(check.name);
189
+ }
190
+ }
191
+ catch {
192
+ // Ignore read errors
193
+ }
194
+ }
195
+ else {
196
+ tools.push(check.name);
197
+ }
198
+ }
199
+ break;
200
+ }
201
+ }
202
+ }
203
+ return tools;
204
+ }
205
+ /**
206
+ * Format the analysis as a display-ready tree structure
207
+ */
208
+ formatAsTree(analysis) {
209
+ const lines = [];
210
+ const { system, project } = analysis;
211
+ // OS
212
+ lines.push(`├─ OS: ${system.os.displayName}`);
213
+ // Shell
214
+ lines.push(`├─ shell: ${system.shell}`);
215
+ // Git
216
+ if (system.hasGit) {
217
+ lines.push('├─ git repository detected');
218
+ }
219
+ // Tools
220
+ if (system.detectedTools.length > 0) {
221
+ const toolsStr = system.detectedTools.join(' + ');
222
+ lines.push(`├─ ${toolsStr} found`);
223
+ }
224
+ // Project info from ProjectAnalyzerService
225
+ if (project) {
226
+ if (project.frameworks.length > 0) {
227
+ lines.push(`├─ frameworks: ${project.frameworks.slice(0, 3).join(', ')}`);
228
+ }
229
+ if (project.projectType !== 'unknown') {
230
+ lines.push(`├─ project type: ${project.projectType}`);
231
+ }
232
+ }
233
+ // Workspace (always last with └─)
234
+ const lastIdx = lines.length - 1;
235
+ if (lines[lastIdx]) {
236
+ lines[lastIdx] = lines[lastIdx].replace('├─', '└─');
237
+ }
238
+ // Add workspace line
239
+ const homeDir = os.homedir();
240
+ let displayPath = system.workspacePath;
241
+ if (displayPath.startsWith(homeDir)) {
242
+ displayPath = '~' + displayPath.slice(homeDir.length);
243
+ }
244
+ lines.push(`└─ workspace: ${displayPath}`);
245
+ return lines;
246
+ }
247
+ }
248
+ //# sourceMappingURL=SystemDetectionService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemDetectionService.js","sourceRoot":"","sources":["../../../src/services/SystemDetectionService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAwB,MAAM,6BAA6B,CAAC;AA6B3F;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACzB,MAAM,CAAC,QAAQ,GAAkC,IAAI,CAAC;IACtD,QAAQ,GAAwB,IAAI,CAAC;IACrC,aAAa,CAAS;IAE9B,YAAoB,aAAqB;QACvC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,gBAAwB,OAAO,CAAC,GAAG,EAAE;QACtD,IAAI,CAAC,sBAAsB,CAAC,QAAQ,EAAE,CAAC;YACrC,sBAAsB,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,aAAa,CAAC,CAAC;QAC9E,CAAC;QACD,OAAO,sBAAsB,CAAC,QAAQ,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,aAAa;QAClB,sBAAsB,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,aAAsB,KAAK;QAC3C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEO,KAA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ACxD,CAAC;QACH,CAAC;QAED,kCAAkC;QAClC,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACjC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACnB,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtD,CAAC;QAED,qBAAqB;QACrB,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7B,IAAI,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC;QACvC,IAAI,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACpC,WAAW,GAAG,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACxD,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC;QAE3C,OAAO,KAAK,CAAC;IACf,CAAC"}
@@ -9,6 +9,7 @@ import { useTerminalSize } from './hooks/useTerminalSize.js';
9
9
  import { lerp } from '../utils/math.js';
10
10
  import { useUIState } from './contexts/UIStateContext.js';
11
11
  import { StreamingContext } from './contexts/StreamingContext.js';
12
+ import { FocusProvider } from './contexts/FocusContext.js';
12
13
  import { QuittingDisplay } from './components/QuittingDisplay.js';
13
14
  import { ScreenReaderAppLayout } from './layouts/ScreenReaderAppLayout.js';
14
15
  import { DefaultAppLayout } from './layouts/DefaultAppLayout.js';
@@ -32,6 +33,6 @@ export const App = () => {
32
33
  if (uiState.quittingMessages) {
33
34
  return _jsx(QuittingDisplay, {});
34
35
  }
35
- return (_jsx(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? (_jsx(ScreenReaderAppLayout, {})) : (_jsx(DefaultAppLayout, { width: containerWidth })) }));
36
+ return (_jsx(FocusProvider, { children: _jsx(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? (_jsx(ScreenReaderAppLayout, {})) : (_jsx(DefaultAppLayout, { width: containerWidth })) }) }));
36
37
  };
37
38
  //# sourceMappingURL=App.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sourceRoot":"","sources":["../../../src/ui/App.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,KAAK,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,iBAAiB,GAAG,CAAC,aAAqB,EAAU,EAAE;IAC1D,IAAI,aAAa,IAAI,EAAE,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,aAAa,IAAI,GAAG,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uEAAuE;IACvE,MAAM,CAAC,GAAG,CAAC,aAAa,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAEnC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE;IACtB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,qBAAqB,GAAG,wBAAwB,EAAE,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