@opencorelabs/lucidity 0.7.0 → 0.9.5

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 (502) hide show
  1. package/README.md +9 -2
  2. package/dist/assets/speech/lucidity-speech +0 -0
  3. package/dist/automations/agent.d.ts.map +1 -1
  4. package/dist/automations/agent.js +2 -0
  5. package/dist/automations/designer.d.ts +1 -1
  6. package/dist/automations/service.d.ts +4 -0
  7. package/dist/automations/service.d.ts.map +1 -1
  8. package/dist/automations/service.js +60 -22
  9. package/dist/automations/store.d.ts +9 -3
  10. package/dist/automations/store.d.ts.map +1 -1
  11. package/dist/automations/store.js +45 -32
  12. package/dist/automations/workflow.d.ts +14 -0
  13. package/dist/automations/workflow.d.ts.map +1 -0
  14. package/dist/automations/workflow.js +57 -0
  15. package/dist/chat/server.d.ts +1 -0
  16. package/dist/chat/server.d.ts.map +1 -1
  17. package/dist/chat/server.js +6 -1
  18. package/dist/coding/listPrs.d.ts +2 -0
  19. package/dist/coding/listPrs.d.ts.map +1 -1
  20. package/dist/coding/listPrs.js +10 -0
  21. package/dist/coding/runCodeTurn.d.ts +6 -30
  22. package/dist/coding/runCodeTurn.d.ts.map +1 -1
  23. package/dist/coding/runCodeTurn.js +145 -218
  24. package/dist/coding/runReview.d.ts +10 -0
  25. package/dist/coding/runReview.d.ts.map +1 -0
  26. package/dist/coding/runReview.js +87 -0
  27. package/dist/coding/workspaceRegistry.d.ts +72 -0
  28. package/dist/coding/workspaceRegistry.d.ts.map +1 -0
  29. package/dist/coding/workspaceRegistry.js +421 -0
  30. package/dist/coding/worktree.d.ts +72 -32
  31. package/dist/coding/worktree.d.ts.map +1 -1
  32. package/dist/coding/worktree.js +190 -38
  33. package/dist/coding/worktreeSetup.d.ts +7 -0
  34. package/dist/coding/worktreeSetup.d.ts.map +1 -0
  35. package/dist/coding/worktreeSetup.js +49 -0
  36. package/dist/config.d.ts +2 -0
  37. package/dist/config.d.ts.map +1 -1
  38. package/dist/daemonLease.d.ts +12 -0
  39. package/dist/daemonLease.d.ts.map +1 -0
  40. package/dist/daemonLease.js +32 -0
  41. package/dist/goals/assessment.d.ts +115 -0
  42. package/dist/goals/assessment.d.ts.map +1 -0
  43. package/dist/goals/assessment.js +67 -0
  44. package/dist/goals/notes.d.ts +18 -0
  45. package/dist/goals/notes.d.ts.map +1 -0
  46. package/dist/goals/notes.js +72 -0
  47. package/dist/index.js +75 -40
  48. package/dist/jobs/briefing.d.ts +2 -16
  49. package/dist/jobs/briefing.d.ts.map +1 -1
  50. package/dist/jobs/briefing.js +65 -93
  51. package/dist/jobs/goals.d.ts +15 -0
  52. package/dist/jobs/goals.d.ts.map +1 -0
  53. package/dist/jobs/goals.js +286 -0
  54. package/dist/jobs/weeklyReview.d.ts.map +1 -1
  55. package/dist/jobs/weeklyReview.js +3 -2
  56. package/dist/logTimestamps.d.ts +10 -0
  57. package/dist/logTimestamps.d.ts.map +1 -0
  58. package/dist/logTimestamps.js +12 -0
  59. package/dist/providerRecovery.d.ts +48 -0
  60. package/dist/providerRecovery.d.ts.map +1 -0
  61. package/dist/providerRecovery.js +100 -0
  62. package/dist/queue.d.ts +1 -0
  63. package/dist/queue.d.ts.map +1 -1
  64. package/dist/queue.js +4 -0
  65. package/dist/room/client.d.ts +6 -19
  66. package/dist/room/client.d.ts.map +1 -1
  67. package/dist/room/client.js +127 -123
  68. package/dist/room/computer.js +1 -1
  69. package/dist/room/durablePublish.d.ts +6 -0
  70. package/dist/room/durablePublish.d.ts.map +1 -0
  71. package/dist/room/durablePublish.js +19 -0
  72. package/dist/room/incidents.d.ts +4 -1
  73. package/dist/room/incidents.d.ts.map +1 -1
  74. package/dist/room/incidents.js +15 -7
  75. package/dist/room/turnQueue.d.ts.map +1 -1
  76. package/dist/room/turnQueue.js +55 -46
  77. package/dist/runtimeStore.d.ts +46 -0
  78. package/dist/runtimeStore.d.ts.map +1 -0
  79. package/dist/runtimeStore.js +205 -0
  80. package/dist/setup/server.js +1 -1
  81. package/dist/turnLog.d.ts +10 -40
  82. package/dist/turnLog.d.ts.map +1 -1
  83. package/dist/turnLog.js +33 -56
  84. package/dist/vault.d.ts +6 -3
  85. package/dist/vault.d.ts.map +1 -1
  86. package/dist/vault.js +18 -4
  87. package/package.json +4 -4
  88. package/src/automations/agent.ts +2 -0
  89. package/src/automations/service.ts +47 -21
  90. package/src/automations/store.ts +41 -50
  91. package/src/automations/workflow.ts +49 -0
  92. package/src/chat/server.ts +7 -1
  93. package/src/coding/listPrs.ts +14 -0
  94. package/src/coding/runCodeTurn.ts +51 -139
  95. package/src/coding/runReview.ts +83 -0
  96. package/src/coding/workspaceRegistry.ts +380 -0
  97. package/src/coding/worktree.ts +205 -40
  98. package/src/coding/worktreeSetup.ts +50 -0
  99. package/src/config.ts +2 -0
  100. package/src/daemonLease.ts +33 -0
  101. package/src/goals/assessment.ts +106 -0
  102. package/src/goals/notes.ts +88 -0
  103. package/src/index.ts +76 -46
  104. package/src/jobs/briefing.ts +62 -109
  105. package/src/jobs/goals.ts +384 -0
  106. package/src/jobs/weeklyReview.ts +4 -3
  107. package/src/logTimestamps.ts +14 -0
  108. package/src/providerRecovery.ts +99 -0
  109. package/src/queue.ts +4 -0
  110. package/src/room/client.ts +84 -116
  111. package/src/room/computer.ts +1 -1
  112. package/src/room/durablePublish.ts +25 -0
  113. package/src/room/incidents.ts +20 -8
  114. package/src/room/turnQueue.ts +53 -56
  115. package/src/runtimeStore.ts +207 -0
  116. package/src/setup/server.ts +1 -1
  117. package/src/turnLog.ts +32 -75
  118. package/src/vault.ts +16 -7
  119. package/vendor/mcp-server/dist/index.js +2 -0
  120. package/vendor/mcp-server/dist/tools/goals.d.ts +4 -0
  121. package/vendor/mcp-server/dist/tools/goals.d.ts.map +1 -0
  122. package/vendor/mcp-server/dist/tools/goals.js +38 -0
  123. package/vendor/mcp-server/package.json +1 -1
  124. package/vendor/mcp-server/src/index.ts +2 -0
  125. package/vendor/mcp-server/src/tools/goals.ts +62 -0
  126. package/vendor/runtime/README.md +36 -2
  127. package/vendor/runtime/dist/executor/asyncQueue.d.ts +1 -0
  128. package/vendor/runtime/dist/executor/asyncQueue.d.ts.map +1 -1
  129. package/vendor/runtime/dist/executor/asyncQueue.js +3 -0
  130. package/vendor/runtime/dist/executor/claudeAgent.d.ts +5 -1
  131. package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
  132. package/vendor/runtime/dist/executor/claudeAgent.js +77 -13
  133. package/vendor/runtime/dist/executor/codex.d.ts +8 -2
  134. package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
  135. package/vendor/runtime/dist/executor/codex.js +113 -38
  136. package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts +2 -0
  137. package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts.map +1 -0
  138. package/vendor/runtime/dist/executor/codexProtocol/AgentPath.js +2 -0
  139. package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts +4 -1
  140. package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts.map +1 -1
  141. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts +6 -0
  142. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts.map +1 -0
  143. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.js +2 -0
  144. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts +12 -0
  145. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts.map +1 -0
  146. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.js +2 -0
  147. package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts +24 -0
  148. package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts.map +1 -0
  149. package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.js +2 -0
  150. package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts +8 -0
  151. package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts.map +1 -0
  152. package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.js +2 -0
  153. package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts +3 -0
  154. package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts.map +1 -1
  155. package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts +1 -1
  156. package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts.map +1 -1
  157. package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts +8 -0
  158. package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts.map +1 -0
  159. package/vendor/runtime/dist/executor/codexProtocol/SleepItem.js +2 -0
  160. package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts +14 -0
  161. package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts.map +1 -0
  162. package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.js +2 -0
  163. package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts +7 -0
  164. package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts.map +1 -0
  165. package/vendor/runtime/dist/executor/codexProtocol/ThreadId.js +2 -0
  166. package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts +15 -0
  167. package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts.map +1 -0
  168. package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.js +2 -0
  169. package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts +2 -0
  170. package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts.map +1 -0
  171. package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.js +2 -0
  172. package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts +5 -0
  173. package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts.map +1 -0
  174. package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.js +2 -0
  175. package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts +29 -0
  176. package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts.map +1 -0
  177. package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.js +2 -0
  178. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts +6 -0
  179. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts.map +1 -0
  180. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.js +2 -0
  181. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts +2 -0
  182. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts.map +1 -0
  183. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.js +2 -0
  184. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts +2 -0
  185. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts.map +1 -0
  186. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.js +2 -0
  187. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts +2 -0
  188. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts.map +1 -0
  189. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.js +2 -0
  190. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts +20 -0
  191. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts.map +1 -0
  192. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.js +2 -0
  193. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts +2 -0
  194. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts.map +1 -0
  195. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.js +2 -0
  196. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts +2 -0
  197. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts.map +1 -0
  198. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.js +2 -0
  199. package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts +6 -0
  200. package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts.map +1 -0
  201. package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.js +2 -0
  202. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts +11 -0
  203. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts.map +1 -0
  204. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.js +2 -0
  205. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts +2 -0
  206. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts.map +1 -0
  207. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.js +2 -0
  208. package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts +7 -0
  209. package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts.map +1 -0
  210. package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.js +2 -0
  211. package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts +5 -0
  212. package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts.map +1 -1
  213. package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts +6 -0
  214. package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts.map +1 -0
  215. package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.js +2 -0
  216. package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts +5 -0
  217. package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts.map +1 -0
  218. package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.js +2 -0
  219. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts +2 -0
  220. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts.map +1 -0
  221. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.js +2 -0
  222. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts +9 -0
  223. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts.map +1 -0
  224. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.js +2 -0
  225. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts +8 -0
  226. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts.map +1 -0
  227. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.js +2 -0
  228. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts +4 -0
  229. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts.map +1 -0
  230. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.js +2 -0
  231. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts +7 -0
  232. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts.map +1 -0
  233. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.js +2 -0
  234. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts +2 -0
  235. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts.map +1 -0
  236. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.js +2 -0
  237. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts +6 -0
  238. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts.map +1 -0
  239. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.js +2 -0
  240. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts +7 -0
  241. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts.map +1 -0
  242. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.js +2 -0
  243. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts +16 -0
  244. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts.map +1 -0
  245. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.js +2 -0
  246. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts +4 -0
  247. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts.map +1 -0
  248. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.js +2 -0
  249. package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts +8 -0
  250. package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts.map +1 -1
  251. package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts +11 -0
  252. package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts.map +1 -0
  253. package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.js +2 -0
  254. package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts +2 -0
  255. package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts.map +1 -0
  256. package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.js +2 -0
  257. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts +2 -0
  258. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts.map +1 -0
  259. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.js +2 -0
  260. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts +9 -0
  261. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts.map +1 -0
  262. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.js +2 -0
  263. package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts +4 -0
  264. package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts.map +1 -1
  265. package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts +2 -0
  266. package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts.map +1 -1
  267. package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts +7 -0
  268. package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts.map +1 -0
  269. package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.js +2 -0
  270. package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts +2 -0
  271. package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts.map +1 -0
  272. package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.js +2 -0
  273. package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts +100 -0
  274. package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts.map +1 -0
  275. package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.js +2 -0
  276. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts +2 -0
  277. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts.map +1 -0
  278. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.js +2 -0
  279. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts +2 -0
  280. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts.map +1 -0
  281. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.js +2 -0
  282. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts +216 -0
  283. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts.map +1 -0
  284. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.js +2 -0
  285. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts +11 -0
  286. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts.map +1 -0
  287. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.js +2 -0
  288. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts +5 -0
  289. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts.map +1 -0
  290. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.js +2 -0
  291. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts +4 -1
  292. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts.map +1 -1
  293. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts +19 -0
  294. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts.map +1 -0
  295. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.js +2 -0
  296. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts +8 -0
  297. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts.map +1 -0
  298. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.js +2 -0
  299. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts +3 -1
  300. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts.map +1 -1
  301. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts +12 -0
  302. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts.map +1 -0
  303. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.js +2 -0
  304. package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts +36 -0
  305. package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts.map +1 -0
  306. package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.js +2 -0
  307. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts +12 -0
  308. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts.map +1 -0
  309. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.js +2 -0
  310. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts +2 -0
  311. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts.map +1 -0
  312. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.js +2 -0
  313. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts +7 -2
  314. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts.map +1 -1
  315. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts +2 -0
  316. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts.map +1 -0
  317. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.js +2 -0
  318. package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts +3 -0
  319. package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts.map +1 -1
  320. package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts +15 -0
  321. package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts.map +1 -0
  322. package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.js +2 -0
  323. package/vendor/runtime/dist/executor/codexRpc.d.ts +13 -4
  324. package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
  325. package/vendor/runtime/dist/executor/codexRpc.js +21 -5
  326. package/vendor/runtime/dist/executor/codexSessions.d.ts +30 -0
  327. package/vendor/runtime/dist/executor/codexSessions.d.ts.map +1 -0
  328. package/vendor/runtime/dist/executor/codexSessions.js +88 -0
  329. package/vendor/runtime/dist/executor/health.d.ts +8 -2
  330. package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
  331. package/vendor/runtime/dist/executor/health.js +21 -5
  332. package/vendor/runtime/dist/executor/liveTurns.d.ts +2 -1
  333. package/vendor/runtime/dist/executor/liveTurns.d.ts.map +1 -1
  334. package/vendor/runtime/dist/executor/liveTurns.js +12 -5
  335. package/vendor/runtime/dist/executor/ownership.d.ts +40 -0
  336. package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -0
  337. package/vendor/runtime/dist/executor/ownership.js +106 -0
  338. package/vendor/runtime/dist/executor/providerRouter.d.ts +1 -0
  339. package/vendor/runtime/dist/executor/providerRouter.d.ts.map +1 -1
  340. package/vendor/runtime/dist/executor/providerRouter.js +5 -0
  341. package/vendor/runtime/dist/executor/types.d.ts +27 -0
  342. package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
  343. package/vendor/runtime/dist/harness/index.d.ts.map +1 -1
  344. package/vendor/runtime/dist/harness/index.js +1 -0
  345. package/vendor/runtime/dist/index.d.ts +2 -1
  346. package/vendor/runtime/dist/index.d.ts.map +1 -1
  347. package/vendor/runtime/dist/index.js +1 -0
  348. package/vendor/runtime/src/executor/asyncQueue.ts +3 -0
  349. package/vendor/runtime/src/executor/claudeAgent.ts +66 -13
  350. package/vendor/runtime/src/executor/codex.ts +124 -47
  351. package/vendor/runtime/src/executor/codexProtocol/AgentPath.ts +5 -0
  352. package/vendor/runtime/src/executor/codexProtocol/FunctionCallOutputContentItem.ts +1 -1
  353. package/vendor/runtime/src/executor/codexProtocol/ImageGenerationFailure.ts +5 -0
  354. package/vendor/runtime/src/executor/codexProtocol/ImageGenerationItem.ts +7 -0
  355. package/vendor/runtime/src/executor/codexProtocol/LegacyAppPathString.ts +27 -0
  356. package/vendor/runtime/src/executor/codexProtocol/MessagePhase.ts +11 -0
  357. package/vendor/runtime/src/executor/codexProtocol/Personality.ts +3 -0
  358. package/vendor/runtime/src/executor/codexProtocol/PlanType.ts +1 -1
  359. package/vendor/runtime/src/executor/codexProtocol/README.md +2 -2
  360. package/vendor/runtime/src/executor/codexProtocol/SleepItem.ts +8 -0
  361. package/vendor/runtime/src/executor/codexProtocol/SubAgentSource.ts +7 -0
  362. package/vendor/runtime/src/executor/codexProtocol/ThreadId.ts +10 -0
  363. package/vendor/runtime/src/executor/codexProtocol/WebSearchItem.ts +14 -0
  364. package/vendor/runtime/src/executor/codexProtocol/v2/AgentMessageDelivery.ts +5 -0
  365. package/vendor/runtime/src/executor/codexProtocol/v2/AsyncUserInputQuestion.ts +5 -0
  366. package/vendor/runtime/src/executor/codexProtocol/v2/CodexErrorInfo.ts +12 -0
  367. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentState.ts +6 -0
  368. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentStatus.ts +5 -0
  369. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentTool.ts +5 -0
  370. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentToolCallStatus.ts +5 -0
  371. package/vendor/runtime/src/executor/codexProtocol/v2/CommandAction.ts +6 -0
  372. package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionSource.ts +5 -0
  373. package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionStatus.ts +5 -0
  374. package/vendor/runtime/src/executor/codexProtocol/v2/CyberAccessProgram.ts +9 -0
  375. package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.ts +5 -0
  376. package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallStatus.ts +5 -0
  377. package/vendor/runtime/src/executor/codexProtocol/v2/FileUpdateChange.ts +6 -0
  378. package/vendor/runtime/src/executor/codexProtocol/v2/GetAccountRateLimitsResponse.ts +5 -0
  379. package/vendor/runtime/src/executor/codexProtocol/v2/GitInfo.ts +5 -0
  380. package/vendor/runtime/src/executor/codexProtocol/v2/HookPromptFragment.ts +5 -0
  381. package/vendor/runtime/src/executor/codexProtocol/v2/McpAppDisplayMode.ts +5 -0
  382. package/vendor/runtime/src/executor/codexProtocol/v2/McpAppUi.ts +9 -0
  383. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallAppContext.ts +5 -0
  384. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallError.ts +5 -0
  385. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallResult.ts +6 -0
  386. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallStatus.ts +5 -0
  387. package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitation.ts +6 -0
  388. package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitationEntry.ts +5 -0
  389. package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentErrorDetails.ts +18 -0
  390. package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentSteer.ts +5 -0
  391. package/vendor/runtime/src/executor/codexProtocol/v2/Model.ts +11 -2
  392. package/vendor/runtime/src/executor/codexProtocol/v2/ModelAccessPrograms.ts +13 -0
  393. package/vendor/runtime/src/executor/codexProtocol/v2/NonSteerableTurnKind.ts +5 -0
  394. package/vendor/runtime/src/executor/codexProtocol/v2/PatchApplyStatus.ts +5 -0
  395. package/vendor/runtime/src/executor/codexProtocol/v2/PatchChangeKind.ts +5 -0
  396. package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitSnapshot.ts +5 -1
  397. package/vendor/runtime/src/executor/codexProtocol/v2/ReviewStartParams.ts +2 -0
  398. package/vendor/runtime/src/executor/codexProtocol/v2/SessionSource.ts +6 -0
  399. package/vendor/runtime/src/executor/codexProtocol/v2/SubAgentActivityKind.ts +5 -0
  400. package/vendor/runtime/src/executor/codexProtocol/v2/Thread.ts +104 -0
  401. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadActiveFlag.ts +5 -0
  402. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadHistoryMode.ts +5 -0
  403. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadItem.ts +125 -0
  404. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadParams.ts +12 -0
  405. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadResponse.ts +6 -0
  406. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadResumeParams.ts +5 -1
  407. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSection.ts +21 -0
  408. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSectionAppearance.ts +8 -0
  409. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStartParams.ts +4 -1
  410. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStatus.ts +6 -0
  411. package/vendor/runtime/src/executor/codexProtocol/v2/Turn.ts +37 -0
  412. package/vendor/runtime/src/executor/codexProtocol/v2/TurnError.ts +11 -0
  413. package/vendor/runtime/src/executor/codexProtocol/v2/TurnItemsView.ts +5 -0
  414. package/vendor/runtime/src/executor/codexProtocol/v2/TurnStartParams.ts +7 -2
  415. package/vendor/runtime/src/executor/codexProtocol/v2/TurnStatus.ts +5 -0
  416. package/vendor/runtime/src/executor/codexProtocol/v2/UserInput.ts +1 -1
  417. package/vendor/runtime/src/executor/codexProtocol/v2/WebSearchAction.ts +5 -0
  418. package/vendor/runtime/src/executor/codexRpc.ts +26 -6
  419. package/vendor/runtime/src/executor/codexSessions.ts +108 -0
  420. package/vendor/runtime/src/executor/health.ts +21 -7
  421. package/vendor/runtime/src/executor/liveTurns.ts +12 -5
  422. package/vendor/runtime/src/executor/ownership.ts +83 -0
  423. package/vendor/runtime/src/executor/providerRouter.ts +6 -0
  424. package/vendor/runtime/src/executor/types.ts +20 -1
  425. package/vendor/runtime/src/harness/index.ts +1 -0
  426. package/vendor/runtime/src/index.ts +2 -1
  427. package/vendor/shared/dist/agentCommands.d.ts +1 -0
  428. package/vendor/shared/dist/agentCommands.d.ts.map +1 -1
  429. package/vendor/shared/dist/automations.d.ts +34 -0
  430. package/vendor/shared/dist/automations.d.ts.map +1 -1
  431. package/vendor/shared/dist/automations.js +12 -0
  432. package/vendor/shared/dist/cardStudio.d.ts +41 -0
  433. package/vendor/shared/dist/cardStudio.d.ts.map +1 -1
  434. package/vendor/shared/dist/cardStudio.js +13 -3
  435. package/vendor/shared/dist/computer.d.ts +7 -1
  436. package/vendor/shared/dist/computer.d.ts.map +1 -1
  437. package/vendor/shared/dist/computer.js +13 -4
  438. package/vendor/shared/dist/constants.d.ts +3 -3
  439. package/vendor/shared/dist/constants.d.ts.map +1 -1
  440. package/vendor/shared/dist/constants.js +8 -14
  441. package/vendor/shared/dist/goalNotes.d.ts +4 -0
  442. package/vendor/shared/dist/goalNotes.d.ts.map +1 -0
  443. package/vendor/shared/dist/goalNotes.js +23 -0
  444. package/vendor/shared/dist/goals.d.ts +835 -0
  445. package/vendor/shared/dist/goals.d.ts.map +1 -0
  446. package/vendor/shared/dist/goals.js +198 -0
  447. package/vendor/shared/dist/index.d.ts +7 -2
  448. package/vendor/shared/dist/index.d.ts.map +1 -1
  449. package/vendor/shared/dist/index.js +6 -1
  450. package/vendor/shared/dist/journal-vault.d.ts +1 -1
  451. package/vendor/shared/dist/messagingSafety.d.ts +21 -0
  452. package/vendor/shared/dist/messagingSafety.d.ts.map +1 -0
  453. package/vendor/shared/dist/messagingSafety.js +8 -0
  454. package/vendor/shared/dist/schemas/harness.d.ts +199 -169
  455. package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
  456. package/vendor/shared/dist/schemas/harness.js +25 -124
  457. package/vendor/shared/dist/smartCapture.d.ts +24 -0
  458. package/vendor/shared/dist/smartCapture.d.ts.map +1 -1
  459. package/vendor/shared/dist/smartCapture.js +15 -0
  460. package/vendor/shared/dist/taskSync.d.ts +342 -0
  461. package/vendor/shared/dist/taskSync.d.ts.map +1 -0
  462. package/vendor/shared/dist/taskSync.js +111 -0
  463. package/vendor/shared/dist/types.d.ts +1 -4
  464. package/vendor/shared/dist/types.d.ts.map +1 -1
  465. package/vendor/shared/dist/voiceCapture.d.ts +1 -1
  466. package/vendor/shared/dist/workspaces.d.ts +255 -0
  467. package/vendor/shared/dist/workspaces.d.ts.map +1 -0
  468. package/vendor/shared/dist/workspaces.js +89 -0
  469. package/vendor/shared/src/agentCommands.ts +1 -0
  470. package/vendor/shared/src/automations.ts +12 -0
  471. package/vendor/shared/src/cardStudio.ts +13 -3
  472. package/vendor/shared/src/computer.ts +19 -5
  473. package/vendor/shared/src/constants.ts +8 -14
  474. package/vendor/shared/src/goalNotes.ts +23 -0
  475. package/vendor/shared/src/goals.ts +237 -0
  476. package/vendor/shared/src/index.ts +7 -6
  477. package/vendor/shared/src/messagingSafety.ts +11 -0
  478. package/vendor/shared/src/schemas/harness.ts +24 -130
  479. package/vendor/shared/src/smartCapture.ts +27 -0
  480. package/vendor/shared/src/taskSync.ts +81 -0
  481. package/vendor/shared/src/types.ts +0 -6
  482. package/vendor/shared/src/workspaces.ts +103 -0
  483. package/dist/coding/conduct.d.ts +0 -69
  484. package/dist/coding/conduct.d.ts.map +0 -1
  485. package/dist/coding/conduct.js +0 -348
  486. package/dist/coding/fleetIntegrate.d.ts +0 -37
  487. package/dist/coding/fleetIntegrate.d.ts.map +0 -1
  488. package/dist/coding/fleetIntegrate.js +0 -64
  489. package/dist/coding/fleetPlan.d.ts +0 -20
  490. package/dist/coding/fleetPlan.d.ts.map +0 -1
  491. package/dist/coding/fleetPlan.js +0 -125
  492. package/dist/coding/fleetTasks.d.ts +0 -33
  493. package/dist/coding/fleetTasks.d.ts.map +0 -1
  494. package/dist/coding/fleetTasks.js +0 -75
  495. package/dist/coding/openFleetPr.d.ts +0 -41
  496. package/dist/coding/openFleetPr.d.ts.map +0 -1
  497. package/dist/coding/openFleetPr.js +0 -121
  498. package/src/coding/conduct.ts +0 -462
  499. package/src/coding/fleetIntegrate.ts +0 -95
  500. package/src/coding/fleetPlan.ts +0 -135
  501. package/src/coding/fleetTasks.ts +0 -109
  502. package/src/coding/openFleetPr.ts +0 -148
