better-codex 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/README.md +26 -0
  2. package/apps/backend/README.md +46 -0
  3. package/apps/backend/bun.lock +64 -0
  4. package/apps/backend/package.json +18 -0
  5. package/apps/backend/scripts/generate-protocol.ts +32 -0
  6. package/apps/backend/src/analytics/service.ts +219 -0
  7. package/apps/backend/src/analytics/store.ts +284 -0
  8. package/apps/backend/src/config.ts +98 -0
  9. package/apps/backend/src/core/app-server.ts +131 -0
  10. package/apps/backend/src/core/jsonrpc.ts +166 -0
  11. package/apps/backend/src/protocol/AbsolutePathBuf.ts +14 -0
  12. package/apps/backend/src/protocol/AddConversationListenerParams.ts +6 -0
  13. package/apps/backend/src/protocol/AddConversationSubscriptionResponse.ts +5 -0
  14. package/apps/backend/src/protocol/AgentMessageContent.ts +5 -0
  15. package/apps/backend/src/protocol/AgentMessageContentDeltaEvent.ts +5 -0
  16. package/apps/backend/src/protocol/AgentMessageDeltaEvent.ts +5 -0
  17. package/apps/backend/src/protocol/AgentMessageEvent.ts +5 -0
  18. package/apps/backend/src/protocol/AgentMessageItem.ts +6 -0
  19. package/apps/backend/src/protocol/AgentReasoningDeltaEvent.ts +5 -0
  20. package/apps/backend/src/protocol/AgentReasoningEvent.ts +5 -0
  21. package/apps/backend/src/protocol/AgentReasoningRawContentDeltaEvent.ts +5 -0
  22. package/apps/backend/src/protocol/AgentReasoningRawContentEvent.ts +5 -0
  23. package/apps/backend/src/protocol/AgentReasoningSectionBreakEvent.ts +5 -0
  24. package/apps/backend/src/protocol/Annotations.ts +9 -0
  25. package/apps/backend/src/protocol/ApplyPatchApprovalParams.ts +21 -0
  26. package/apps/backend/src/protocol/ApplyPatchApprovalRequestEvent.ts +23 -0
  27. package/apps/backend/src/protocol/ApplyPatchApprovalResponse.ts +6 -0
  28. package/apps/backend/src/protocol/ArchiveConversationParams.ts +6 -0
  29. package/apps/backend/src/protocol/ArchiveConversationResponse.ts +5 -0
  30. package/apps/backend/src/protocol/AskForApproval.ts +9 -0
  31. package/apps/backend/src/protocol/AudioContent.ts +9 -0
  32. package/apps/backend/src/protocol/AuthMode.ts +5 -0
  33. package/apps/backend/src/protocol/AuthStatusChangeNotification.ts +9 -0
  34. package/apps/backend/src/protocol/BackgroundEventEvent.ts +5 -0
  35. package/apps/backend/src/protocol/BlobResourceContents.ts +5 -0
  36. package/apps/backend/src/protocol/CallToolResult.ts +10 -0
  37. package/apps/backend/src/protocol/CancelLoginChatGptParams.ts +5 -0
  38. package/apps/backend/src/protocol/CancelLoginChatGptResponse.ts +5 -0
  39. package/apps/backend/src/protocol/ClientInfo.ts +5 -0
  40. package/apps/backend/src/protocol/ClientNotification.ts +5 -0
  41. package/apps/backend/src/protocol/ClientRequest.ts +46 -0
  42. package/apps/backend/src/protocol/CodexErrorInfo.ts +8 -0
  43. package/apps/backend/src/protocol/ContentBlock.ts +10 -0
  44. package/apps/backend/src/protocol/ContentItem.ts +5 -0
  45. package/apps/backend/src/protocol/ContextCompactedEvent.ts +5 -0
  46. package/apps/backend/src/protocol/ConversationGitInfo.ts +5 -0
  47. package/apps/backend/src/protocol/ConversationId.ts +5 -0
  48. package/apps/backend/src/protocol/ConversationSummary.ts +8 -0
  49. package/apps/backend/src/protocol/CreditsSnapshot.ts +5 -0
  50. package/apps/backend/src/protocol/CustomPrompt.ts +5 -0
  51. package/apps/backend/src/protocol/DeprecationNoticeEvent.ts +13 -0
  52. package/apps/backend/src/protocol/ElicitationRequestEvent.ts +6 -0
  53. package/apps/backend/src/protocol/EmbeddedResource.ts +13 -0
  54. package/apps/backend/src/protocol/EmbeddedResourceResource.ts +7 -0
  55. package/apps/backend/src/protocol/ErrorEvent.ts +6 -0
  56. package/apps/backend/src/protocol/EventMsg.ts +60 -0
  57. package/apps/backend/src/protocol/ExecApprovalRequestEvent.ts +32 -0
  58. package/apps/backend/src/protocol/ExecCommandApprovalParams.ts +12 -0
  59. package/apps/backend/src/protocol/ExecCommandApprovalResponse.ts +6 -0
  60. package/apps/backend/src/protocol/ExecCommandBeginEvent.ts +35 -0
  61. package/apps/backend/src/protocol/ExecCommandEndEvent.ts +59 -0
  62. package/apps/backend/src/protocol/ExecCommandOutputDeltaEvent.ts +18 -0
  63. package/apps/backend/src/protocol/ExecCommandSource.ts +5 -0
  64. package/apps/backend/src/protocol/ExecOneOffCommandParams.ts +6 -0
  65. package/apps/backend/src/protocol/ExecOneOffCommandResponse.ts +5 -0
  66. package/apps/backend/src/protocol/ExecOutputStream.ts +5 -0
  67. package/apps/backend/src/protocol/ExecPolicyAmendment.ts +12 -0
  68. package/apps/backend/src/protocol/ExitedReviewModeEvent.ts +6 -0
  69. package/apps/backend/src/protocol/FileChange.ts +5 -0
  70. package/apps/backend/src/protocol/ForcedLoginMethod.ts +5 -0
  71. package/apps/backend/src/protocol/FunctionCallOutputContentItem.ts +9 -0
  72. package/apps/backend/src/protocol/FunctionCallOutputPayload.ts +15 -0
  73. package/apps/backend/src/protocol/FuzzyFileSearchParams.ts +5 -0
  74. package/apps/backend/src/protocol/FuzzyFileSearchResponse.ts +6 -0
  75. package/apps/backend/src/protocol/FuzzyFileSearchResult.ts +8 -0
  76. package/apps/backend/src/protocol/GetAuthStatusParams.ts +5 -0
  77. package/apps/backend/src/protocol/GetAuthStatusResponse.ts +6 -0
  78. package/apps/backend/src/protocol/GetConversationSummaryParams.ts +6 -0
  79. package/apps/backend/src/protocol/GetConversationSummaryResponse.ts +6 -0
  80. package/apps/backend/src/protocol/GetHistoryEntryResponseEvent.ts +10 -0
  81. package/apps/backend/src/protocol/GetUserAgentResponse.ts +5 -0
  82. package/apps/backend/src/protocol/GetUserSavedConfigResponse.ts +6 -0
  83. package/apps/backend/src/protocol/GhostCommit.ts +8 -0
  84. package/apps/backend/src/protocol/GitDiffToRemoteParams.ts +5 -0
  85. package/apps/backend/src/protocol/GitDiffToRemoteResponse.ts +6 -0
  86. package/apps/backend/src/protocol/GitSha.ts +5 -0
  87. package/apps/backend/src/protocol/HistoryEntry.ts +5 -0
  88. package/apps/backend/src/protocol/ImageContent.ts +9 -0
  89. package/apps/backend/src/protocol/InitializeParams.ts +6 -0
  90. package/apps/backend/src/protocol/InitializeResponse.ts +5 -0
  91. package/apps/backend/src/protocol/InputItem.ts +5 -0
  92. package/apps/backend/src/protocol/InterruptConversationParams.ts +6 -0
  93. package/apps/backend/src/protocol/InterruptConversationResponse.ts +6 -0
  94. package/apps/backend/src/protocol/ItemCompletedEvent.ts +7 -0
  95. package/apps/backend/src/protocol/ItemStartedEvent.ts +7 -0
  96. package/apps/backend/src/protocol/ListConversationsParams.ts +5 -0
  97. package/apps/backend/src/protocol/ListConversationsResponse.ts +6 -0
  98. package/apps/backend/src/protocol/ListCustomPromptsResponseEvent.ts +9 -0
  99. package/apps/backend/src/protocol/ListSkillsResponseEvent.ts +9 -0
  100. package/apps/backend/src/protocol/LocalShellAction.ts +6 -0
  101. package/apps/backend/src/protocol/LocalShellExecAction.ts +5 -0
  102. package/apps/backend/src/protocol/LocalShellStatus.ts +5 -0
  103. package/apps/backend/src/protocol/LoginApiKeyParams.ts +5 -0
  104. package/apps/backend/src/protocol/LoginApiKeyResponse.ts +5 -0
  105. package/apps/backend/src/protocol/LoginChatGptCompleteNotification.ts +8 -0
  106. package/apps/backend/src/protocol/LoginChatGptResponse.ts +5 -0
  107. package/apps/backend/src/protocol/LogoutChatGptResponse.ts +5 -0
  108. package/apps/backend/src/protocol/McpAuthStatus.ts +5 -0
  109. package/apps/backend/src/protocol/McpInvocation.ts +18 -0
  110. package/apps/backend/src/protocol/McpListToolsResponseEvent.ts +25 -0
  111. package/apps/backend/src/protocol/McpStartupCompleteEvent.ts +6 -0
  112. package/apps/backend/src/protocol/McpStartupFailure.ts +5 -0
  113. package/apps/backend/src/protocol/McpStartupStatus.ts +5 -0
  114. package/apps/backend/src/protocol/McpStartupUpdateEvent.ts +14 -0
  115. package/apps/backend/src/protocol/McpToolCallBeginEvent.ts +10 -0
  116. package/apps/backend/src/protocol/McpToolCallEndEvent.ts +15 -0
  117. package/apps/backend/src/protocol/NetworkAccess.ts +8 -0
  118. package/apps/backend/src/protocol/NewConversationParams.ts +8 -0
  119. package/apps/backend/src/protocol/NewConversationResponse.ts +7 -0
  120. package/apps/backend/src/protocol/ParsedCommand.ts +12 -0
  121. package/apps/backend/src/protocol/PatchApplyBeginEvent.ts +23 -0
  122. package/apps/backend/src/protocol/PatchApplyEndEvent.ts +31 -0
  123. package/apps/backend/src/protocol/PlanItemArg.ts +6 -0
  124. package/apps/backend/src/protocol/PlanType.ts +5 -0
  125. package/apps/backend/src/protocol/Profile.ts +9 -0
  126. package/apps/backend/src/protocol/README.md +11 -0
  127. package/apps/backend/src/protocol/RateLimitSnapshot.ts +8 -0
  128. package/apps/backend/src/protocol/RateLimitWindow.ts +17 -0
  129. package/apps/backend/src/protocol/RawResponseItemEvent.ts +6 -0
  130. package/apps/backend/src/protocol/ReasoningContentDeltaEvent.ts +5 -0
  131. package/apps/backend/src/protocol/ReasoningEffort.ts +8 -0
  132. package/apps/backend/src/protocol/ReasoningItem.ts +5 -0
  133. package/apps/backend/src/protocol/ReasoningItemContent.ts +5 -0
  134. package/apps/backend/src/protocol/ReasoningItemReasoningSummary.ts +5 -0
  135. package/apps/backend/src/protocol/ReasoningRawContentDeltaEvent.ts +5 -0
  136. package/apps/backend/src/protocol/ReasoningSummary.ts +10 -0
  137. package/apps/backend/src/protocol/RemoveConversationListenerParams.ts +5 -0
  138. package/apps/backend/src/protocol/RemoveConversationSubscriptionResponse.ts +5 -0
  139. package/apps/backend/src/protocol/RequestId.ts +5 -0
  140. package/apps/backend/src/protocol/Resource.ts +9 -0
  141. package/apps/backend/src/protocol/ResourceLink.ts +11 -0
  142. package/apps/backend/src/protocol/ResourceTemplate.ts +9 -0
  143. package/apps/backend/src/protocol/ResponseItem.ts +17 -0
  144. package/apps/backend/src/protocol/ResumeConversationParams.ts +8 -0
  145. package/apps/backend/src/protocol/ResumeConversationResponse.ts +7 -0
  146. package/apps/backend/src/protocol/ReviewCodeLocation.ts +9 -0
  147. package/apps/backend/src/protocol/ReviewDecision.ts +9 -0
  148. package/apps/backend/src/protocol/ReviewFinding.ts +9 -0
  149. package/apps/backend/src/protocol/ReviewLineRange.ts +8 -0
  150. package/apps/backend/src/protocol/ReviewOutputEvent.ts +9 -0
  151. package/apps/backend/src/protocol/ReviewRequest.ts +9 -0
  152. package/apps/backend/src/protocol/ReviewTarget.ts +9 -0
  153. package/apps/backend/src/protocol/Role.ts +8 -0
  154. package/apps/backend/src/protocol/SandboxMode.ts +5 -0
  155. package/apps/backend/src/protocol/SandboxPolicy.ts +35 -0
  156. package/apps/backend/src/protocol/SandboxSettings.ts +6 -0
  157. package/apps/backend/src/protocol/SendUserMessageParams.ts +7 -0
  158. package/apps/backend/src/protocol/SendUserMessageResponse.ts +5 -0
  159. package/apps/backend/src/protocol/SendUserTurnParams.ts +11 -0
  160. package/apps/backend/src/protocol/SendUserTurnResponse.ts +5 -0
  161. package/apps/backend/src/protocol/ServerNotification.ts +36 -0
  162. package/apps/backend/src/protocol/ServerRequest.ts +13 -0
  163. package/apps/backend/src/protocol/SessionConfiguredEvent.ts +48 -0
  164. package/apps/backend/src/protocol/SessionConfiguredNotification.ts +8 -0
  165. package/apps/backend/src/protocol/SessionSource.ts +6 -0
  166. package/apps/backend/src/protocol/SetDefaultModelParams.ts +6 -0
  167. package/apps/backend/src/protocol/SetDefaultModelResponse.ts +5 -0
  168. package/apps/backend/src/protocol/SkillErrorInfo.ts +5 -0
  169. package/apps/backend/src/protocol/SkillMetadata.ts +6 -0
  170. package/apps/backend/src/protocol/SkillScope.ts +5 -0
  171. package/apps/backend/src/protocol/SkillsListEntry.ts +7 -0
  172. package/apps/backend/src/protocol/StepStatus.ts +5 -0
  173. package/apps/backend/src/protocol/StreamErrorEvent.ts +6 -0
  174. package/apps/backend/src/protocol/SubAgentSource.ts +5 -0
  175. package/apps/backend/src/protocol/TaskCompleteEvent.ts +5 -0
  176. package/apps/backend/src/protocol/TaskStartedEvent.ts +5 -0
  177. package/apps/backend/src/protocol/TerminalInteractionEvent.ts +17 -0
  178. package/apps/backend/src/protocol/TextContent.ts +9 -0
  179. package/apps/backend/src/protocol/TextResourceContents.ts +5 -0
  180. package/apps/backend/src/protocol/TokenCountEvent.ts +7 -0
  181. package/apps/backend/src/protocol/TokenUsage.ts +5 -0
  182. package/apps/backend/src/protocol/TokenUsageInfo.ts +6 -0
  183. package/apps/backend/src/protocol/Tool.ts +11 -0
  184. package/apps/backend/src/protocol/ToolAnnotations.ts +15 -0
  185. package/apps/backend/src/protocol/ToolInputSchema.ts +9 -0
  186. package/apps/backend/src/protocol/ToolOutputSchema.ts +10 -0
  187. package/apps/backend/src/protocol/Tools.ts +5 -0
  188. package/apps/backend/src/protocol/TurnAbortReason.ts +5 -0
  189. package/apps/backend/src/protocol/TurnAbortedEvent.ts +6 -0
  190. package/apps/backend/src/protocol/TurnDiffEvent.ts +5 -0
  191. package/apps/backend/src/protocol/TurnItem.ts +9 -0
  192. package/apps/backend/src/protocol/UndoCompletedEvent.ts +5 -0
  193. package/apps/backend/src/protocol/UndoStartedEvent.ts +5 -0
  194. package/apps/backend/src/protocol/UpdatePlanArgs.ts +6 -0
  195. package/apps/backend/src/protocol/UserInfoResponse.ts +5 -0
  196. package/apps/backend/src/protocol/UserInput.ts +8 -0
  197. package/apps/backend/src/protocol/UserMessageEvent.ts +5 -0
  198. package/apps/backend/src/protocol/UserMessageItem.ts +6 -0
  199. package/apps/backend/src/protocol/UserSavedConfig.ts +14 -0
  200. package/apps/backend/src/protocol/Verbosity.ts +9 -0
  201. package/apps/backend/src/protocol/ViewImageToolCallEvent.ts +13 -0
  202. package/apps/backend/src/protocol/WarningEvent.ts +5 -0
  203. package/apps/backend/src/protocol/WebSearchAction.ts +5 -0
  204. package/apps/backend/src/protocol/WebSearchBeginEvent.ts +5 -0
  205. package/apps/backend/src/protocol/WebSearchEndEvent.ts +5 -0
  206. package/apps/backend/src/protocol/WebSearchItem.ts +5 -0
  207. package/apps/backend/src/protocol/index.ts +198 -0
  208. package/apps/backend/src/protocol/serde_json/JsonValue.ts +5 -0
  209. package/apps/backend/src/protocol/v2/Account.ts +6 -0
  210. package/apps/backend/src/protocol/v2/AccountLoginCompletedNotification.ts +5 -0
  211. package/apps/backend/src/protocol/v2/AccountRateLimitsUpdatedNotification.ts +6 -0
  212. package/apps/backend/src/protocol/v2/AccountUpdatedNotification.ts +6 -0
  213. package/apps/backend/src/protocol/v2/AgentMessageDeltaNotification.ts +5 -0
  214. package/apps/backend/src/protocol/v2/ApprovalDecision.ts +6 -0
  215. package/apps/backend/src/protocol/v2/AskForApproval.ts +5 -0
  216. package/apps/backend/src/protocol/v2/CancelLoginAccountParams.ts +5 -0
  217. package/apps/backend/src/protocol/v2/CancelLoginAccountResponse.ts +6 -0
  218. package/apps/backend/src/protocol/v2/CancelLoginAccountStatus.ts +5 -0
  219. package/apps/backend/src/protocol/v2/CodexErrorInfo.ts +11 -0
  220. package/apps/backend/src/protocol/v2/CommandAction.ts +5 -0
  221. package/apps/backend/src/protocol/v2/CommandExecParams.ts +6 -0
  222. package/apps/backend/src/protocol/v2/CommandExecResponse.ts +5 -0
  223. package/apps/backend/src/protocol/v2/CommandExecutionOutputDeltaNotification.ts +5 -0
  224. package/apps/backend/src/protocol/v2/CommandExecutionRequestApprovalParams.ts +14 -0
  225. package/apps/backend/src/protocol/v2/CommandExecutionRequestApprovalResponse.ts +6 -0
  226. package/apps/backend/src/protocol/v2/CommandExecutionStatus.ts +5 -0
  227. package/apps/backend/src/protocol/v2/Config.ts +15 -0
  228. package/apps/backend/src/protocol/v2/ConfigBatchWriteParams.ts +10 -0
  229. package/apps/backend/src/protocol/v2/ConfigEdit.ts +7 -0
  230. package/apps/backend/src/protocol/v2/ConfigLayer.ts +7 -0
  231. package/apps/backend/src/protocol/v2/ConfigLayerMetadata.ts +6 -0
  232. package/apps/backend/src/protocol/v2/ConfigLayerSource.ts +6 -0
  233. package/apps/backend/src/protocol/v2/ConfigReadParams.ts +5 -0
  234. package/apps/backend/src/protocol/v2/ConfigReadResponse.ts +8 -0
  235. package/apps/backend/src/protocol/v2/ConfigValueWriteParams.ts +11 -0
  236. package/apps/backend/src/protocol/v2/ConfigWriteResponse.ts +12 -0
  237. package/apps/backend/src/protocol/v2/ContextCompactedNotification.ts +5 -0
  238. package/apps/backend/src/protocol/v2/CreditsSnapshot.ts +5 -0
  239. package/apps/backend/src/protocol/v2/DeprecationNoticeNotification.ts +13 -0
  240. package/apps/backend/src/protocol/v2/ErrorNotification.ts +6 -0
  241. package/apps/backend/src/protocol/v2/ExecPolicyAmendment.ts +5 -0
  242. package/apps/backend/src/protocol/v2/FeedbackUploadParams.ts +5 -0
  243. package/apps/backend/src/protocol/v2/FeedbackUploadResponse.ts +5 -0
  244. package/apps/backend/src/protocol/v2/FileChangeOutputDeltaNotification.ts +5 -0
  245. package/apps/backend/src/protocol/v2/FileChangeRequestApprovalParams.ts +14 -0
  246. package/apps/backend/src/protocol/v2/FileChangeRequestApprovalResponse.ts +6 -0
  247. package/apps/backend/src/protocol/v2/FileUpdateChange.ts +6 -0
  248. package/apps/backend/src/protocol/v2/GetAccountParams.ts +5 -0
  249. package/apps/backend/src/protocol/v2/GetAccountRateLimitsResponse.ts +6 -0
  250. package/apps/backend/src/protocol/v2/GetAccountResponse.ts +6 -0
  251. package/apps/backend/src/protocol/v2/GitInfo.ts +5 -0
  252. package/apps/backend/src/protocol/v2/ItemCompletedNotification.ts +6 -0
  253. package/apps/backend/src/protocol/v2/ItemStartedNotification.ts +6 -0
  254. package/apps/backend/src/protocol/v2/ListMcpServerStatusParams.ts +13 -0
  255. package/apps/backend/src/protocol/v2/ListMcpServerStatusResponse.ts +11 -0
  256. package/apps/backend/src/protocol/v2/LoginAccountParams.ts +5 -0
  257. package/apps/backend/src/protocol/v2/LoginAccountResponse.ts +9 -0
  258. package/apps/backend/src/protocol/v2/LogoutAccountResponse.ts +5 -0
  259. package/apps/backend/src/protocol/v2/McpAuthStatus.ts +5 -0
  260. package/apps/backend/src/protocol/v2/McpServerOauthLoginCompletedNotification.ts +5 -0
  261. package/apps/backend/src/protocol/v2/McpServerOauthLoginParams.ts +5 -0
  262. package/apps/backend/src/protocol/v2/McpServerOauthLoginResponse.ts +5 -0
  263. package/apps/backend/src/protocol/v2/McpServerStatus.ts +9 -0
  264. package/apps/backend/src/protocol/v2/McpToolCallError.ts +5 -0
  265. package/apps/backend/src/protocol/v2/McpToolCallProgressNotification.ts +5 -0
  266. package/apps/backend/src/protocol/v2/McpToolCallResult.ts +7 -0
  267. package/apps/backend/src/protocol/v2/McpToolCallStatus.ts +5 -0
  268. package/apps/backend/src/protocol/v2/MergeStrategy.ts +5 -0
  269. package/apps/backend/src/protocol/v2/Model.ts +7 -0
  270. package/apps/backend/src/protocol/v2/ModelListParams.ts +13 -0
  271. package/apps/backend/src/protocol/v2/ModelListResponse.ts +11 -0
  272. package/apps/backend/src/protocol/v2/NetworkAccess.ts +5 -0
  273. package/apps/backend/src/protocol/v2/OverriddenMetadata.ts +7 -0
  274. package/apps/backend/src/protocol/v2/PatchApplyStatus.ts +5 -0
  275. package/apps/backend/src/protocol/v2/PatchChangeKind.ts +5 -0
  276. package/apps/backend/src/protocol/v2/ProfileV2.ts +10 -0
  277. package/apps/backend/src/protocol/v2/RateLimitSnapshot.ts +8 -0
  278. package/apps/backend/src/protocol/v2/RateLimitWindow.ts +5 -0
  279. package/apps/backend/src/protocol/v2/RawResponseItemCompletedNotification.ts +6 -0
  280. package/apps/backend/src/protocol/v2/ReasoningEffortOption.ts +6 -0
  281. package/apps/backend/src/protocol/v2/ReasoningSummaryPartAddedNotification.ts +5 -0
  282. package/apps/backend/src/protocol/v2/ReasoningSummaryTextDeltaNotification.ts +5 -0
  283. package/apps/backend/src/protocol/v2/ReasoningTextDeltaNotification.ts +5 -0
  284. package/apps/backend/src/protocol/v2/ReviewDelivery.ts +5 -0
  285. package/apps/backend/src/protocol/v2/ReviewStartParams.ts +12 -0
  286. package/apps/backend/src/protocol/v2/ReviewStartResponse.ts +13 -0
  287. package/apps/backend/src/protocol/v2/ReviewTarget.ts +9 -0
  288. package/apps/backend/src/protocol/v2/SandboxMode.ts +5 -0
  289. package/apps/backend/src/protocol/v2/SandboxPolicy.ts +7 -0
  290. package/apps/backend/src/protocol/v2/SandboxWorkspaceWrite.ts +5 -0
  291. package/apps/backend/src/protocol/v2/SessionSource.ts +5 -0
  292. package/apps/backend/src/protocol/v2/SkillErrorInfo.ts +5 -0
  293. package/apps/backend/src/protocol/v2/SkillMetadata.ts +6 -0
  294. package/apps/backend/src/protocol/v2/SkillScope.ts +5 -0
  295. package/apps/backend/src/protocol/v2/SkillsListEntry.ts +7 -0
  296. package/apps/backend/src/protocol/v2/SkillsListParams.ts +13 -0
  297. package/apps/backend/src/protocol/v2/SkillsListResponse.ts +6 -0
  298. package/apps/backend/src/protocol/v2/TerminalInteractionNotification.ts +5 -0
  299. package/apps/backend/src/protocol/v2/Thread.ts +46 -0
  300. package/apps/backend/src/protocol/v2/ThreadArchiveParams.ts +5 -0
  301. package/apps/backend/src/protocol/v2/ThreadArchiveResponse.ts +5 -0
  302. package/apps/backend/src/protocol/v2/ThreadItem.ts +48 -0
  303. package/apps/backend/src/protocol/v2/ThreadListParams.ts +18 -0
  304. package/apps/backend/src/protocol/v2/ThreadListResponse.ts +11 -0
  305. package/apps/backend/src/protocol/v2/ThreadResumeParams.ts +35 -0
  306. package/apps/backend/src/protocol/v2/ThreadResumeResponse.ts +9 -0
  307. package/apps/backend/src/protocol/v2/ThreadStartParams.ts +15 -0
  308. package/apps/backend/src/protocol/v2/ThreadStartResponse.ts +9 -0
  309. package/apps/backend/src/protocol/v2/ThreadStartedNotification.ts +6 -0
  310. package/apps/backend/src/protocol/v2/ThreadTokenUsage.ts +6 -0
  311. package/apps/backend/src/protocol/v2/ThreadTokenUsageUpdatedNotification.ts +6 -0
  312. package/apps/backend/src/protocol/v2/TokenUsageBreakdown.ts +5 -0
  313. package/apps/backend/src/protocol/v2/ToolsV2.ts +5 -0
  314. package/apps/backend/src/protocol/v2/Turn.ts +18 -0
  315. package/apps/backend/src/protocol/v2/TurnCompletedNotification.ts +6 -0
  316. package/apps/backend/src/protocol/v2/TurnDiffUpdatedNotification.ts +9 -0
  317. package/apps/backend/src/protocol/v2/TurnError.ts +6 -0
  318. package/apps/backend/src/protocol/v2/TurnInterruptParams.ts +5 -0
  319. package/apps/backend/src/protocol/v2/TurnInterruptResponse.ts +5 -0
  320. package/apps/backend/src/protocol/v2/TurnPlanStep.ts +6 -0
  321. package/apps/backend/src/protocol/v2/TurnPlanStepStatus.ts +5 -0
  322. package/apps/backend/src/protocol/v2/TurnPlanUpdatedNotification.ts +6 -0
  323. package/apps/backend/src/protocol/v2/TurnStartParams.ts +34 -0
  324. package/apps/backend/src/protocol/v2/TurnStartResponse.ts +6 -0
  325. package/apps/backend/src/protocol/v2/TurnStartedNotification.ts +6 -0
  326. package/apps/backend/src/protocol/v2/TurnStatus.ts +5 -0
  327. package/apps/backend/src/protocol/v2/UserInput.ts +5 -0
  328. package/apps/backend/src/protocol/v2/WindowsWorldWritableWarningNotification.ts +5 -0
  329. package/apps/backend/src/protocol/v2/WriteStatus.ts +5 -0
  330. package/apps/backend/src/protocol/v2/index.ts +123 -0
  331. package/apps/backend/src/reviews/service.ts +27 -0
  332. package/apps/backend/src/reviews/store.ts +124 -0
  333. package/apps/backend/src/server.ts +531 -0
  334. package/apps/backend/src/services/profile-store.ts +114 -0
  335. package/apps/backend/src/services/supervisor.ts +102 -0
  336. package/apps/backend/src/thread-index/service.ts +75 -0
  337. package/apps/backend/src/thread-index/store.ts +195 -0
  338. package/apps/backend/src/ws/messages.ts +73 -0
  339. package/apps/backend/tsconfig.json +20 -0
  340. package/apps/web/README.md +24 -0
  341. package/apps/web/bun.lock +1062 -0
  342. package/apps/web/eslint.config.js +23 -0
  343. package/apps/web/index.html +16 -0
  344. package/apps/web/package.json +38 -0
  345. package/apps/web/src/app.tsx +83 -0
  346. package/apps/web/src/components/composer/slash-command-menu.tsx +47 -0
  347. package/apps/web/src/components/index.ts +2 -0
  348. package/apps/web/src/components/layout/account-usage-panel.tsx +167 -0
  349. package/apps/web/src/components/layout/analytics-view.tsx +296 -0
  350. package/apps/web/src/components/layout/index.ts +7 -0
  351. package/apps/web/src/components/layout/mobile-header.tsx +56 -0
  352. package/apps/web/src/components/layout/reviews-view.tsx +848 -0
  353. package/apps/web/src/components/layout/session-view.tsx +1374 -0
  354. package/apps/web/src/components/layout/settings-dialog.tsx +322 -0
  355. package/apps/web/src/components/layout/side-bar.tsx +417 -0
  356. package/apps/web/src/components/layout/thread-list.tsx +488 -0
  357. package/apps/web/src/components/layout/virtualized-message-list.tsx +748 -0
  358. package/apps/web/src/components/loading/startup-ascii.ts +652 -0
  359. package/apps/web/src/components/loading/startup-loader.tsx +37 -0
  360. package/apps/web/src/components/session-view/file-mention-menu.tsx +46 -0
  361. package/apps/web/src/components/session-view/session-auth-banner.tsx +61 -0
  362. package/apps/web/src/components/session-view/session-composer.tsx +328 -0
  363. package/apps/web/src/components/session-view/session-dialogs.tsx +280 -0
  364. package/apps/web/src/components/session-view/session-empty.tsx +47 -0
  365. package/apps/web/src/components/session-view/session-header.tsx +49 -0
  366. package/apps/web/src/components/ui/avatar.tsx +19 -0
  367. package/apps/web/src/components/ui/badge.tsx +21 -0
  368. package/apps/web/src/components/ui/button.tsx +47 -0
  369. package/apps/web/src/components/ui/collapsible-content.tsx +114 -0
  370. package/apps/web/src/components/ui/contribution-graph.tsx +182 -0
  371. package/apps/web/src/components/ui/dialog-box.tsx +203 -0
  372. package/apps/web/src/components/ui/icon-button.tsx +32 -0
  373. package/apps/web/src/components/ui/icons.tsx +187 -0
  374. package/apps/web/src/components/ui/index.tsx +15 -0
  375. package/apps/web/src/components/ui/input.tsx +43 -0
  376. package/apps/web/src/components/ui/markdown-stream.tsx +21 -0
  377. package/apps/web/src/components/ui/mobile-drawer.tsx +124 -0
  378. package/apps/web/src/components/ui/section-header.tsx +13 -0
  379. package/apps/web/src/components/ui/select.tsx +217 -0
  380. package/apps/web/src/components/ui/shimmer.tsx +138 -0
  381. package/apps/web/src/components/ui/status-dot.tsx +24 -0
  382. package/apps/web/src/config.ts +5 -0
  383. package/apps/web/src/hooks/index.ts +3 -0
  384. package/apps/web/src/hooks/use-analytics.ts +122 -0
  385. package/apps/web/src/hooks/use-hub-connection.ts +587 -0
  386. package/apps/web/src/hooks/use-mobile.ts +76 -0
  387. package/apps/web/src/hooks/use-thread-history.ts +210 -0
  388. package/apps/web/src/index.css +269 -0
  389. package/apps/web/src/main.tsx +10 -0
  390. package/apps/web/src/services/hub-client.ts +358 -0
  391. package/apps/web/src/store/index.ts +528 -0
  392. package/apps/web/src/types/index.ts +119 -0
  393. package/apps/web/src/utils/account-refresh.ts +168 -0
  394. package/apps/web/src/utils/approval-policy.ts +53 -0
  395. package/apps/web/src/utils/init-prompt.ts +41 -0
  396. package/apps/web/src/utils/item-format.ts +170 -0
  397. package/apps/web/src/utils/prompt-expander.ts +62 -0
  398. package/apps/web/src/utils/reasoning-summary.ts +48 -0
  399. package/apps/web/src/utils/slash-commands.ts +98 -0
  400. package/apps/web/tsconfig.app.json +28 -0
  401. package/apps/web/tsconfig.json +7 -0
  402. package/apps/web/tsconfig.node.json +26 -0
  403. package/apps/web/vite.config.ts +8 -0
  404. package/bin/better-codex.cjs +199 -0
  405. package/package.json +20 -0
