@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
package/README.md CHANGED
@@ -9,7 +9,7 @@ on your machine for scheduled briefings and interactive chat.
9
9
  Requires Node.js 22 or newer.
10
10
 
11
11
  ```sh
12
- npm install -g @opencorelabs/lucidity@0.7.0
12
+ npm install -g @opencorelabs/lucidity@0.9.5
13
13
  lucidity setup
14
14
  ```
15
15
 
@@ -123,9 +123,16 @@ npm run verify:npm -- --local
123
123
  This builds the agent and its workspace dependencies, vendors the internal
124
124
  libraries as local file dependencies with a private Zod 3 copy for MCP, writes the publishable archive to `dist/npm/`, and verifies the CLI
125
125
  and MCP server from isolated global and local installations. Publish that
126
- archive with `npm publish dist/npm/opencorelabs-lucidity-0.7.0.tgz --access public`.
126
+ archive with `npm publish dist/npm/opencorelabs-lucidity-0.9.5.tgz --access public`.
127
127
  The private workspace packages do not need separate npm publications.
128
128
 
129
+ Set `LUCIDITY_NPM_VERIFY_CACHE` to an absolute directory to reuse package downloads between verification runs. Each run still installs into a fresh temporary prefix, refreshes registry metadata and checks package integrity. The cache must be outside that temporary installation and is retained after verification. Without this variable, each run uses its own disposable cache.
130
+
131
+ ```sh
132
+ LUCIDITY_NPM_VERIFY_CACHE="$PWD/.context/npm-verify-cache" npm run verify:npm
133
+ LUCIDITY_NPM_VERIFY_CACHE="$PWD/.context/npm-verify-cache" npm run verify:npm -- --local
134
+ ```
135
+
129
136
  When the speech helper has been built, the archive includes its executable,
130
137
  corresponding Swift source, pinned FluidAudio dependency and third-party notices.