@@ -3,6 +3,7 @@ import { readFileSync } from 'node:fs';
3
3
  import { randomUUID } from 'node:crypto';
4
4
  import { CodexRpc, initializeCodex, } from './codexRpc.js';
5
5
  import { LiveTurns, abortError } from './liveTurns.js';
6
+ import { CodexSessions, codexBindingFingerprint, } from './codexSessions.js';
6
7
  // App-server does not persist an empty thread until its first turn. Keep a durable
7
8
  // reset marker in Lucidity's provider session envelope until that turn starts.
8
9
  const EMPTY_SESSION_PREFIX = 'lucidity-codex-empty:';
@@ -100,12 +101,49 @@ export class CodexExecutor {
100
101
  options;
101
102
  name = 'codex-app-server';
102
103
  strictResume = true;
104
+ recoveryCapability = 'native-turn';
103
105
  turns = new LiveTurns();
106
+ sessions = new CodexSessions();
104
107
  constructor(options = {}) {
105
108
  this.options = options;
106
109
  }
107
- connect(cwd) {
108
- return (this.options.connect?.(cwd) ?? new CodexRpc(this.options.command, cwd));
110
+ connect(cwd, env) {
111
+ return (this.options.connect?.(cwd, env) ?? new CodexRpc(this.options.command, cwd, env));
112
+ }
113
+ async inspect(ref, options = {}) {
114
+ if (!ref.sessionId || !ref.turnId || ref.inspectionDisabled)
115
+ return { status: 'unsupported', reason: 'No inspectable native Codex turn was recorded.' };
116
+ const rpc = this.connect(options.cwd);
117
+ let timer;
118
+ try {
119
+ return await Promise.race([
120
+ (async () => {
121
+ await initializeCodex(rpc);
122
+ const { thread } = await rpc.request('thread/read', {
123
+ threadId: ref.sessionId, includeTurns: true,
124
+ });
125
+ if (thread.id !== ref.sessionId || thread.status?.type === 'active')
126
+ return { status: 'unknown', reason: 'Codex history does not identify an inactive matching thread.' };
127
+ const turn = thread.turns?.find((turn) => turn.id === ref.turnId);
128
+ if (!turn || turn.status !== 'completed' || turn.itemsView !== 'full')
129
+ return { status: 'unknown', reason: 'Codex has no complete result for this exact turn.' };
130
+ const answer = [...turn.items].reverse().find((item) => item.type === 'agentMessage' && item.phase !== 'commentary');
131
+ if (!answer || answer.type !== 'agentMessage' || typeof answer.text !== 'string')
132
+ return { status: 'unknown', reason: 'The completed turn has no retained final answer.' };
133
+ return { status: 'completed', result: { text: answer.text.trim(), sessionId: thread.id } };
134
+ })(),
135
+ new Promise((resolve) => {
136
+ timer = setTimeout(() => resolve({ status: 'unknown', reason: 'Codex history inspection timed out.' }), Math.min(options.timeoutMs ?? 10_000, 30_000));
137
+ }),
138
+ ]);
139
+ }
140
+ catch {
141
+ return { status: 'unknown', reason: 'Codex history is unavailable or unreadable with the installed runtime.' };
142
+ }
143
+ finally {
144
+ clearTimeout(timer);
145
+ await rpc.close();
146
+ }
109
147
  }
110
148
  steer(requestId, text) {
111
149
  return this.turns.steer(requestId, text);
@@ -114,7 +152,7 @@ export class CodexExecutor {
114
152
  return this.turns.interrupt(requestId);
115
153
  }
116
154
  async dispose() {
117
- this.turns.dispose();
155
+ await Promise.all([this.turns.dispose(), this.sessions.dispose()]);
118
156
  }
119
157
  async models() {
120
158
  const rpc = this.connect();
@@ -141,7 +179,7 @@ export class CodexExecutor {
141
179
  return models;
142
180
  }
143
181
  finally {
144
- rpc.close();
182
+ await rpc.close();
145
183
  }
146
184
  }
147
185
  async commands(input = {}) {
@@ -230,40 +268,39 @@ export class CodexExecutor {
230
268
  let threadId = '';
231
269
  let turnId = '';
232
270
  let ended = false;
233
- const rpc = this.connect(input.cwd);
234
- let owner;
235
- try {
236
- owner = this.turns.open(input, async (text) => {
237
- if (command)
238
- throw new Error('Wait for the command to finish before sending a message.');
239
- if (!turnId || ended)
240
- throw new Error('Codex has no active turn to steer.');
241
- const params = {
242
- threadId,
243
- expectedTurnId: turnId,
244
- input: userInput({ userPrompt: text }),
245
- };
246
- await rpc.request('turn/steer', params);
247
- });
248
- }
249
- catch (error) {
250
- rpc.close();
251
- throw error;
252
- }
271
+ let rpc;
272
+ let thread;
273
+ let fingerprint = '';
274
+ let reusable = false;
275
+ const owner = this.turns.open(input, async (text) => {
276
+ if (command)
277
+ throw new Error('Wait for the command to finish before sending a message.');
278
+ if (!rpc || !turnId || ended)
279
+ throw new Error('Codex has no active turn to steer.');
280
+ const params = {
281
+ threadId,
282
+ expectedTurnId: turnId,
283
+ input: userInput({ userPrompt: text }),
284
+ };
285
+ await rpc.request('turn/steer', params);
286
+ });
253
287
  const abort = () => {
288
+ const active = rpc;
289
+ if (!active)
290
+ return;
254
291
  if (turnId && !ended) {
255
- void rpc
292
+ void active
256
293
  .request('turn/interrupt', { threadId, turnId })
257
294
  .catch(() => { })
258
- .finally(() => rpc.close());
259
- const timer = setTimeout(() => rpc.close(), 1000);
295
+ .finally(() => active.close());
296
+ const timer = setTimeout(() => active.close(), 1000);
260
297
  timer.unref();
261
298
  }
262
299
  else
263
- rpc.close();
300
+ active.close();
264
301
  };
265
302
  owner.controller.signal.addEventListener('abort', abort, { once: true });
266
- rpc.onRequest = async (request) => {
303
+ const onRequest = async (request) => {
267
304
  const p = request.params ?? {};
268
305
  if (ended ||
269
306
  owner.controller.signal.aborted ||
@@ -300,7 +337,18 @@ export class CodexExecutor {
300
337
  };
301
338
  try {
302
339
  owner.check();
303
- await initializeCodex(rpc);
340
+ const pooled = await this.sessions.take(input.resume);
341
+ rpc = pooled?.rpc ?? this.connect(input.cwd, input.env);
342
+ input.onRecovery?.({ pid: rpc.pid, inspectionDisabled: !!command });
343
+ rpc.onRequest = onRequest;
344
+ owner.check();
345
+ if (!pooled)
346
+ await initializeCodex(rpc);
347
+ else {
348
+ const account = await rpc.request('account/read', { refreshToken: false });
349
+ if (account.account?.type !== 'chatgpt')
350
+ throw new Error('Codex needs ChatGPT subscription login. Run codex login on this computer.');
351
+ }
304
352
  const inherited = await rpc.request('config/read', { includeLayers: false, cwd: input.cwd });
305
353
  const params = {
306
354
  cwd: input.cwd,
@@ -322,13 +370,28 @@ export class CodexExecutor {
322
370
  developerInstructions: input.systemPrompt,
323
371
  config: codexRunConfig(input, inherited.config),
324
372
  };
325
- const thread = input.resume && !isEmptySession(input.resume)
326
- ? await rpc.request('thread/resume', {
327
- ...params,
328
- threadId: input.resume,
329
- })
330
- : await rpc.request('thread/start', params);
373
+ fingerprint = codexBindingFingerprint(params);
374
+ if (pooled && pooled.fingerprint !== fingerprint) {
375
+ // Permissions, MCP tools, model, cwd or instructions changed. A new transport
376
+ // resumes only after the old owner has fully exited.
377
+ await rpc.close();
378
+ owner.check();
379
+ rpc = this.connect(input.cwd, input.env);
380
+ input.onRecovery?.({ pid: rpc.pid });
381
+ rpc.onRequest = onRequest;
382
+ await initializeCodex(rpc);
383
+ }
384
+ thread =
385
+ pooled?.fingerprint === fingerprint
386
+ ? pooled.thread
387
+ : input.resume && !isEmptySession(input.resume)
388
+ ? await rpc.request('thread/resume', {
389
+ ...params,
390
+ threadId: input.resume,
391
+ })
392
+ : await rpc.request('thread/start', params);
331
393
  threadId = thread.thread.id;
394
+ input.onRecovery?.({ sessionId: threadId });
332
395
  const sessionId = isEmptySession(input.resume) &&
333
396
  command &&
334
397
  ['status', 'skills'].includes(command.name)
@@ -414,6 +477,8 @@ export class CodexExecutor {
414
477
  const turn = await rpc.request('turn/start', start);
415
478
  turnId = turn.turn.id;
416
479
  }
480
+ if (turnId)
481
+ input.onRecovery?.({ turnId });
417
482
  let finalText = '';
418
483
  let streamedText = '';
419
484
  for await (const event of rpc.events) {
@@ -461,6 +526,8 @@ export class CodexExecutor {
461
526
  yield {
462
527
  type: 'tool_call',
463
528
  name,
529
+ ...(item.id ? { itemId: item.id } : {}),
530
+ ...(item.status ? { outcome: item.status } : {}),
464
531
  phase: event.method === 'item/started' ? 'start' : 'end',
465
532
  };
466
533
  }
@@ -473,6 +540,7 @@ export class CodexExecutor {
473
540
  throw abortError();
474
541
  if (completed.status !== 'completed')
475
542
  throw new Error(completed.error?.message ?? `Codex turn ${completed.status}.`);
543
+ reusable = true;
476
544
  if (command)
477
545
  yield {
478
546
  type: 'tool_call',
@@ -500,8 +568,15 @@ export class CodexExecutor {
500
568
  finally {
501
569
  ended = true;
502
570
  owner.controller.signal.removeEventListener('abort', abort);
503
- rpc.close();
504
- owner.close();
571
+ try {
572
+ if (rpc && reusable && thread && !owner.controller.signal.aborted)
573
+ await this.sessions.keep({ rpc, thread, fingerprint });
574
+ else
575
+ await rpc?.close();
576
+ }
577
+ finally {
578
+ owner.close();
579
+ }
505
580
  }
506
581
  }
507
582
  }
@@ -0,0 +1,2 @@
1
+ export type AgentPath = string;
2
+ //# sourceMappingURL=AgentPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentPath.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/AgentPath.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -8,9 +8,12 @@ export type FunctionCallOutputContentItem = {
8
8
  text: string;
9
9
  } | {
10
10
  "type": "input_image";
11
- image_url: string;
12
11
  detail?: ImageDetail;
12
+ } & ({
13
+ image_url: string;
13
14
  } | {
15
+ file_id: string;
16
+ }) | {
14
17
  "type": "input_audio";
15
18
  audio_url: string;
16
19
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"FunctionCallOutputContentItem.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/FunctionCallOutputContentItem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;CAAE,CAAC"}
1
+ {"version":3,"file":"FunctionCallOutputContentItem.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/FunctionCallOutputContentItem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAAE,GAAG,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;CAAE,CAAC,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;CAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type ImageGenerationFailure = {
2
+ "type": "usageLimitExceeded";
3
+ limitId: string;
4
+ resetsAt: number | null;
5
+ };
6
+ //# sourceMappingURL=ImageGenerationFailure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageGenerationFailure.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/ImageGenerationFailure.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IAAE,MAAM,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { AbsolutePathBuf } from "./AbsolutePathBuf.js";
2
+ import type { ImageGenerationFailure } from "./ImageGenerationFailure.js";
3
+ export type ImageGenerationItem = {
4
+ id: string;
5
+ status: string;
6
+ revisedPrompt: string | null;
7
+ result: string;
8
+ transparentBackground?: boolean;
9
+ failure: ImageGenerationFailure | null;
10
+ savedPath?: AbsolutePathBuf;
11
+ };
12
+ //# sourceMappingURL=ImageGenerationItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageGenerationItem.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/ImageGenerationItem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,eAAe,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A UTF-8 path for preserving raw path compatibility at the app-server API
3
+ * boundary while Codex migrates to [`PathUri`].
4
+ *
5
+ * Supports storing arbitrary strings read from the API and converting to and
6
+ * from [`PathUri`] using an explicitly selected native path convention.
7
+ *
8
+ * When converting from [`PathUri`], "native" refers to the supplied
9
+ * [`PathConvention`], which may be foreign to the operating system running
10
+ * this process. The inner string is private so path-producing code must use a
11
+ * path conversion method instead of bypassing the intended conversion
12
+ * boundary. Non-UTF-8 paths are converted to UTF-8 lossily because this API
13
+ * value is serialized as a JSON string.
14
+ *
15
+ * Deserialization and [`Self::from_string`] accept any UTF-8 string without
16
+ * interpreting or validating it. Use [`Self::from_string`] when a caller
17
+ * already owns legacy app-server path text and needs to preserve its wire
18
+ * spelling; use [`Self::from_path`], [`Self::from_abs_path`], or
19
+ * [`Self::from_path_uri`] when converting an actual path value. Relative
20
+ * path text remains valid until an operation such as [`Self::to_path_uri`]
21
+ * requires an absolute path.
22
+ */
23
+ export type LegacyAppPathString = string;
24
+ //# sourceMappingURL=LegacyAppPathString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegacyAppPathString.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/LegacyAppPathString.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Classifies an assistant message as interim commentary or final answer text.
3
+ *
4
+ * Providers do not emit this consistently, so callers must treat `None` as
5
+ * "phase unknown" and keep compatibility behavior for legacy models.
6
+ */
7
+ export type MessagePhase = "commentary" | "final_answer";
8
+ //# sourceMappingURL=MessagePhase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessagePhase.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/MessagePhase.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Deprecated: `friendly` and `pragmatic` no longer select a style.
3
+ */
1
4
  export type Personality = "none" | "friendly" | "pragmatic";
2
5
  //# sourceMappingURL=Personality.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Personality.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/Personality.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"Personality.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/Personality.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,CAAC"}
@@ -1,2 +1,2 @@
1
- export type PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown";
1
+ export type PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "promax" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown";
2
2
  //# sourceMappingURL=PlanType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlanType.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/PlanType.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,6BAA6B,GAAG,iCAAiC,GAAG,UAAU,GAAG,OAAO,GAAG,2BAA2B,GAAG,4BAA4B,GAAG,YAAY,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"PlanType.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/PlanType.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,6BAA6B,GAAG,iCAAiC,GAAG,UAAU,GAAG,OAAO,GAAG,2BAA2B,GAAG,4BAA4B,GAAG,YAAY,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Display item emitted by the interruptible `clock.sleep` tool.
3
+ */
4
+ export type SleepItem = {
5
+ id: string;
6
+ durationMs: number;
7
+ };
8
+ //# sourceMappingURL=SleepItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SleepItem.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/SleepItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { AgentPath } from "./AgentPath.js";
2
+ import type { ThreadId } from "./ThreadId.js";
3
+ export type SubAgentSource = "review" | "compact" | {
4
+ "thread_spawn": {
5
+ parent_thread_id: ThreadId;
6
+ depth: number;
7
+ agent_path: AgentPath | null;
8
+ agent_nickname: string | null;
9
+ agent_role: string | null;
10
+ };
11
+ } | "memory_consolidation" | {
12
+ "other": string;
13
+ };
14
+ //# sourceMappingURL=SubAgentSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubAgentSource.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/SubAgentSource.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG;IAAE,cAAc,EAAE;QAAE,gBAAgB,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;QAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;KAAE,CAAA;CAAE,GAAG,sBAAsB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Identifier for a Codex thread.
3
+ *
4
+ * Codex-generated thread IDs are UUIDv7, and some use cases rely on that.
5
+ */
6
+ export type ThreadId = string;
7
+ //# sourceMappingURL=ThreadId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThreadId.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/ThreadId.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { JsonValue } from "./serde_json/JsonValue.js";
2
+ import type { WebSearchAction } from "./v2/WebSearchAction.js";
3
+ export type WebSearchItem = {
4
+ id: string;
5
+ query: string;
6
+ action: WebSearchAction | null;
7
+ /**
8
+ * Structured search results returned out-of-band by standalone web search.
9
+ *
10
+ * These stay as opaque JSON at the extension/app-server boundary so new
11
+ * result fields and result types can pass through without a Codex release.
12
+ */
13
+ results: Array<JsonValue> | null;
14
+ };
15
+ //# sourceMappingURL=WebSearchItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebSearchItem.d.ts","sourceRoot":"","sources":["../../../src/executor/codexProtocol/WebSearchItem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACxF;;;;;OAKG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,2 @@
1
+ export type AgentMessageDelivery = "async";
2
+ //# sourceMappingURL=AgentMessageDelivery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentMessageDelivery.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/AgentMessageDelivery.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export type AsyncUserInputQuestion = {
2
+ title: string;
3
+ options: Array<string> | null;
4
+ };
5
+ //# sourceMappingURL=AsyncUserInputQuestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncUserInputQuestion.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/AsyncUserInputQuestion.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,29 @@
1
+ import type { NonSteerableTurnKind } from "./NonSteerableTurnKind.js";
2
+ /**
3
+ * This translation layer make sure that we expose codex error code in camel case.
4
+ *
5
+ * When an upstream HTTP status is available (for example, from the Responses API or a provider),
6
+ * it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.
7
+ */
8
+ export type CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "rateLimitExceeded" | "flexUnavailable" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "tooManyDenials" | {
9
+ "httpConnectionFailed": {
10
+ httpStatusCode: number | null;
11
+ };
12
+ } | {
13
+ "responseStreamConnectionFailed": {
14
+ httpStatusCode: number | null;
15
+ };
16
+ } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | {
17
+ "responseStreamDisconnected": {
18
+ httpStatusCode: number | null;
19
+ };
20
+ } | {
21
+ "responseTooManyFailedAttempts": {
22
+ httpStatusCode: number | null;
23
+ };
24
+ } | {
25
+ "activeTurnNotSteerable": {
26
+ turnKind: NonSteerableTurnKind;
27
+ };
28
+ } | "other";
29
+ //# sourceMappingURL=CodexErrorInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodexErrorInfo.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/CodexErrorInfo.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,uBAAuB,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,aAAa,GAAG,6BAA6B,GAAG,gBAAgB,GAAG;IAAE,sBAAsB,EAAE;QAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;KAAE,CAAA;CAAE,GAAG;IAAE,gCAAgC,EAAE;QAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;KAAE,CAAA;CAAE,GAAG,qBAAqB,GAAG,cAAc,GAAG,YAAY,GAAG,sBAAsB,GAAG,cAAc,GAAG;IAAE,4BAA4B,EAAE;QAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;KAAE,CAAA;CAAE,GAAG;IAAE,+BAA+B,EAAE;QAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;KAAE,CAAA;CAAE,GAAG;IAAE,wBAAwB,EAAE;QAAE,QAAQ,EAAE,oBAAoB,CAAC;KAAE,CAAA;CAAE,GAAG,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { CollabAgentStatus } from "./CollabAgentStatus.js";
2
+ export type CollabAgentState = {
3
+ status: CollabAgentStatus;
4
+ message: string | null;
5
+ };
6
+ //# sourceMappingURL=CollabAgentState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollabAgentState.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/CollabAgentState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,2 @@
1
+ export type CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound";
2
+ //# sourceMappingURL=CollabAgentStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollabAgentStatus.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/CollabAgentStatus.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,2 @@
1
+ export type CollabAgentTool = "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents";
2
+ //# sourceMappingURL=CollabAgentTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollabAgentTool.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/CollabAgentTool.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,GAAG,cAAc,GAAG,gBAAgB,GAAG,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,2 @@
1
+ export type CollabAgentToolCallStatus = "inProgress" | "completed" | "failed" | "interrupted";
2
+ //# sourceMappingURL=CollabAgentToolCallStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollabAgentToolCallStatus.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/CollabAgentToolCallStatus.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,yBAAyB,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { LegacyAppPathString } from "../LegacyAppPathString.js";
2
+ export type CommandAction = {
3
+ "type": "read";
4
+ command: string;
5
+ name: string;
6
+ path: LegacyAppPathString;
7
+ } | {
8
+ "type": "listFiles";
9
+ command: string;
10
+ path: string | null;
11
+ } | {
12
+ "type": "search";
13
+ command: string;
14
+ query: string | null;
15
+ path: string | null;
16
+ } | {
17
+ "type": "unknown";
18
+ command: string;
19
+ };
20
+ //# sourceMappingURL=CommandAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandAction.d.ts","sourceRoot":"","sources":["../../../../src/executor/codexProtocol/v2/CommandAction.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,mBAAmB,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ // GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ export {};