@@ -0,0 +1,652 @@
1
+ export const STARTUP_FRAME_TICK_MS = 80
2
+
3
+ export const STARTUP_FRAMES = [
4
+ `
5
+ eoeddccddcoe
6
+ edoocecocedxxde ecce
7
+ oxcxccccee eccecxdxxxc
8
+ dceeccooe ocxdxo
9
+ eedocexeeee coxeeo
10
+ xc ce xcodxxo coexxo
11
+ cecoc cexcocxe xox
12
+ xxexe oooxdxc cex
13
+ xdxce dxxeexcoxcccccceco dc x
14
+ exdc edce oc xcxeeeodoooxoooox
15
+ eeece eeoooe eecccc eccoodeo
16
+ ceo co e ococex
17
+ eeoeece edecxecc
18
+ ecoee ccdddddodcceoxc
19
+ ecccxxxeeeoedccc
20
+
21
+ `,
22
+ `
23
+ eoeddcdddcoe
24
+ ecoocdcxxxdxxdecxcce
25
+ oxcxeccxcee eccdcoxxdxo
26
+ exoeoccooe ooexoxo
27
+ oecocexeeeee eoxexo
28
+ cocce xcecoec eexcx
29
+ oxccx eoxdxexo ocxcx
30
+ xc ee oxcxxdc xcoox
31
+ cccdx dxeeexcoxccccccccoxexxc
32
+ edcx oxxc oc xdeeeeeooeexco x
33
+ eee c ceooxc ecccccccccxocxx
34
+ ceeooo e ocdooc
35
+ oeeexco odec exc
36
+ exedeecccdddddodceexxc
37
+ eccccxxeeeexdocc
38
+
39
+ `,
40
+ `
41
+ eoddccddddoe
42
+ ecooexxcxcddxdeexcce
43
+ odocdxccce ecx cccoexo
44
+ ocoexdoce edc xxe
45
+ cocxoeoxxcee eeexxe
46
+ oxeeo ooxedee x eex
47
+ dc x ccexecxo ocoxo
48
+ ooxox ooxcoex xexdx
49
+ occx dxccxxcoxdcceeeccexecdx
50
+ oedeo oocoddx xcxeeo doodeexexe
51
+ cex x cxxcoc cccccccccoooooo
52
+ ccx ec e oeceoo
53
+ deooceo ocdocoxc
54
+ decoecceddddoddcdeecc
55
+ ecccedxeeeexdoec
56
+
57
+ `,
58
+ `
59
+ eoddcddcdcoe
60
+ eocccxo xedocdxcocoe
61
+ ocdxxxccce eexeecxoeee
62
+ ooxoxcoco cxccece
63
+ oxoexdxedexo ecexce
64
+ oxxex cexxoce c edxo
65
+ cexde ccceccxo o cdx
66
+ xoe oxocexx xxx
67
+ ex xe dxoceoocxccceeeeoo xxc
68
+ xeo x oooooexedexooeodoedxoocx
69
+ exdceoeeoeo ccccccccceoxxxe
70
+ oxecxee oedoccc
71
+ eeode oe eoeocdxo
72
+ xxxdecceddddocdccexce
73
+ ceexdxeeeeedoce
74
+
75
+ `,
76
+ `
77
+ eodddcdddcoe
78
+ ecccocoxxcxdcdexcco
79
+ ceoecxcce cedxce oco
80
+ oxoxoxodo oexxxxe
81
+ oeocoeecxeeo e exexe
82
+ xxxxo eexedoxe coxx
83
+ xox c eeexecxo ccxcxo
84
+ xoxec oedxoex cxex
85
+ xoxec oexcoxcdexcxeeecoecxox
86
+ eexeoooccc xc ooedeodoooxocxe
87
+ eoxxoxoeeoce ccccccccoxdxeo
88
+ eecoee e oeocoe
89
+ eocexdce edcoccdc
90
+ excxoccedxdeocdcexdc
91
+ eocecceeeoeocce
92
+
93
+ `,
94
+ `
95
+ eodddcddccee
96
+ oedocxdccxccdeocce
97
+ oooxxxcc ecxodcccoee
98
+ ooxcxcedo ecxxxxo
99
+ cdxxxceecce oeexeo
100
+ dooxoeecdxeexo odeox
101
+ e cxx eexoee ecxex
102
+ x xxx exdxoxx xcexx
103
+ eoxox ocxxcdocexcxeecceoeox
104
+ xxeooeeedc xodcoxxodddexoxe
105
+ o x oxxxdoc cccccccceeeox
106
+ o d ooe odeooxe
107
+ oeeecco eceeococ
108
+ ecxcocc dxeeoccc ddc
109
+ eodccoeeeeeocc
110
+
111
+ `,
112
+ `
113
+ eoxdccddcoe
114
+ ocecexcccdded eco
115
+ c oxxxce eexe coeco
116
+ eexxxxdc execxoo
117
+ ecxcxxexoeo o cxxe
118
+ x dxxc ecedxe ooxxx
119
+ eecx eexexex ccexx
120
+ ecoxx dcoxcxe c xxx
121
+ ocxc oceoxeoxxddexxddcexx
122
+ xocxxddxxocxoexxeeododexex
123
+ e deocxceo cccccccceoxx
124
+ ce oeoee ocoodoc
125
+ cdoceeee oexococc
126
+ eecexcedxeeeccxcco
127
+ cxccxdxeeoedcc
128
+
129
+ `,
130
+ `
131
+ eecedccdcoe
132
+ occoxxxcdd x cc
133
+ exdoxooc ocxoxceceo
134
+ ececoxocx c dexxe
135
+ c oxooexoe ocexxo
136
+ xcoxeeeeexec ecxxx
137
+ xcxxx cedexex xexoxo
138
+ eoxxo xceoxoco oeoxx
139
+ e exxee ocdxxococooexxx
140
+ ecodexcoxoxxdxdeexxdc
141
+ ooeexexxxocececceccoex
142
+ cocxexee oooooc
143
+ ceeceeee eoeexcoc
144
+ odcxoc ddccdodoxe
145
+ xxeccexeocode
146
+ ee
147
+ `,
148
+ `
149
+ odecoccdo
150
+ oceoxxccd eoee
151
+ o oxxoceedo eexo
152
+ c xxodde eeoxeexco
153
+ occdeccxco coccdcxx
154
+ x xxxcexedee xcxcxxx
155
+ e xcexccxeeocooo exx
156
+ x xoeoexxxeodeex xx
157
+ coxc oxcxxxxcxxoxxe
158
+ xexxxeoxexexxxxeexxx
159
+ c eeoeexocccccxxcoex
160
+ exxxeoe oo eoxe
161
+ ecexee odedxoc
162
+ eoceexcocdddcxe
163
+ coe ceexdcoc
164
+
165
+ `,
166
+ `
167
+ eccccecce
168
+ ccecccexoeco
169
+ eeoxxoxxoxceoo
170
+ xeeoexdeoeocceeo
171
+ o dxxcxe cooeoxo
172
+ xe cxcxooe eecx
173
+ e xcccxxxxc xoo
174
+ c xxecocxxoeeoexx
175
+ c xe eexdxxcecdxx
176
+ x oxeoxeoeceeexce
177
+ o cxxxxxcc eocexe
178
+ eecoeocc exccooo
179
+ xc xxxxcodooxoe
180
+ deccoxcde ooc
181
+ co eceeodc
182
+
183
+ `,
184
+ `
185
+ occcccce
186
+ oc dxxxeeo
187
+ oceexxdecoeo
188
+ xeexxddoedoo
189
+ ecodexcecdexxo
190
+ xcexxceddxeoxx
191
+ cc oxxxxxxexde
192
+ x xxoxxeo xcx
193
+ o cxoxxcocxex
194
+ cc exodocoxexe
195
+ ceo xxxxdoxeex
196
+ eeooxecoccdxe
197
+ e cxeeeexdc
198
+ ec cxxoeoce
199
+ ee cccece
200
+
201
+ `,
202
+ `
203
+ ccccco
204
+ odeeoxoe
205
+ c xoeco
206
+ ocxxxddcx
207
+ x cxxxxoox
208
+ xcoocecexc
209
+ x xoexxe
210
+ x ocexxc
211
+ co xoxxcxx
212
+ x oxcdce
213
+ xo xcdcco
214
+ o cx eox
215
+ o ccxocex
216
+ ceocoxexe
217
+ e cxeoo
218
+
219
+ `,
220
+ `
221
+ occco
222
+ xeexx
223
+ xeexc
224
+ xccxe
225
+ c xx
226
+ cdoxx
227
+ o xx
228
+ c cx
229
+ oc exo
230
+ xc cdx
231
+ ceoo xe
232
+ xeeex
233
+ xcoxe
234
+ ceexd
235
+ o ocd
236
+
237
+ `,
238
+ `
239
+ ccccd
240
+ ooeeoe
241
+ xexxo x
242
+ xxoxcexo
243
+ xxxe x
244
+ xcxx cx
245
+ xxxx o c
246
+ xxexe e
247
+ xxxx c
248
+ ceoo do
249
+ exccooox
250
+ xcxxeeex
251
+ o cxddde
252
+ xeoceeo
253
+ ec cdo
254
+
255
+ `,
256
+ `
257
+ cccccxe
258
+ eodxxedco
259
+ ooxcdexccx
260
+ xoe ooooeex
261
+ xxdcdexxocex
262
+ exxoxxoox c
263
+ xx xxxxxxox
264
+ xxoxxcxxx cox
265
+ xxcoocxxxeodx
266
+ xexdoxexco ox
267
+ xoxxxxex e d
268
+ xccoexxeo d
269
+ cxeo oooe de
270
+ xexxeeoceo
271
+ eeceeeeo
272
+ ee
273
+ `,
274
+ `
275
+ edcccccxe
276
+ oexxcxxexde
277
+ xooceodexx ce
278
+ ooo dceexexxccx
279
+ xxdeoccdxxcoxee
280
+ xxxcxc xed x xox
281
+ eex oeoxxxxocco x
282
+ xod xexxoxxxcd ex
283
+ eexxxcxoexxccc o
284
+ cceeoddecxoex oex
285
+ xxxcccocexdcdoxxe
286
+ xxc xe eooo o
287
+ exc x oooeox
288
+ exxcecxoocex
289
+ cdoeddeedc
290
+
291
+ `,
292
+ `
293
+ odcccddxoe
294
+ edccxxxcdcxoceo
295
+ oceoeddecocxxxece
296
+ oxoeoxcee cxdexxxde
297
+ xoe x xcoedeoo o
298
+ edcooe odox oodoxoo
299
+ c dox oooxe ccxxodx
300
+ ocdx ooxxoxoxxddc
301
+ oocoeddcxeexeedexxx x
302
+ xcedeexoceoxxe eccce
303
+ eeeoccccccceexcooe ec
304
+ exxec eoxxe d
305
+ eee cee ocooeeo
306
+ o xccdeceedcdxc
307
+ ecdoeocxcecc
308
+ e
309
+ `,
310
+ `
311
+ eddcddcdxoe
312
+ eccedoccxeeoccdde
313
+ eodxcccdcocoeccooe c
314
+ oxxcooecc ceeeodxedeeeo
315
+ eeoo ox ecceeoxoxeedeee
316
+ oex ooxoeeeoocoxcooeoeox
317
+ xxedo cocoxceoccxdxdo
318
+ ceoxx eecxxde xdxc
319
+ ecc oedddddcxxoxcoeo xcxe
320
+ eeexcec xxoeeeexxxedxee o
321
+ xoxeeccccccce eeeoxocoeoe
322
+ ee oeo eeccocec
323
+ eecceeo eceeoeoe
324
+ cxoccccdddecceoeoc
325
+ cxxeoeeooccdcc
326
+ e
327
+ `,
328
+ `
329
+ eeddcxcddxoe
330
+ ecxxxeodddeceoxcoo
331
+ ocddocxcce ecdoecde
332
+ odxcoee eddcoexco
333
+ xxoeoe oxecocxe xeo
334
+ xeocc excxo oo cocx
335
+ edxxc oceoxcoe odocx
336
+ xxxx xdcexco x xxx
337
+ xcxeoddddddxxxxccdcxd e cxx
338
+ edooxdcoecceoeo ee deeeoooxe
339
+ cecocxcccccccc eeeoxoo ooc
340
+ eeecee eooeooc
341
+ c eexxco oddooxde
342
+ ccoxcoxceeddocc dcxc
343
+ cxoedoceooecoe
344
+
345
+ `,
346
+ `
347
+ eecdxxdcdoee
348
+ oddcdoeodddxxeececo
349
+ oocecccxcc ecececcxce
350
+ excecxc eocxeocee
351
+ ex oxc eo exxecexxe
352
+ oeoxc cccdxco cexxe
353
+ dxdcx oc occe oexo
354
+ xeeoe ccddxco xxcx
355
+ xoxxdoddddddddeocdeeeec o xe
356
+ cxexec oeeeeeexe ceecxde oo xx
357
+ eoeecccccccccc eodxxox oe
358
+ c ecoo eocoxo
359
+ eeecoxe odcedcc
360
+ eooocxceddodcxceoocc
361
+ eccxe deeeexccc
362
+
363
+ `,
364
+ `
365
+ eeodcddcdcoee
366
+ occeeeecxdxcdeeocce
367
+ dceeccece eexcceeco
368
+ ocxdcc eodcodco
369
+ oooce oxoee eeeeo
370
+ ocox occeoo eeeo
371
+ xcxe e oeooc edec
372
+ ee ed cxo x x
373
+ x x ocdddddccc exocxo do x
374
+ x xe xe eox ececxo ocoo
375
+ d co eeccc ce cceod oe o
376
+ cc dde ecc o
377
+ ce eoe eodcc oe
378
+ cde ccccdxxdddccc oe
379
+ cccdceeeeoedcce
380
+
381
+ `,
382
+ `
383
+ eocdcddcdcoe
384
+ ecocxoeoxoexxdxcocce
385
+ odcdxecce ecceccceeco
386
+ dcxccc ooxxxece
387
+ exxoc oeoxdxoodcx
388
+ excoe oxoxdeoe exedx
389
+ xcceo xcxecoc xxox
390
+ xxdxe xexxee xexcx
391
+ xxoco cxddddddcceecxe eo exdc
392
+ exd ceeeo oocxoox ecdecxoo oed
393
+ eeeex cccccccce edcceooocoe
394
+ eceeeo ecocxoc
395
+ cccd cce eococceo
396
+ cdccoccxddcddodccccoc
397
+ cxcxedeeeodeodce
398
+
399
+ `,
400
+ `
401
+ eocedccccdcee
402
+ edxcxeeoeddoxexcxce
403
+ occxcodce cxdcxedxxo
404
+ odxcdoe eddexxde
405
+ ooxeoc ooooccocexe
406
+ oexcoe ecccccoccxxexo
407
+ exxcx odoo exe c xcc
408
+ xox x xcxoeeo x cox
409
+ ece xcxddddddddxecxecee x xxx
410
+ xeeexcdc oee exeeox eex
411
+ ocx x eccccccc ceoddxeoeoe
412
+ oxxexo ooxeeoe
413
+ e xocoee eocdcoco
414
+ edecdccexddecccoecce
415
+ cx cdexeeceecce
416
+
417
+ `,
418
+ `
419
+ exedcccddoe
420
+ oceocxeexddcoecc
421
+ occdeoccx oedcxcco e
422
+ ocooooxdoeexoe ecexeec
423
+ o ooeoo eccoeexeeexoc
424
+ xoecee cooo oxd oce
425
+ x xx ooeoocoeexeexe
426
+ x exx xodoeexxeooexx
427
+ xo xddddccxxxccecoex x xx
428
+ e o cxoooddooxoeeccx xcx
429
+ e cexeccccccce eoocexdooe
430
+ e eoce x codo
431
+ eoceexo edceodec
432
+ oocoeecxxddddxeeoe
433
+ cdeccdeeeddcc
434
+
435
+ `,
436
+ `
437
+ ecdcdcccce
438
+ o coceedexcxxo
439
+ oxoooocoxcedexxxe
440
+ xccx o dx cexoceo
441
+ oeeeoocedoexc xooeoc
442
+ eoxxxeccoexd oxoxooxo
443
+ xoxcx xeeoeeoxeoecxdx
444
+ xxxoxoc xedeoxeexdxxe
445
+ ecexcxeeddddcxxeexccxe
446
+ oocxoxoxexxdcexecdoex
447
+ excoexecccccccoxexoxe
448
+ xecxdcdeoocdeooooxo
449
+ eeexeeecdooeoexxo
450
+ eodeeecdxcc cxc
451
+ xoccecoecxc
452
+
453
+ `,
454
+ `
455
+ edccccco
456
+ ocxdoexcdxo
457
+ occcxdexecceo
458
+ dccoxxxexxecoe
459
+ xeoexoxcceodxed
460
+ e cxodocceeceeo
461
+ x ccdxxoxxddcc
462
+ oo exxxeedxxoxx
463
+ x oecdcxcddoexx
464
+ oexooxeeoceecx
465
+ xecoxcceooecexx
466
+ eexxoe oocxxe
467
+ c cxe eeoxoo
468
+ xcceecceccd
469
+ eodecxeec
470
+
471
+ `,
472
+ `
473
+ dcccco
474
+ xddoxoe
475
+ dce cxocx
476
+ xxxexxdxx
477
+ x exeocd
478
+ xeoecexxxe
479
+ d cxxecxx
480
+ x exxxdcxx
481
+ xo o xcxxxx
482
+ cd ocexecxx
483
+ xo eecccoc
484
+ xxccxxeox
485
+ xddcdooxe
486
+ eeexedoo
487
+ cec eeo
488
+
489
+ `,
490
+ `
491
+ occd
492
+ xcexe
493
+ d dxe
494
+ xoecx
495
+ x xx
496
+ x ocx
497
+ exx ex
498
+ xoccx
499
+ oe ex
500
+ xxodxx
501
+ x ex
502
+ xdcdx
503
+ xdcxx
504
+ ceeox
505
+ x ocx
506
+
507
+ `,
508
+ `
509
+ ccccco
510
+ oxco ce
511
+ eoxx ccx
512
+ xxxxeeoo
513
+ e xcx x
514
+ xoxxx ee
515
+ xeexxx e
516
+ xxdxx
517
+ xxxcx e
518
+ exdxx e
519
+ cxxoxe d
520
+ xoxxx ex
521
+ xxxxexex
522
+ xdxcocxc
523
+ xxc oo
524
+
525
+ `,
526
+ `
527
+ edcccco
528
+ eodxxeccde
529
+ ccexoeexcoe
530
+ xxexoxeexe eo
531
+ dcxxeexoxo x
532
+ xcxec cxxxxox
533
+ eoxxxee eoex de
534
+ cx ccdxoxcxo e
535
+ cxecexdxeoxo e
536
+ cxxexeexx co e
537
+ exxdeecxxxcxx
538
+ xcoooocexxc x
539
+ exexxocxxoxo
540
+ oeocdeoxooc
541
+ eooxeeedc
542
+ eeee
543
+ `,
544
+ `
545
+ eodccccdo
546
+ eccdcoeccecco
547
+ oxeooodeeocxece
548
+ oxoceecdeoeexexxe
549
+ exxxxcoceeocexoee
550
+ dxeexexccedcoooxocx
551
+ oxx xecxeododcxcxox
552
+ eeo xxcxe xeccxxeox
553
+ xeoexcexxxocxxxe x
554
+ cxxxooxxeeeeexexx c
555
+ eceocxo occceoxcxe
556
+ xxxeeeo edc x
557
+ dxcde o o xceoe
558
+ dxexoexeoxcoxe
559
+ ccdxeccoodc
560
+ eeee
561
+ `,
562
+ `
563
+ occccddxoe
564
+ dcxccxexxccxxo
565
+ oecdeocedoecxcecco
566
+ cooxeoedo o oeexco o
567
+ ooxoxceccxd ceoxeoeceo
568
+ eoeeoecxedxxce xco c
569
+ cxcdoecexxooxodeoeooxce
570
+ xxxoe cexxcocxdoecexcce
571
+ exxoe cexceexcccxxxdxcde
572
+ ccceexceceeeeeexxcxdxoe
573
+ oecxxo xccccccedooooo
574
+ eoxeee oexocx
575
+ cccxxxce eoexo o
576
+ eoecxcxddceecceo
577
+ xddeeococecc
578
+ eee
579
+ `,
580
+ `
581
+ eocdcdcdxoe
582
+ eccxxecdxdxoxcxco
583
+ eoexcccodce ccoxxcco
584
+ oeoxoexoe cxxeec
585
+ eoxoexxoeee xceee
586
+ ooo eeeeeeo oeoee
587
+ xxc eocxexe xcxx
588
+ cxoo occeodo ecxc
589
+ xxx x oe ocooodddcxxcoexex
590
+ eoxccodooexxeeeeexxceeexxo
591
+ edeo xoxo o ccccccc xxooee
592
+ ececoco oododo
593
+ ceccocdo ecxoocec
594
+ exccecxodcecdoecxc
595
+ cddcoeeeeccdoc
596
+ eeee
597
+ `,
598
+ `
599
+ eodccccdxoe
600
+ ecccoedxcxccdccdode
601
+ eoooxccdxce eeeeoccco
602
+ ooexceooe cxocee
603
+ ooxeoox xc o eecee
604
+ ooexeo eecxece eoexe
605
+ xcexe ceecxee xdxe
606
+ exdcd xcexocx o ee
607
+ ocooc oeooceddccccccxeec xee
608
+ xxeooooecoocxxxexoeeeooexxexe
609
+ oeeo xexce ccceeeee oooexc
610
+ ooeddee odoxoc
611
+ ecexcedo ecdceooe
612
+ oeoxcxcodocdcdceccdc
613
+ cxeddeeeeeddcde
614
+ eee
615
+ `,
616
+ `
617
+ eocddcccdcoe
618
+ ocdcoxccccxcxdcxcde
619
+ eooxdccxecce eccdcocxco
620
+ ooocoodoe cceexe
621
+ ooxxooe ceco xecxo
622
+ dodoce cxecooce xeex
623
+ e oo ee cceo xeee
624
+ xxxd oeedoc o co
625
+ o oe oxxodcoxddededcxx xxdc
626
+ xoedc oodcccoxd eoeeeeocxoc xc
627
+ oeeocoeexoee eceeeeceecooeox
628
+ coeeox eoc oe
629
+ edeedodo odoeccc
630
+ ceecxcxodxxcxdocceodc
631
+ cexddeeoeecccce
632
+
633
+ `,
634
+ `
635
+ eecdccccdcoe
636
+ edccecodocecdcccccce
637
+ oeceoccoccee eccxccxocxo
638
+ exccceeee ccxecx
639
+ ooedecxeeeoo eeoc
640
+ o ooe ce cxoo ceec
641
+ x d e e cee xexo
642
+ xxex ee eoo ex x
643
+ xccx oo occcocceccccce xexx
644
+ ecxe oxeeoxo exeeeeeeexx eoce
645
+ c cxe cecoe ccceeeeec xoco
646
+ cocedo ooxco
647
+ eoxxcxo occcooe
648
+ coecccdedxecxdcocodcc
649
+ eccoxeooeooccccc
650
+
651
+ `,
652
+ ]
@@ -0,0 +1,37 @@
1
+ import { useEffect, useState } from 'react'
2
+ import { useAppStore } from '../../store'
3
+ import { STARTUP_FRAMES, STARTUP_FRAME_TICK_MS } from './startup-ascii'
4
+
5
+ export const StartupLoader = () => {
6
+ const connectionStatus = useAppStore((state) => state.connectionStatus)
7
+ const isLoading = connectionStatus === 'idle' || connectionStatus === 'connecting'
8
+ const [frameIndex, setFrameIndex] = useState(0)
9
+
10
+ useEffect(() => {
11
+ if (!isLoading) {
12
+ return undefined
13
+ }
14
+ setFrameIndex(0)
15
+ const intervalId = window.setInterval(() => {
16
+ setFrameIndex((current) => (current + 1) % STARTUP_FRAMES.length)
17
+ }, STARTUP_FRAME_TICK_MS)
18
+ return () => window.clearInterval(intervalId)
19
+ }, [isLoading])
20
+
21
+ if (!isLoading) {
22
+ return null
23
+ }
24
+
25
+ return (
26
+ <div className="fixed inset-0 z-50 flex items-center justify-center bg-bg-primary">
27
+ <div className="flex flex-col items-center gap-6 text-center">
28
+ <pre className="whitespace-pre font-mono text-[11px] leading-tight text-text-secondary">
29
+ {STARTUP_FRAMES[frameIndex]}
30
+ </pre>
31
+ <div className="text-xs uppercase tracking-[0.4em] text-text-muted">
32
+ Booting Codex Hub
33
+ </div>
34
+ </div>
35
+ </div>
36
+ )
37
+ }