131
138
  The helper runs only on Apple Silicon macOS; other platforms retain the regular CLI
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/automations/agent.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAA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AAC;EAiKrC"}
@@ -13,6 +13,8 @@ const SOURCE_TOOLS = {
13
13
  'get_today',
14
14
  'get_week',
15
15
  'list_projects',
16
+ 'list_goals',
17
+ 'get_goal',
16
18
  'list_milestones',
17
19
  'get_milestone_progress',
18
20
  'get_task_stats',
@@ -8,7 +8,7 @@ export declare function readGuidance(root: string): {
8
8
  design: string;
9
9
  };
10
10
  export declare function parseDesignResult(text: string): {
11
- outcome: "blocked" | "skipped" | "ready";
11
+ outcome: "ready" | "blocked" | "skipped";
12
12
  summary: string;
13
13
  directions: {
14
14
  id: string;
@@ -3,6 +3,7 @@ import { AutomationStore } from './store.js';
3
3
  export declare function nextOccurrence(schedule: AutomationSchedule, after: Date): string | null;
4
4
  export interface AutomationServiceDeps {
5
5
  store: AutomationStore;
6
+ resumable?: (job: AutomationJob) => boolean;
6
7
  execute: (job: AutomationJob, run: AutomationRun, signal: AbortSignal) => Promise<Partial<AutomationRun>>;
7
8
  validateRepo: (id: string) => void;
8
9
  saveGuidance: (run: AutomationRun) => Promise<string | void>;
@@ -37,6 +38,9 @@ export declare class AutomationService {
37
38
  command(raw: AutomationCommand | unknown): Promise<AutomationSnapshot>;
38
39
  tick(): void;
39
40
  private launch;
41
+ private hasAccepted;
42
+ private resumeAccepted;
43
+ private executeAccepted;
40
44
  private finish;
41
45
  }
42
46
  //# sourceMappingURL=service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/automations/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAErB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,IAAI,GACV,MAAM,GAAG,IA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from 'uuidv7';
3
3
  import { AutomationCommandSchema, isDesignerInput, } from '@lucidity/shared';
4
+ import { WorkflowInterrupted } from './workflow.js';
4
5
  export function nextOccurrence(schedule, after) {
5
6
  if (schedule.frequency === 'manual')
6
7
  return null;
@@ -32,6 +33,8 @@ export class AutomationService {
32
33
  this.deps = deps;
33
34
  this.now = deps.now ?? (() => new Date());
34
35
  for (const run of deps.store.runs()) {
36
+ if (run.status === 'running' && run.workflow)
37
+ continue;
35
38
  if (run.status === 'running')
36
39
  this.finish(run, {
37
40
  status: 'interrupted',
@@ -132,7 +135,7 @@ export class AutomationService {
132
135
  this.deps.changed?.();
133
136
  }
134
137
  assertIdle(jobId) {
135
- if (this.active.has(jobId))
138
+ if (this.active.has(jobId) || this.deps.store.runs().some((run) => run.jobId === jobId && run.status === 'running'))
136
139
  throw new Error('This automation already has a running job. Open it or cancel it before starting another.');
137
140
  }
138
141
  async command(raw) {
@@ -209,9 +212,13 @@ export class AutomationService {
209
212
  else if (command.action === 'cancel') {
210
213
  const run = this.deps.store.run(command.runId);
211
214
  const active = this.active.get(run.jobId);
212
- if (!active || active.runId !== run.id)
215
+ if (run.status !== 'running')
213
216
  throw new Error('This run has already ended');
214
- active.controller.abort();
217
+ this.deps.store.saveRun({ ...run, cancelRequested: true });
218
+ if (active?.runId === run.id)
219
+ active.controller.abort();
220
+ else
221
+ this.finish(run, { status: 'cancelled', cancelRequested: true });
215
222
  message =
216
223
  'Cancellation requested. Completed external edits remain available for review.';
217
224
  }
@@ -295,6 +302,7 @@ export class AutomationService {
295
302
  }
296
303
  tick() {
297
304
  const now = this.now();
305
+ this.resumeAccepted(now);
298
306
  for (const job of this.deps.store.jobs()) {
299
307
  if (!this.deps.scheduledWork() && job.id !== 'builtin:prune')
300
308
  continue;
@@ -309,15 +317,15 @@ export class AutomationService {
309
317
  if (new Date(job.nextRunAt) > now)
310
318
  continue;
311
319
  const late = now.getTime() - Date.parse(job.nextRunAt) > 90_000;
312
- // Claim the scheduled occurrence before inference. A crash never replays it.
313
- this.saveJob({
314
- ...job,
315
- pausedUntil: undefined,
316
- nextRunAt: nextOccurrence(job.schedule, now),
317
- });
318
- if (this.active.has(job.id) || (late && job.catchUp === 'skip')) {
320
+ // The occurrence and its run are admitted in the same transaction.
321
+ const claim = { occurrence: job.nextRunAt, job: {
322
+ ...job,
323
+ pausedUntil: undefined,
324
+ nextRunAt: nextOccurrence(job.schedule, now),
325
+ } };
326
+ if (this.hasAccepted(job.id) || (late && job.catchUp === 'skip')) {
319
327
  const at = now.toISOString();
320
- this.deps.store.saveRun({
328
+ this.deps.store.admit({
321
329
  id: uuidv7(),
322
330
  jobId: job.id,
323
331
  jobName: job.name,
@@ -330,22 +338,22 @@ export class AutomationService {
330
338
  status: 'skipped',
331
339
  startedAt: at,
332
340
  finishedAt: at,
333
- summary: this.active.has(job.id)
341
+ summary: this.hasAccepted(job.id)
334
342
  ? 'Previous run is still active.'
335
343
  : 'Scheduled time was missed while the computer was unavailable. Catch-up is disabled.',
336
344
  directions: [],
337
345
  feedback: [],
338
- });
346
+ }, claim);
339
347
  }
340
348
  else
341
349
  this.launch(job, job.kind === 'builtin'
342
350
  ? 'builtin'
343
351
  : job.kind === 'agent'
344
352
  ? 'agent'
345
- : 'design', late ? 'catch-up' : 'scheduled');
353
+ : 'design', late ? 'catch-up' : 'scheduled', undefined, claim);
346
354
  }
347
355
  }
348
- launch(job, stage, trigger, parent) {
356
+ launch(job, stage, trigger, parent, claim) {
349
357
  this.assertIdle(job.id);
350
358
  const run = {
351
359
  id: uuidv7(),
@@ -356,26 +364,57 @@ export class AutomationService {
356
364
  status: 'running',
357
365
  startedAt: this.now().toISOString(),
358
366
  summary: 'Starting…',
367
+ ...(this.deps.resumable?.(job) ? { workflow: { version: 1, attempts: 1, possibleAdditionalCost: false, steps: [] } } : {}),
359
368
  input: job.input,
360
369
  parentRunId: parent?.id,
361
370
  feedback: parent?.feedback ?? [],
362
371
  directions: stage === 'implementation' ? (parent?.directions ?? []) : [],
363
372
  selectedDirectionId: stage === 'implementation' ? parent?.selectedDirectionId : undefined,
364
373
  };
365
- this.deps.store.saveRun(run);
374
+ if (!this.deps.store.admit(run, claim))
375
+ return run.id;
376
+ this.executeAccepted(job, run);
377
+ return run.id;
378
+ }
379
+ hasAccepted(jobId) {
380
+ return this.active.has(jobId) || this.deps.store.runs().some((run) => run.jobId === jobId && run.status === 'running');
381
+ }
382
+ resumeAccepted(now) {
383
+ for (const run of this.deps.store.runs()) {
384
+ if (run.status !== 'running' || this.active.has(run.jobId))
385
+ continue;
386
+ const job = this.deps.store.jobs().find((job) => job.id === run.jobId);
387
+ if (run.cancelRequested) {
388
+ this.finish(run, { status: 'cancelled' });
389
+ continue;
390
+ }
391
+ if (!job || !this.deps.resumable?.(job) || run.workflow?.version !== 1) {
392
+ this.finish(run, { status: 'interrupted', error: 'This saved workflow cannot resume with the installed version.' });
393
+ continue;
394
+ }
395
+ if (!this.deps.scheduledWork() || !job.enabled || (job.pausedUntil && new Date(job.pausedUntil) > now))
396
+ continue;
397
+ const resumed = { ...run, workflow: { ...run.workflow, attempts: run.workflow.attempts + 1 } };
398
+ this.deps.store.saveRun(resumed);
399
+ this.executeAccepted(job, resumed);
400
+ }
401
+ }
402
+ executeAccepted(job, run) {
366
403
  const controller = new AbortController();
367
404
  // Microtask admission makes the active marker visible before any executor can finish.
368
405
  const done = Promise.resolve()
369
406
  .then(async () => {
370
407
  try {
371
408
  const result = await this.deps.execute(job, run, controller.signal);
372
- this.finish(run, controller.signal.aborted
373
- ? { ...result, status: 'cancelled' }
374
- : result);
409
+ if (controller.signal.aborted && run.workflow && !this.deps.store.run(run.id).cancelRequested)
410
+ return;
411
+ this.finish(run, controller.signal.aborted ? { ...result, status: 'cancelled' } : result);
375
412
  }
376
413
  catch (error) {
414
+ if (controller.signal.aborted && run.workflow && !this.deps.store.run(run.id).cancelRequested)
415
+ return;
377
416
  this.finish(run, {
378
- status: controller.signal.aborted ? 'cancelled' : 'failed',
417
+ status: controller.signal.aborted ? 'cancelled' : error instanceof WorkflowInterrupted ? 'interrupted' : 'failed',
379
418
  error: error instanceof Error ? error.message : String(error),
380
419
  });
381
420
  }
@@ -389,12 +428,11 @@ export class AutomationService {
389
428
  });
390
429
  this.active.set(job.id, { runId: run.id, controller, done });
391
430
  this.deps.changed?.();
392
- return run.id;
393
431
  }
394
432
  finish(run, patch) {
395
433
  const finishedAt = this.now().toISOString();
396
434
  this.deps.store.saveRun({
397
- ...run,
435
+ ...this.deps.store.run(run.id),
398
436
  status: 'completed',
399
437
  ...patch,
400
438
  id: run.id,
@@ -1,13 +1,19 @@
1
1
  import { type AutomationJob, type AutomationRun } from '@lucidity/shared';
2
- /** Only the daemon writes this store; CLI and phone go through its authenticated gateway. */
2
+ import { RuntimeStore } from '../runtimeStore.js';
3
+ /** The daemon owns admission and execution. Legacy JSON remains untouched after import. */
3
4
  export declare class AutomationStore {
4
5
  readonly directory: string;
5
- constructor(directory: string);
6
- private write;
6
+ readonly runtime: RuntimeStore;
7
+ constructor(directory: string, runtime?: RuntimeStore);
7
8
  jobs(): AutomationJob[];
8
9
  saveJob(job: AutomationJob): void;
9
10
  run(id: string): AutomationRun;
10
11
  saveRun(run: AutomationRun): void;
11
12
  runs(): AutomationRun[];
13
+ /** Advancing a schedule and accepting its one run commit together, including skipped occurrences. */
14
+ admit(run: AutomationRun, claim?: {
15
+ job: AutomationJob;
16
+ occurrence: string;
17
+ }): boolean;
12
18
  }
13
19
  //# sourceMappingURL=store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/automations/store.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAE1B,6FAA6F;AAC7F,qBAAa,eAAe;IACd,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM;IAGtC,OAAO,CAAC,KAAK;IAKb,IAAI,IAAI,aAAa,EAAE;IAQvB,OAAO,CAAC,GAAG,EAAE,aAAa;IAO1B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa;IAQ9B,OAAO,CAAC,GAAG,EAAE,aAAa;IAO1B,IAAI,IAAI,aAAa,EAAE;CAMxB"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/automations/store.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAAE,KAAK,aAAa,EACvC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,2FAA2F;AAC3F,qBAAa,eAAe;IAEd,QAAQ,CAAC,SAAS,EAAE,MAAM;IADtC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;gBACV,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;IAe9D,IAAI,IAAI,aAAa,EAAE;IACvB,OAAO,CAAC,GAAG,EAAE,aAAa;IAC1B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa;IAM9B,OAAO,CAAC,GAAG,EAAE,aAAa;IAC1B,IAAI,IAAI,aAAa,EAAE;IAGvB,qGAAqG;IACrG,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE;QAAE,GAAG,EAAE,aAAa,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;CAcvF"}
@@ -1,46 +1,59 @@
1
- import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, writeFileSync, } from 'node:fs';
1
+ import { existsSync, mkdirSync, readFileSync, readdirSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { AutomationJobSchema, AutomationRunSchema, } from '@lucidity/shared';
4
- /** Only the daemon writes this store; CLI and phone go through its authenticated gateway. */
4
+ import { RuntimeStore } from '../runtimeStore.js';
5
+ /** The daemon owns admission and execution. Legacy JSON remains untouched after import. */
5
6
  export class AutomationStore {
6
7
  directory;
7
- constructor(directory) {
8
+ runtime;
9
+ constructor(directory, runtime) {
8
10
  this.directory = directory;
9
11
  mkdirSync(join(directory, 'runs'), { recursive: true, mode: 0o700 });
12
+ this.runtime = runtime ?? new RuntimeStore(join(directory, 'automations.sqlite'));
13
+ if (!this.runtime.get('automation-migrations', directory)) {
14
+ const path = join(directory, 'jobs.json');
15
+ const jobs = existsSync(path) ? AutomationJobSchema.array().parse(JSON.parse(readFileSync(path, 'utf8'))) : [];
16
+ const runs = readdirSync(join(directory, 'runs')).filter((name) => name.endsWith('.json')).map((name) => AutomationRunSchema.parse(JSON.parse(readFileSync(join(directory, 'runs', name), 'utf8'))));
17
+ this.runtime.transaction(() => {
18
+ for (const job of jobs)
19
+ if (!this.runtime.get('automation-jobs', job.id))
20
+ this.saveJob(job);
21
+ for (const run of runs)
22
+ if (!this.runtime.get('automation-runs', run.id))
23
+ this.saveRun(run);
24
+ this.runtime.set('automation-migrations', directory, true);
25
+ });
26
+ }
10
27
  }
11
- write(path, value) {
12
- const temporary = `${path}.tmp`;
13
- writeFileSync(temporary, JSON.stringify(value, null, 2), { mode: 0o600 });
14
- renameSync(temporary, path);
15
- }
16
- jobs() {
17
- const path = join(this.directory, 'jobs.json');
18
- if (!existsSync(path))
19
- return [];
20
- // Corruption must be surfaced, never mistaken for an empty store and overwritten.
21
- return AutomationJobSchema.array().parse(JSON.parse(readFileSync(path, 'utf8')));
22
- }
23
- saveJob(job) {
24
- const jobs = this.jobs();
25
- this.write(join(this.directory, 'jobs.json'), [
26
- ...jobs.filter((row) => row.id !== job.id),
27
- AutomationJobSchema.parse(job),
28
- ]);
29
- }
28
+ jobs() { return this.runtime.list('automation-jobs').map((job) => AutomationJobSchema.parse(job)); }
29
+ saveJob(job) { this.runtime.set('automation-jobs', job.id, AutomationJobSchema.parse(job)); }
30
30
  run(id) {
31
31
  if (!/^[a-zA-Z0-9-]+$/.test(id))
32
32
  throw new Error('Invalid run ID');
33
- return AutomationRunSchema.parse(JSON.parse(readFileSync(join(this.directory, 'runs', `${id}.json`), 'utf8')));
34
- }
35
- saveRun(run) {
36
- if (!/^[a-zA-Z0-9-]+$/.test(run.id))
37
- throw new Error('Invalid run ID');
38
- this.write(join(this.directory, 'runs', `${run.id}.json`), AutomationRunSchema.parse(run));
33
+ const run = this.runtime.get('automation-runs', id);
34
+ if (!run)
35
+ throw new Error('Automation run not found');
36
+ return AutomationRunSchema.parse(run);
39
37
  }
38
+ saveRun(run) { this.runtime.set('automation-runs', run.id, AutomationRunSchema.parse(run)); }
40
39
  runs() {
41
- return readdirSync(join(this.directory, 'runs'))
42
- .filter((name) => name.endsWith('.json'))
43
- .map((name) => this.run(name.slice(0, -5)))
44
- .sort((a, b) => b.id.localeCompare(a.id));
40
+ return this.runtime.list('automation-runs').map((run) => AutomationRunSchema.parse(run)).sort((a, b) => b.id.localeCompare(a.id));
41
+ }
42
+ /** Advancing a schedule and accepting its one run commit together, including skipped occurrences. */
43
+ admit(run, claim) {
44
+ return this.runtime.transaction(() => {
45
+ if (this.runtime.get('automation-runs', run.id))
46
+ return false;
47
+ if (claim) {
48
+ const current = this.runtime.get('automation-jobs', claim.job.id);
49
+ const key = JSON.stringify([claim.job.id, claim.occurrence]);
50
+ if (current?.nextRunAt !== claim.occurrence || this.runtime.get('automation-occurrences', key))
51
+ return false;
52
+ this.runtime.set('automation-occurrences', key, run.id);
53
+ this.saveJob(claim.job);
54
+ }
55
+ this.saveRun(run);
56
+ return true;
57
+ });
45
58
  }
46
59
  }
@@ -0,0 +1,14 @@
1
+ import type { AutomationStore } from './store.js';
2
+ export declare class WorkflowInterrupted extends Error {
3
+ }
4
+ /** A small ordered-step journal. Only pure reads and tool-less generation may retry. */
5
+ export declare class SavedWorkflow {
6
+ private readonly store;
7
+ readonly runId: string;
8
+ private readonly signal?;
9
+ private checkpoint;
10
+ constructor(store: AutomationStore, runId: string, signal?: AbortSignal | undefined);
11
+ private save;
12
+ step<T>(key: string, policy: 'retry' | 'effect', action: () => Promise<T> | T): Promise<T>;
13
+ }
14
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/automations/workflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,qBAAa,mBAAoB,SAAQ,KAAK;CAAG;AAEjD,wFAAwF;AACxF,qBAAa,aAAa;IAEZ,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAmB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IADrG,OAAO,CAAC,UAAU,CAAa;gBACF,KAAK,EAAE,eAAe,EAAW,KAAK,EAAE,MAAM,EAAmB,MAAM,CAAC,EAAE,WAAW,YAAA;IAIlH,OAAO,CAAC,IAAI;IAYN,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAsBjG"}
@@ -0,0 +1,57 @@
1
+ export class WorkflowInterrupted extends Error {
2
+ }
3
+ /** A small ordered-step journal. Only pure reads and tool-less generation may retry. */
4
+ export class SavedWorkflow {
5
+ store;
6
+ runId;
7
+ signal;
8
+ checkpoint;
9
+ constructor(store, runId, signal) {
10
+ this.store = store;
11
+ this.runId = runId;
12
+ this.signal = signal;
13
+ this.checkpoint = store.runtime.get('workflow-steps', runId) ?? { version: 1, steps: [] };
14
+ if (this.checkpoint.version !== 1)
15
+ throw new WorkflowInterrupted('This run uses an incompatible saved workflow version. Its saved output has been retained.');
16
+ }
17
+ save(step) {
18
+ this.checkpoint.steps = [...this.checkpoint.steps.filter((old) => old.key !== step.key), step];
19
+ this.store.runtime.transaction(() => {
20
+ this.store.runtime.set('workflow-steps', this.runId, this.checkpoint);
21
+ const run = this.store.run(this.runId);
22
+ this.store.saveRun({ ...run, workflow: {
23
+ version: 1, attempts: run.workflow?.attempts ?? 1,
24
+ possibleAdditionalCost: this.checkpoint.steps.some((s) => s.attempts > 1 && ['Generate briefing', 'Reflect'].includes(s.key)),
25
+ steps: this.checkpoint.steps.map(({ value: _, ...progress }) => progress),
26
+ }, ...(step.key === 'Generate briefing' && step.status === 'completed' ? { summary: step.value.text, costUsd: step.value.costUsd, sessionId: step.value.sessionId } : {}) });
27
+ });
28
+ }
29
+ async step(key, policy, action) {
30
+ if (this.signal?.aborted || this.store.run(this.runId).cancelRequested)
31
+ throw new Error('Run stopped.');
32
+ const old = this.checkpoint.steps.find((step) => step.key === key);
33
+ if (old?.status === 'completed')
34
+ return old.value;
35
+ if (old && policy === 'effect') {
36
+ const error = `${key} may already have happened. Review the saved output before doing it again.`;
37
+ this.save({ ...old, status: 'uncertain', error });
38
+ throw new WorkflowInterrupted(error);
39
+ }
40
+ if ((old?.attempts ?? 0) >= 3)
41
+ throw new WorkflowInterrupted(`${key} reached its three-attempt recovery limit. Saved work has been retained.`);
42
+ const started = { key, status: 'running', attempts: (old?.attempts ?? 0) + 1 };
43
+ this.save(started);
44
+ let value;
45
+ try {
46
+ value = await action();
47
+ }
48
+ catch (error) {
49
+ this.save({ ...started, status: policy === 'effect' ? 'uncertain' : 'failed', error: error instanceof Error ? error.message : String(error) });
50
+ if (policy === 'effect')
51
+ throw new WorkflowInterrupted(`${key} has an uncertain outcome: ${String(error)}`);
52
+ throw error;
53
+ }
54
+ this.save({ ...started, status: 'completed', value });
55
+ return value;
56
+ }
57
+ }
@@ -5,6 +5,7 @@ import { LaneQueue } from '../queue.js';
5
5
  import type { McpWiring } from '../mcp/config.js';
6
6
  import type { AutomationService } from '../automations/service.js';
7
7
  export interface ChatServerDeps {
8
+ signal?: AbortSignal;
8
9
  automations?: AutomationService;
9
10
  config: DaemonConfig;
10
11
  executor: AgentExecutor;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["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AC,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uEAAuE;IACvE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,qFAAqF;IACrF,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAiBD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAoO7D"}
@@ -38,6 +38,11 @@ export function createChatServer(deps) {
38
38
  });
39
39
  });
40
40
  async function handle(req, res) {
41
+ if (deps.signal?.aborted) {
42
+ res.writeHead(503);
43
+ res.end('Lucidity is restarting. Reconnect before sending.');
44
+ return;
45
+ }
41
46
  if (req.method === 'GET' && req.url === '/health') {
42
47
  res.writeHead(200, { 'Content-Type': 'application/json' });
43
48
  res.end(JSON.stringify({ ok: true }));
@@ -123,7 +128,7 @@ export function createChatServer(deps) {
123
128
  const input = await buildChatInput();
124
129
  for await (const ev of executor.runStream({
125
130
  ...input,
126
- signal: ac.signal,
131
+ signal: deps.signal ? AbortSignal.any([ac.signal, deps.signal]) : ac.signal,
127
132
  })) {
128
133
  if (ev.type === 'session')
129
134
  send({ type: 'session', sessionId: ev.sessionId });
@@ -13,4 +13,6 @@ export declare function listPrs(repoId: string, mode: WorkspaceMode | undefined,
13
13
  prs: PrInfo[];
14
14
  error?: string;
15
15
  }>;
16
+ /** The head commit of the merged pull request opened from `branch`, if there is one. Never throws. */
17
+ export declare function mergedPrHead(repoRoot: string, branch: string): Promise<string | undefined>;
16
18
  //# sourceMappingURL=listPrs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"listPrs.d.ts","sourceRoot":"","sources":["../../src/coding/listPrs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAoBjD;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmC7D"}
1
+ {"version":3,"file":"listPrs.d.ts","sourceRoot":"","sources":["../../src/coding/listPrs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAoBjD;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmC7D;AAED,sGAAsG;AACtG,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAWhG"}
@@ -49,3 +49,13 @@ export async function listPrs(repoId, mode, config) {
49
49
  return { branch, prs: [], error: (raw.split('\n')[0] ?? '').slice(0, 200) };
50
50
  }
51
51
  }
52
+ /** The head commit of the merged pull request opened from `branch`, if there is one. Never throws. */
53
+ export async function mergedPrHead(repoRoot, branch) {
54
+ try {
55
+ const { stdout } = await exec('gh', ['pr', 'list', '--head', branch, '--state', 'merged', '--limit', '1', '--json', 'headRefOid'], { cwd: repoRoot, env: { ...process.env, PATH: GH_PATH }, maxBuffer: 1024 * 1024 });
56
+ return JSON.parse(stdout)[0]?.headRefOid;
57
+ }
58
+ catch {
59
+ return undefined;
60
+ }
61
+ }
@@ -2,7 +2,9 @@ import type { AgentExecutor, AgentProvider } from '@lucidity/runtime';
2
2
  import type { ProviderHandoff } from '@lucidity/shared';
3
3
  import { type WorkspaceMode, type HarnessImage } from '@lucidity/shared';
4
4
  import type { RepoEntry } from '../config.js';
5
+ import { type Workspace } from './worktree.js';
5
6
  export interface CodeTurnRequest {
7
+ recoveryOf?: string;
6
8
  id: string;
7
9
  repoId: string;
8
10
  prompt: string;
@@ -14,10 +16,8 @@ export interface CodeTurnRequest {
14
16
  provider?: AgentProvider;
15
17
  /** The conversation moving over from the other provider. Keeps the workspace as it is. */
16
18
  handoff?: ProviderHandoff;
17
- /** Conductor worker id (the fleet subtask's id). Present → this turn runs in the
18
- * worker's isolated `fleet/<repo>/<workerId>` worktree instead of the bare repo
19
- * session, so N workers code the same repo in parallel. Absent → the classic
20
- * single-session turn, unchanged. */
19
+ /** The worktree this turn belongs to. Present → it runs in that worktree's own folder and
20
+ * branch instead of the main session, so several can code the same repo in parallel. */
21
21
  workerId?: string;
22
22
  /** Where to work (#121). Absent → `worktree`. */
23
23
  mode?: WorkspaceMode;
@@ -26,6 +26,7 @@ export interface CodeTurnRequest {
26
26
  expectedBranch?: string;
27
27
  }
28
28
  export interface RunCodeTurnDeps {
29
+ prepareWorkspace?: (request: CodeTurnRequest) => Promise<Workspace>;
29
30
  repos: RepoEntry[];
30
31
  executor: AgentExecutor;
31
32
  mcp?: import('@lucidity/runtime').ExecutorRunInput['mcp'];
@@ -52,31 +53,6 @@ export interface RunCodeTurnDeps {
52
53
  /** Home dir Claude Code's session store lives under (`<home>/.claude/projects/...`). Test seam. */
53
54
  claudeHome?: string;
54
55
  }
55
- /**
56
- * The commit message for one coding turn. The subject is Lucid's own summary of what it
57
- * did; the body is the prompt that asked for it, so the commit still says why it exists.
58
- *
59
- * Deriving the subject from the prompt (as this once did) produced garbage: a raw slice cut
60
- * mid-word, and — because a prompt's own newline landed inside the slice — a stray second
61
- * line that git read as a body with no blank line before it. Anything reaching `git commit`
62
- * here must be subject / blank / body, in that order.
63
- */
64
- export declare function codeCommitMessage(prompt: string, summary: string): string;
65
- /**
66
- * Run one coding turn (M7). Resolves the repo via the allowlist, then works in the
67
- * session's workspace — by default the PERSISTENT worktree on the stable
68
- * `lucid/<repoId>` branch at a stable path, where a fresh session (no `resume`)
69
- * resets to HEAD and a resumed one reuses it so prior turns' commits are present.
70
- * In `in-place` mode (#121) the workspace is the user's checkout itself, on its live
71
- * branch, so Lucid picks up their uncommitted work. Runs Claude Code in auto mode
72
- * (streaming narration + tool_call events) and returns the turn's diff.
73
- *
74
- * Continuity has two halves that must agree: `req.resume` threads the *conversation*
75
- * via `--resume`, and a stable cwd threads both the *files* and — critically — Claude
76
- * Code's session store, which is keyed by cwd, so `--resume` only resolves when every
77
- * turn runs in the same directory. Both modes have a stable cwd, but they are DIFFERENT
78
- * directories, so switching mode strands the old session id; the phone starts a fresh
79
- * conversation on a switch, and the first-output deadline below catches it if it doesn't.
80
- */
56
+ /** Run a turn in an existing checkout or persistent worker without resetting its files. */
81
57
  export declare function runCodeTurn(req: CodeTurnRequest, deps: RunCodeTurnDeps): Promise<void>;
82
58
  //# sourceMappingURL=runCodeTurn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runCodeTurn.d.ts","sourceRoot":"","sources":["../../src/coding/runCodeTurn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAuB,MAAM,mBAAmB,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,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