mcp-codex-worker 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 (462) hide show
  1. package/README.md +135 -0
  2. package/bin/mcp-codex-worker.mjs +17 -0
  3. package/dist/src/app.d.ts +29 -0
  4. package/dist/src/app.js +353 -0
  5. package/dist/src/app.js.map +1 -0
  6. package/dist/src/config/defaults.d.ts +11 -0
  7. package/dist/src/config/defaults.js +12 -0
  8. package/dist/src/config/defaults.js.map +1 -0
  9. package/dist/src/index.d.ts +2 -0
  10. package/dist/src/index.js +64 -0
  11. package/dist/src/index.js.map +1 -0
  12. package/dist/src/mcp/tool-definitions.d.ts +180 -0
  13. package/dist/src/mcp/tool-definitions.js +241 -0
  14. package/dist/src/mcp/tool-definitions.js.map +1 -0
  15. package/dist/src/services/app-server-client.d.ts +65 -0
  16. package/dist/src/services/app-server-client.js +511 -0
  17. package/dist/src/services/app-server-client.js.map +1 -0
  18. package/dist/src/services/codex-runtime.d.ts +84 -0
  19. package/dist/src/services/codex-runtime.js +371 -0
  20. package/dist/src/services/codex-runtime.js.map +1 -0
  21. package/dist/src/services/fleet-mode.d.ts +3 -0
  22. package/dist/src/services/fleet-mode.js +21 -0
  23. package/dist/src/services/fleet-mode.js.map +1 -0
  24. package/dist/src/services/model-catalog.d.ts +22 -0
  25. package/dist/src/services/model-catalog.js +51 -0
  26. package/dist/src/services/model-catalog.js.map +1 -0
  27. package/dist/src/services/profile-manager.d.ts +29 -0
  28. package/dist/src/services/profile-manager.js +82 -0
  29. package/dist/src/services/profile-manager.js.map +1 -0
  30. package/dist/src/types/codex.d.ts +50 -0
  31. package/dist/src/types/codex.js +2 -0
  32. package/dist/src/types/codex.js.map +1 -0
  33. package/package.json +53 -0
  34. package/src/app.ts +417 -0
  35. package/src/config/defaults.ts +14 -0
  36. package/src/index.ts +84 -0
  37. package/src/mcp/tool-definitions.ts +280 -0
  38. package/src/protocol/AbsolutePathBuf.ts +14 -0
  39. package/src/protocol/AgentPath.ts +5 -0
  40. package/src/protocol/ApplyPatchApprovalParams.ts +21 -0
  41. package/src/protocol/ApplyPatchApprovalResponse.ts +6 -0
  42. package/src/protocol/AuthMode.ts +8 -0
  43. package/src/protocol/ClientInfo.ts +5 -0
  44. package/src/protocol/ClientNotification.ts +5 -0
  45. package/src/protocol/ClientRequest.ts +67 -0
  46. package/src/protocol/CollaborationMode.ts +10 -0
  47. package/src/protocol/ContentItem.ts +5 -0
  48. package/src/protocol/ConversationGitInfo.ts +5 -0
  49. package/src/protocol/ConversationSummary.ts +8 -0
  50. package/src/protocol/ExecCommandApprovalParams.ts +16 -0
  51. package/src/protocol/ExecCommandApprovalResponse.ts +6 -0
  52. package/src/protocol/ExecPolicyAmendment.ts +12 -0
  53. package/src/protocol/FileChange.ts +5 -0
  54. package/src/protocol/ForcedLoginMethod.ts +5 -0
  55. package/src/protocol/FunctionCallOutputBody.ts +6 -0
  56. package/src/protocol/FunctionCallOutputContentItem.ts +10 -0
  57. package/src/protocol/FuzzyFileSearchMatchType.ts +5 -0
  58. package/src/protocol/FuzzyFileSearchParams.ts +5 -0
  59. package/src/protocol/FuzzyFileSearchResponse.ts +6 -0
  60. package/src/protocol/FuzzyFileSearchResult.ts +9 -0
  61. package/src/protocol/FuzzyFileSearchSessionCompletedNotification.ts +5 -0
  62. package/src/protocol/FuzzyFileSearchSessionUpdatedNotification.ts +6 -0
  63. package/src/protocol/GetAuthStatusParams.ts +5 -0
  64. package/src/protocol/GetAuthStatusResponse.ts +6 -0
  65. package/src/protocol/GetConversationSummaryParams.ts +6 -0
  66. package/src/protocol/GetConversationSummaryResponse.ts +6 -0
  67. package/src/protocol/GhostCommit.ts +8 -0
  68. package/src/protocol/GitDiffToRemoteParams.ts +5 -0
  69. package/src/protocol/GitDiffToRemoteResponse.ts +6 -0
  70. package/src/protocol/GitSha.ts +5 -0
  71. package/src/protocol/ImageDetail.ts +5 -0
  72. package/src/protocol/InitializeCapabilities.ts +17 -0
  73. package/src/protocol/InitializeParams.ts +7 -0
  74. package/src/protocol/InitializeResponse.ts +20 -0
  75. package/src/protocol/InputModality.ts +8 -0
  76. package/src/protocol/LocalShellAction.ts +6 -0
  77. package/src/protocol/LocalShellExecAction.ts +5 -0
  78. package/src/protocol/LocalShellStatus.ts +5 -0
  79. package/src/protocol/MessagePhase.ts +11 -0
  80. package/src/protocol/ModeKind.ts +8 -0
  81. package/src/protocol/NetworkPolicyAmendment.ts +6 -0
  82. package/src/protocol/NetworkPolicyRuleAction.ts +5 -0
  83. package/src/protocol/ParsedCommand.ts +12 -0
  84. package/src/protocol/Personality.ts +5 -0
  85. package/src/protocol/PlanType.ts +5 -0
  86. package/src/protocol/RealtimeConversationVersion.ts +5 -0
  87. package/src/protocol/ReasoningEffort.ts +8 -0
  88. package/src/protocol/ReasoningItemContent.ts +5 -0
  89. package/src/protocol/ReasoningItemReasoningSummary.ts +5 -0
  90. package/src/protocol/ReasoningSummary.ts +10 -0
  91. package/src/protocol/RequestId.ts +5 -0
  92. package/src/protocol/Resource.ts +9 -0
  93. package/src/protocol/ResourceTemplate.ts +9 -0
  94. package/src/protocol/ResponseItem.ts +18 -0
  95. package/src/protocol/ReviewDecision.ts +10 -0
  96. package/src/protocol/ServerNotification.ts +60 -0
  97. package/src/protocol/ServerRequest.ts +18 -0
  98. package/src/protocol/ServiceTier.ts +5 -0
  99. package/src/protocol/SessionSource.ts +6 -0
  100. package/src/protocol/Settings.ts +9 -0
  101. package/src/protocol/SubAgentSource.ts +7 -0
  102. package/src/protocol/ThreadId.ts +5 -0
  103. package/src/protocol/Tool.ts +9 -0
  104. package/src/protocol/Verbosity.ts +9 -0
  105. package/src/protocol/WebSearchAction.ts +5 -0
  106. package/src/protocol/WebSearchContextSize.ts +5 -0
  107. package/src/protocol/WebSearchLocation.ts +5 -0
  108. package/src/protocol/WebSearchMode.ts +5 -0
  109. package/src/protocol/WebSearchToolConfig.ts +7 -0
  110. package/src/protocol/index.ts +75 -0
  111. package/src/protocol/serde_json/JsonValue.ts +5 -0
  112. package/src/protocol/v2/Account.ts +6 -0
  113. package/src/protocol/v2/AccountLoginCompletedNotification.ts +5 -0
  114. package/src/protocol/v2/AccountRateLimitsUpdatedNotification.ts +6 -0
  115. package/src/protocol/v2/AccountUpdatedNotification.ts +7 -0
  116. package/src/protocol/v2/AdditionalFileSystemPermissions.ts +6 -0
  117. package/src/protocol/v2/AdditionalNetworkPermissions.ts +5 -0
  118. package/src/protocol/v2/AdditionalPermissionProfile.ts +7 -0
  119. package/src/protocol/v2/AgentMessageDeltaNotification.ts +5 -0
  120. package/src/protocol/v2/AnalyticsConfig.ts +6 -0
  121. package/src/protocol/v2/AppBranding.ts +8 -0
  122. package/src/protocol/v2/AppInfo.ts +19 -0
  123. package/src/protocol/v2/AppListUpdatedNotification.ts +9 -0
  124. package/src/protocol/v2/AppMetadata.ts +7 -0
  125. package/src/protocol/v2/AppReview.ts +5 -0
  126. package/src/protocol/v2/AppScreenshot.ts +5 -0
  127. package/src/protocol/v2/AppSummary.ts +8 -0
  128. package/src/protocol/v2/AppToolApproval.ts +5 -0
  129. package/src/protocol/v2/AppToolsConfig.ts +6 -0
  130. package/src/protocol/v2/ApprovalsReviewer.ts +12 -0
  131. package/src/protocol/v2/AppsConfig.ts +8 -0
  132. package/src/protocol/v2/AppsDefaultConfig.ts +5 -0
  133. package/src/protocol/v2/AppsListParams.ts +24 -0
  134. package/src/protocol/v2/AppsListResponse.ts +14 -0
  135. package/src/protocol/v2/AskForApproval.ts +5 -0
  136. package/src/protocol/v2/ByteRange.ts +5 -0
  137. package/src/protocol/v2/CancelLoginAccountParams.ts +5 -0
  138. package/src/protocol/v2/CancelLoginAccountResponse.ts +6 -0
  139. package/src/protocol/v2/CancelLoginAccountStatus.ts +5 -0
  140. package/src/protocol/v2/ChatgptAuthTokensRefreshParams.ts +16 -0
  141. package/src/protocol/v2/ChatgptAuthTokensRefreshReason.ts +5 -0
  142. package/src/protocol/v2/ChatgptAuthTokensRefreshResponse.ts +5 -0
  143. package/src/protocol/v2/CodexErrorInfo.ts +12 -0
  144. package/src/protocol/v2/CollabAgentState.ts +6 -0
  145. package/src/protocol/v2/CollabAgentStatus.ts +5 -0
  146. package/src/protocol/v2/CollabAgentTool.ts +5 -0
  147. package/src/protocol/v2/CollabAgentToolCallStatus.ts +5 -0
  148. package/src/protocol/v2/CollaborationModeMask.ts +10 -0
  149. package/src/protocol/v2/CommandAction.ts +5 -0
  150. package/src/protocol/v2/CommandExecOutputDeltaNotification.ts +30 -0
  151. package/src/protocol/v2/CommandExecOutputStream.ts +8 -0
  152. package/src/protocol/v2/CommandExecParams.ts +97 -0
  153. package/src/protocol/v2/CommandExecResizeParams.ts +18 -0
  154. package/src/protocol/v2/CommandExecResizeResponse.ts +8 -0
  155. package/src/protocol/v2/CommandExecResponse.ts +24 -0
  156. package/src/protocol/v2/CommandExecTerminalSize.ts +16 -0
  157. package/src/protocol/v2/CommandExecTerminateParams.ts +13 -0
  158. package/src/protocol/v2/CommandExecTerminateResponse.ts +8 -0
  159. package/src/protocol/v2/CommandExecWriteParams.ts +22 -0
  160. package/src/protocol/v2/CommandExecWriteResponse.ts +8 -0
  161. package/src/protocol/v2/CommandExecutionApprovalDecision.ts +7 -0
  162. package/src/protocol/v2/CommandExecutionOutputDeltaNotification.ts +5 -0
  163. package/src/protocol/v2/CommandExecutionRequestApprovalParams.ts +57 -0
  164. package/src/protocol/v2/CommandExecutionRequestApprovalResponse.ts +6 -0
  165. package/src/protocol/v2/CommandExecutionSource.ts +5 -0
  166. package/src/protocol/v2/CommandExecutionStatus.ts +5 -0
  167. package/src/protocol/v2/Config.ts +23 -0
  168. package/src/protocol/v2/ConfigBatchWriteParams.ts +14 -0
  169. package/src/protocol/v2/ConfigEdit.ts +7 -0
  170. package/src/protocol/v2/ConfigLayer.ts +7 -0
  171. package/src/protocol/v2/ConfigLayerMetadata.ts +6 -0
  172. package/src/protocol/v2/ConfigLayerSource.ts +16 -0
  173. package/src/protocol/v2/ConfigReadParams.ts +11 -0
  174. package/src/protocol/v2/ConfigReadResponse.ts +8 -0
  175. package/src/protocol/v2/ConfigRequirements.ts +9 -0
  176. package/src/protocol/v2/ConfigRequirementsReadResponse.ts +10 -0
  177. package/src/protocol/v2/ConfigValueWriteParams.ts +11 -0
  178. package/src/protocol/v2/ConfigWarningNotification.ts +22 -0
  179. package/src/protocol/v2/ConfigWriteResponse.ts +12 -0
  180. package/src/protocol/v2/ContextCompactedNotification.ts +8 -0
  181. package/src/protocol/v2/CreditsSnapshot.ts +5 -0
  182. package/src/protocol/v2/DeprecationNoticeNotification.ts +13 -0
  183. package/src/protocol/v2/DynamicToolCallOutputContentItem.ts +5 -0
  184. package/src/protocol/v2/DynamicToolCallParams.ts +6 -0
  185. package/src/protocol/v2/DynamicToolCallResponse.ts +6 -0
  186. package/src/protocol/v2/DynamicToolCallStatus.ts +5 -0
  187. package/src/protocol/v2/DynamicToolSpec.ts +6 -0
  188. package/src/protocol/v2/ErrorNotification.ts +6 -0
  189. package/src/protocol/v2/ExecPolicyAmendment.ts +5 -0
  190. package/src/protocol/v2/ExperimentalFeature.ts +37 -0
  191. package/src/protocol/v2/ExperimentalFeatureEnablementSetParams.ts +12 -0
  192. package/src/protocol/v2/ExperimentalFeatureEnablementSetResponse.ts +9 -0
  193. package/src/protocol/v2/ExperimentalFeatureListParams.ts +13 -0
  194. package/src/protocol/v2/ExperimentalFeatureListResponse.ts +11 -0
  195. package/src/protocol/v2/ExperimentalFeatureStage.ts +5 -0
  196. package/src/protocol/v2/ExternalAgentConfigDetectParams.ts +13 -0
  197. package/src/protocol/v2/ExternalAgentConfigDetectResponse.ts +6 -0
  198. package/src/protocol/v2/ExternalAgentConfigImportParams.ts +6 -0
  199. package/src/protocol/v2/ExternalAgentConfigImportResponse.ts +5 -0
  200. package/src/protocol/v2/ExternalAgentConfigMigrationItem.ts +10 -0
  201. package/src/protocol/v2/ExternalAgentConfigMigrationItemType.ts +5 -0
  202. package/src/protocol/v2/FeedbackUploadParams.ts +5 -0
  203. package/src/protocol/v2/FeedbackUploadResponse.ts +5 -0
  204. package/src/protocol/v2/FileChangeApprovalDecision.ts +5 -0
  205. package/src/protocol/v2/FileChangeOutputDeltaNotification.ts +5 -0
  206. package/src/protocol/v2/FileChangeRequestApprovalParams.ts +14 -0
  207. package/src/protocol/v2/FileChangeRequestApprovalResponse.ts +6 -0
  208. package/src/protocol/v2/FileUpdateChange.ts +6 -0
  209. package/src/protocol/v2/FsChangedNotification.ts +17 -0
  210. package/src/protocol/v2/FsCopyParams.ts +21 -0
  211. package/src/protocol/v2/FsCopyResponse.ts +8 -0
  212. package/src/protocol/v2/FsCreateDirectoryParams.ts +17 -0
  213. package/src/protocol/v2/FsCreateDirectoryResponse.ts +8 -0
  214. package/src/protocol/v2/FsGetMetadataParams.ts +13 -0
  215. package/src/protocol/v2/FsGetMetadataResponse.ts +24 -0
  216. package/src/protocol/v2/FsReadDirectoryEntry.ts +20 -0
  217. package/src/protocol/v2/FsReadDirectoryParams.ts +13 -0
  218. package/src/protocol/v2/FsReadDirectoryResponse.ts +13 -0
  219. package/src/protocol/v2/FsReadFileParams.ts +13 -0
  220. package/src/protocol/v2/FsReadFileResponse.ts +12 -0
  221. package/src/protocol/v2/FsRemoveParams.ts +21 -0
  222. package/src/protocol/v2/FsRemoveResponse.ts +8 -0
  223. package/src/protocol/v2/FsUnwatchParams.ts +12 -0
  224. package/src/protocol/v2/FsUnwatchResponse.ts +8 -0
  225. package/src/protocol/v2/FsWatchParams.ts +13 -0
  226. package/src/protocol/v2/FsWatchResponse.ts +17 -0
  227. package/src/protocol/v2/FsWriteFileParams.ts +17 -0
  228. package/src/protocol/v2/FsWriteFileResponse.ts +8 -0
  229. package/src/protocol/v2/GetAccountParams.ts +13 -0
  230. package/src/protocol/v2/GetAccountRateLimitsResponse.ts +14 -0
  231. package/src/protocol/v2/GetAccountResponse.ts +6 -0
  232. package/src/protocol/v2/GitInfo.ts +5 -0
  233. package/src/protocol/v2/GrantedPermissionProfile.ts +7 -0
  234. package/src/protocol/v2/GuardianApprovalReview.ts +12 -0
  235. package/src/protocol/v2/GuardianApprovalReviewStatus.ts +8 -0
  236. package/src/protocol/v2/GuardianRiskLevel.ts +8 -0
  237. package/src/protocol/v2/HookCompletedNotification.ts +6 -0
  238. package/src/protocol/v2/HookEventName.ts +5 -0
  239. package/src/protocol/v2/HookExecutionMode.ts +5 -0
  240. package/src/protocol/v2/HookHandlerType.ts +5 -0
  241. package/src/protocol/v2/HookOutputEntry.ts +6 -0
  242. package/src/protocol/v2/HookOutputEntryKind.ts +5 -0
  243. package/src/protocol/v2/HookPromptFragment.ts +5 -0
  244. package/src/protocol/v2/HookRunStatus.ts +5 -0
  245. package/src/protocol/v2/HookRunSummary.ts +11 -0
  246. package/src/protocol/v2/HookScope.ts +5 -0
  247. package/src/protocol/v2/HookStartedNotification.ts +6 -0
  248. package/src/protocol/v2/ItemCompletedNotification.ts +6 -0
  249. package/src/protocol/v2/ItemGuardianApprovalReviewCompletedNotification.ts +15 -0
  250. package/src/protocol/v2/ItemGuardianApprovalReviewStartedNotification.ts +15 -0
  251. package/src/protocol/v2/ItemStartedNotification.ts +6 -0
  252. package/src/protocol/v2/ListMcpServerStatusParams.ts +13 -0
  253. package/src/protocol/v2/ListMcpServerStatusResponse.ts +11 -0
  254. package/src/protocol/v2/LoginAccountParams.ts +21 -0
  255. package/src/protocol/v2/LoginAccountResponse.ts +17 -0
  256. package/src/protocol/v2/LogoutAccountResponse.ts +5 -0
  257. package/src/protocol/v2/MarketplaceInterface.ts +5 -0
  258. package/src/protocol/v2/MarketplaceLoadErrorInfo.ts +6 -0
  259. package/src/protocol/v2/McpAuthStatus.ts +5 -0
  260. package/src/protocol/v2/McpElicitationArrayType.ts +5 -0
  261. package/src/protocol/v2/McpElicitationBooleanSchema.ts +6 -0
  262. package/src/protocol/v2/McpElicitationBooleanType.ts +5 -0
  263. package/src/protocol/v2/McpElicitationConstOption.ts +5 -0
  264. package/src/protocol/v2/McpElicitationEnumSchema.ts +8 -0
  265. package/src/protocol/v2/McpElicitationLegacyTitledEnumSchema.ts +6 -0
  266. package/src/protocol/v2/McpElicitationMultiSelectEnumSchema.ts +7 -0
  267. package/src/protocol/v2/McpElicitationNumberSchema.ts +6 -0
  268. package/src/protocol/v2/McpElicitationNumberType.ts +5 -0
  269. package/src/protocol/v2/McpElicitationObjectType.ts +5 -0
  270. package/src/protocol/v2/McpElicitationPrimitiveSchema.ts +9 -0
  271. package/src/protocol/v2/McpElicitationSchema.ts +13 -0
  272. package/src/protocol/v2/McpElicitationSingleSelectEnumSchema.ts +7 -0
  273. package/src/protocol/v2/McpElicitationStringFormat.ts +5 -0
  274. package/src/protocol/v2/McpElicitationStringSchema.ts +7 -0
  275. package/src/protocol/v2/McpElicitationStringType.ts +5 -0
  276. package/src/protocol/v2/McpElicitationTitledEnumItems.ts +6 -0
  277. package/src/protocol/v2/McpElicitationTitledMultiSelectEnumSchema.ts +7 -0
  278. package/src/protocol/v2/McpElicitationTitledSingleSelectEnumSchema.ts +7 -0
  279. package/src/protocol/v2/McpElicitationUntitledEnumItems.ts +6 -0
  280. package/src/protocol/v2/McpElicitationUntitledMultiSelectEnumSchema.ts +7 -0
  281. package/src/protocol/v2/McpElicitationUntitledSingleSelectEnumSchema.ts +6 -0
  282. package/src/protocol/v2/McpServerElicitationAction.ts +5 -0
  283. package/src/protocol/v2/McpServerElicitationRequestParams.ts +16 -0
  284. package/src/protocol/v2/McpServerElicitationRequestResponse.ts +17 -0
  285. package/src/protocol/v2/McpServerOauthLoginCompletedNotification.ts +5 -0
  286. package/src/protocol/v2/McpServerOauthLoginParams.ts +5 -0
  287. package/src/protocol/v2/McpServerOauthLoginResponse.ts +5 -0
  288. package/src/protocol/v2/McpServerRefreshResponse.ts +5 -0
  289. package/src/protocol/v2/McpServerStartupState.ts +5 -0
  290. package/src/protocol/v2/McpServerStatus.ts +9 -0
  291. package/src/protocol/v2/McpServerStatusUpdatedNotification.ts +6 -0
  292. package/src/protocol/v2/McpToolCallError.ts +5 -0
  293. package/src/protocol/v2/McpToolCallProgressNotification.ts +5 -0
  294. package/src/protocol/v2/McpToolCallResult.ts +6 -0
  295. package/src/protocol/v2/McpToolCallStatus.ts +5 -0
  296. package/src/protocol/v2/MemoryCitation.ts +6 -0
  297. package/src/protocol/v2/MemoryCitationEntry.ts +5 -0
  298. package/src/protocol/v2/MergeStrategy.ts +5 -0
  299. package/src/protocol/v2/Model.ts +10 -0
  300. package/src/protocol/v2/ModelAvailabilityNux.ts +5 -0
  301. package/src/protocol/v2/ModelListParams.ts +17 -0
  302. package/src/protocol/v2/ModelListResponse.ts +11 -0
  303. package/src/protocol/v2/ModelRerouteReason.ts +5 -0
  304. package/src/protocol/v2/ModelReroutedNotification.ts +6 -0
  305. package/src/protocol/v2/ModelUpgradeInfo.ts +5 -0
  306. package/src/protocol/v2/NetworkAccess.ts +5 -0
  307. package/src/protocol/v2/NetworkApprovalContext.ts +6 -0
  308. package/src/protocol/v2/NetworkApprovalProtocol.ts +5 -0
  309. package/src/protocol/v2/NetworkDomainPermission.ts +5 -0
  310. package/src/protocol/v2/NetworkPolicyAmendment.ts +6 -0
  311. package/src/protocol/v2/NetworkPolicyRuleAction.ts +5 -0
  312. package/src/protocol/v2/NetworkRequirements.ts +32 -0
  313. package/src/protocol/v2/NetworkUnixSocketPermission.ts +5 -0
  314. package/src/protocol/v2/NonSteerableTurnKind.ts +5 -0
  315. package/src/protocol/v2/OverriddenMetadata.ts +7 -0
  316. package/src/protocol/v2/PatchApplyStatus.ts +5 -0
  317. package/src/protocol/v2/PatchChangeKind.ts +5 -0
  318. package/src/protocol/v2/PermissionGrantScope.ts +5 -0
  319. package/src/protocol/v2/PermissionsRequestApprovalParams.ts +6 -0
  320. package/src/protocol/v2/PermissionsRequestApprovalResponse.ts +7 -0
  321. package/src/protocol/v2/PlanDeltaNotification.ts +9 -0
  322. package/src/protocol/v2/PluginAuthPolicy.ts +5 -0
  323. package/src/protocol/v2/PluginDetail.ts +9 -0
  324. package/src/protocol/v2/PluginInstallParams.ts +10 -0
  325. package/src/protocol/v2/PluginInstallPolicy.ts +5 -0
  326. package/src/protocol/v2/PluginInstallResponse.ts +7 -0
  327. package/src/protocol/v2/PluginInterface.ts +11 -0
  328. package/src/protocol/v2/PluginListParams.ts +16 -0
  329. package/src/protocol/v2/PluginListResponse.ts +7 -0
  330. package/src/protocol/v2/PluginMarketplaceEntry.ts +8 -0
  331. package/src/protocol/v2/PluginReadParams.ts +6 -0
  332. package/src/protocol/v2/PluginReadResponse.ts +6 -0
  333. package/src/protocol/v2/PluginSource.ts +6 -0
  334. package/src/protocol/v2/PluginSummary.ts +9 -0
  335. package/src/protocol/v2/PluginUninstallParams.ts +9 -0
  336. package/src/protocol/v2/PluginUninstallResponse.ts +5 -0
  337. package/src/protocol/v2/ProfileV2.ts +19 -0
  338. package/src/protocol/v2/RateLimitSnapshot.ts +8 -0
  339. package/src/protocol/v2/RateLimitWindow.ts +5 -0
  340. package/src/protocol/v2/RawResponseItemCompletedNotification.ts +6 -0
  341. package/src/protocol/v2/ReadOnlyAccess.ts +6 -0
  342. package/src/protocol/v2/ReasoningEffortOption.ts +6 -0
  343. package/src/protocol/v2/ReasoningSummaryPartAddedNotification.ts +5 -0
  344. package/src/protocol/v2/ReasoningSummaryTextDeltaNotification.ts +5 -0
  345. package/src/protocol/v2/ReasoningTextDeltaNotification.ts +5 -0
  346. package/src/protocol/v2/RequestPermissionProfile.ts +7 -0
  347. package/src/protocol/v2/ResidencyRequirement.ts +5 -0
  348. package/src/protocol/v2/ReviewDelivery.ts +5 -0
  349. package/src/protocol/v2/ReviewStartParams.ts +12 -0
  350. package/src/protocol/v2/ReviewStartResponse.ts +13 -0
  351. package/src/protocol/v2/ReviewTarget.ts +9 -0
  352. package/src/protocol/v2/SandboxMode.ts +5 -0
  353. package/src/protocol/v2/SandboxPolicy.ts +8 -0
  354. package/src/protocol/v2/SandboxWorkspaceWrite.ts +5 -0
  355. package/src/protocol/v2/ServerRequestResolvedNotification.ts +6 -0
  356. package/src/protocol/v2/SessionSource.ts +6 -0
  357. package/src/protocol/v2/SkillDependencies.ts +6 -0
  358. package/src/protocol/v2/SkillErrorInfo.ts +5 -0
  359. package/src/protocol/v2/SkillInterface.ts +5 -0
  360. package/src/protocol/v2/SkillMetadata.ts +12 -0
  361. package/src/protocol/v2/SkillScope.ts +5 -0
  362. package/src/protocol/v2/SkillSummary.ts +6 -0
  363. package/src/protocol/v2/SkillToolDependency.ts +5 -0
  364. package/src/protocol/v2/SkillsChangedNotification.ts +11 -0
  365. package/src/protocol/v2/SkillsConfigWriteParams.ts +14 -0
  366. package/src/protocol/v2/SkillsConfigWriteResponse.ts +5 -0
  367. package/src/protocol/v2/SkillsListEntry.ts +7 -0
  368. package/src/protocol/v2/SkillsListExtraRootsForCwd.ts +5 -0
  369. package/src/protocol/v2/SkillsListParams.ts +18 -0
  370. package/src/protocol/v2/SkillsListResponse.ts +6 -0
  371. package/src/protocol/v2/TerminalInteractionNotification.ts +5 -0
  372. package/src/protocol/v2/TextElement.ts +14 -0
  373. package/src/protocol/v2/TextPosition.ts +13 -0
  374. package/src/protocol/v2/TextRange.ts +6 -0
  375. package/src/protocol/v2/Thread.ts +72 -0
  376. package/src/protocol/v2/ThreadActiveFlag.ts +5 -0
  377. package/src/protocol/v2/ThreadArchiveParams.ts +5 -0
  378. package/src/protocol/v2/ThreadArchiveResponse.ts +5 -0
  379. package/src/protocol/v2/ThreadArchivedNotification.ts +5 -0
  380. package/src/protocol/v2/ThreadClosedNotification.ts +5 -0
  381. package/src/protocol/v2/ThreadCompactStartParams.ts +5 -0
  382. package/src/protocol/v2/ThreadCompactStartResponse.ts +5 -0
  383. package/src/protocol/v2/ThreadForkParams.ts +34 -0
  384. package/src/protocol/v2/ThreadForkResponse.ts +15 -0
  385. package/src/protocol/v2/ThreadItem.ts +100 -0
  386. package/src/protocol/v2/ThreadListParams.ts +43 -0
  387. package/src/protocol/v2/ThreadListResponse.ts +11 -0
  388. package/src/protocol/v2/ThreadLoadedListParams.ts +13 -0
  389. package/src/protocol/v2/ThreadLoadedListResponse.ts +14 -0
  390. package/src/protocol/v2/ThreadMetadataGitInfoUpdateParams.ts +20 -0
  391. package/src/protocol/v2/ThreadMetadataUpdateParams.ts +12 -0
  392. package/src/protocol/v2/ThreadMetadataUpdateResponse.ts +6 -0
  393. package/src/protocol/v2/ThreadNameUpdatedNotification.ts +5 -0
  394. package/src/protocol/v2/ThreadReadParams.ts +9 -0
  395. package/src/protocol/v2/ThreadReadResponse.ts +6 -0
  396. package/src/protocol/v2/ThreadRealtimeAudioChunk.ts +8 -0
  397. package/src/protocol/v2/ThreadRealtimeClosedNotification.ts +8 -0
  398. package/src/protocol/v2/ThreadRealtimeErrorNotification.ts +8 -0
  399. package/src/protocol/v2/ThreadRealtimeItemAddedNotification.ts +9 -0
  400. package/src/protocol/v2/ThreadRealtimeOutputAudioDeltaNotification.ts +9 -0
  401. package/src/protocol/v2/ThreadRealtimeStartedNotification.ts +9 -0
  402. package/src/protocol/v2/ThreadRealtimeTranscriptUpdatedNotification.ts +9 -0
  403. package/src/protocol/v2/ThreadResumeParams.ts +43 -0
  404. package/src/protocol/v2/ThreadResumeResponse.ts +15 -0
  405. package/src/protocol/v2/ThreadRollbackParams.ts +12 -0
  406. package/src/protocol/v2/ThreadRollbackResponse.ts +14 -0
  407. package/src/protocol/v2/ThreadSetNameParams.ts +5 -0
  408. package/src/protocol/v2/ThreadSetNameResponse.ts +5 -0
  409. package/src/protocol/v2/ThreadShellCommandParams.ts +12 -0
  410. package/src/protocol/v2/ThreadShellCommandResponse.ts +5 -0
  411. package/src/protocol/v2/ThreadSortKey.ts +5 -0
  412. package/src/protocol/v2/ThreadSourceKind.ts +5 -0
  413. package/src/protocol/v2/ThreadStartParams.ts +23 -0
  414. package/src/protocol/v2/ThreadStartResponse.ts +15 -0
  415. package/src/protocol/v2/ThreadStartedNotification.ts +6 -0
  416. package/src/protocol/v2/ThreadStatus.ts +6 -0
  417. package/src/protocol/v2/ThreadStatusChangedNotification.ts +6 -0
  418. package/src/protocol/v2/ThreadTokenUsage.ts +6 -0
  419. package/src/protocol/v2/ThreadTokenUsageUpdatedNotification.ts +6 -0
  420. package/src/protocol/v2/ThreadUnarchiveParams.ts +5 -0
  421. package/src/protocol/v2/ThreadUnarchiveResponse.ts +6 -0
  422. package/src/protocol/v2/ThreadUnarchivedNotification.ts +5 -0
  423. package/src/protocol/v2/ThreadUnsubscribeParams.ts +5 -0
  424. package/src/protocol/v2/ThreadUnsubscribeResponse.ts +6 -0
  425. package/src/protocol/v2/ThreadUnsubscribeStatus.ts +5 -0
  426. package/src/protocol/v2/TokenUsageBreakdown.ts +5 -0
  427. package/src/protocol/v2/ToolRequestUserInputAnswer.ts +8 -0
  428. package/src/protocol/v2/ToolRequestUserInputOption.ts +8 -0
  429. package/src/protocol/v2/ToolRequestUserInputParams.ts +9 -0
  430. package/src/protocol/v2/ToolRequestUserInputQuestion.ts +9 -0
  431. package/src/protocol/v2/ToolRequestUserInputResponse.ts +9 -0
  432. package/src/protocol/v2/ToolsV2.ts +6 -0
  433. package/src/protocol/v2/Turn.ts +18 -0
  434. package/src/protocol/v2/TurnCompletedNotification.ts +6 -0
  435. package/src/protocol/v2/TurnDiffUpdatedNotification.ts +9 -0
  436. package/src/protocol/v2/TurnError.ts +6 -0
  437. package/src/protocol/v2/TurnInterruptParams.ts +5 -0
  438. package/src/protocol/v2/TurnInterruptResponse.ts +5 -0
  439. package/src/protocol/v2/TurnPlanStep.ts +6 -0
  440. package/src/protocol/v2/TurnPlanStepStatus.ts +5 -0
  441. package/src/protocol/v2/TurnPlanUpdatedNotification.ts +6 -0
  442. package/src/protocol/v2/TurnStartParams.ts +54 -0
  443. package/src/protocol/v2/TurnStartResponse.ts +6 -0
  444. package/src/protocol/v2/TurnStartedNotification.ts +6 -0
  445. package/src/protocol/v2/TurnStatus.ts +5 -0
  446. package/src/protocol/v2/TurnSteerParams.ts +11 -0
  447. package/src/protocol/v2/TurnSteerResponse.ts +5 -0
  448. package/src/protocol/v2/UserInput.ts +10 -0
  449. package/src/protocol/v2/WebSearchAction.ts +5 -0
  450. package/src/protocol/v2/WindowsSandboxSetupCompletedNotification.ts +6 -0
  451. package/src/protocol/v2/WindowsSandboxSetupMode.ts +5 -0
  452. package/src/protocol/v2/WindowsSandboxSetupStartParams.ts +7 -0
  453. package/src/protocol/v2/WindowsSandboxSetupStartResponse.ts +5 -0
  454. package/src/protocol/v2/WindowsWorldWritableWarningNotification.ts +5 -0
  455. package/src/protocol/v2/WriteStatus.ts +5 -0
  456. package/src/protocol/v2/index.ts +346 -0
  457. package/src/services/app-server-client.ts +636 -0
  458. package/src/services/codex-runtime.ts +500 -0
  459. package/src/services/fleet-mode.ts +29 -0
  460. package/src/services/model-catalog.ts +86 -0
  461. package/src/services/profile-manager.ts +113 -0
  462. package/src/types/codex.ts +57 -0
