@opencorelabs/lucidity 0.8.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 (371) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/speech/lucidity-speech +0 -0
  3. package/dist/automations/service.d.ts +4 -0
  4. package/dist/automations/service.d.ts.map +1 -1
  5. package/dist/automations/service.js +60 -22
  6. package/dist/automations/store.d.ts +9 -3
  7. package/dist/automations/store.d.ts.map +1 -1
  8. package/dist/automations/store.js +45 -32
  9. package/dist/automations/workflow.d.ts +14 -0
  10. package/dist/automations/workflow.d.ts.map +1 -0
  11. package/dist/automations/workflow.js +57 -0
  12. package/dist/coding/listPrs.d.ts +2 -0
  13. package/dist/coding/listPrs.d.ts.map +1 -1
  14. package/dist/coding/listPrs.js +10 -0
  15. package/dist/coding/runCodeTurn.d.ts +3 -14
  16. package/dist/coding/runCodeTurn.d.ts.map +1 -1
  17. package/dist/coding/runCodeTurn.js +21 -86
  18. package/dist/coding/runReview.d.ts +10 -0
  19. package/dist/coding/runReview.d.ts.map +1 -0
  20. package/dist/coding/runReview.js +87 -0
  21. package/dist/coding/workspaceRegistry.d.ts +49 -1
  22. package/dist/coding/workspaceRegistry.d.ts.map +1 -1
  23. package/dist/coding/workspaceRegistry.js +208 -17
  24. package/dist/coding/worktree.d.ts +61 -18
  25. package/dist/coding/worktree.d.ts.map +1 -1
  26. package/dist/coding/worktree.js +149 -17
  27. package/dist/coding/worktreeSetup.d.ts +7 -0
  28. package/dist/coding/worktreeSetup.d.ts.map +1 -0
  29. package/dist/coding/worktreeSetup.js +49 -0
  30. package/dist/index.js +21 -28
  31. package/dist/jobs/briefing.d.ts +2 -16
  32. package/dist/jobs/briefing.d.ts.map +1 -1
  33. package/dist/jobs/briefing.js +65 -93
  34. package/dist/logTimestamps.d.ts +10 -0
  35. package/dist/logTimestamps.d.ts.map +1 -0
  36. package/dist/logTimestamps.js +12 -0
  37. package/dist/providerRecovery.d.ts +48 -0
  38. package/dist/providerRecovery.d.ts.map +1 -0
  39. package/dist/providerRecovery.js +100 -0
  40. package/dist/room/client.d.ts +2 -20
  41. package/dist/room/client.d.ts.map +1 -1
  42. package/dist/room/client.js +18 -29
  43. package/dist/room/computer.d.ts.map +1 -1
  44. package/dist/room/computer.js +1 -2
  45. package/dist/room/incidents.d.ts +3 -0
  46. package/dist/room/incidents.d.ts.map +1 -1
  47. package/dist/room/incidents.js +1 -0
  48. package/dist/room/turnQueue.d.ts.map +1 -1
  49. package/dist/room/turnQueue.js +28 -22
  50. package/dist/runtimeStore.d.ts +2 -0
  51. package/dist/runtimeStore.d.ts.map +1 -1
  52. package/dist/runtimeStore.js +17 -0
  53. package/dist/vault.d.ts +6 -3
  54. package/dist/vault.d.ts.map +1 -1
  55. package/dist/vault.js +18 -4
  56. package/package.json +1 -1
  57. package/src/automations/service.ts +47 -21
  58. package/src/automations/store.ts +41 -50
  59. package/src/automations/workflow.ts +49 -0
  60. package/src/coding/listPrs.ts +14 -0
  61. package/src/coding/runCodeTurn.ts +26 -95
  62. package/src/coding/runReview.ts +83 -0
  63. package/src/coding/workspaceRegistry.ts +186 -16
  64. package/src/coding/worktree.ts +161 -20
  65. package/src/coding/worktreeSetup.ts +50 -0
  66. package/src/index.ts +22 -31
  67. package/src/jobs/briefing.ts +62 -109
  68. package/src/logTimestamps.ts +14 -0
  69. package/src/providerRecovery.ts +99 -0
  70. package/src/room/client.ts +19 -54
  71. package/src/room/computer.ts +1 -2
  72. package/src/room/incidents.ts +4 -0
  73. package/src/room/turnQueue.ts +27 -29
  74. package/src/runtimeStore.ts +18 -1
  75. package/src/vault.ts +16 -7
  76. package/vendor/mcp-server/package.json +1 -1
  77. package/vendor/runtime/README.md +34 -0
  78. package/vendor/runtime/dist/executor/claudeAgent.d.ts +4 -0
  79. package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
  80. package/vendor/runtime/dist/executor/claudeAgent.js +57 -4
  81. package/vendor/runtime/dist/executor/codex.d.ts +7 -2
  82. package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
  83. package/vendor/runtime/dist/executor/codex.js +47 -4
  84. package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts +2 -0
  85. package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts.map +1 -0
  86. package/vendor/runtime/dist/executor/codexProtocol/AgentPath.js +2 -0
  87. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts +6 -0
  88. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts.map +1 -0
  89. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.js +2 -0
  90. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts +12 -0
  91. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts.map +1 -0
  92. package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.js +2 -0
  93. package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts +24 -0
  94. package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts.map +1 -0
  95. package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.js +2 -0
  96. package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts +8 -0
  97. package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts.map +1 -0
  98. package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.js +2 -0
  99. package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts +8 -0
  100. package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts.map +1 -0
  101. package/vendor/runtime/dist/executor/codexProtocol/SleepItem.js +2 -0
  102. package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts +14 -0
  103. package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts.map +1 -0
  104. package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.js +2 -0
  105. package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts +7 -0
  106. package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts.map +1 -0
  107. package/vendor/runtime/dist/executor/codexProtocol/ThreadId.js +2 -0
  108. package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts +15 -0
  109. package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts.map +1 -0
  110. package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.js +2 -0
  111. package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts +2 -0
  112. package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts.map +1 -0
  113. package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.js +2 -0
  114. package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts +5 -0
  115. package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts.map +1 -0
  116. package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.js +2 -0
  117. package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts +29 -0
  118. package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts.map +1 -0
  119. package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.js +2 -0
  120. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts +6 -0
  121. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts.map +1 -0
  122. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.js +2 -0
  123. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts +2 -0
  124. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts.map +1 -0
  125. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.js +2 -0
  126. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts +2 -0
  127. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts.map +1 -0
  128. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.js +2 -0
  129. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts +2 -0
  130. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts.map +1 -0
  131. package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.js +2 -0
  132. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts +20 -0
  133. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts.map +1 -0
  134. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.js +2 -0
  135. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts +2 -0
  136. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts.map +1 -0
  137. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.js +2 -0
  138. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts +2 -0
  139. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts.map +1 -0
  140. package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.js +2 -0
  141. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts +11 -0
  142. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts.map +1 -0
  143. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.js +2 -0
  144. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts +2 -0
  145. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts.map +1 -0
  146. package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.js +2 -0
  147. package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts +7 -0
  148. package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts.map +1 -0
  149. package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.js +2 -0
  150. package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts +6 -0
  151. package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts.map +1 -0
  152. package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.js +2 -0
  153. package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts +5 -0
  154. package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts.map +1 -0
  155. package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.js +2 -0
  156. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts +2 -0
  157. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts.map +1 -0
  158. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.js +2 -0
  159. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts +9 -0
  160. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts.map +1 -0
  161. package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.js +2 -0
  162. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts +8 -0
  163. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts.map +1 -0
  164. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.js +2 -0
  165. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts +4 -0
  166. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts.map +1 -0
  167. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.js +2 -0
  168. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts +7 -0
  169. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts.map +1 -0
  170. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.js +2 -0
  171. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts +2 -0
  172. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts.map +1 -0
  173. package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.js +2 -0
  174. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts +6 -0
  175. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts.map +1 -0
  176. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.js +2 -0
  177. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts +7 -0
  178. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts.map +1 -0
  179. package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.js +2 -0
  180. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts +16 -0
  181. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts.map +1 -0
  182. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.js +2 -0
  183. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts +4 -0
  184. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts.map +1 -0
  185. package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.js +2 -0
  186. package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts +2 -0
  187. package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts.map +1 -0
  188. package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.js +2 -0
  189. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts +2 -0
  190. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts.map +1 -0
  191. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.js +2 -0
  192. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts +9 -0
  193. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts.map +1 -0
  194. package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.js +2 -0
  195. package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts +7 -0
  196. package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts.map +1 -0
  197. package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.js +2 -0
  198. package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts +2 -0
  199. package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts.map +1 -0
  200. package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.js +2 -0
  201. package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts +100 -0
  202. package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts.map +1 -0
  203. package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.js +2 -0
  204. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts +2 -0
  205. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts.map +1 -0
  206. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.js +2 -0
  207. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts +2 -0
  208. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts.map +1 -0
  209. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.js +2 -0
  210. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts +216 -0
  211. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts.map +1 -0
  212. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.js +2 -0
  213. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts +11 -0
  214. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts.map +1 -0
  215. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.js +2 -0
  216. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts +5 -0
  217. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts.map +1 -0
  218. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.js +2 -0
  219. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts +19 -0
  220. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts.map +1 -0
  221. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.js +2 -0
  222. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts +8 -0
  223. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts.map +1 -0
  224. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.js +2 -0
  225. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts +12 -0
  226. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts.map +1 -0
  227. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.js +2 -0
  228. package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts +36 -0
  229. package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts.map +1 -0
  230. package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.js +2 -0
  231. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts +12 -0
  232. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts.map +1 -0
  233. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.js +2 -0
  234. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts +2 -0
  235. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts.map +1 -0
  236. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.js +2 -0
  237. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts +2 -0
  238. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts.map +1 -0
  239. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.js +2 -0
  240. package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts +15 -0
  241. package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts.map +1 -0
  242. package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.js +2 -0
  243. package/vendor/runtime/dist/executor/codexRpc.d.ts +3 -1
  244. package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
  245. package/vendor/runtime/dist/executor/codexRpc.js +3 -2
  246. package/vendor/runtime/dist/executor/health.d.ts +6 -1
  247. package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
  248. package/vendor/runtime/dist/executor/health.js +4 -0
  249. package/vendor/runtime/dist/executor/ownership.d.ts +6 -1
  250. package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -1
  251. package/vendor/runtime/dist/executor/ownership.js +7 -0
  252. package/vendor/runtime/dist/executor/types.d.ts +25 -0
  253. package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
  254. package/vendor/runtime/dist/harness/index.d.ts.map +1 -1
  255. package/vendor/runtime/dist/harness/index.js +1 -0
  256. package/vendor/runtime/dist/index.d.ts +1 -1
  257. package/vendor/runtime/dist/index.d.ts.map +1 -1
  258. package/vendor/runtime/src/executor/claudeAgent.ts +50 -4
  259. package/vendor/runtime/src/executor/codex.ts +51 -5
  260. package/vendor/runtime/src/executor/codexProtocol/AgentPath.ts +5 -0
  261. package/vendor/runtime/src/executor/codexProtocol/ImageGenerationFailure.ts +5 -0
  262. package/vendor/runtime/src/executor/codexProtocol/ImageGenerationItem.ts +7 -0
  263. package/vendor/runtime/src/executor/codexProtocol/LegacyAppPathString.ts +27 -0
  264. package/vendor/runtime/src/executor/codexProtocol/MessagePhase.ts +11 -0
  265. package/vendor/runtime/src/executor/codexProtocol/SleepItem.ts +8 -0
  266. package/vendor/runtime/src/executor/codexProtocol/SubAgentSource.ts +7 -0
  267. package/vendor/runtime/src/executor/codexProtocol/ThreadId.ts +10 -0
  268. package/vendor/runtime/src/executor/codexProtocol/WebSearchItem.ts +14 -0
  269. package/vendor/runtime/src/executor/codexProtocol/v2/AgentMessageDelivery.ts +5 -0
  270. package/vendor/runtime/src/executor/codexProtocol/v2/AsyncUserInputQuestion.ts +5 -0
  271. package/vendor/runtime/src/executor/codexProtocol/v2/CodexErrorInfo.ts +12 -0
  272. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentState.ts +6 -0
  273. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentStatus.ts +5 -0
  274. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentTool.ts +5 -0
  275. package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentToolCallStatus.ts +5 -0
  276. package/vendor/runtime/src/executor/codexProtocol/v2/CommandAction.ts +6 -0
  277. package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionSource.ts +5 -0
  278. package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionStatus.ts +5 -0
  279. package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.ts +5 -0
  280. package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallStatus.ts +5 -0
  281. package/vendor/runtime/src/executor/codexProtocol/v2/FileUpdateChange.ts +6 -0
  282. package/vendor/runtime/src/executor/codexProtocol/v2/GitInfo.ts +5 -0
  283. package/vendor/runtime/src/executor/codexProtocol/v2/HookPromptFragment.ts +5 -0
  284. package/vendor/runtime/src/executor/codexProtocol/v2/McpAppDisplayMode.ts +5 -0
  285. package/vendor/runtime/src/executor/codexProtocol/v2/McpAppUi.ts +9 -0
  286. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallAppContext.ts +5 -0
  287. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallError.ts +5 -0
  288. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallResult.ts +6 -0
  289. package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallStatus.ts +5 -0
  290. package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitation.ts +6 -0
  291. package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitationEntry.ts +5 -0
  292. package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentErrorDetails.ts +18 -0
  293. package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentSteer.ts +5 -0
  294. package/vendor/runtime/src/executor/codexProtocol/v2/NonSteerableTurnKind.ts +5 -0
  295. package/vendor/runtime/src/executor/codexProtocol/v2/PatchApplyStatus.ts +5 -0
  296. package/vendor/runtime/src/executor/codexProtocol/v2/PatchChangeKind.ts +5 -0
  297. package/vendor/runtime/src/executor/codexProtocol/v2/SessionSource.ts +6 -0
  298. package/vendor/runtime/src/executor/codexProtocol/v2/SubAgentActivityKind.ts +5 -0
  299. package/vendor/runtime/src/executor/codexProtocol/v2/Thread.ts +104 -0
  300. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadActiveFlag.ts +5 -0
  301. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadHistoryMode.ts +5 -0
  302. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadItem.ts +125 -0
  303. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadParams.ts +12 -0
  304. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadResponse.ts +6 -0
  305. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSection.ts +21 -0
  306. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSectionAppearance.ts +8 -0
  307. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStatus.ts +6 -0
  308. package/vendor/runtime/src/executor/codexProtocol/v2/Turn.ts +37 -0
  309. package/vendor/runtime/src/executor/codexProtocol/v2/TurnError.ts +11 -0
  310. package/vendor/runtime/src/executor/codexProtocol/v2/TurnItemsView.ts +5 -0
  311. package/vendor/runtime/src/executor/codexProtocol/v2/TurnStatus.ts +5 -0
  312. package/vendor/runtime/src/executor/codexProtocol/v2/WebSearchAction.ts +5 -0
  313. package/vendor/runtime/src/executor/codexRpc.ts +4 -2
  314. package/vendor/runtime/src/executor/health.ts +5 -1
  315. package/vendor/runtime/src/executor/ownership.ts +8 -1
  316. package/vendor/runtime/src/executor/types.ts +18 -1
  317. package/vendor/runtime/src/harness/index.ts +1 -0
  318. package/vendor/runtime/src/index.ts +1 -1
  319. package/vendor/shared/dist/automations.d.ts +34 -0
  320. package/vendor/shared/dist/automations.d.ts.map +1 -1
  321. package/vendor/shared/dist/automations.js +12 -0
  322. package/vendor/shared/dist/computer.d.ts +1 -1
  323. package/vendor/shared/dist/computer.d.ts.map +1 -1
  324. package/vendor/shared/dist/computer.js +1 -2
  325. package/vendor/shared/dist/constants.d.ts +1 -1
  326. package/vendor/shared/dist/constants.d.ts.map +1 -1
  327. package/vendor/shared/dist/constants.js +3 -10
  328. package/vendor/shared/dist/index.d.ts +4 -2
  329. package/vendor/shared/dist/index.d.ts.map +1 -1
  330. package/vendor/shared/dist/index.js +3 -1
  331. package/vendor/shared/dist/journal-vault.d.ts +1 -1
  332. package/vendor/shared/dist/messagingSafety.d.ts +21 -0
  333. package/vendor/shared/dist/messagingSafety.d.ts.map +1 -0
  334. package/vendor/shared/dist/messagingSafety.js +8 -0
  335. package/vendor/shared/dist/schemas/harness.d.ts +98 -169
  336. package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
  337. package/vendor/shared/dist/schemas/harness.js +19 -124
  338. package/vendor/shared/dist/smartCapture.d.ts +24 -0
  339. package/vendor/shared/dist/smartCapture.d.ts.map +1 -1
  340. package/vendor/shared/dist/smartCapture.js +15 -0
  341. package/vendor/shared/dist/taskSync.d.ts +342 -0
  342. package/vendor/shared/dist/taskSync.d.ts.map +1 -0
  343. package/vendor/shared/dist/taskSync.js +111 -0
  344. package/vendor/shared/dist/types.d.ts +1 -4
  345. package/vendor/shared/dist/types.d.ts.map +1 -1
  346. package/vendor/shared/dist/voiceCapture.d.ts +1 -1
  347. package/vendor/shared/dist/workspaces.d.ts +117 -0
  348. package/vendor/shared/dist/workspaces.d.ts.map +1 -1
  349. package/vendor/shared/dist/workspaces.js +50 -1
  350. package/vendor/shared/src/automations.ts +12 -0
  351. package/vendor/shared/src/computer.ts +3 -3
  352. package/vendor/shared/src/constants.ts +3 -10
  353. package/vendor/shared/src/index.ts +3 -6
  354. package/vendor/shared/src/messagingSafety.ts +11 -0
  355. package/vendor/shared/src/schemas/harness.ts +18 -130
  356. package/vendor/shared/src/smartCapture.ts +27 -0
  357. package/vendor/shared/src/taskSync.ts +81 -0
  358. package/vendor/shared/src/types.ts +0 -6
  359. package/vendor/shared/src/workspaces.ts +56 -1
  360. package/dist/coding/conduct.d.ts +0 -48
  361. package/dist/coding/conduct.d.ts.map +0 -1
  362. package/dist/coding/conduct.js +0 -263
  363. package/dist/coding/fleetPlan.d.ts +0 -20
  364. package/dist/coding/fleetPlan.d.ts.map +0 -1
  365. package/dist/coding/fleetPlan.js +0 -125
  366. package/dist/coding/fleetTasks.d.ts +0 -33
  367. package/dist/coding/fleetTasks.d.ts.map +0 -1
  368. package/dist/coding/fleetTasks.js +0 -75
  369. package/src/coding/conduct.ts +0 -325
  370. package/src/coding/fleetPlan.ts +0 -135
  371. package/src/coding/fleetTasks.ts +0 -109
