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,46 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { AddConversationListenerParams } from "./AddConversationListenerParams";
5
+ import type { ArchiveConversationParams } from "./ArchiveConversationParams";
6
+ import type { CancelLoginChatGptParams } from "./CancelLoginChatGptParams";
7
+ import type { ExecOneOffCommandParams } from "./ExecOneOffCommandParams";
8
+ import type { FuzzyFileSearchParams } from "./FuzzyFileSearchParams";
9
+ import type { GetAuthStatusParams } from "./GetAuthStatusParams";
10
+ import type { GetConversationSummaryParams } from "./GetConversationSummaryParams";
11
+ import type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams";
12
+ import type { InitializeParams } from "./InitializeParams";
13
+ import type { InterruptConversationParams } from "./InterruptConversationParams";
14
+ import type { ListConversationsParams } from "./ListConversationsParams";
15
+ import type { LoginApiKeyParams } from "./LoginApiKeyParams";
16
+ import type { NewConversationParams } from "./NewConversationParams";
17
+ import type { RemoveConversationListenerParams } from "./RemoveConversationListenerParams";
18
+ import type { RequestId } from "./RequestId";
19
+ import type { ResumeConversationParams } from "./ResumeConversationParams";
20
+ import type { SendUserMessageParams } from "./SendUserMessageParams";
21
+ import type { SendUserTurnParams } from "./SendUserTurnParams";
22
+ import type { SetDefaultModelParams } from "./SetDefaultModelParams";
23
+ import type { CancelLoginAccountParams } from "./v2/CancelLoginAccountParams";
24
+ import type { CommandExecParams } from "./v2/CommandExecParams";
25
+ import type { ConfigBatchWriteParams } from "./v2/ConfigBatchWriteParams";
26
+ import type { ConfigReadParams } from "./v2/ConfigReadParams";
27
+ import type { ConfigValueWriteParams } from "./v2/ConfigValueWriteParams";
28
+ import type { FeedbackUploadParams } from "./v2/FeedbackUploadParams";
29
+ import type { GetAccountParams } from "./v2/GetAccountParams";
30
+ import type { ListMcpServerStatusParams } from "./v2/ListMcpServerStatusParams";
31
+ import type { LoginAccountParams } from "./v2/LoginAccountParams";
32
+ import type { McpServerOauthLoginParams } from "./v2/McpServerOauthLoginParams";
33
+ import type { ModelListParams } from "./v2/ModelListParams";
34
+ import type { ReviewStartParams } from "./v2/ReviewStartParams";
35
+ import type { SkillsListParams } from "./v2/SkillsListParams";
36
+ import type { ThreadArchiveParams } from "./v2/ThreadArchiveParams";
37
+ import type { ThreadListParams } from "./v2/ThreadListParams";
38
+ import type { ThreadResumeParams } from "./v2/ThreadResumeParams";
39
+ import type { ThreadStartParams } from "./v2/ThreadStartParams";
40
+ import type { TurnInterruptParams } from "./v2/TurnInterruptParams";
41
+ import type { TurnStartParams } from "./v2/TurnStartParams";
42
+
43
+ /**
44
+ * Request from the client to the server.
45
+ */
46
+ export type ClientRequest = { "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "newConversation", id: RequestId, params: NewConversationParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "listConversations", id: RequestId, params: ListConversationsParams, } | { "method": "resumeConversation", id: RequestId, params: ResumeConversationParams, } | { "method": "archiveConversation", id: RequestId, params: ArchiveConversationParams, } | { "method": "sendUserMessage", id: RequestId, params: SendUserMessageParams, } | { "method": "sendUserTurn", id: RequestId, params: SendUserTurnParams, } | { "method": "interruptConversation", id: RequestId, params: InterruptConversationParams, } | { "method": "addConversationListener", id: RequestId, params: AddConversationListenerParams, } | { "method": "removeConversationListener", id: RequestId, params: RemoveConversationListenerParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "loginApiKey", id: RequestId, params: LoginApiKeyParams, } | { "method": "loginChatGpt", id: RequestId, params: undefined, } | { "method": "cancelLoginChatGpt", id: RequestId, params: CancelLoginChatGptParams, } | { "method": "logoutChatGpt", id: RequestId, params: undefined, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "getUserSavedConfig", id: RequestId, params: undefined, } | { "method": "setDefaultModel", id: RequestId, params: SetDefaultModelParams, } | { "method": "getUserAgent", id: RequestId, params: undefined, } | { "method": "userInfo", id: RequestId, params: undefined, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, } | { "method": "execOneOffCommand", id: RequestId, params: ExecOneOffCommandParams, };
@@ -0,0 +1,8 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ /**
6
+ * Codex errors that we expose to clients.
7
+ */
8
+ export type CodexErrorInfo = "context_window_exceeded" | "usage_limit_exceeded" | { "http_connection_failed": { http_status_code: number | null, } } | { "response_stream_connection_failed": { http_status_code: number | null, } } | "internal_server_error" | "unauthorized" | "bad_request" | "sandbox_error" | { "response_stream_disconnected": { http_status_code: number | null, } } | { "response_too_many_failed_attempts": { http_status_code: number | null, } } | "other";
@@ -0,0 +1,10 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { AudioContent } from "./AudioContent";
5
+ import type { EmbeddedResource } from "./EmbeddedResource";
6
+ import type { ImageContent } from "./ImageContent";
7
+ import type { ResourceLink } from "./ResourceLink";
8
+ import type { TextContent } from "./TextContent";
9
+
10
+ export type ContentBlock = TextContent | ImageContent | AudioContent | ResourceLink | EmbeddedResource;
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, } | { "type": "output_text", text: string, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ContextCompactedEvent = null;
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ConversationGitInfo = { sha: string | null, branch: string | null, origin_url: string | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ConversationId = string;
@@ -0,0 +1,8 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ConversationGitInfo } from "./ConversationGitInfo";
5
+ import type { ConversationId } from "./ConversationId";
6
+ import type { SessionSource } from "./SessionSource";
7
+
8
+ export type ConversationSummary = { conversationId: ConversationId, path: string, preview: string, timestamp: string | null, modelProvider: string, cwd: string, cliVersion: string, source: SessionSource, gitInfo: ConversationGitInfo | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type CreditsSnapshot = { has_credits: boolean, unlimited: boolean, balance: string | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type CustomPrompt = { name: string, path: string, content: string, description: string | null, argument_hint: string | null, };
@@ -0,0 +1,13 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type DeprecationNoticeEvent = {
6
+ /**
7
+ * Concise summary of what is deprecated.
8
+ */
9
+ summary: string,
10
+ /**
11
+ * Optional extra guidance, such as migration steps or rationale.
12
+ */
13
+ details: string | null, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { RequestId } from "./RequestId";
5
+
6
+ export type ElicitationRequestEvent = { server_name: string, id: RequestId, message: string, };
@@ -0,0 +1,13 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { Annotations } from "./Annotations";
5
+ import type { EmbeddedResourceResource } from "./EmbeddedResourceResource";
6
+
7
+ /**
8
+ * The contents of a resource, embedded into a prompt or tool call result.
9
+ *
10
+ * It is up to the client how best to render embedded resources for the benefit
11
+ * of the LLM and/or the user.
12
+ */
13
+ export type EmbeddedResource = { annotations?: Annotations, resource: EmbeddedResourceResource, type: string, };
@@ -0,0 +1,7 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { BlobResourceContents } from "./BlobResourceContents";
5
+ import type { TextResourceContents } from "./TextResourceContents";
6
+
7
+ export type EmbeddedResourceResource = TextResourceContents | BlobResourceContents;
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { CodexErrorInfo } from "./CodexErrorInfo";
5
+
6
+ export type ErrorEvent = { message: string, codex_error_info: CodexErrorInfo | null, };
@@ -0,0 +1,60 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { AgentMessageContentDeltaEvent } from "./AgentMessageContentDeltaEvent";
5
+ import type { AgentMessageDeltaEvent } from "./AgentMessageDeltaEvent";
6
+ import type { AgentMessageEvent } from "./AgentMessageEvent";
7
+ import type { AgentReasoningDeltaEvent } from "./AgentReasoningDeltaEvent";
8
+ import type { AgentReasoningEvent } from "./AgentReasoningEvent";
9
+ import type { AgentReasoningRawContentDeltaEvent } from "./AgentReasoningRawContentDeltaEvent";
10
+ import type { AgentReasoningRawContentEvent } from "./AgentReasoningRawContentEvent";
11
+ import type { AgentReasoningSectionBreakEvent } from "./AgentReasoningSectionBreakEvent";
12
+ import type { ApplyPatchApprovalRequestEvent } from "./ApplyPatchApprovalRequestEvent";
13
+ import type { BackgroundEventEvent } from "./BackgroundEventEvent";
14
+ import type { ContextCompactedEvent } from "./ContextCompactedEvent";
15
+ import type { DeprecationNoticeEvent } from "./DeprecationNoticeEvent";
16
+ import type { ElicitationRequestEvent } from "./ElicitationRequestEvent";
17
+ import type { ErrorEvent } from "./ErrorEvent";
18
+ import type { ExecApprovalRequestEvent } from "./ExecApprovalRequestEvent";
19
+ import type { ExecCommandBeginEvent } from "./ExecCommandBeginEvent";
20
+ import type { ExecCommandEndEvent } from "./ExecCommandEndEvent";
21
+ import type { ExecCommandOutputDeltaEvent } from "./ExecCommandOutputDeltaEvent";
22
+ import type { ExitedReviewModeEvent } from "./ExitedReviewModeEvent";
23
+ import type { GetHistoryEntryResponseEvent } from "./GetHistoryEntryResponseEvent";
24
+ import type { ItemCompletedEvent } from "./ItemCompletedEvent";
25
+ import type { ItemStartedEvent } from "./ItemStartedEvent";
26
+ import type { ListCustomPromptsResponseEvent } from "./ListCustomPromptsResponseEvent";
27
+ import type { ListSkillsResponseEvent } from "./ListSkillsResponseEvent";
28
+ import type { McpListToolsResponseEvent } from "./McpListToolsResponseEvent";
29
+ import type { McpStartupCompleteEvent } from "./McpStartupCompleteEvent";
30
+ import type { McpStartupUpdateEvent } from "./McpStartupUpdateEvent";
31
+ import type { McpToolCallBeginEvent } from "./McpToolCallBeginEvent";
32
+ import type { McpToolCallEndEvent } from "./McpToolCallEndEvent";
33
+ import type { PatchApplyBeginEvent } from "./PatchApplyBeginEvent";
34
+ import type { PatchApplyEndEvent } from "./PatchApplyEndEvent";
35
+ import type { RawResponseItemEvent } from "./RawResponseItemEvent";
36
+ import type { ReasoningContentDeltaEvent } from "./ReasoningContentDeltaEvent";
37
+ import type { ReasoningRawContentDeltaEvent } from "./ReasoningRawContentDeltaEvent";
38
+ import type { ReviewRequest } from "./ReviewRequest";
39
+ import type { SessionConfiguredEvent } from "./SessionConfiguredEvent";
40
+ import type { StreamErrorEvent } from "./StreamErrorEvent";
41
+ import type { TaskCompleteEvent } from "./TaskCompleteEvent";
42
+ import type { TaskStartedEvent } from "./TaskStartedEvent";
43
+ import type { TerminalInteractionEvent } from "./TerminalInteractionEvent";
44
+ import type { TokenCountEvent } from "./TokenCountEvent";
45
+ import type { TurnAbortedEvent } from "./TurnAbortedEvent";
46
+ import type { TurnDiffEvent } from "./TurnDiffEvent";
47
+ import type { UndoCompletedEvent } from "./UndoCompletedEvent";
48
+ import type { UndoStartedEvent } from "./UndoStartedEvent";
49
+ import type { UpdatePlanArgs } from "./UpdatePlanArgs";
50
+ import type { UserMessageEvent } from "./UserMessageEvent";
51
+ import type { ViewImageToolCallEvent } from "./ViewImageToolCallEvent";
52
+ import type { WarningEvent } from "./WarningEvent";
53
+ import type { WebSearchBeginEvent } from "./WebSearchBeginEvent";
54
+ import type { WebSearchEndEvent } from "./WebSearchEndEvent";
55
+
56
+ /**
57
+ * Response event from the agent
58
+ * NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.
59
+ */
60
+ export type EventMsg = { "type": "error" } & ErrorEvent | { "type": "warning" } & WarningEvent | { "type": "context_compacted" } & ContextCompactedEvent | { "type": "task_started" } & TaskStartedEvent | { "type": "task_complete" } & TaskCompleteEvent | { "type": "token_count" } & TokenCountEvent | { "type": "agent_message" } & AgentMessageEvent | { "type": "user_message" } & UserMessageEvent | { "type": "agent_message_delta" } & AgentMessageDeltaEvent | { "type": "agent_reasoning" } & AgentReasoningEvent | { "type": "agent_reasoning_delta" } & AgentReasoningDeltaEvent | { "type": "agent_reasoning_raw_content" } & AgentReasoningRawContentEvent | { "type": "agent_reasoning_raw_content_delta" } & AgentReasoningRawContentDeltaEvent | { "type": "agent_reasoning_section_break" } & AgentReasoningSectionBreakEvent | { "type": "session_configured" } & SessionConfiguredEvent | { "type": "mcp_startup_update" } & McpStartupUpdateEvent | { "type": "mcp_startup_complete" } & McpStartupCompleteEvent | { "type": "mcp_tool_call_begin" } & McpToolCallBeginEvent | { "type": "mcp_tool_call_end" } & McpToolCallEndEvent | { "type": "web_search_begin" } & WebSearchBeginEvent | { "type": "web_search_end" } & WebSearchEndEvent | { "type": "exec_command_begin" } & ExecCommandBeginEvent | { "type": "exec_command_output_delta" } & ExecCommandOutputDeltaEvent | { "type": "terminal_interaction" } & TerminalInteractionEvent | { "type": "exec_command_end" } & ExecCommandEndEvent | { "type": "view_image_tool_call" } & ViewImageToolCallEvent | { "type": "exec_approval_request" } & ExecApprovalRequestEvent | { "type": "elicitation_request" } & ElicitationRequestEvent | { "type": "apply_patch_approval_request" } & ApplyPatchApprovalRequestEvent | { "type": "deprecation_notice" } & DeprecationNoticeEvent | { "type": "background_event" } & BackgroundEventEvent | { "type": "undo_started" } & UndoStartedEvent | { "type": "undo_completed" } & UndoCompletedEvent | { "type": "stream_error" } & StreamErrorEvent | { "type": "patch_apply_begin" } & PatchApplyBeginEvent | { "type": "patch_apply_end" } & PatchApplyEndEvent | { "type": "turn_diff" } & TurnDiffEvent | { "type": "get_history_entry_response" } & GetHistoryEntryResponseEvent | { "type": "mcp_list_tools_response" } & McpListToolsResponseEvent | { "type": "list_custom_prompts_response" } & ListCustomPromptsResponseEvent | { "type": "list_skills_response" } & ListSkillsResponseEvent | { "type": "skills_update_available" } | { "type": "plan_update" } & UpdatePlanArgs | { "type": "turn_aborted" } & TurnAbortedEvent | { "type": "shutdown_complete" } | { "type": "entered_review_mode" } & ReviewRequest | { "type": "exited_review_mode" } & ExitedReviewModeEvent | { "type": "raw_response_item" } & RawResponseItemEvent | { "type": "item_started" } & ItemStartedEvent | { "type": "item_completed" } & ItemCompletedEvent | { "type": "agent_message_content_delta" } & AgentMessageContentDeltaEvent | { "type": "reasoning_content_delta" } & ReasoningContentDeltaEvent | { "type": "reasoning_raw_content_delta" } & ReasoningRawContentDeltaEvent;
@@ -0,0 +1,32 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ExecPolicyAmendment } from "./ExecPolicyAmendment";
5
+ import type { ParsedCommand } from "./ParsedCommand";
6
+
7
+ export type ExecApprovalRequestEvent = {
8
+ /**
9
+ * Identifier for the associated exec call, if available.
10
+ */
11
+ call_id: string,
12
+ /**
13
+ * Turn ID that this command belongs to.
14
+ * Uses `#[serde(default)]` for backwards compatibility.
15
+ */
16
+ turn_id: string,
17
+ /**
18
+ * The command to be executed.
19
+ */
20
+ command: Array<string>,
21
+ /**
22
+ * The command's working directory.
23
+ */
24
+ cwd: string,
25
+ /**
26
+ * Optional human-readable reason for the approval (e.g. retry without sandbox).
27
+ */
28
+ reason: string | null,
29
+ /**
30
+ * Proposed execpolicy amendment that can be applied to allow future runs.
31
+ */
32
+ proposed_execpolicy_amendment?: ExecPolicyAmendment, parsed_cmd: Array<ParsedCommand>, };
@@ -0,0 +1,12 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ConversationId } from "./ConversationId";
5
+ import type { ParsedCommand } from "./ParsedCommand";
6
+
7
+ export type ExecCommandApprovalParams = { conversationId: ConversationId,
8
+ /**
9
+ * Use to correlate this with [codex_core::protocol::ExecCommandBeginEvent]
10
+ * and [codex_core::protocol::ExecCommandEndEvent].
11
+ */
12
+ callId: string, command: Array<string>, cwd: string, reason: string | null, parsedCmd: Array<ParsedCommand>, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ReviewDecision } from "./ReviewDecision";
5
+
6
+ export type ExecCommandApprovalResponse = { decision: ReviewDecision, };
@@ -0,0 +1,35 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ExecCommandSource } from "./ExecCommandSource";
5
+ import type { ParsedCommand } from "./ParsedCommand";
6
+
7
+ export type ExecCommandBeginEvent = {
8
+ /**
9
+ * Identifier so this can be paired with the ExecCommandEnd event.
10
+ */
11
+ call_id: string,
12
+ /**
13
+ * Identifier for the underlying PTY process (when available).
14
+ */
15
+ process_id?: string,
16
+ /**
17
+ * Turn ID that this command belongs to.
18
+ */
19
+ turn_id: string,
20
+ /**
21
+ * The command to be executed.
22
+ */
23
+ command: Array<string>,
24
+ /**
25
+ * The command's working directory if not the default cwd for the agent.
26
+ */
27
+ cwd: string, parsed_cmd: Array<ParsedCommand>,
28
+ /**
29
+ * Where the command originated. Defaults to Agent for backward compatibility.
30
+ */
31
+ source: ExecCommandSource,
32
+ /**
33
+ * Raw input sent to a unified exec session (if this is an interaction event).
34
+ */
35
+ interaction_input?: string, };
@@ -0,0 +1,59 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ExecCommandSource } from "./ExecCommandSource";
5
+ import type { ParsedCommand } from "./ParsedCommand";
6
+
7
+ export type ExecCommandEndEvent = {
8
+ /**
9
+ * Identifier for the ExecCommandBegin that finished.
10
+ */
11
+ call_id: string,
12
+ /**
13
+ * Identifier for the underlying PTY process (when available).
14
+ */
15
+ process_id?: string,
16
+ /**
17
+ * Turn ID that this command belongs to.
18
+ */
19
+ turn_id: string,
20
+ /**
21
+ * The command that was executed.
22
+ */
23
+ command: Array<string>,
24
+ /**
25
+ * The command's working directory if not the default cwd for the agent.
26
+ */
27
+ cwd: string, parsed_cmd: Array<ParsedCommand>,
28
+ /**
29
+ * Where the command originated. Defaults to Agent for backward compatibility.
30
+ */
31
+ source: ExecCommandSource,
32
+ /**
33
+ * Raw input sent to a unified exec session (if this is an interaction event).
34
+ */
35
+ interaction_input?: string,
36
+ /**
37
+ * Captured stdout
38
+ */
39
+ stdout: string,
40
+ /**
41
+ * Captured stderr
42
+ */
43
+ stderr: string,
44
+ /**
45
+ * Captured aggregated output
46
+ */
47
+ aggregated_output: string,
48
+ /**
49
+ * The command's exit code.
50
+ */
51
+ exit_code: number,
52
+ /**
53
+ * The duration of the command execution.
54
+ */
55
+ duration: string,
56
+ /**
57
+ * Formatted output from the command, as seen by the model.
58
+ */
59
+ formatted_output: string, };
@@ -0,0 +1,18 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ExecOutputStream } from "./ExecOutputStream";
5
+
6
+ export type ExecCommandOutputDeltaEvent = {
7
+ /**
8
+ * Identifier for the ExecCommandBegin that produced this chunk.
9
+ */
10
+ call_id: string,
11
+ /**
12
+ * Which stream produced this chunk.
13
+ */
14
+ stream: ExecOutputStream,
15
+ /**
16
+ * Raw bytes from the stream (may not be valid UTF-8).
17
+ */
18
+ chunk: string, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ExecCommandSource = "agent" | "user_shell" | "unified_exec_startup" | "unified_exec_interaction";
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { SandboxPolicy } from "./SandboxPolicy";
5
+
6
+ export type ExecOneOffCommandParams = { command: Array<string>, timeoutMs: bigint | null, cwd: string | null, sandboxPolicy: SandboxPolicy | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ExecOneOffCommandResponse = { exitCode: number, stdout: string, stderr: string, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ExecOutputStream = "stdout" | "stderr";
@@ -0,0 +1,12 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ /**
6
+ * Proposed execpolicy change to allow commands starting with this prefix.
7
+ *
8
+ * The `command` tokens form the prefix that would be added as an execpolicy
9
+ * `prefix_rule(..., decision="allow")`, letting the agent bypass approval for
10
+ * commands that start with this token sequence.
11
+ */
12
+ export type ExecPolicyAmendment = Array<string>;
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ReviewOutputEvent } from "./ReviewOutputEvent";
5
+
6
+ export type ExitedReviewModeEvent = { review_output: ReviewOutputEvent | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type FileChange = { "type": "add", content: string, } | { "type": "delete", content: string, } | { "type": "update", unified_diff: string, move_path: string | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type ForcedLoginMethod = "chatgpt" | "api";
@@ -0,0 +1,9 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ /**
6
+ * Responses API compatible content items that can be returned by a tool call.
7
+ * This is a subset of ContentItem with the types we support as function call outputs.
8
+ */
9
+ export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, };
@@ -0,0 +1,15 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem";
5
+
6
+ /**
7
+ * The payload we send back to OpenAI when reporting a tool call result.
8
+ *
9
+ * `content` preserves the historical plain-string payload so downstream
10
+ * integrations (tests, logging, etc.) can keep treating tool output as
11
+ * `String`. When an MCP server returns richer data we additionally populate
12
+ * `content_items` with the structured form that the Responses/Chat
13
+ * Completions APIs understand.
14
+ */
15
+ export type FunctionCallOutputPayload = { content: string, content_items: Array<FunctionCallOutputContentItem> | null, success: boolean | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type FuzzyFileSearchParams = { query: string, roots: Array<string>, cancellationToken: string | null, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult";
5
+
6
+ export type FuzzyFileSearchResponse = { files: Array<FuzzyFileSearchResult>, };
@@ -0,0 +1,8 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ /**
6
+ * Superset of [`codex_file_search::FileMatch`]
7
+ */
8
+ export type FuzzyFileSearchResult = { root: string, path: string, file_name: string, score: number, indices: Array<number> | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type GetAuthStatusParams = { includeToken: boolean | null, refreshToken: boolean | null, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { AuthMode } from "./AuthMode";
5
+
6
+ export type GetAuthStatusResponse = { authMethod: AuthMode | null, authToken: string | null, requiresOpenaiAuth: boolean | null, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ConversationId } from "./ConversationId";
5
+
6
+ export type GetConversationSummaryParams = { rolloutPath: string, } | { conversationId: ConversationId, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { ConversationSummary } from "./ConversationSummary";
5
+
6
+ export type GetConversationSummaryResponse = { summary: ConversationSummary, };
@@ -0,0 +1,10 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { HistoryEntry } from "./HistoryEntry";
5
+
6
+ export type GetHistoryEntryResponseEvent = { offset: number, log_id: bigint,
7
+ /**
8
+ * The entry at the requested offset, if available and parseable.
9
+ */
10
+ entry: HistoryEntry | null, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type GetUserAgentResponse = { userAgent: string, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { UserSavedConfig } from "./UserSavedConfig";
5
+
6
+ export type GetUserSavedConfigResponse = { config: UserSavedConfig, };
@@ -0,0 +1,8 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ /**
6
+ * Details of a ghost commit created from a repository state.
7
+ */
8
+ export type GhostCommit = { id: string, parent: string | null, preexisting_untracked_files: Array<string>, preexisting_untracked_dirs: Array<string>, };
@@ -0,0 +1,5 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+
5
+ export type GitDiffToRemoteParams = { cwd: string, };
@@ -0,0 +1,6 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+
3
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
4
+ import type { GitSha } from "./GitSha";
5
+
6
+ export type GitDiffToRemoteResponse = { sha: GitSha, diff: string, };