@@ -0,0 +1,100 @@
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 { MessagePhase } from "../MessagePhase";
5
+ import type { ReasoningEffort } from "../ReasoningEffort";
6
+ import type { JsonValue } from "../serde_json/JsonValue";
7
+ import type { CollabAgentState } from "./CollabAgentState";
8
+ import type { CollabAgentTool } from "./CollabAgentTool";
9
+ import type { CollabAgentToolCallStatus } from "./CollabAgentToolCallStatus";
10
+ import type { CommandAction } from "./CommandAction";
11
+ import type { CommandExecutionSource } from "./CommandExecutionSource";
12
+ import type { CommandExecutionStatus } from "./CommandExecutionStatus";
13
+ import type { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputContentItem";
14
+ import type { DynamicToolCallStatus } from "./DynamicToolCallStatus";
15
+ import type { FileUpdateChange } from "./FileUpdateChange";
16
+ import type { HookPromptFragment } from "./HookPromptFragment";
17
+ import type { McpToolCallError } from "./McpToolCallError";
18
+ import type { McpToolCallResult } from "./McpToolCallResult";
19
+ import type { McpToolCallStatus } from "./McpToolCallStatus";
20
+ import type { MemoryCitation } from "./MemoryCitation";
21
+ import type { PatchApplyStatus } from "./PatchApplyStatus";
22
+ import type { UserInput } from "./UserInput";
23
+ import type { WebSearchAction } from "./WebSearchAction";
24
+
25
+ export type ThreadItem = { "type": "userMessage", id: string, content: Array<UserInput>, } | { "type": "hookPrompt", id: string, fragments: Array<HookPromptFragment>, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, memoryCitation: MemoryCitation | null, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array<string>, content: Array<string>, } | { "type": "commandExecution", id: string,
26
+ /**
27
+ * The command to be executed.
28
+ */
29
+ command: string,
30
+ /**
31
+ * The command's working directory.
32
+ */
33
+ cwd: string,
34
+ /**
35
+ * Identifier for the underlying PTY process (when available).
36
+ */
37
+ processId: string | null, source: CommandExecutionSource, status: CommandExecutionStatus,
38
+ /**
39
+ * A best-effort parsing of the command to understand the action(s) it will perform.
40
+ * This returns a list of CommandAction objects because a single shell command may
41
+ * be composed of many commands piped together.
42
+ */
43
+ commandActions: Array<CommandAction>,
44
+ /**
45
+ * The command's output, aggregated from stdout and stderr.
46
+ */
47
+ aggregatedOutput: string | null,
48
+ /**
49
+ * The command's exit code.
50
+ */
51
+ exitCode: number | null,
52
+ /**
53
+ * The duration of the command execution in milliseconds.
54
+ */
55
+ durationMs: number | null, } | { "type": "fileChange", id: string, changes: Array<FileUpdateChange>, status: PatchApplyStatus, } | { "type": "mcpToolCall", id: string, server: string, tool: string, status: McpToolCallStatus, arguments: JsonValue, result: McpToolCallResult | null, error: McpToolCallError | null,
56
+ /**
57
+ * The duration of the MCP tool call in milliseconds.
58
+ */
59
+ durationMs: number | null, } | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array<DynamicToolCallOutputContentItem> | null, success: boolean | null,
60
+ /**
61
+ * The duration of the dynamic tool call in milliseconds.
62
+ */
63
+ durationMs: number | null, } | { "type": "collabAgentToolCall",
64
+ /**
65
+ * Unique identifier for this collab tool call.
66
+ */
67
+ id: string,
68
+ /**
69
+ * Name of the collab tool that was invoked.
70
+ */
71
+ tool: CollabAgentTool,
72
+ /**
73
+ * Current status of the collab tool call.
74
+ */
75
+ status: CollabAgentToolCallStatus,
76
+ /**
77
+ * Thread ID of the agent issuing the collab request.
78
+ */
79
+ senderThreadId: string,
80
+ /**
81
+ * Thread ID of the receiving agent, when applicable. In case of spawn operation,
82
+ * this corresponds to the newly spawned agent.
83
+ */
84
+ receiverThreadIds: Array<string>,
85
+ /**
86
+ * Prompt text sent as part of the collab tool call, when available.
87
+ */
88
+ prompt: string | null,
89
+ /**
90
+ * Model requested for the spawned agent, when applicable.
91
+ */
92
+ model: string | null,
93
+ /**
94
+ * Reasoning effort requested for the spawned agent, when applicable.
95
+ */
96
+ reasoningEffort: ReasoningEffort | null,
97
+ /**
98
+ * Last known status of the target agents, when available.
99
+ */
100
+ agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: string, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, savedPath?: string, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, };
@@ -0,0 +1,43 @@
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 { ThreadSortKey } from "./ThreadSortKey";
5
+ import type { ThreadSourceKind } from "./ThreadSourceKind";
6
+
7
+ export type ThreadListParams = {
8
+ /**
9
+ * Opaque pagination cursor returned by a previous call.
10
+ */
11
+ cursor?: string | null,
12
+ /**
13
+ * Optional page size; defaults to a reasonable server-side value.
14
+ */
15
+ limit?: number | null,
16
+ /**
17
+ * Optional sort key; defaults to created_at.
18
+ */
19
+ sortKey?: ThreadSortKey | null,
20
+ /**
21
+ * Optional provider filter; when set, only sessions recorded under these
22
+ * providers are returned. When present but empty, includes all providers.
23
+ */
24
+ modelProviders?: Array<string> | null,
25
+ /**
26
+ * Optional source filter; when set, only sessions from these source kinds
27
+ * are returned. When omitted or empty, defaults to interactive sources.
28
+ */
29
+ sourceKinds?: Array<ThreadSourceKind> | null,
30
+ /**
31
+ * Optional archived filter; when set to true, only archived threads are returned.
32
+ * If false or null, only non-archived threads are returned.
33
+ */
34
+ archived?: boolean | null,
35
+ /**
36
+ * Optional cwd filter; when set, only threads whose session cwd exactly
37
+ * matches this path are returned.
38
+ */
39
+ cwd?: string | null,
40
+ /**
41
+ * Optional substring filter for the extracted thread title.
42
+ */
43
+ searchTerm?: string | null, };
@@ -0,0 +1,11 @@
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 { Thread } from "./Thread";
5
+
6
+ export type ThreadListResponse = { data: Array<Thread>,
7
+ /**
8
+ * Opaque cursor to pass to the next call to continue after the last item.
9
+ * if None, there are no more items to return.
10
+ */
11
+ nextCursor: 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 ThreadLoadedListParams = {
6
+ /**
7
+ * Opaque pagination cursor returned by a previous call.
8
+ */
9
+ cursor?: string | null,
10
+ /**
11
+ * Optional page size; defaults to no limit.
12
+ */
13
+ limit?: number | null, };
@@ -0,0 +1,14 @@
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 ThreadLoadedListResponse = {
6
+ /**
7
+ * Thread ids for sessions currently loaded in memory.
8
+ */
9
+ data: Array<string>,
10
+ /**
11
+ * Opaque cursor to pass to the next call to continue after the last item.
12
+ * if None, there are no more items to return.
13
+ */
14
+ nextCursor: string | null, };
@@ -0,0 +1,20 @@
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 ThreadMetadataGitInfoUpdateParams = {
6
+ /**
7
+ * Omit to leave the stored commit unchanged, set to `null` to clear it,
8
+ * or provide a non-empty string to replace it.
9
+ */
10
+ sha?: string | null,
11
+ /**
12
+ * Omit to leave the stored branch unchanged, set to `null` to clear it,
13
+ * or provide a non-empty string to replace it.
14
+ */
15
+ branch?: string | null,
16
+ /**
17
+ * Omit to leave the stored origin URL unchanged, set to `null` to clear it,
18
+ * or provide a non-empty string to replace it.
19
+ */
20
+ originUrl?: string | null, };
@@ -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 { ThreadMetadataGitInfoUpdateParams } from "./ThreadMetadataGitInfoUpdateParams";
5
+
6
+ export type ThreadMetadataUpdateParams = { threadId: string,
7
+ /**
8
+ * Patch the stored Git metadata for this thread.
9
+ * Omit a field to leave it unchanged, set it to `null` to clear it, or
10
+ * provide a string to replace the stored value.
11
+ */
12
+ gitInfo?: ThreadMetadataGitInfoUpdateParams | 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 { Thread } from "./Thread";
5
+
6
+ export type ThreadMetadataUpdateResponse = { thread: Thread, };
@@ -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 ThreadNameUpdatedNotification = { threadId: string, threadName?: string, };
@@ -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
+ export type ThreadReadParams = { threadId: string,
6
+ /**
7
+ * When true, include turns and their items from rollout history.
8
+ */
9
+ includeTurns: boolean, };
@@ -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 { Thread } from "./Thread";
5
+
6
+ export type ThreadReadResponse = { thread: Thread, };
@@ -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
+ * EXPERIMENTAL - thread realtime audio chunk.
7
+ */
8
+ export type ThreadRealtimeAudioChunk = { data: string, sampleRate: number, numChannels: number, samplesPerChannel: number | null, itemId: string | null, };
@@ -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
+ * EXPERIMENTAL - emitted when thread realtime transport closes.
7
+ */
8
+ export type ThreadRealtimeClosedNotification = { threadId: string, reason: string | null, };
@@ -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
+ * EXPERIMENTAL - emitted when thread realtime encounters an error.
7
+ */
8
+ export type ThreadRealtimeErrorNotification = { threadId: string, message: string, };
@@ -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
+ import type { JsonValue } from "../serde_json/JsonValue";
5
+
6
+ /**
7
+ * EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.
8
+ */
9
+ export type ThreadRealtimeItemAddedNotification = { threadId: string, item: JsonValue, };
@@ -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
+ import type { ThreadRealtimeAudioChunk } from "./ThreadRealtimeAudioChunk";
5
+
6
+ /**
7
+ * EXPERIMENTAL - streamed output audio emitted by thread realtime.
8
+ */
9
+ export type ThreadRealtimeOutputAudioDeltaNotification = { threadId: string, audio: ThreadRealtimeAudioChunk, };
@@ -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
+ import type { RealtimeConversationVersion } from "../RealtimeConversationVersion";
5
+
6
+ /**
7
+ * EXPERIMENTAL - emitted when thread realtime startup is accepted.
8
+ */
9
+ export type ThreadRealtimeStartedNotification = { threadId: string, sessionId: string | null, version: RealtimeConversationVersion, };
@@ -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
+ * EXPERIMENTAL - flat transcript delta emitted whenever realtime
7
+ * transcript text changes.
8
+ */
9
+ export type ThreadRealtimeTranscriptUpdatedNotification = { threadId: string, role: string, text: string, };
@@ -0,0 +1,43 @@
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 { Personality } from "../Personality";
5
+ import type { ResponseItem } from "../ResponseItem";
6
+ import type { ServiceTier } from "../ServiceTier";
7
+ import type { JsonValue } from "../serde_json/JsonValue";
8
+ import type { ApprovalsReviewer } from "./ApprovalsReviewer";
9
+ import type { AskForApproval } from "./AskForApproval";
10
+ import type { SandboxMode } from "./SandboxMode";
11
+
12
+ /**
13
+ * There are three ways to resume a thread:
14
+ * 1. By thread_id: load the thread from disk by thread_id and resume it.
15
+ * 2. By history: instantiate the thread from memory and resume it.
16
+ * 3. By path: load the thread from disk by path and resume it.
17
+ *
18
+ * The precedence is: history > path > thread_id.
19
+ * If using history or path, the thread_id param will be ignored.
20
+ *
21
+ * Prefer using thread_id whenever possible.
22
+ */
23
+ export type ThreadResumeParams = {threadId: string, /**
24
+ * [UNSTABLE] FOR CODEX CLOUD - DO NOT USE.
25
+ * If specified, the thread will be resumed with the provided history
26
+ * instead of loaded from disk.
27
+ */
28
+ history?: Array<ResponseItem> | null, /**
29
+ * [UNSTABLE] Specify the rollout path to resume from.
30
+ * If specified, the thread_id param will be ignored.
31
+ */
32
+ path?: string | null, /**
33
+ * Configuration overrides for the resumed thread, if any.
34
+ */
35
+ model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, /**
36
+ * Override where approval requests are routed for review on this thread
37
+ * and subsequent turns.
38
+ */
39
+ approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, /**
40
+ * If true, persist additional rollout EventMsg variants required to
41
+ * reconstruct a richer thread history on subsequent resume/fork/read.
42
+ */
43
+ persistExtendedHistory: boolean};
@@ -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 { ReasoningEffort } from "../ReasoningEffort";
5
+ import type { ServiceTier } from "../ServiceTier";
6
+ import type { ApprovalsReviewer } from "./ApprovalsReviewer";
7
+ import type { AskForApproval } from "./AskForApproval";
8
+ import type { SandboxPolicy } from "./SandboxPolicy";
9
+ import type { Thread } from "./Thread";
10
+
11
+ export type ThreadResumeResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
12
+ /**
13
+ * Reviewer currently used for approval requests on this thread.
14
+ */
15
+ approvalsReviewer: ApprovalsReviewer, sandbox: SandboxPolicy, reasoningEffort: ReasoningEffort | null, };
@@ -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
+ export type ThreadRollbackParams = { threadId: string,
6
+ /**
7
+ * The number of turns to drop from the end of the thread. Must be >= 1.
8
+ *
9
+ * This only modifies the thread's history and does not revert local file changes
10
+ * that have been made by the agent. Clients are responsible for reverting these changes.
11
+ */
12
+ numTurns: number, };
@@ -0,0 +1,14 @@
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 { Thread } from "./Thread";
5
+
6
+ export type ThreadRollbackResponse = {
7
+ /**
8
+ * The updated thread after applying the rollback, with `turns` populated.
9
+ *
10
+ * The ThreadItems stored in each Turn are lossy since we explicitly do not
11
+ * persist all agent interactions, such as command executions. This is the same
12
+ * behavior as `thread/resume`.
13
+ */
14
+ thread: Thread, };
@@ -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 ThreadSetNameParams = { threadId: string, name: 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 ThreadSetNameResponse = Record<string, never>;
@@ -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
+ export type ThreadShellCommandParams = { threadId: string,
6
+ /**
7
+ * Shell command string evaluated by the thread's configured shell.
8
+ * Unlike `command/exec`, this intentionally preserves shell syntax
9
+ * such as pipes, redirects, and quoting. This runs unsandboxed with full
10
+ * access rather than inheriting the thread sandbox policy.
11
+ */
12
+ command: 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 ThreadShellCommandResponse = Record<string, never>;
@@ -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 ThreadSortKey = "created_at" | "updated_at";
@@ -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 ThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown";
@@ -0,0 +1,23 @@
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 { Personality } from "../Personality";
5
+ import type { ServiceTier } from "../ServiceTier";
6
+ import type { JsonValue } from "../serde_json/JsonValue";
7
+ import type { ApprovalsReviewer } from "./ApprovalsReviewer";
8
+ import type { AskForApproval } from "./AskForApproval";
9
+ import type { SandboxMode } from "./SandboxMode";
10
+
11
+ export type ThreadStartParams = {model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, /**
12
+ * Override where approval requests are routed for review on this thread
13
+ * and subsequent turns.
14
+ */
15
+ approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, serviceName?: string | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, ephemeral?: boolean | null, /**
16
+ * If true, opt into emitting raw Responses API items on the event stream.
17
+ * This is for internal use only (e.g. Codex Cloud).
18
+ */
19
+ experimentalRawEvents: boolean, /**
20
+ * If true, persist additional rollout EventMsg variants required to
21
+ * reconstruct a richer thread history on resume/fork/read.
22
+ */
23
+ persistExtendedHistory: boolean};
@@ -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 { ReasoningEffort } from "../ReasoningEffort";
5
+ import type { ServiceTier } from "../ServiceTier";
6
+ import type { ApprovalsReviewer } from "./ApprovalsReviewer";
7
+ import type { AskForApproval } from "./AskForApproval";
8
+ import type { SandboxPolicy } from "./SandboxPolicy";
9
+ import type { Thread } from "./Thread";
10
+
11
+ export type ThreadStartResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
12
+ /**
13
+ * Reviewer currently used for approval requests on this thread.
14
+ */
15
+ approvalsReviewer: ApprovalsReviewer, sandbox: SandboxPolicy, reasoningEffort: ReasoningEffort | 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 { Thread } from "./Thread";
5
+
6
+ export type ThreadStartedNotification = { thread: Thread, };
@@ -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 { ThreadActiveFlag } from "./ThreadActiveFlag";
5
+
6
+ export type ThreadStatus = { "type": "notLoaded" } | { "type": "idle" } | { "type": "systemError" } | { "type": "active", activeFlags: Array<ThreadActiveFlag>, };
@@ -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 { ThreadStatus } from "./ThreadStatus";
5
+
6
+ export type ThreadStatusChangedNotification = { threadId: string, status: ThreadStatus, };
@@ -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 { TokenUsageBreakdown } from "./TokenUsageBreakdown";
5
+
6
+ export type ThreadTokenUsage = { total: TokenUsageBreakdown, last: TokenUsageBreakdown, modelContextWindow: number | 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 { ThreadTokenUsage } from "./ThreadTokenUsage";
5
+
6
+ export type ThreadTokenUsageUpdatedNotification = { threadId: string, turnId: string, tokenUsage: ThreadTokenUsage, };
@@ -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 ThreadUnarchiveParams = { threadId: 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 { Thread } from "./Thread";
5
+
6
+ export type ThreadUnarchiveResponse = { thread: Thread, };
@@ -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 ThreadUnarchivedNotification = { threadId: 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 ThreadUnsubscribeParams = { threadId: 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 { ThreadUnsubscribeStatus } from "./ThreadUnsubscribeStatus";
5
+
6
+ export type ThreadUnsubscribeResponse = { status: ThreadUnsubscribeStatus, };
@@ -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 ThreadUnsubscribeStatus = "notLoaded" | "notSubscribed" | "unsubscribed";
@@ -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 TokenUsageBreakdown = { totalTokens: number, inputTokens: number, cachedInputTokens: number, outputTokens: number, reasoningOutputTokens: number, };
@@ -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
+ * EXPERIMENTAL. Captures a user's answer to a request_user_input question.
7
+ */
8
+ export type ToolRequestUserInputAnswer = { answers: Array<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
+
5
+ /**
6
+ * EXPERIMENTAL. Defines a single selectable option for request_user_input.
7
+ */
8
+ export type ToolRequestUserInputOption = { label: string, description: string, };
@@ -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
+ import type { ToolRequestUserInputQuestion } from "./ToolRequestUserInputQuestion";
5
+
6
+ /**
7
+ * EXPERIMENTAL. Params sent with a request_user_input event.
8
+ */
9
+ export type ToolRequestUserInputParams = { threadId: string, turnId: string, itemId: string, questions: Array<ToolRequestUserInputQuestion>, };