@@ -8,6 +8,23 @@ export declare const SavedChatMessageSchema: z.ZodObject<{
8
8
  }>;
9
9
  text: z.ZodString;
10
10
  }, z.core.$loose>;
11
+ /** How one repository's worktrees are prepared. Stored on the computer and edited from the phone. */
12
+ export declare const RepoSettingsSchema: z.ZodObject<{
13
+ copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
14
+ setup: z.ZodOptional<z.ZodString>;
15
+ baseRef: z.ZodOptional<z.ZodString>;
16
+ archiveScript: z.ZodOptional<z.ZodString>;
17
+ archiveOnMerge: z.ZodOptional<z.ZodBoolean>;
18
+ deleteBranchOnArchive: z.ZodOptional<z.ZodBoolean>;
19
+ }, z.core.$strip>;
20
+ /** Where a repository lives on the computer, and what its copy list matches there right now. */
21
+ export declare const RepoPlacesSchema: z.ZodObject<{
22
+ root: z.ZodString;
23
+ worktrees: z.ZodString;
24
+ copyMatches: z.ZodArray<z.ZodString>;
25
+ }, z.core.$strip>;
26
+ export type RepoPlaces = z.infer<typeof RepoPlacesSchema>;
27
+ export type RepoSettings = z.infer<typeof RepoSettingsSchema>;
11
28
  export declare const WorkerWorkspaceSchema: z.ZodObject<{
12
29
  workerId: z.ZodUUID;
13
30
  repoId: z.ZodString;
@@ -26,6 +43,11 @@ export declare const WorkerWorkspaceSchema: z.ZodObject<{
26
43
  baseSha: z.ZodOptional<z.ZodString>;
27
44
  resume: z.ZodOptional<z.ZodString>;
28
45
  error: z.ZodOptional<z.ZodString>;
46
+ setup: z.ZodOptional<z.ZodEnum<{
47
+ running: "running";
48
+ failed: "failed";
49
+ }>>;
50
+ port: z.ZodOptional<z.ZodNumber>;
29
51
  createdAt: z.ZodString;
30
52
  updatedAt: z.ZodString;
31
53
  }, z.core.$strip>;
@@ -34,12 +56,21 @@ export declare const WorkspaceCommandSchema: z.ZodObject<{
34
56
  action: z.ZodEnum<{
35
57
  archive: "archive";
36
58
  history: "history";
59
+ settings: "settings";
60
+ delete: "delete";
37
61
  list: "list";
62
+ setup: "setup";
38
63
  create: "create";
39
64
  restore: "restore";
40
65
  import: "import";
41
66
  "clear-history": "clear-history";
67
+ "inspect-run": "inspect-run";
68
+ "continue-run": "continue-run";
69
+ "save-settings": "save-settings";
42
70
  }>;
71
+ requestId: z.ZodOptional<z.ZodUUID>;
72
+ reviewId: z.ZodOptional<z.ZodUUID>;
73
+ instruction: z.ZodOptional<z.ZodString>;
43
74
  repoId: z.ZodOptional<z.ZodString>;
44
75
  workerId: z.ZodOptional<z.ZodUUID>;
45
76
  checkout: z.ZodOptional<z.ZodBoolean>;
@@ -47,6 +78,15 @@ export declare const WorkspaceCommandSchema: z.ZodObject<{
47
78
  title: z.ZodOptional<z.ZodString>;
48
79
  brief: z.ZodOptional<z.ZodString>;
49
80
  before: z.ZodOptional<z.ZodString>;
81
+ settings: z.ZodOptional<z.ZodObject<{
82
+ copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
83
+ setup: z.ZodOptional<z.ZodString>;
84
+ baseRef: z.ZodOptional<z.ZodString>;
85
+ archiveScript: z.ZodOptional<z.ZodString>;
86
+ archiveOnMerge: z.ZodOptional<z.ZodBoolean>;
87
+ deleteBranchOnArchive: z.ZodOptional<z.ZodBoolean>;
88
+ }, z.core.$strip>>;
89
+ force: z.ZodOptional<z.ZodBoolean>;
50
90
  legacy: z.ZodOptional<z.ZodObject<{
51
91
  messages: z.ZodArray<z.ZodObject<{
52
92
  id: z.ZodString;
@@ -62,6 +102,12 @@ export declare const WorkspaceCommandSchema: z.ZodObject<{
62
102
  }, z.core.$strip>>;
63
103
  }, z.core.$strip>;
64
104
  export type WorkspaceCommand = z.infer<typeof WorkspaceCommandSchema>;
105
+ /** Work an archived worktree still holds that is neither in the repository's base branch nor pushed. */
106
+ export declare const UnmergedWorkSchema: z.ZodObject<{
107
+ commits: z.ZodNumber;
108
+ uncommitted: z.ZodBoolean;
109
+ }, z.core.$strip>;
110
+ export type UnmergedWork = z.infer<typeof UnmergedWorkSchema>;
65
111
  export declare const WorkspaceRunSchema: z.ZodObject<{
66
112
  requestId: z.ZodString;
67
113
  prompt: z.ZodString;
@@ -79,6 +125,31 @@ export declare const WorkspaceRunSchema: z.ZodObject<{
79
125
  terminated: z.ZodBoolean;
80
126
  }, z.core.$strip>;
81
127
  export type WorkspaceRun = z.infer<typeof WorkspaceRunSchema>;
128
+ export declare const RunReviewSchema: z.ZodObject<{
129
+ requestId: z.ZodUUID;
130
+ reviewId: z.ZodUUID;
131
+ inspectedAt: z.ZodString;
132
+ prompt: z.ZodString;
133
+ workspace: z.ZodOptional<z.ZodString>;
134
+ branch: z.ZodOptional<z.ZodString>;
135
+ changes: z.ZodString;
136
+ diff: z.ZodString;
137
+ inspectionError: z.ZodOptional<z.ZodString>;
138
+ progress: z.ZodString;
139
+ answer: z.ZodOptional<z.ZodString>;
140
+ evidence: z.ZodString;
141
+ tools: z.ZodArray<z.ZodObject<{
142
+ name: z.ZodString;
143
+ phase: z.ZodString;
144
+ itemId: z.ZodOptional<z.ZodString>;
145
+ outcome: z.ZodOptional<z.ZodString>;
146
+ }, z.core.$strip>>;
147
+ unresolved: z.ZodArray<z.ZodString>;
148
+ continuationId: z.ZodUUID;
149
+ continuedAt: z.ZodOptional<z.ZodString>;
150
+ instruction: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strip>;
152
+ export type RunReview = z.infer<typeof RunReviewSchema>;
82
153
  export declare const WorkspaceSnapshotSchema: z.ZodObject<{
83
154
  workers: z.ZodArray<z.ZodObject<{
84
155
  workerId: z.ZodUUID;
@@ -98,9 +169,38 @@ export declare const WorkspaceSnapshotSchema: z.ZodObject<{
98
169
  baseSha: z.ZodOptional<z.ZodString>;
99
170
  resume: z.ZodOptional<z.ZodString>;
100
171
  error: z.ZodOptional<z.ZodString>;
172
+ setup: z.ZodOptional<z.ZodEnum<{
173
+ running: "running";
174
+ failed: "failed";
175
+ }>>;
176
+ port: z.ZodOptional<z.ZodNumber>;
101
177
  createdAt: z.ZodString;
102
178
  updatedAt: z.ZodString;
103
179
  }, z.core.$strip>>;
180
+ review: z.ZodOptional<z.ZodObject<{
181
+ requestId: z.ZodUUID;
182
+ reviewId: z.ZodUUID;
183
+ inspectedAt: z.ZodString;
184
+ prompt: z.ZodString;
185
+ workspace: z.ZodOptional<z.ZodString>;
186
+ branch: z.ZodOptional<z.ZodString>;
187
+ changes: z.ZodString;
188
+ diff: z.ZodString;
189
+ inspectionError: z.ZodOptional<z.ZodString>;
190
+ progress: z.ZodString;
191
+ answer: z.ZodOptional<z.ZodString>;
192
+ evidence: z.ZodString;
193
+ tools: z.ZodArray<z.ZodObject<{
194
+ name: z.ZodString;
195
+ phase: z.ZodString;
196
+ itemId: z.ZodOptional<z.ZodString>;
197
+ outcome: z.ZodOptional<z.ZodString>;
198
+ }, z.core.$strip>>;
199
+ unresolved: z.ZodArray<z.ZodString>;
200
+ continuationId: z.ZodUUID;
201
+ continuedAt: z.ZodOptional<z.ZodString>;
202
+ instruction: z.ZodOptional<z.ZodString>;
203
+ }, z.core.$strip>>;
104
204
  checkout: z.ZodOptional<z.ZodObject<{
105
205
  repoId: z.ZodString;
106
206
  conversationId: z.ZodString;
@@ -133,6 +233,23 @@ export declare const WorkspaceSnapshotSchema: z.ZodObject<{
133
233
  text: z.ZodString;
134
234
  }, z.core.$loose>>>;
135
235
  nextBefore: z.ZodOptional<z.ZodString>;
236
+ settings: z.ZodOptional<z.ZodObject<{
237
+ copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
238
+ setup: z.ZodOptional<z.ZodString>;
239
+ baseRef: z.ZodOptional<z.ZodString>;
240
+ archiveScript: z.ZodOptional<z.ZodString>;
241
+ archiveOnMerge: z.ZodOptional<z.ZodBoolean>;
242
+ deleteBranchOnArchive: z.ZodOptional<z.ZodBoolean>;
243
+ }, z.core.$strip>>;
244
+ places: z.ZodOptional<z.ZodObject<{
245
+ root: z.ZodString;
246
+ worktrees: z.ZodString;
247
+ copyMatches: z.ZodArray<z.ZodString>;
248
+ }, z.core.$strip>>;
249
+ unmerged: z.ZodOptional<z.ZodObject<{
250
+ commits: z.ZodNumber;
251
+ uncommitted: z.ZodBoolean;
252
+ }, z.core.$strip>>;
136
253
  }, z.core.$strip>;
137
254
  export type WorkspaceSnapshot = z.infer<typeof WorkspaceSnapshotSchema>;
138
255
  //# sourceMappingURL=workspaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../src/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;iBAEnB,CAAC;AAEjB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;iBAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;iBAK7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../src/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;iBAEnB,CAAC;AAEjB,qGAAqG;AACrG,eAAO,MAAM,kBAAkB;;;;;;;iBAa7B,CAAC;AACH,gGAAgG;AAChG,eAAO,MAAM,gBAAgB;;;;iBAE3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;iBAYhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,wGAAwG;AACxG,eAAO,MAAM,kBAAkB;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;iBAK7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;iBAQ1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAclC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -2,6 +2,25 @@ import { z } from 'zod';
2
2
  export const SavedChatMessageSchema = z.object({
3
3
  id: z.string().min(1), role: z.enum(['user', 'lucid', 'notice']), text: z.string(),
4
4
  }).passthrough();
5
+ /** How one repository's worktrees are prepared. Stored on the computer and edited from the phone. */
6
+ export const RepoSettingsSchema = z.object({
7
+ /** Gitignored files copied from the main checkout into a new worktree. Wildcards in the file name only. */
8
+ copy: z.array(z.string().trim().min(1).max(300)).max(50).default([]),
9
+ /** Shell command run in a new worktree once those files are in place. */
10
+ setup: z.string().trim().max(2000).optional(),
11
+ /** Remote branch new worktrees start from, e.g. `origin/main`. Unset uses the remote default. */
12
+ baseRef: z.string().trim().max(200).optional(),
13
+ /** Shell command run in a worktree just before it is archived. A failure stops the archive. */
14
+ archiveScript: z.string().trim().max(2000).optional(),
15
+ /** Archive a worktree once the pull request for its branch has merged. */
16
+ archiveOnMerge: z.boolean().optional(),
17
+ /** Delete the local branch when a worktree is archived. Restore brings it back from the snapshot. */
18
+ deleteBranchOnArchive: z.boolean().optional(),
19
+ });
20
+ /** Where a repository lives on the computer, and what its copy list matches there right now. */
21
+ export const RepoPlacesSchema = z.object({
22
+ root: z.string(), worktrees: z.string(), copyMatches: z.array(z.string()),
23
+ });
5
24
  export const WorkerWorkspaceSchema = z.object({
6
25
  workerId: z.uuidv7(), repoId: z.string().min(1), title: z.string().min(1).max(200),
7
26
  brief: z.string().max(8000).default(''),
@@ -9,27 +28,53 @@ export const WorkerWorkspaceSchema = z.object({
9
28
  state: z.enum(['creating', 'ready', 'setup_failed', 'archived']),
10
29
  branch: z.string().optional(), baseRef: z.string().optional(), baseSha: z.string().optional(),
11
30
  resume: z.string().optional(), error: z.string().optional(),
31
+ /** The setup command's progress on a ready worktree. A failure's output is in `error`. */
32
+ setup: z.enum(['running', 'failed']).optional(),
33
+ /** First of the ten ports reserved for this worktree's servers. */
34
+ port: z.number().int().min(1024).max(65525).optional(),
12
35
  createdAt: z.string(), updatedAt: z.string(),
13
36
  });
14
37
  export const WorkspaceCommandSchema = z.object({
15
- action: z.enum(['list', 'create', 'history', 'archive', 'restore', 'import', 'clear-history']),
38
+ action: z.enum(['list', 'create', 'history', 'archive', 'restore', 'import', 'clear-history', 'inspect-run', 'continue-run',
39
+ 'settings', 'save-settings', 'setup', 'delete']),
40
+ requestId: z.uuidv7().optional(), reviewId: z.uuidv7().optional(),
41
+ instruction: z.string().trim().min(1).max(8000).optional(),
16
42
  repoId: z.string().min(1).optional(), workerId: z.uuidv7().optional(),
17
43
  checkout: z.boolean().optional(), revision: z.string().optional(),
18
44
  title: z.string().trim().min(1).max(200).optional(),
19
45
  brief: z.string().max(8000).optional(), before: z.string().optional(),
46
+ settings: RepoSettingsSchema.optional(),
47
+ /** `delete` only: go ahead even though the worktree holds work that is not in the base branch. */
48
+ force: z.boolean().optional(),
20
49
  legacy: z.object({
21
50
  messages: z.array(SavedChatMessageSchema).max(10_000), resume: z.string().optional(),
22
51
  sessionCheckout: z.boolean().optional(),
23
52
  }).optional(),
24
53
  });
54
+ /** Work an archived worktree still holds that is neither in the repository's base branch nor pushed. */
55
+ export const UnmergedWorkSchema = z.object({
56
+ commits: z.number().int().min(0),
57
+ /** The archive snapshot holds files that were never committed. */
58
+ uncommitted: z.boolean(),
59
+ });
25
60
  export const WorkspaceRunSchema = z.object({
26
61
  requestId: z.string(), prompt: z.string(),
27
62
  handoff: z.object({ from: z.enum(['claude', 'codex']), to: z.enum(['claude', 'codex']) }).optional(),
28
63
  frames: z.array(z.record(z.string(), z.unknown())),
29
64
  terminated: z.boolean(),
30
65
  });
66
+ export const RunReviewSchema = z.object({
67
+ requestId: z.uuidv7(), reviewId: z.uuidv7(), inspectedAt: z.string(),
68
+ prompt: z.string(), workspace: z.string().optional(), branch: z.string().optional(),
69
+ changes: z.string(), diff: z.string(), inspectionError: z.string().optional(),
70
+ progress: z.string(), answer: z.string().optional(), evidence: z.string(),
71
+ tools: z.array(z.object({ name: z.string(), phase: z.string(), itemId: z.string().optional(), outcome: z.string().optional() })),
72
+ unresolved: z.array(z.string()),
73
+ continuationId: z.uuidv7(), continuedAt: z.string().optional(), instruction: z.string().optional(),
74
+ });
31
75
  export const WorkspaceSnapshotSchema = z.object({
32
76
  workers: z.array(WorkerWorkspaceSchema),
77
+ review: RunReviewSchema.optional(),
33
78
  checkout: z.object({
34
79
  repoId: z.string(), conversationId: z.string(), revision: z.string(),
35
80
  resume: z.string().optional(),
@@ -37,4 +82,8 @@ export const WorkspaceSnapshotSchema = z.object({
37
82
  runs: z.array(WorkspaceRunSchema).optional(),
38
83
  legacyMessages: z.array(SavedChatMessageSchema).optional(),
39
84
  nextBefore: z.string().optional(),
85
+ settings: RepoSettingsSchema.optional(),
86
+ places: RepoPlacesSchema.optional(),
87
+ /** A `delete` that was not carried out: what would be lost. Sending it again with `force` deletes. */
88
+ unmerged: UnmergedWorkSchema.optional(),
40
89
  });
@@ -233,6 +233,18 @@ export const AutomationRunSchema = z.object({
233
233
  costUsd: z.number().optional(),
234
234
  sessionId: z.string().optional(),
235
235
  summary: z.string().default(''),
236
+ cancelRequested: z.boolean().optional(),
237
+ workflow: z.object({
238
+ version: z.number().int(),
239
+ attempts: z.number().int(),
240
+ possibleAdditionalCost: z.boolean(),
241
+ steps: z.array(z.object({
242
+ key: z.string(),
243
+ status: z.enum(['running', 'completed', 'uncertain', 'failed']),
244
+ attempts: z.number().int(),
245
+ error: z.string().optional(),
246
+ })),
247
+ }).optional(),
236
248
  error: z.string().optional(),
237
249
  parentRunId: id.optional(),
238
250
  input: AutomationInputSchema.optional(),
@@ -51,13 +51,14 @@ export type ComputerPresence = z.infer<typeof ComputerPresenceSchema>;
51
51
  export type ComputerFeature =
52
52
  | 'checkout-history'
53
53
  | 'workspaces'
54
+ | 'repo-settings'
55
+ | 'worktree-delete'
54
56
  | 'turn-queue'
55
57
  | 'provider-handoff'
56
58
  | 'queue-control'
57
59
  | 'day-plan'
58
60
  | 'ask'
59
61
  | 'code'
60
- | 'conduct'
61
62
  | 'briefing'
62
63
  | 'attention'
63
64
  | 'models'
@@ -98,7 +99,6 @@ export const INFERENCE_FEATURES = new Set<string>([
98
99
  'ask',
99
100
  'day-plan',
100
101
  'code',
101
- 'conduct',
102
102
  'briefing',
103
103
  'attention',
104
104
  ]);
@@ -174,7 +174,7 @@ export function computerAvailability(
174
174
  `Update Lucidity on ${presence.computer?.name ?? presence.machine ?? 'your computer'} to use this feature. Other compatible features remain available.`,
175
175
  );
176
176
  if (
177
- ['code', 'conduct', 'repos', 'prs'].includes(feature) &&
177
+ ['code', 'repos', 'prs'].includes(feature) &&
178
178
  !runtime.permissions.includes('coding')
179
179
  )
180
180
  return blocked(
@@ -395,10 +395,6 @@ export const HARNESS_REQUEST_KINDS = [
395
395
  'getConfig',
396
396
  'setConfig',
397
397
  'incident',
398
- // Conductor (fleet of coding agents): `plan` decomposes a goal into workers (returns a
399
- // fan-out plan, runs no code); `run` executes an approved plan — one isolated worker
400
- // worktree per subtask, dispatched in merge order, integrated back onto lucid/<repo>.
401
- 'conduct',
402
398
  // Phone asks for the Dashboard's attention board (#320) — returns the cached one when it's
403
399
  // still fresh, otherwise composes a new one.
404
400
  'attention',
@@ -471,12 +467,9 @@ export const DELIVERY_CHANNELS = ['macos', 'stdout'] as const;
471
467
  export const AGENT_MODES = ['off', 'auto', 'danger'] as const;
472
468
  export type AgentMode = (typeof AGENT_MODES)[number];
473
469
 
474
- // The lifecycle of one conductor worker (a fan-out lane), as the Fleet board renders it.
475
- // `queued` = created, waiting on a merge-order dependency or a parallel-cap slot; `working` =
476
- // its code turn is streaming; `review` = done, its diff is waiting for the user; `merged` =
477
- // integrated onto the fleet branch; `blocked` = paused for an approval or a merge conflict;
478
- // `failed` = its turn errored. Mapped to Lucidity task status by the dogfood helper
479
- // (pending/in_progress/blocked/completed), since a worker IS a subtask.
470
+ // What a worktree's chat is doing, as the phone shows it. `queued` = being created; `working` =
471
+ // its turn is streaming; `review` = idle and waiting for you; `failed` = its turn or setup errored.
472
+ // `merged` and `blocked` are kept for lanes saved by older builds.
480
473
  export const WORKER_STATUSES = [
481
474
  'queued',
482
475
  'working',
@@ -4,6 +4,7 @@ export * from './githubContributions.js';
4
4
  export * from './projectCapture.js';
5
5
  export * from './taskActivity.js';
6
6
  export * from './recurrence.js';
7
+ export * from './taskSync.js';
7
8
  export * from './vault-search.js';
8
9
  export * from './journal-vault.js';
9
10
  export * from './journal-migration.js';
@@ -250,9 +251,6 @@ export {
250
251
  BriefingRequestSchema,
251
252
  JournalRequestSchema,
252
253
  CodeRequestSchema,
253
- ConductRequestSchema,
254
- FleetPlanSchema,
255
- FleetWorkerSchema,
256
254
  RepoListRequestSchema,
257
255
  ListPrsRequestSchema,
258
256
  GetConfigRequestSchema,
@@ -386,9 +384,6 @@ export type {
386
384
  BriefingRequest,
387
385
  JournalRequest,
388
386
  CodeRequest,
389
- ConductRequest,
390
- FleetPlan,
391
- FleetWorker,
392
387
  RepoListRequest,
393
388
  ListPrsRequest,
394
389
  PrInfo,
@@ -450,3 +445,5 @@ export type { AgentCommandOption, AgentCommandContext } from './agentCommands.js
450
445
 
451
446
  export * from './goals.js';
452
447
  export * from './goalNotes.js';
448
+
449
+ export * from './messagingSafety.js';
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+
3
+ export const MESSAGE_REPORT_REASONS = ['harassment', 'hate', 'sexual_content', 'violence', 'spam', 'other'] as const;
4
+ export const MessageReportSchema = z.object({
5
+ id: z.uuid(),
6
+ messageId: z.uuid(),
7
+ reason: z.enum(MESSAGE_REPORT_REASONS),
8
+ details: z.string().trim().max(2000).default(''),
9
+ });
10
+ export type MessageReportInput = z.infer<typeof MessageReportSchema>;
11
+ export type MessagingSafetyState = { blockedByMe: boolean; canMessage: boolean };
@@ -22,7 +22,6 @@ import {
22
22
  HARNESS_REQUEST_KINDS,
23
23
  APPROVAL_DECISIONS,
24
24
  WORKSPACE_MODES,
25
- WORKER_STATUSES,
26
25
  EFFORT_LEVELS,
27
26
  DELIVERY_CHANNELS,
28
27
  AGENT_MODES,
@@ -113,6 +112,8 @@ export const JournalRequestSchema = HarnessRequestBase.extend({
113
112
  // server-side through the daemon's allowlist to an absolute path — the phone
114
113
  // never sends a filesystem path.
115
114
  export const CodeRequestSchema = HarnessRequestBase.extend({
115
+ recoveryOf: z.uuidv7().optional(),
116
+ recoveryReviewId: z.uuidv7().optional(),
116
117
  kind: z.literal('code'),
117
118
  repoId: z.string().min(1),
118
119
  prompt: z.string().min(1).max(8000),
@@ -126,10 +127,8 @@ export const CodeRequestSchema = HarnessRequestBase.extend({
126
127
  handoff: ProviderHandoffSchema.optional(),
127
128
  queue: z.boolean().optional(),
128
129
  afterRequestId: z.uuidv7().optional(),
129
- /** Conductor worker id (a fleet subtask's id). Present when the phone drills into one
130
- * worker of a fan-out and sends it a follow-up turn: the daemon runs it in that worker's
131
- * isolated `fleet/<repoId>/<workerId>` worktree, on its own lane. Absent → the bare repo
132
- * session, exactly as before. */
130
+ /** The worktree this turn belongs to. The daemon runs it in that worktree's own folder and
131
+ * branch, on its own lane. Absent → the repository's main session. */
133
132
  workerId: z.uuidv7().optional(),
134
133
  /** Where to do the work (#121). Absent → 'worktree', so a daemon on this schema
135
134
  * still understands a phone that predates the mode picker. The daemon rejects
@@ -163,72 +162,6 @@ export const CloneRepoRequestSchema = HarnessRequestBase.extend({
163
162
  url: z.string().min(1).max(2000),
164
163
  });
165
164
 
166
- // ---- Conductor (a fleet of coding agents) ---------------------------------
167
-
168
- // One worker in a fan-out plan — a single coding lane. Its `workerId` is the fleet
169
- // subtask's uuid AND the stream id its code frames arrive under (both uuidv7), so a
170
- // worker reuses the whole existing code-turn pipeline: the phone routes any frame whose
171
- // `requestId` equals a known `workerId` into that worker's lane. `ownedPaths` is the
172
- // files/globs this worker may touch (the ownership map that prevents two lanes colliding);
173
- // `mergeOrder` (lower first) mirrors the subtask's priority and decides integration order.
174
- export const FleetWorkerSchema = z.object({
175
- workerId: z.uuidv7(),
176
- title: z.string().min(1).max(200),
177
- brief: z.string().min(1).max(8000),
178
- ownedPaths: z.array(z.string().max(400)).max(200),
179
- mergeOrder: z.number().int(),
180
- });
181
-
182
- // The lead's decomposition of a goal — what the phone renders as the Fan-out card, and
183
- // what it sends back (possibly edited) to execute. `overlaps` are the ⚠ pairs whose owned
184
- // paths intersect, so the card can warn and the runner can force those two to serialize.
185
- export const FleetPlanSchema = z.object({
186
- goal: z.string().min(1).max(500),
187
- /** The parent Lucidity task (the goal); each worker is a subtask of it. Set once the
188
- * daemon has created the task graph (dogfood); absent on a freshly-proposed plan. */
189
- parentTaskId: z.uuidv7().optional(),
190
- workers: z.array(FleetWorkerSchema).min(1).max(16),
191
- overlaps: z
192
- .array(
193
- z.object({
194
- a: z.uuidv7(),
195
- b: z.uuidv7(),
196
- paths: z.array(z.string().max(400)).max(200),
197
- }),
198
- )
199
- .max(120) // at most C(16,2) pairs for the 16-worker ceiling
200
- .optional(),
201
- /** How many workers may run at once (quota guard). Absent → the daemon's default cap. */
202
- maxParallel: z.number().int().positive().max(16).optional(),
203
- });
204
-
205
- // Phone → daemon. Four phases over one request kind:
206
- // - `plan`: decompose `prompt` (the goal) → one `fleet_plan` event. Nothing runs or is created,
207
- // so the user edits or discards freely.
208
- // - `setup`: materialize an approved plan for the DESIGN-FIRST flow — create the task graph and
209
- // announce the workers (`worker_status: queued`), but write NO code. The user then chats each
210
- // worker via a `code` turn carrying its `workerId`, and merges with `integrate` when ready.
211
- // - `run`: the AUTO flow — create the graph, dispatch every worker to code in merge order, then
212
- // integrate. One-tap "fan out & run".
213
- // - `integrate`: merge the plan's worker branches onto lucid/<repo> in order → `worker_status`
214
- // (merged) / `fleet_conflict` / `fleet_done`. Used by the design-first flow's "Merge fleet".
215
- // Splitting plan from the rest keeps fan-out a one-tap opt-in: no worker spawns until the phone
216
- // sends `setup`/`run` with a plan the user accepted.
217
- export const ConductRequestSchema = HarnessRequestBase.extend({
218
- kind: z.literal('conduct'),
219
- repoId: z.string().min(1),
220
- phase: z.enum(['plan', 'run', 'setup', 'integrate']),
221
- prompt: z.string().min(1).max(8000),
222
- images: harnessImagesField,
223
- /** The approved plan to execute — required on `run`, ignored on `plan`. */
224
- plan: FleetPlanSchema.optional(),
225
- /** Conductor (lead) session id to continue its planning conversation across turns. */
226
- resume: z.string().optional(),
227
- /** Skip the dogfood task graph (no parent/subtask on the board). Set for quick incremental
228
- * spawns so the board isn't spammed with a parent per task; the fleet UI tracks them anyway. */
229
- ephemeral: z.boolean().optional(),
230
- });
231
-
232
165
  // Stop an in-flight request (the phone's stop button). `targetId` is the original
233
166
  // request's `id`; the daemon aborts its executor run and replies with a
234
167
  // `cancelled` stream event correlated to that same id.
@@ -328,6 +261,8 @@ export const IncidentReportRequestSchema = HarnessRequestBase.extend({
328
261
  snapshot: IncidentSnapshotSchema.optional(),
329
262
  /** The tail of the phone's diag ring — feeds SUSPEND_GAP and enriches the timeline. */
330
263
  diag: z.array(IncidentDiagEventSchema).max(400).optional(),
264
+ /** The phone's stutter-meter reading (frame times, redraw counts, time in history work). */
265
+ perf: z.record(z.string(), z.unknown()).optional(),
331
266
  });
332
267
 
333
268
  // ---- Voice diagnostics (Kokoro TTS drop/pause capture) --------------------
@@ -543,7 +478,6 @@ export const HarnessRequestSchema = z.discriminatedUnion('kind', [
543
478
  BriefingRequestSchema,
544
479
  JournalRequestSchema,
545
480
  CodeRequestSchema,
546
- ConductRequestSchema,
547
481
  RepoListRequestSchema,
548
482
  ListPrsRequestSchema,
549
483
  CloneRepoRequestSchema,
@@ -843,6 +777,8 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
843
777
  type: z.literal('queue_state'),
844
778
  requestId: z.uuidv7(),
845
779
  state: z.enum(['queued', 'running']),
780
+ blockedBy: z.uuidv7().optional(),
781
+ message: z.string().optional(),
846
782
  }),
847
783
  z.object({
848
784
  // Durable receipt written before execution; recovery only pulls saved output.
@@ -870,6 +806,8 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
870
806
  requestId: z.uuidv7(),
871
807
  name: z.string(),
872
808
  phase: z.enum(['start', 'end']),
809
+ itemId: z.string().optional(),
810
+ outcome: z.string().optional(),
873
811
  }),
874
812
  z.object({
875
813
  type: z.literal('done'),
@@ -882,6 +820,7 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
882
820
  // has no memory of earlier turns — the phone surfaces/counts this so a silent
883
821
  // conversation reset is never invisible again (the root cause behind the #107 wipe).
884
822
  freshStart: z.boolean().optional(),
823
+ recovered: z.boolean().optional(),
885
824
  }),
886
825
  z.object({
887
826
  // The result of a `code` turn (M7): the diff the turn produced, ready for the
@@ -892,6 +831,13 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
892
831
  requestId: z.uuidv7(),
893
832
  branch: z.string(),
894
833
  diff: z.string(),
834
+ /** What the turn changed in tracked files: line counts and paths. The phone shows this in
835
+ * place of a diff. Absent when nothing changed or the count could not be taken. */
836
+ changes: z.object({
837
+ added: z.number().int().nonnegative(),
838
+ removed: z.number().int().nonnegative(),
839
+ files: z.array(z.string()).max(40),
840
+ }).optional(),
895
841
  summary: z.string().optional(),
896
842
  mode: z.enum(WORKSPACE_MODES).optional(),
897
843
  // In-place only: the branch the phone expected this turn to land on, echoed back ONLY
@@ -908,64 +854,6 @@ export const HarnessStreamEventSchema = z.discriminatedUnion('type', [
908
854
  requestId: z.uuidv7(),
909
855
  repoId: z.string(),
910
856
  }),
911
- // ---- Conductor fleet events (stream under the CONDUCT turn's requestId) ----
912
- z.object({
913
- // The lead's decomposition, produced by a `conduct` `plan` turn — the phone renders it
914
- // as the Fan-out card. Nothing has run or been created yet; the user edits/accepts, then
915
- // sends `conduct` `run` with this (possibly edited) plan.
916
- type: z.literal('fleet_plan'),
917
- requestId: z.uuidv7(),
918
- plan: FleetPlanSchema,
919
- }),
920
- z.object({
921
- // A worker crossed into a new lifecycle state. The phone updates that lane's card on the
922
- // Fleet board. The worker's own delta/tool_call/code_result/done frames arrive separately,
923
- // UNDER `requestId === workerId`, so they flow through the existing code-turn rendering.
924
- type: z.literal('worker_status'),
925
- requestId: z.uuidv7(),
926
- workerId: z.uuidv7(),
927
- status: z.enum(WORKER_STATUSES),
928
- /** A short live line for the card ("editing serialTts.ts"). Optional. */
929
- detail: z.string().optional(),
930
- /** This worker's diff size once it has one, for the card's "+N −M". Optional. */
931
- diffStat: z
932
- .object({
933
- added: z.number().int(),
934
- removed: z.number().int(),
935
- files: z.number().int(),
936
- })
937
- .optional(),
938
- }),
939
- z.object({
940
- // Integration hit a conflict merging a worker onto the fleet branch. Surfaced in the
941
- // conductor feed (never silently) so the user can hand it back to a worker as a fresh turn.
942
- // (Legacy combined-integrate path; per-feature delivery opens independent PRs and never
943
- // merges workers together, so this doesn't fire there.)
944
- type: z.literal('fleet_conflict'),
945
- requestId: z.uuidv7(),
946
- workerId: z.uuidv7(),
947
- paths: z.array(z.string()),
948
- message: z.string(),
949
- }),
950
- z.object({
951
- // One worker was delivered as its OWN pull request (per-feature delivery): its branch was
952
- // pushed and a PR opened against the base. `url` is that worker's PR; `error` a short reason
953
- // it couldn't open (no remote / no gh / no auth) — the worker's commits still exist on its
954
- // branch. One of these fires per delivered worker.
955
- type: z.literal('worker_pr'),
956
- requestId: z.uuidv7(),
957
- workerId: z.uuidv7(),
958
- url: z.string().optional(),
959
- error: z.string().optional(),
960
- }),
961
- z.object({
962
- // The fan-out finished. Per-feature delivery: `delivered`/`total` count how many workers got
963
- // their own PR (each worker's URL arrives in its `worker_pr`). No single integration branch.
964
- type: z.literal('fleet_done'),
965
- requestId: z.uuidv7(),
966
- delivered: z.number().int(),
967
- total: z.number().int(),
968
- }),
969
857
  z.object({
970
858
  type: z.literal('error'),
971
859
  requestId: z.uuidv7(),
@@ -65,3 +65,30 @@ export type SmartCaptureReview = {
65
65
  message?: string;
66
66
  pollAfterMs?: number | null;
67
67
  };
68
+
69
+ /** Bump when the disclosure below changes in a way people should agree to again. */
70
+ export const AI_CONSENT_VERSION = '2026-10-12';
71
+
72
+ /**
73
+ * The one wording of what is sent and to whom, shown before anything is transmitted.
74
+ * It names the recipients on purpose: that is the point of asking.
75
+ */
76
+ export const AI_CONSENT_DISCLOSURE = {
77
+ title: 'Allow AI features?',
78
+ body: 'Lucidity can suggest a project and date for a new task, spot a duplicate, and carry out the quick actions you speak or type. To do that it sends the task or instruction text, your project and milestone names, and the titles, dates and status of related tasks to Vercel’s AI Gateway and TypeSafe’s Jev model. Lucidity keeps what you asked for 14 days to improve quick actions. Notes, journal entries and audio are never sent. You can turn this off at any time in Settings.',
79
+ allow: 'Allow',
80
+ decline: 'Not now',
81
+ } as const;
82
+
83
+ export const AiConsentInputSchema = z.object({ granted: z.boolean() }).strict();
84
+
85
+ export type AiConsent = {
86
+ /** The account has AI features to turn on. Nobody else is asked. */
87
+ available: boolean;
88
+ /** null until the person has answered. */
89
+ granted: boolean | null;
90
+ decidedAt: string | null;
91
+ };
92
+
93
+ /** The `code` on a 403 from an AI route when the only thing missing is consent. */
94
+ export const AI_CONSENT_REQUIRED = 'ai_consent_required';