@shivaedev/work-fleet 0.0.0 → 0.1.1

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 (1134) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/LICENSE +21 -0
  3. package/README.md +362 -1
  4. package/dist/DecisionCode.d.ts +4 -0
  5. package/dist/DecisionCode.d.ts.map +1 -0
  6. package/dist/DecisionCode.js +49 -0
  7. package/dist/DecisionCode.js.map +1 -0
  8. package/dist/admit.d.ts +494 -0
  9. package/dist/admit.d.ts.map +1 -0
  10. package/dist/admit.js +28 -0
  11. package/dist/admit.js.map +1 -0
  12. package/dist/attention.d.ts +18 -0
  13. package/dist/attention.d.ts.map +1 -0
  14. package/dist/attention.js +15 -0
  15. package/dist/attention.js.map +1 -0
  16. package/dist/board/acknowledgeDecision.d.ts +20 -0
  17. package/dist/board/acknowledgeDecision.d.ts.map +1 -0
  18. package/dist/board/acknowledgeDecision.js +44 -0
  19. package/dist/board/acknowledgeDecision.js.map +1 -0
  20. package/dist/board/briefRevision.d.ts +3 -0
  21. package/dist/board/briefRevision.d.ts.map +1 -0
  22. package/dist/board/briefRevision.js +13 -0
  23. package/dist/board/briefRevision.js.map +1 -0
  24. package/dist/board/completionFields.d.ts +8 -0
  25. package/dist/board/completionFields.d.ts.map +1 -0
  26. package/dist/board/completionFields.js +56 -0
  27. package/dist/board/completionFields.js.map +1 -0
  28. package/dist/board/completionMarkdown.d.ts +2 -0
  29. package/dist/board/completionMarkdown.d.ts.map +1 -0
  30. package/dist/board/completionMarkdown.js +24 -0
  31. package/dist/board/completionMarkdown.js.map +1 -0
  32. package/dist/board/decisionAnswer.d.ts +3 -0
  33. package/dist/board/decisionAnswer.d.ts.map +1 -0
  34. package/dist/board/decisionAnswer.js +11 -0
  35. package/dist/board/decisionAnswer.js.map +1 -0
  36. package/dist/board/decisionReading.d.ts +41 -0
  37. package/dist/board/decisionReading.d.ts.map +1 -0
  38. package/dist/board/decisionReading.js +43 -0
  39. package/dist/board/decisionReading.js.map +1 -0
  40. package/dist/board/documents.d.ts +14 -0
  41. package/dist/board/documents.d.ts.map +1 -0
  42. package/dist/board/documents.js +62 -0
  43. package/dist/board/documents.js.map +1 -0
  44. package/dist/board/fleetField.d.ts +5 -0
  45. package/dist/board/fleetField.d.ts.map +1 -0
  46. package/dist/board/fleetField.js +30 -0
  47. package/dist/board/fleetField.js.map +1 -0
  48. package/dist/board/markdown.d.ts +4 -0
  49. package/dist/board/markdown.d.ts.map +1 -0
  50. package/dist/board/markdown.js +92 -0
  51. package/dist/board/markdown.js.map +1 -0
  52. package/dist/board/publish.d.ts +57 -0
  53. package/dist/board/publish.d.ts.map +1 -0
  54. package/dist/board/publish.js +89 -0
  55. package/dist/board/publish.js.map +1 -0
  56. package/dist/board/publishReport.d.ts +39 -0
  57. package/dist/board/publishReport.d.ts.map +1 -0
  58. package/dist/board/publishReport.js +36 -0
  59. package/dist/board/publishReport.js.map +1 -0
  60. package/dist/board/readDocument.d.ts +14 -0
  61. package/dist/board/readDocument.d.ts.map +1 -0
  62. package/dist/board/readDocument.js +28 -0
  63. package/dist/board/readDocument.js.map +1 -0
  64. package/dist/board/readPass.d.ts +29 -0
  65. package/dist/board/readPass.d.ts.map +1 -0
  66. package/dist/board/readPass.js +84 -0
  67. package/dist/board/readPass.js.map +1 -0
  68. package/dist/board/reportContent.d.ts +5 -0
  69. package/dist/board/reportContent.d.ts.map +1 -0
  70. package/dist/board/reportContent.js +15 -0
  71. package/dist/board/reportContent.js.map +1 -0
  72. package/dist/board/reportFiles.d.ts +5 -0
  73. package/dist/board/reportFiles.d.ts.map +1 -0
  74. package/dist/board/reportFiles.js +64 -0
  75. package/dist/board/reportFiles.js.map +1 -0
  76. package/dist/board/reportIdentity.d.ts +11 -0
  77. package/dist/board/reportIdentity.d.ts.map +1 -0
  78. package/dist/board/reportIdentity.js +7 -0
  79. package/dist/board/reportIdentity.js.map +1 -0
  80. package/dist/board/reportLinks.d.ts +4 -0
  81. package/dist/board/reportLinks.d.ts.map +1 -0
  82. package/dist/board/reportLinks.js +16 -0
  83. package/dist/board/reportLinks.js.map +1 -0
  84. package/dist/board/reportPayload.d.ts +26 -0
  85. package/dist/board/reportPayload.d.ts.map +1 -0
  86. package/dist/board/reportPayload.js +53 -0
  87. package/dist/board/reportPayload.js.map +1 -0
  88. package/dist/board/reportPayloadFile.d.ts +4 -0
  89. package/dist/board/reportPayloadFile.d.ts.map +1 -0
  90. package/dist/board/reportPayloadFile.js +69 -0
  91. package/dist/board/reportPayloadFile.js.map +1 -0
  92. package/dist/board/schema.d.ts +75 -0
  93. package/dist/board/schema.d.ts.map +1 -0
  94. package/dist/board/schema.js +40 -0
  95. package/dist/board/schema.js.map +1 -0
  96. package/dist/board/statusMarkdown.d.ts +4 -0
  97. package/dist/board/statusMarkdown.d.ts.map +1 -0
  98. package/dist/board/statusMarkdown.js +34 -0
  99. package/dist/board/statusMarkdown.js.map +1 -0
  100. package/dist/board/workRevision.d.ts +2 -0
  101. package/dist/board/workRevision.d.ts.map +1 -0
  102. package/dist/board/workRevision.js +8 -0
  103. package/dist/board/workRevision.js.map +1 -0
  104. package/dist/board/writeCompletion.d.ts +3 -0
  105. package/dist/board/writeCompletion.d.ts.map +1 -0
  106. package/dist/board/writeCompletion.js +45 -0
  107. package/dist/board/writeCompletion.js.map +1 -0
  108. package/dist/board/writeHealth.d.ts +5 -0
  109. package/dist/board/writeHealth.d.ts.map +1 -0
  110. package/dist/board/writeHealth.js +20 -0
  111. package/dist/board/writeHealth.js.map +1 -0
  112. package/dist/board/writePublished.d.ts +4 -0
  113. package/dist/board/writePublished.d.ts.map +1 -0
  114. package/dist/board/writePublished.js +42 -0
  115. package/dist/board/writePublished.js.map +1 -0
  116. package/dist/board/writeStatus.d.ts +5 -0
  117. package/dist/board/writeStatus.d.ts.map +1 -0
  118. package/dist/board/writeStatus.js +8 -0
  119. package/dist/board/writeStatus.js.map +1 -0
  120. package/dist/cli.d.ts +3 -0
  121. package/dist/cli.d.ts.map +1 -0
  122. package/dist/cli.js +59 -0
  123. package/dist/cli.js.map +1 -0
  124. package/dist/completion.d.ts +8 -0
  125. package/dist/completion.d.ts.map +1 -0
  126. package/dist/completion.js +23 -0
  127. package/dist/completion.js.map +1 -0
  128. package/dist/engine/ReportInspection.d.ts +10 -0
  129. package/dist/engine/ReportInspection.d.ts.map +1 -0
  130. package/dist/engine/ReportInspection.js +4 -0
  131. package/dist/engine/ReportInspection.js.map +1 -0
  132. package/dist/engine/applyResolution.d.ts +983 -0
  133. package/dist/engine/applyResolution.d.ts.map +1 -0
  134. package/dist/engine/applyResolution.js +97 -0
  135. package/dist/engine/applyResolution.js.map +1 -0
  136. package/dist/engine/approveBrief.d.ts +1475 -0
  137. package/dist/engine/approveBrief.d.ts.map +1 -0
  138. package/dist/engine/approveBrief.js +82 -0
  139. package/dist/engine/approveBrief.js.map +1 -0
  140. package/dist/engine/authorizeResolution.d.ts +8355 -0
  141. package/dist/engine/authorizeResolution.d.ts.map +1 -0
  142. package/dist/engine/authorizeResolution.js +18 -0
  143. package/dist/engine/authorizeResolution.js.map +1 -0
  144. package/dist/engine/boardBrief.d.ts +1470 -0
  145. package/dist/engine/boardBrief.d.ts.map +1 -0
  146. package/dist/engine/boardBrief.js +57 -0
  147. package/dist/engine/boardBrief.js.map +1 -0
  148. package/dist/engine/capacityRetry.d.ts +25539 -0
  149. package/dist/engine/capacityRetry.d.ts.map +1 -0
  150. package/dist/engine/capacityRetry.js +55 -0
  151. package/dist/engine/capacityRetry.js.map +1 -0
  152. package/dist/engine/closeDecisions.d.ts +963 -0
  153. package/dist/engine/closeDecisions.d.ts.map +1 -0
  154. package/dist/engine/closeDecisions.js +74 -0
  155. package/dist/engine/closeDecisions.js.map +1 -0
  156. package/dist/engine/completeBoardWork.d.ts +965 -0
  157. package/dist/engine/completeBoardWork.d.ts.map +1 -0
  158. package/dist/engine/completeBoardWork.js +29 -0
  159. package/dist/engine/completeBoardWork.js.map +1 -0
  160. package/dist/engine/completeReport.d.ts +977 -0
  161. package/dist/engine/completeReport.d.ts.map +1 -0
  162. package/dist/engine/completeReport.js +20 -0
  163. package/dist/engine/completeReport.js.map +1 -0
  164. package/dist/engine/continueCommand.d.ts +485 -0
  165. package/dist/engine/continueCommand.d.ts.map +1 -0
  166. package/dist/engine/continueCommand.js +28 -0
  167. package/dist/engine/continueCommand.js.map +1 -0
  168. package/dist/engine/continueWorker.d.ts +984 -0
  169. package/dist/engine/continueWorker.d.ts.map +1 -0
  170. package/dist/engine/continueWorker.js +20 -0
  171. package/dist/engine/continueWorker.js.map +1 -0
  172. package/dist/engine/continuedRecord.d.ts +3 -0
  173. package/dist/engine/continuedRecord.d.ts.map +1 -0
  174. package/dist/engine/continuedRecord.js +23 -0
  175. package/dist/engine/continuedRecord.js.map +1 -0
  176. package/dist/engine/deliverPendingAnswers.d.ts +9797 -0
  177. package/dist/engine/deliverPendingAnswers.d.ts.map +1 -0
  178. package/dist/engine/deliverPendingAnswers.js +22 -0
  179. package/dist/engine/deliverPendingAnswers.js.map +1 -0
  180. package/dist/engine/deliveryFailure.d.ts +6 -0
  181. package/dist/engine/deliveryFailure.d.ts.map +1 -0
  182. package/dist/engine/deliveryFailure.js +11 -0
  183. package/dist/engine/deliveryFailure.js.map +1 -0
  184. package/dist/engine/dispatchCommand.d.ts +485 -0
  185. package/dist/engine/dispatchCommand.d.ts.map +1 -0
  186. package/dist/engine/dispatchCommand.js +69 -0
  187. package/dist/engine/dispatchCommand.js.map +1 -0
  188. package/dist/engine/ensureDecisionOwner.d.ts +963 -0
  189. package/dist/engine/ensureDecisionOwner.d.ts.map +1 -0
  190. package/dist/engine/ensureDecisionOwner.js +13 -0
  191. package/dist/engine/ensureDecisionOwner.js.map +1 -0
  192. package/dist/engine/ensurePublication.d.ts +964 -0
  193. package/dist/engine/ensurePublication.d.ts.map +1 -0
  194. package/dist/engine/ensurePublication.js +25 -0
  195. package/dist/engine/ensurePublication.js.map +1 -0
  196. package/dist/engine/exhaustedCheckRepairs.d.ts +3 -0
  197. package/dist/engine/exhaustedCheckRepairs.d.ts.map +1 -0
  198. package/dist/engine/exhaustedCheckRepairs.js +10 -0
  199. package/dist/engine/exhaustedCheckRepairs.js.map +1 -0
  200. package/dist/engine/failureCode.d.ts +3 -0
  201. package/dist/engine/failureCode.d.ts.map +1 -0
  202. package/dist/engine/failureCode.js +28 -0
  203. package/dist/engine/failureCode.js.map +1 -0
  204. package/dist/engine/failureContext.d.ts +14 -0
  205. package/dist/engine/failureContext.d.ts.map +1 -0
  206. package/dist/engine/failureContext.js +9 -0
  207. package/dist/engine/failureContext.js.map +1 -0
  208. package/dist/engine/failureMessage.d.ts +2 -0
  209. package/dist/engine/failureMessage.d.ts.map +1 -0
  210. package/dist/engine/failureMessage.js +20 -0
  211. package/dist/engine/failureMessage.js.map +1 -0
  212. package/dist/engine/failureOwner.d.ts +3 -0
  213. package/dist/engine/failureOwner.d.ts.map +1 -0
  214. package/dist/engine/failureOwner.js +9 -0
  215. package/dist/engine/failureOwner.js.map +1 -0
  216. package/dist/engine/health.d.ts +36 -0
  217. package/dist/engine/health.d.ts.map +1 -0
  218. package/dist/engine/health.js +26 -0
  219. package/dist/engine/health.js.map +1 -0
  220. package/dist/engine/inspectRenewal.d.ts +974 -0
  221. package/dist/engine/inspectRenewal.d.ts.map +1 -0
  222. package/dist/engine/inspectRenewal.js +53 -0
  223. package/dist/engine/inspectRenewal.js.map +1 -0
  224. package/dist/engine/launchInput.d.ts +492 -0
  225. package/dist/engine/launchInput.d.ts.map +1 -0
  226. package/dist/engine/launchInput.js +24 -0
  227. package/dist/engine/launchInput.js.map +1 -0
  228. package/dist/engine/launchObservationRetries.d.ts +3 -0
  229. package/dist/engine/launchObservationRetries.d.ts.map +1 -0
  230. package/dist/engine/launchObservationRetries.js +4 -0
  231. package/dist/engine/launchObservationRetries.js.map +1 -0
  232. package/dist/engine/launchReceipt.d.ts +486 -0
  233. package/dist/engine/launchReceipt.d.ts.map +1 -0
  234. package/dist/engine/launchReceipt.js +14 -0
  235. package/dist/engine/launchReceipt.js.map +1 -0
  236. package/dist/engine/launchRecord.d.ts +4 -0
  237. package/dist/engine/launchRecord.d.ts.map +1 -0
  238. package/dist/engine/launchRecord.js +8 -0
  239. package/dist/engine/launchRecord.js.map +1 -0
  240. package/dist/engine/localOnlyCriteria.d.ts +13 -0
  241. package/dist/engine/localOnlyCriteria.d.ts.map +1 -0
  242. package/dist/engine/localOnlyCriteria.js +13 -0
  243. package/dist/engine/localOnlyCriteria.js.map +1 -0
  244. package/dist/engine/makeAdopt.d.ts +974 -0
  245. package/dist/engine/makeAdopt.d.ts.map +1 -0
  246. package/dist/engine/makeAdopt.js +52 -0
  247. package/dist/engine/makeAdopt.js.map +1 -0
  248. package/dist/engine/makeAdvance.d.ts +485 -0
  249. package/dist/engine/makeAdvance.d.ts.map +1 -0
  250. package/dist/engine/makeAdvance.js +79 -0
  251. package/dist/engine/makeAdvance.js.map +1 -0
  252. package/dist/engine/makeDeliver.d.ts +963 -0
  253. package/dist/engine/makeDeliver.d.ts.map +1 -0
  254. package/dist/engine/makeDeliver.js +85 -0
  255. package/dist/engine/makeDeliver.js.map +1 -0
  256. package/dist/engine/makeHuman.d.ts +965 -0
  257. package/dist/engine/makeHuman.d.ts.map +1 -0
  258. package/dist/engine/makeHuman.js +39 -0
  259. package/dist/engine/makeHuman.js.map +1 -0
  260. package/dist/engine/makeLaunch.d.ts +971 -0
  261. package/dist/engine/makeLaunch.d.ts.map +1 -0
  262. package/dist/engine/makeLaunch.js +75 -0
  263. package/dist/engine/makeLaunch.js.map +1 -0
  264. package/dist/engine/makeObserve.d.ts +964 -0
  265. package/dist/engine/makeObserve.d.ts.map +1 -0
  266. package/dist/engine/makeObserve.js +89 -0
  267. package/dist/engine/makeObserve.js.map +1 -0
  268. package/dist/engine/makeReview.d.ts +973 -0
  269. package/dist/engine/makeReview.d.ts.map +1 -0
  270. package/dist/engine/makeReview.js +84 -0
  271. package/dist/engine/makeReview.js.map +1 -0
  272. package/dist/engine/makeState.d.ts +7880 -0
  273. package/dist/engine/makeState.d.ts.map +1 -0
  274. package/dist/engine/makeState.js +61 -0
  275. package/dist/engine/makeState.js.map +1 -0
  276. package/dist/engine/makeValidate.d.ts +973 -0
  277. package/dist/engine/makeValidate.d.ts.map +1 -0
  278. package/dist/engine/makeValidate.js +34 -0
  279. package/dist/engine/makeValidate.js.map +1 -0
  280. package/dist/engine/mergeReadiness.d.ts +10759 -0
  281. package/dist/engine/mergeReadiness.d.ts.map +1 -0
  282. package/dist/engine/mergeReadiness.js +25 -0
  283. package/dist/engine/mergeReadiness.js.map +1 -0
  284. package/dist/engine/observeDeliveryFailure.d.ts +8836 -0
  285. package/dist/engine/observeDeliveryFailure.d.ts.map +1 -0
  286. package/dist/engine/observeDeliveryFailure.js +40 -0
  287. package/dist/engine/observeDeliveryFailure.js.map +1 -0
  288. package/dist/engine/observeRenewal.d.ts +1535 -0
  289. package/dist/engine/observeRenewal.d.ts.map +1 -0
  290. package/dist/engine/observeRenewal.js +27 -0
  291. package/dist/engine/observeRenewal.js.map +1 -0
  292. package/dist/engine/observedAttempt.d.ts +4 -0
  293. package/dist/engine/observedAttempt.d.ts.map +1 -0
  294. package/dist/engine/observedAttempt.js +15 -0
  295. package/dist/engine/observedAttempt.js.map +1 -0
  296. package/dist/engine/obtainReview.d.ts +515 -0
  297. package/dist/engine/obtainReview.d.ts.map +1 -0
  298. package/dist/engine/obtainReview.js +100 -0
  299. package/dist/engine/obtainReview.js.map +1 -0
  300. package/dist/engine/operationRecord.d.ts +6299 -0
  301. package/dist/engine/operationRecord.d.ts.map +1 -0
  302. package/dist/engine/operationRecord.js +19 -0
  303. package/dist/engine/operationRecord.js.map +1 -0
  304. package/dist/engine/originalWork.d.ts +4 -0
  305. package/dist/engine/originalWork.d.ts.map +1 -0
  306. package/dist/engine/originalWork.js +14 -0
  307. package/dist/engine/originalWork.js.map +1 -0
  308. package/dist/engine/pendingAcknowledgements.d.ts +9 -0
  309. package/dist/engine/pendingAcknowledgements.d.ts.map +1 -0
  310. package/dist/engine/pendingAcknowledgements.js +38 -0
  311. package/dist/engine/pendingAcknowledgements.js.map +1 -0
  312. package/dist/engine/persistTerminalReceipts.d.ts +968 -0
  313. package/dist/engine/persistTerminalReceipts.d.ts.map +1 -0
  314. package/dist/engine/persistTerminalReceipts.js +12 -0
  315. package/dist/engine/persistTerminalReceipts.js.map +1 -0
  316. package/dist/engine/prepareCommand.d.ts +488 -0
  317. package/dist/engine/prepareCommand.d.ts.map +1 -0
  318. package/dist/engine/prepareCommand.js +69 -0
  319. package/dist/engine/prepareCommand.js.map +1 -0
  320. package/dist/engine/queueAnswerCommand.d.ts +487 -0
  321. package/dist/engine/queueAnswerCommand.d.ts.map +1 -0
  322. package/dist/engine/queueAnswerCommand.js +15 -0
  323. package/dist/engine/queueAnswerCommand.js.map +1 -0
  324. package/dist/engine/readOrContinueReview.d.ts +517 -0
  325. package/dist/engine/readOrContinueReview.d.ts.map +1 -0
  326. package/dist/engine/readOrContinueReview.js +54 -0
  327. package/dist/engine/readOrContinueReview.js.map +1 -0
  328. package/dist/engine/readResolution.d.ts +134 -0
  329. package/dist/engine/readResolution.d.ts.map +1 -0
  330. package/dist/engine/readResolution.js +45 -0
  331. package/dist/engine/readResolution.js.map +1 -0
  332. package/dist/engine/readRetry.d.ts +17668 -0
  333. package/dist/engine/readRetry.d.ts.map +1 -0
  334. package/dist/engine/readRetry.js +80 -0
  335. package/dist/engine/readRetry.js.map +1 -0
  336. package/dist/engine/reassignCommand.d.ts +484 -0
  337. package/dist/engine/reassignCommand.d.ts.map +1 -0
  338. package/dist/engine/reassignCommand.js +40 -0
  339. package/dist/engine/reassignCommand.js.map +1 -0
  340. package/dist/engine/reconcileAttempt.d.ts +534 -0
  341. package/dist/engine/reconcileAttempt.d.ts.map +1 -0
  342. package/dist/engine/reconcileAttempt.js +26 -0
  343. package/dist/engine/reconcileAttempt.js.map +1 -0
  344. package/dist/engine/reconcileCommand.d.ts +486 -0
  345. package/dist/engine/reconcileCommand.d.ts.map +1 -0
  346. package/dist/engine/reconcileCommand.js +52 -0
  347. package/dist/engine/reconcileCommand.js.map +1 -0
  348. package/dist/engine/recoverStall.d.ts +8881 -0
  349. package/dist/engine/recoverStall.d.ts.map +1 -0
  350. package/dist/engine/recoverStall.js +62 -0
  351. package/dist/engine/recoverStall.js.map +1 -0
  352. package/dist/engine/recoverUnobservable.d.ts +8881 -0
  353. package/dist/engine/recoverUnobservable.d.ts.map +1 -0
  354. package/dist/engine/recoverUnobservable.js +26 -0
  355. package/dist/engine/recoverUnobservable.js.map +1 -0
  356. package/dist/engine/refreshBrief.d.ts +17675 -0
  357. package/dist/engine/refreshBrief.d.ts.map +1 -0
  358. package/dist/engine/refreshBrief.js +48 -0
  359. package/dist/engine/refreshBrief.js.map +1 -0
  360. package/dist/engine/refreshReviewResult.d.ts +984 -0
  361. package/dist/engine/refreshReviewResult.d.ts.map +1 -0
  362. package/dist/engine/refreshReviewResult.js +69 -0
  363. package/dist/engine/refreshReviewResult.js.map +1 -0
  364. package/dist/engine/releaseClosedPreparation.d.ts +8845 -0
  365. package/dist/engine/releaseClosedPreparation.d.ts.map +1 -0
  366. package/dist/engine/releaseClosedPreparation.js +17 -0
  367. package/dist/engine/releaseClosedPreparation.js.map +1 -0
  368. package/dist/engine/releaseExecution.d.ts +8836 -0
  369. package/dist/engine/releaseExecution.d.ts.map +1 -0
  370. package/dist/engine/releaseExecution.js +54 -0
  371. package/dist/engine/releaseExecution.js.map +1 -0
  372. package/dist/engine/releaseFinishedWork.d.ts +485 -0
  373. package/dist/engine/releaseFinishedWork.d.ts.map +1 -0
  374. package/dist/engine/releaseFinishedWork.js +27 -0
  375. package/dist/engine/releaseFinishedWork.js.map +1 -0
  376. package/dist/engine/releaseOnly.d.ts +3 -0
  377. package/dist/engine/releaseOnly.d.ts.map +1 -0
  378. package/dist/engine/releaseOnly.js +19 -0
  379. package/dist/engine/releaseOnly.js.map +1 -0
  380. package/dist/engine/releaseReceipts.d.ts +12 -0
  381. package/dist/engine/releaseReceipts.d.ts.map +1 -0
  382. package/dist/engine/releaseReceipts.js +20 -0
  383. package/dist/engine/releaseReceipts.js.map +1 -0
  384. package/dist/engine/repository.d.ts +5824 -0
  385. package/dist/engine/repository.d.ts.map +1 -0
  386. package/dist/engine/repository.js +112 -0
  387. package/dist/engine/repository.js.map +1 -0
  388. package/dist/engine/requestConflictRepair.d.ts +8835 -0
  389. package/dist/engine/requestConflictRepair.d.ts.map +1 -0
  390. package/dist/engine/requestConflictRepair.js +26 -0
  391. package/dist/engine/requestConflictRepair.js.map +1 -0
  392. package/dist/engine/requestRework.d.ts +983 -0
  393. package/dist/engine/requestRework.d.ts.map +1 -0
  394. package/dist/engine/requestRework.js +35 -0
  395. package/dist/engine/requestRework.js.map +1 -0
  396. package/dist/engine/reserveRenewal.d.ts +25 -0
  397. package/dist/engine/reserveRenewal.d.ts.map +1 -0
  398. package/dist/engine/reserveRenewal.js +15 -0
  399. package/dist/engine/reserveRenewal.js.map +1 -0
  400. package/dist/engine/resolveCommand.d.ts +484 -0
  401. package/dist/engine/resolveCommand.d.ts.map +1 -0
  402. package/dist/engine/resolveCommand.js +36 -0
  403. package/dist/engine/resolveCommand.js.map +1 -0
  404. package/dist/engine/resolveExecution.d.ts +8834 -0
  405. package/dist/engine/resolveExecution.d.ts.map +1 -0
  406. package/dist/engine/resolveExecution.js +32 -0
  407. package/dist/engine/resolveExecution.js.map +1 -0
  408. package/dist/engine/restartableReview.d.ts +4 -0
  409. package/dist/engine/restartableReview.d.ts.map +1 -0
  410. package/dist/engine/restartableReview.js +14 -0
  411. package/dist/engine/restartableReview.js.map +1 -0
  412. package/dist/engine/resumeAttempt.d.ts +8884 -0
  413. package/dist/engine/resumeAttempt.d.ts.map +1 -0
  414. package/dist/engine/resumeAttempt.js +21 -0
  415. package/dist/engine/resumeAttempt.js.map +1 -0
  416. package/dist/engine/retireUnacknowledged.d.ts +967 -0
  417. package/dist/engine/retireUnacknowledged.d.ts.map +1 -0
  418. package/dist/engine/retireUnacknowledged.js +14 -0
  419. package/dist/engine/retireUnacknowledged.js.map +1 -0
  420. package/dist/engine/retryPrompt.d.ts +3 -0
  421. package/dist/engine/retryPrompt.d.ts.map +1 -0
  422. package/dist/engine/retryPrompt.js +13 -0
  423. package/dist/engine/retryPrompt.js.map +1 -0
  424. package/dist/engine/retryTerminal.d.ts +8370 -0
  425. package/dist/engine/retryTerminal.d.ts.map +1 -0
  426. package/dist/engine/retryTerminal.js +15 -0
  427. package/dist/engine/retryTerminal.js.map +1 -0
  428. package/dist/engine/scheduler.d.ts +966 -0
  429. package/dist/engine/scheduler.d.ts.map +1 -0
  430. package/dist/engine/scheduler.js +68 -0
  431. package/dist/engine/scheduler.js.map +1 -0
  432. package/dist/engine/sessionCleanup.d.ts +965 -0
  433. package/dist/engine/sessionCleanup.d.ts.map +1 -0
  434. package/dist/engine/sessionCleanup.js +42 -0
  435. package/dist/engine/sessionCleanup.js.map +1 -0
  436. package/dist/engine/sessionStatus.d.ts +3 -0
  437. package/dist/engine/sessionStatus.d.ts.map +1 -0
  438. package/dist/engine/sessionStatus.js +13 -0
  439. package/dist/engine/sessionStatus.js.map +1 -0
  440. package/dist/engine/settleMergedDelivery.d.ts +8839 -0
  441. package/dist/engine/settleMergedDelivery.d.ts.map +1 -0
  442. package/dist/engine/settleMergedDelivery.js +16 -0
  443. package/dist/engine/settleMergedDelivery.js.map +1 -0
  444. package/dist/engine/submissionFailure.d.ts +7875 -0
  445. package/dist/engine/submissionFailure.d.ts.map +1 -0
  446. package/dist/engine/submissionFailure.js +32 -0
  447. package/dist/engine/submissionFailure.js.map +1 -0
  448. package/dist/engine/submitLaunch.d.ts +8358 -0
  449. package/dist/engine/submitLaunch.d.ts.map +1 -0
  450. package/dist/engine/submitLaunch.js +17 -0
  451. package/dist/engine/submitLaunch.js.map +1 -0
  452. package/dist/engine/threadNames.d.ts +4 -0
  453. package/dist/engine/threadNames.d.ts.map +1 -0
  454. package/dist/engine/threadNames.js +53 -0
  455. package/dist/engine/threadNames.js.map +1 -0
  456. package/dist/engine/views.d.ts +3 -0
  457. package/dist/engine/views.d.ts.map +1 -0
  458. package/dist/engine/views.js +40 -0
  459. package/dist/engine/views.js.map +1 -0
  460. package/dist/engine/workerReport.d.ts +1464 -0
  461. package/dist/engine/workerReport.d.ts.map +1 -0
  462. package/dist/engine/workerReport.js +43 -0
  463. package/dist/engine/workerReport.js.map +1 -0
  464. package/dist/errors.d.ts +13 -0
  465. package/dist/errors.d.ts.map +1 -0
  466. package/dist/errors.js +6 -0
  467. package/dist/errors.js.map +1 -0
  468. package/dist/exposeFailure.d.ts +4 -0
  469. package/dist/exposeFailure.d.ts.map +1 -0
  470. package/dist/exposeFailure.js +26 -0
  471. package/dist/exposeFailure.js.map +1 -0
  472. package/dist/fleet.d.ts +4827 -0
  473. package/dist/fleet.d.ts.map +1 -0
  474. package/dist/fleet.js +41 -0
  475. package/dist/fleet.js.map +1 -0
  476. package/dist/fleetRecords.d.ts +2 -0
  477. package/dist/fleetRecords.d.ts.map +1 -0
  478. package/dist/fleetRecords.js +4 -0
  479. package/dist/fleetRecords.js.map +1 -0
  480. package/dist/host/actionCommands.d.ts +35 -0
  481. package/dist/host/actionCommands.d.ts.map +1 -0
  482. package/dist/host/actionCommands.js +49 -0
  483. package/dist/host/actionCommands.js.map +1 -0
  484. package/dist/host/admission.d.ts +979 -0
  485. package/dist/host/admission.d.ts.map +1 -0
  486. package/dist/host/admission.js +105 -0
  487. package/dist/host/admission.js.map +1 -0
  488. package/dist/host/answerText.d.ts +4 -0
  489. package/dist/host/answerText.d.ts.map +1 -0
  490. package/dist/host/answerText.js +11 -0
  491. package/dist/host/answerText.js.map +1 -0
  492. package/dist/host/answerWork.d.ts +483 -0
  493. package/dist/host/answerWork.d.ts.map +1 -0
  494. package/dist/host/answerWork.js +70 -0
  495. package/dist/host/answerWork.js.map +1 -0
  496. package/dist/host/applyReportPatch.d.ts +4 -0
  497. package/dist/host/applyReportPatch.d.ts.map +1 -0
  498. package/dist/host/applyReportPatch.js +107 -0
  499. package/dist/host/applyReportPatch.js.map +1 -0
  500. package/dist/host/cliOptions.d.ts +7 -0
  501. package/dist/host/cliOptions.d.ts.map +1 -0
  502. package/dist/host/cliOptions.js +12 -0
  503. package/dist/host/cliOptions.js.map +1 -0
  504. package/dist/host/commands.d.ts +979 -0
  505. package/dist/host/commands.d.ts.map +1 -0
  506. package/dist/host/commands.js +39 -0
  507. package/dist/host/commands.js.map +1 -0
  508. package/dist/host/config.d.ts +86 -0
  509. package/dist/host/config.d.ts.map +1 -0
  510. package/dist/host/config.js +81 -0
  511. package/dist/host/config.js.map +1 -0
  512. package/dist/host/continuationMessage.d.ts +5 -0
  513. package/dist/host/continuationMessage.d.ts.map +1 -0
  514. package/dist/host/continuationMessage.js +13 -0
  515. package/dist/host/continuationMessage.js.map +1 -0
  516. package/dist/host/daemon.d.ts +5537 -0
  517. package/dist/host/daemon.d.ts.map +1 -0
  518. package/dist/host/daemon.js +37 -0
  519. package/dist/host/daemon.js.map +1 -0
  520. package/dist/host/daemonClient.d.ts +5520 -0
  521. package/dist/host/daemonClient.d.ts.map +1 -0
  522. package/dist/host/daemonClient.js +27 -0
  523. package/dist/host/daemonClient.js.map +1 -0
  524. package/dist/host/daemonContract.d.ts +9040 -0
  525. package/dist/host/daemonContract.d.ts.map +1 -0
  526. package/dist/host/daemonContract.js +63 -0
  527. package/dist/host/daemonContract.js.map +1 -0
  528. package/dist/host/daemonDiagnostics.d.ts +4 -0
  529. package/dist/host/daemonDiagnostics.d.ts.map +1 -0
  530. package/dist/host/daemonDiagnostics.js +17 -0
  531. package/dist/host/daemonDiagnostics.js.map +1 -0
  532. package/dist/host/daemonHandlers.d.ts +4 -0
  533. package/dist/host/daemonHandlers.d.ts.map +1 -0
  534. package/dist/host/daemonHandlers.js +23 -0
  535. package/dist/host/daemonHandlers.js.map +1 -0
  536. package/dist/host/daemonSnapshots.d.ts +25 -0
  537. package/dist/host/daemonSnapshots.d.ts.map +1 -0
  538. package/dist/host/daemonSnapshots.js +15 -0
  539. package/dist/host/daemonSnapshots.js.map +1 -0
  540. package/dist/host/defaults.d.ts +5 -0
  541. package/dist/host/defaults.d.ts.map +1 -0
  542. package/dist/host/defaults.js +5 -0
  543. package/dist/host/defaults.js.map +1 -0
  544. package/dist/host/fleetItems.d.ts +22 -0
  545. package/dist/host/fleetItems.d.ts.map +1 -0
  546. package/dist/host/fleetItems.js +30 -0
  547. package/dist/host/fleetItems.js.map +1 -0
  548. package/dist/host/follow.d.ts +10 -0
  549. package/dist/host/follow.d.ts.map +1 -0
  550. package/dist/host/follow.js +30 -0
  551. package/dist/host/follow.js.map +1 -0
  552. package/dist/host/followCommands.d.ts +20 -0
  553. package/dist/host/followCommands.d.ts.map +1 -0
  554. package/dist/host/followCommands.js +45 -0
  555. package/dist/host/followCommands.js.map +1 -0
  556. package/dist/host/followState.d.ts +9 -0
  557. package/dist/host/followState.d.ts.map +1 -0
  558. package/dist/host/followState.js +30 -0
  559. package/dist/host/followState.js.map +1 -0
  560. package/dist/host/github.d.ts +32 -0
  561. package/dist/host/github.d.ts.map +1 -0
  562. package/dist/host/github.js +19 -0
  563. package/dist/host/github.js.map +1 -0
  564. package/dist/host/githubCheckState.d.ts +34 -0
  565. package/dist/host/githubCheckState.d.ts.map +1 -0
  566. package/dist/host/githubCheckState.js +74 -0
  567. package/dist/host/githubCheckState.js.map +1 -0
  568. package/dist/host/githubChecks.d.ts +31 -0
  569. package/dist/host/githubChecks.d.ts.map +1 -0
  570. package/dist/host/githubChecks.js +38 -0
  571. package/dist/host/githubChecks.js.map +1 -0
  572. package/dist/host/githubDelivery.d.ts +15 -0
  573. package/dist/host/githubDelivery.d.ts.map +1 -0
  574. package/dist/host/githubDelivery.js +53 -0
  575. package/dist/host/githubDelivery.js.map +1 -0
  576. package/dist/host/githubRead.d.ts +5 -0
  577. package/dist/host/githubRead.d.ts.map +1 -0
  578. package/dist/host/githubRead.js +15 -0
  579. package/dist/host/githubRead.js.map +1 -0
  580. package/dist/host/githubRequiredChecks.d.ts +5 -0
  581. package/dist/host/githubRequiredChecks.d.ts.map +1 -0
  582. package/dist/host/githubRequiredChecks.js +13 -0
  583. package/dist/host/githubRequiredChecks.js.map +1 -0
  584. package/dist/host/githubResult.d.ts +42 -0
  585. package/dist/host/githubResult.d.ts.map +1 -0
  586. package/dist/host/githubResult.js +60 -0
  587. package/dist/host/githubResult.js.map +1 -0
  588. package/dist/host/guidance.d.ts +4 -0
  589. package/dist/host/guidance.d.ts.map +1 -0
  590. package/dist/host/guidance.js +28 -0
  591. package/dist/host/guidance.js.map +1 -0
  592. package/dist/host/healthLayer.d.ts +4 -0
  593. package/dist/host/healthLayer.d.ts.map +1 -0
  594. package/dist/host/healthLayer.js +16 -0
  595. package/dist/host/healthLayer.js.map +1 -0
  596. package/dist/host/localOnlyBoardPath.d.ts +4 -0
  597. package/dist/host/localOnlyBoardPath.d.ts.map +1 -0
  598. package/dist/host/localOnlyBoardPath.js +24 -0
  599. package/dist/host/localOnlyBoardPath.js.map +1 -0
  600. package/dist/host/mainSource.d.ts +21 -0
  601. package/dist/host/mainSource.d.ts.map +1 -0
  602. package/dist/host/mainSource.js +71 -0
  603. package/dist/host/mainSource.js.map +1 -0
  604. package/dist/host/nameThreads.d.ts +10 -0
  605. package/dist/host/nameThreads.d.ts.map +1 -0
  606. package/dist/host/nameThreads.js +46 -0
  607. package/dist/host/nameThreads.js.map +1 -0
  608. package/dist/host/providerHealth.d.ts +4 -0
  609. package/dist/host/providerHealth.d.ts.map +1 -0
  610. package/dist/host/providerHealth.js +46 -0
  611. package/dist/host/providerHealth.js.map +1 -0
  612. package/dist/host/providers.d.ts +6 -0
  613. package/dist/host/providers.d.ts.map +1 -0
  614. package/dist/host/providers.js +27 -0
  615. package/dist/host/providers.js.map +1 -0
  616. package/dist/host/quota.d.ts +10 -0
  617. package/dist/host/quota.d.ts.map +1 -0
  618. package/dist/host/quota.js +30 -0
  619. package/dist/host/quota.js.map +1 -0
  620. package/dist/host/readCommand.d.ts +5 -0
  621. package/dist/host/readCommand.d.ts.map +1 -0
  622. package/dist/host/readCommand.js +18 -0
  623. package/dist/host/readCommand.js.map +1 -0
  624. package/dist/host/readWaitStates.d.ts +25 -0
  625. package/dist/host/readWaitStates.d.ts.map +1 -0
  626. package/dist/host/readWaitStates.js +26 -0
  627. package/dist/host/readWaitStates.js.map +1 -0
  628. package/dist/host/reassignWork.d.ts +485 -0
  629. package/dist/host/reassignWork.d.ts.map +1 -0
  630. package/dist/host/reassignWork.js +9 -0
  631. package/dist/host/reassignWork.js.map +1 -0
  632. package/dist/host/recordDecisionResponse.d.ts +40 -0
  633. package/dist/host/recordDecisionResponse.d.ts.map +1 -0
  634. package/dist/host/recordDecisionResponse.js +37 -0
  635. package/dist/host/recordDecisionResponse.js.map +1 -0
  636. package/dist/host/recordPayloads.d.ts +4 -0
  637. package/dist/host/recordPayloads.d.ts.map +1 -0
  638. package/dist/host/recordPayloads.js +16 -0
  639. package/dist/host/recordPayloads.js.map +1 -0
  640. package/dist/host/releaseWork.d.ts +965 -0
  641. package/dist/host/releaseWork.d.ts.map +1 -0
  642. package/dist/host/releaseWork.js +47 -0
  643. package/dist/host/releaseWork.js.map +1 -0
  644. package/dist/host/renderStatus.d.ts +3 -0
  645. package/dist/host/renderStatus.d.ts.map +1 -0
  646. package/dist/host/renderStatus.js +26 -0
  647. package/dist/host/renderStatus.js.map +1 -0
  648. package/dist/host/reportAttachmentFiles.d.ts +5 -0
  649. package/dist/host/reportAttachmentFiles.d.ts.map +1 -0
  650. package/dist/host/reportAttachmentFiles.js +71 -0
  651. package/dist/host/reportAttachmentFiles.js.map +1 -0
  652. package/dist/host/reportBoard.d.ts +11 -0
  653. package/dist/host/reportBoard.d.ts.map +1 -0
  654. package/dist/host/reportBoard.js +103 -0
  655. package/dist/host/reportBoard.js.map +1 -0
  656. package/dist/host/reportFileChanges.d.ts +19 -0
  657. package/dist/host/reportFileChanges.d.ts.map +1 -0
  658. package/dist/host/reportFileChanges.js +31 -0
  659. package/dist/host/reportFileChanges.js.map +1 -0
  660. package/dist/host/reportFileReplay.d.ts +19 -0
  661. package/dist/host/reportFileReplay.d.ts.map +1 -0
  662. package/dist/host/reportFileReplay.js +102 -0
  663. package/dist/host/reportFileReplay.js.map +1 -0
  664. package/dist/host/reportPublication.d.ts +7 -0
  665. package/dist/host/reportPublication.d.ts.map +1 -0
  666. package/dist/host/reportPublication.js +23 -0
  667. package/dist/host/reportPublication.js.map +1 -0
  668. package/dist/host/resultReport.d.ts +13 -0
  669. package/dist/host/resultReport.d.ts.map +1 -0
  670. package/dist/host/resultReport.js +29 -0
  671. package/dist/host/resultReport.js.map +1 -0
  672. package/dist/host/runtime.d.ts +18 -0
  673. package/dist/host/runtime.d.ts.map +1 -0
  674. package/dist/host/runtime.js +91 -0
  675. package/dist/host/runtime.js.map +1 -0
  676. package/dist/host/snapshotStream.d.ts +7 -0
  677. package/dist/host/snapshotStream.d.ts.map +1 -0
  678. package/dist/host/snapshotStream.js +15 -0
  679. package/dist/host/snapshotStream.js.map +1 -0
  680. package/dist/host/status.d.ts +294 -0
  681. package/dist/host/status.d.ts.map +1 -0
  682. package/dist/host/status.js +14 -0
  683. package/dist/host/status.js.map +1 -0
  684. package/dist/host/statusLayer.d.ts +7 -0
  685. package/dist/host/statusLayer.d.ts.map +1 -0
  686. package/dist/host/statusLayer.js +76 -0
  687. package/dist/host/statusLayer.js.map +1 -0
  688. package/dist/host/wait.d.ts +36 -0
  689. package/dist/host/wait.d.ts.map +1 -0
  690. package/dist/host/wait.js +23 -0
  691. package/dist/host/wait.js.map +1 -0
  692. package/dist/host/waitOutcome.d.ts +52 -0
  693. package/dist/host/waitOutcome.d.ts.map +1 -0
  694. package/dist/host/waitOutcome.js +36 -0
  695. package/dist/host/waitOutcome.js.map +1 -0
  696. package/dist/host/watch.d.ts +7 -0
  697. package/dist/host/watch.d.ts.map +1 -0
  698. package/dist/host/watch.js +54 -0
  699. package/dist/host/watch.js.map +1 -0
  700. package/dist/model.d.ts +1122 -0
  701. package/dist/model.d.ts.map +1 -0
  702. package/dist/model.js +114 -0
  703. package/dist/model.js.map +1 -0
  704. package/dist/operations.d.ts +11167 -0
  705. package/dist/operations.d.ts.map +1 -0
  706. package/dist/operations.js +72 -0
  707. package/dist/operations.js.map +1 -0
  708. package/dist/packageInfo.d.ts +4 -0
  709. package/dist/packageInfo.d.ts.map +1 -0
  710. package/dist/packageInfo.js +4 -0
  711. package/dist/packageInfo.js.map +1 -0
  712. package/dist/policy.d.ts +196 -0
  713. package/dist/policy.d.ts.map +1 -0
  714. package/dist/policy.js +85 -0
  715. package/dist/policy.js.map +1 -0
  716. package/dist/policyGuidance.d.ts +4 -0
  717. package/dist/policyGuidance.d.ts.map +1 -0
  718. package/dist/policyGuidance.js +5 -0
  719. package/dist/policyGuidance.js.map +1 -0
  720. package/dist/preparation/compatibility.d.ts +60 -0
  721. package/dist/preparation/compatibility.d.ts.map +1 -0
  722. package/dist/preparation/compatibility.js +41 -0
  723. package/dist/preparation/compatibility.js.map +1 -0
  724. package/dist/preparation/schema.d.ts +78 -0
  725. package/dist/preparation/schema.d.ts.map +1 -0
  726. package/dist/preparation/schema.js +43 -0
  727. package/dist/preparation/schema.js.map +1 -0
  728. package/dist/prompt/reviewer.d.ts +31 -0
  729. package/dist/prompt/reviewer.d.ts.map +1 -0
  730. package/dist/prompt/reviewer.js +49 -0
  731. package/dist/prompt/reviewer.js.map +1 -0
  732. package/dist/prompt/worker.d.ts +28 -0
  733. package/dist/prompt/worker.d.ts.map +1 -0
  734. package/dist/prompt/worker.js +116 -0
  735. package/dist/prompt/worker.js.map +1 -0
  736. package/dist/providers/capacity.d.ts +2 -0
  737. package/dist/providers/capacity.d.ts.map +1 -0
  738. package/dist/providers/capacity.js +8 -0
  739. package/dist/providers/capacity.js.map +1 -0
  740. package/dist/providers/codexAdapter.d.ts +13 -0
  741. package/dist/providers/codexAdapter.d.ts.map +1 -0
  742. package/dist/providers/codexAdapter.js +55 -0
  743. package/dist/providers/codexAdapter.js.map +1 -0
  744. package/dist/providers/codexCloud.d.ts +40 -0
  745. package/dist/providers/codexCloud.d.ts.map +1 -0
  746. package/dist/providers/codexCloud.js +92 -0
  747. package/dist/providers/codexCloud.js.map +1 -0
  748. package/dist/providers/codexCloudConnection.d.ts +5 -0
  749. package/dist/providers/codexCloudConnection.d.ts.map +1 -0
  750. package/dist/providers/codexCloudConnection.js +34 -0
  751. package/dist/providers/codexCloudConnection.js.map +1 -0
  752. package/dist/providers/codexLocal.d.ts +16 -0
  753. package/dist/providers/codexLocal.d.ts.map +1 -0
  754. package/dist/providers/codexLocal.js +49 -0
  755. package/dist/providers/codexLocal.js.map +1 -0
  756. package/dist/providers/codexLogin.d.ts +16 -0
  757. package/dist/providers/codexLogin.d.ts.map +1 -0
  758. package/dist/providers/codexLogin.js +63 -0
  759. package/dist/providers/codexLogin.js.map +1 -0
  760. package/dist/providers/codexProtocol.d.ts +81 -0
  761. package/dist/providers/codexProtocol.d.ts.map +1 -0
  762. package/dist/providers/codexProtocol.js +33 -0
  763. package/dist/providers/codexProtocol.js.map +1 -0
  764. package/dist/providers/codexReportAttachments.d.ts +21 -0
  765. package/dist/providers/codexReportAttachments.d.ts.map +1 -0
  766. package/dist/providers/codexReportAttachments.js +17 -0
  767. package/dist/providers/codexReportAttachments.js.map +1 -0
  768. package/dist/providers/codexRpc.d.ts +24 -0
  769. package/dist/providers/codexRpc.d.ts.map +1 -0
  770. package/dist/providers/codexRpc.js +109 -0
  771. package/dist/providers/codexRpc.js.map +1 -0
  772. package/dist/providers/codexSettings.d.ts +20 -0
  773. package/dist/providers/codexSettings.d.ts.map +1 -0
  774. package/dist/providers/codexSettings.js +24 -0
  775. package/dist/providers/codexSettings.js.map +1 -0
  776. package/dist/providers/codexTurns.d.ts +72 -0
  777. package/dist/providers/codexTurns.d.ts.map +1 -0
  778. package/dist/providers/codexTurns.js +128 -0
  779. package/dist/providers/codexTurns.js.map +1 -0
  780. package/dist/providers/genericRejection.d.ts +3 -0
  781. package/dist/providers/genericRejection.d.ts.map +1 -0
  782. package/dist/providers/genericRejection.js +7 -0
  783. package/dist/providers/genericRejection.js.map +1 -0
  784. package/dist/providers/makeWaitUntilIdle.d.ts +4 -0
  785. package/dist/providers/makeWaitUntilIdle.d.ts.map +1 -0
  786. package/dist/providers/makeWaitUntilIdle.js +27 -0
  787. package/dist/providers/makeWaitUntilIdle.js.map +1 -0
  788. package/dist/providers/observeCodexTurn.d.ts +23 -0
  789. package/dist/providers/observeCodexTurn.d.ts.map +1 -0
  790. package/dist/providers/observeCodexTurn.js +39 -0
  791. package/dist/providers/observeCodexTurn.js.map +1 -0
  792. package/dist/providers/readActiveTurn.d.ts +6 -0
  793. package/dist/providers/readActiveTurn.d.ts.map +1 -0
  794. package/dist/providers/readActiveTurn.js +22 -0
  795. package/dist/providers/readActiveTurn.js.map +1 -0
  796. package/dist/providers/recoverTurn.d.ts +10 -0
  797. package/dist/providers/recoverTurn.d.ts.map +1 -0
  798. package/dist/providers/recoverTurn.js +54 -0
  799. package/dist/providers/recoverTurn.js.map +1 -0
  800. package/dist/providers/startCodexTurn.d.ts +9 -0
  801. package/dist/providers/startCodexTurn.d.ts.map +1 -0
  802. package/dist/providers/startCodexTurn.js +59 -0
  803. package/dist/providers/startCodexTurn.js.map +1 -0
  804. package/dist/qualifyDependencies.d.ts +484 -0
  805. package/dist/qualifyDependencies.d.ts.map +1 -0
  806. package/dist/qualifyDependencies.js +36 -0
  807. package/dist/qualifyDependencies.js.map +1 -0
  808. package/dist/reportAttachments.d.ts +16 -0
  809. package/dist/reportAttachments.d.ts.map +1 -0
  810. package/dist/reportAttachments.js +11 -0
  811. package/dist/reportAttachments.js.map +1 -0
  812. package/dist/reportFileDirectory.d.ts +10 -0
  813. package/dist/reportFileDirectory.d.ts.map +1 -0
  814. package/dist/reportFileDirectory.js +16 -0
  815. package/dist/reportFileDirectory.js.map +1 -0
  816. package/dist/reportFileFailure.d.ts +15 -0
  817. package/dist/reportFileFailure.d.ts.map +1 -0
  818. package/dist/reportFileFailure.js +23 -0
  819. package/dist/reportFileFailure.js.map +1 -0
  820. package/dist/reportLimits.d.ts +9 -0
  821. package/dist/reportLimits.d.ts.map +1 -0
  822. package/dist/reportLimits.js +17 -0
  823. package/dist/reportLimits.js.map +1 -0
  824. package/dist/scheduling/areas.d.ts +1447 -0
  825. package/dist/scheduling/areas.d.ts.map +1 -0
  826. package/dist/scheduling/areas.js +59 -0
  827. package/dist/scheduling/areas.js.map +1 -0
  828. package/dist/session/schema.d.ts +84 -0
  829. package/dist/session/schema.d.ts.map +1 -0
  830. package/dist/session/schema.js +55 -0
  831. package/dist/session/schema.js.map +1 -0
  832. package/dist/session/service.d.ts +105 -0
  833. package/dist/session/service.d.ts.map +1 -0
  834. package/dist/session/service.js +61 -0
  835. package/dist/session/service.js.map +1 -0
  836. package/dist/session/transientFailure.d.ts +5 -0
  837. package/dist/session/transientFailure.d.ts.map +1 -0
  838. package/dist/session/transientFailure.js +22 -0
  839. package/dist/session/transientFailure.js.map +1 -0
  840. package/dist/session/validateReceipt.d.ts +4 -0
  841. package/dist/session/validateReceipt.d.ts.map +1 -0
  842. package/dist/session/validateReceipt.js +8 -0
  843. package/dist/session/validateReceipt.js.map +1 -0
  844. package/dist/storage/FleetStoreOptions.d.ts +13 -0
  845. package/dist/storage/FleetStoreOptions.d.ts.map +1 -0
  846. package/dist/storage/FleetStoreOptions.js +2 -0
  847. package/dist/storage/FleetStoreOptions.js.map +1 -0
  848. package/dist/storage/admission.d.ts +18 -0
  849. package/dist/storage/admission.d.ts.map +1 -0
  850. package/dist/storage/admission.js +39 -0
  851. package/dist/storage/admission.js.map +1 -0
  852. package/dist/storage/admissionReads.d.ts +7 -0
  853. package/dist/storage/admissionReads.d.ts.map +1 -0
  854. package/dist/storage/admissionReads.js +12 -0
  855. package/dist/storage/admissionReads.js.map +1 -0
  856. package/dist/storage/backfillDecisionCodes.d.ts +4 -0
  857. package/dist/storage/backfillDecisionCodes.d.ts.map +1 -0
  858. package/dist/storage/backfillDecisionCodes.js +81 -0
  859. package/dist/storage/backfillDecisionCodes.js.map +1 -0
  860. package/dist/storage/errors.d.ts +31 -0
  861. package/dist/storage/errors.d.ts.map +1 -0
  862. package/dist/storage/errors.js +22 -0
  863. package/dist/storage/errors.js.map +1 -0
  864. package/dist/storage/fleetMigrations.d.ts +43 -0
  865. package/dist/storage/fleetMigrations.d.ts.map +1 -0
  866. package/dist/storage/fleetMigrations.js +58 -0
  867. package/dist/storage/fleetMigrations.js.map +1 -0
  868. package/dist/storage/makeFleetTransaction.d.ts +6 -0
  869. package/dist/storage/makeFleetTransaction.d.ts.map +1 -0
  870. package/dist/storage/makeFleetTransaction.js +12 -0
  871. package/dist/storage/makeFleetTransaction.js.map +1 -0
  872. package/dist/storage/makePostgresFleetStore.d.ts +46 -0
  873. package/dist/storage/makePostgresFleetStore.d.ts.map +1 -0
  874. package/dist/storage/makePostgresFleetStore.js +109 -0
  875. package/dist/storage/makePostgresFleetStore.js.map +1 -0
  876. package/dist/storage/migrateFleet.d.ts +3 -0
  877. package/dist/storage/migrateFleet.d.ts.map +1 -0
  878. package/dist/storage/migrateFleet.js +11 -0
  879. package/dist/storage/migrateFleet.js.map +1 -0
  880. package/dist/storage/model.d.ts +197 -0
  881. package/dist/storage/model.d.ts.map +1 -0
  882. package/dist/storage/model.js +91 -0
  883. package/dist/storage/model.js.map +1 -0
  884. package/dist/storage/modelTables.d.ts +37 -0
  885. package/dist/storage/modelTables.d.ts.map +1 -0
  886. package/dist/storage/modelTables.js +54 -0
  887. package/dist/storage/modelTables.js.map +1 -0
  888. package/dist/storage/nextAdmissionOrder.d.ts +4 -0
  889. package/dist/storage/nextAdmissionOrder.d.ts.map +1 -0
  890. package/dist/storage/nextAdmissionOrder.js +7 -0
  891. package/dist/storage/nextAdmissionOrder.js.map +1 -0
  892. package/dist/storage/operationEntries.d.ts +6 -0
  893. package/dist/storage/operationEntries.d.ts.map +1 -0
  894. package/dist/storage/operationEntries.js +17 -0
  895. package/dist/storage/operationEntries.js.map +1 -0
  896. package/dist/storage/pruneEmptyCycles.d.ts +4 -0
  897. package/dist/storage/pruneEmptyCycles.d.ts.map +1 -0
  898. package/dist/storage/pruneEmptyCycles.js +20 -0
  899. package/dist/storage/pruneEmptyCycles.js.map +1 -0
  900. package/dist/storage/recordTimes.d.ts +23 -0
  901. package/dist/storage/recordTimes.d.ts.map +1 -0
  902. package/dist/storage/recordTimes.js +24 -0
  903. package/dist/storage/recordTimes.js.map +1 -0
  904. package/dist/storage/recordValue.d.ts +7 -0
  905. package/dist/storage/recordValue.d.ts.map +1 -0
  906. package/dist/storage/recordValue.js +39 -0
  907. package/dist/storage/recordValue.js.map +1 -0
  908. package/package.json +78 -3
  909. package/src/DecisionCode.ts +50 -0
  910. package/src/admit.ts +39 -0
  911. package/src/attention.ts +24 -0
  912. package/src/board/acknowledgeDecision.ts +51 -0
  913. package/src/board/briefRevision.ts +17 -0
  914. package/src/board/completionFields.ts +65 -0
  915. package/src/board/completionMarkdown.ts +24 -0
  916. package/src/board/decisionAnswer.ts +12 -0
  917. package/src/board/decisionReading.ts +54 -0
  918. package/src/board/documents.ts +89 -0
  919. package/src/board/fleetField.ts +35 -0
  920. package/src/board/markdown.ts +103 -0
  921. package/src/board/publish.ts +99 -0
  922. package/src/board/publishReport.ts +43 -0
  923. package/src/board/readDocument.ts +33 -0
  924. package/src/board/readPass.ts +115 -0
  925. package/src/board/reportContent.ts +18 -0
  926. package/src/board/reportFiles.ts +93 -0
  927. package/src/board/reportIdentity.ts +10 -0
  928. package/src/board/reportLinks.ts +24 -0
  929. package/src/board/reportPayload.ts +73 -0
  930. package/src/board/reportPayloadFile.ts +93 -0
  931. package/src/board/schema.ts +48 -0
  932. package/src/board/statusMarkdown.ts +40 -0
  933. package/src/board/workRevision.ts +9 -0
  934. package/src/board/writeCompletion.ts +69 -0
  935. package/src/board/writeHealth.ts +30 -0
  936. package/src/board/writePublished.ts +72 -0
  937. package/src/board/writeStatus.ts +11 -0
  938. package/src/cli.ts +97 -0
  939. package/src/completion.ts +27 -0
  940. package/src/engine/ReportInspection.ts +10 -0
  941. package/src/engine/applyResolution.ts +117 -0
  942. package/src/engine/approveBrief.ts +97 -0
  943. package/src/engine/authorizeResolution.ts +23 -0
  944. package/src/engine/boardBrief.ts +84 -0
  945. package/src/engine/capacityRetry.ts +72 -0
  946. package/src/engine/closeDecisions.ts +92 -0
  947. package/src/engine/completeBoardWork.ts +33 -0
  948. package/src/engine/completeReport.ts +24 -0
  949. package/src/engine/continueCommand.ts +30 -0
  950. package/src/engine/continueWorker.ts +25 -0
  951. package/src/engine/continuedRecord.ts +24 -0
  952. package/src/engine/deliverPendingAnswers.ts +30 -0
  953. package/src/engine/deliveryFailure.ts +13 -0
  954. package/src/engine/dispatchCommand.ts +88 -0
  955. package/src/engine/ensureDecisionOwner.ts +16 -0
  956. package/src/engine/ensurePublication.ts +32 -0
  957. package/src/engine/exhaustedCheckRepairs.ts +11 -0
  958. package/src/engine/failureCode.ts +30 -0
  959. package/src/engine/failureContext.ts +22 -0
  960. package/src/engine/failureMessage.ts +19 -0
  961. package/src/engine/failureOwner.ts +10 -0
  962. package/src/engine/health.ts +31 -0
  963. package/src/engine/inspectRenewal.ts +64 -0
  964. package/src/engine/launchInput.ts +30 -0
  965. package/src/engine/launchObservationRetries.ts +5 -0
  966. package/src/engine/launchReceipt.ts +14 -0
  967. package/src/engine/launchRecord.ts +10 -0
  968. package/src/engine/localOnlyCriteria.ts +14 -0
  969. package/src/engine/makeAdopt.ts +57 -0
  970. package/src/engine/makeAdvance.ts +84 -0
  971. package/src/engine/makeDeliver.ts +114 -0
  972. package/src/engine/makeHuman.ts +46 -0
  973. package/src/engine/makeLaunch.ts +111 -0
  974. package/src/engine/makeObserve.ts +113 -0
  975. package/src/engine/makeReview.ts +104 -0
  976. package/src/engine/makeState.ts +89 -0
  977. package/src/engine/makeValidate.ts +43 -0
  978. package/src/engine/mergeReadiness.ts +44 -0
  979. package/src/engine/observeDeliveryFailure.ts +67 -0
  980. package/src/engine/observeRenewal.ts +36 -0
  981. package/src/engine/observedAttempt.ts +17 -0
  982. package/src/engine/obtainReview.ts +148 -0
  983. package/src/engine/operationRecord.ts +22 -0
  984. package/src/engine/originalWork.ts +16 -0
  985. package/src/engine/pendingAcknowledgements.ts +52 -0
  986. package/src/engine/persistTerminalReceipts.ts +16 -0
  987. package/src/engine/prepareCommand.ts +80 -0
  988. package/src/engine/queueAnswerCommand.ts +16 -0
  989. package/src/engine/readOrContinueReview.ts +77 -0
  990. package/src/engine/readResolution.ts +53 -0
  991. package/src/engine/readRetry.ts +104 -0
  992. package/src/engine/reassignCommand.ts +45 -0
  993. package/src/engine/reconcileAttempt.ts +29 -0
  994. package/src/engine/reconcileCommand.ts +74 -0
  995. package/src/engine/recoverStall.ts +83 -0
  996. package/src/engine/recoverUnobservable.ts +39 -0
  997. package/src/engine/refreshBrief.ts +59 -0
  998. package/src/engine/refreshReviewResult.ts +85 -0
  999. package/src/engine/releaseClosedPreparation.ts +31 -0
  1000. package/src/engine/releaseExecution.ts +66 -0
  1001. package/src/engine/releaseFinishedWork.ts +31 -0
  1002. package/src/engine/releaseOnly.ts +24 -0
  1003. package/src/engine/releaseReceipts.ts +25 -0
  1004. package/src/engine/repository.ts +143 -0
  1005. package/src/engine/requestConflictRepair.ts +40 -0
  1006. package/src/engine/requestRework.ts +45 -0
  1007. package/src/engine/reserveRenewal.ts +19 -0
  1008. package/src/engine/resolveCommand.ts +42 -0
  1009. package/src/engine/resolveExecution.ts +42 -0
  1010. package/src/engine/restartableReview.ts +17 -0
  1011. package/src/engine/resumeAttempt.ts +29 -0
  1012. package/src/engine/retireUnacknowledged.ts +19 -0
  1013. package/src/engine/retryPrompt.ts +14 -0
  1014. package/src/engine/retryTerminal.ts +22 -0
  1015. package/src/engine/scheduler.ts +87 -0
  1016. package/src/engine/sessionCleanup.ts +51 -0
  1017. package/src/engine/sessionStatus.ts +14 -0
  1018. package/src/engine/settleMergedDelivery.ts +31 -0
  1019. package/src/engine/submissionFailure.ts +47 -0
  1020. package/src/engine/submitLaunch.ts +43 -0
  1021. package/src/engine/threadNames.ts +56 -0
  1022. package/src/engine/views.ts +42 -0
  1023. package/src/engine/workerReport.ts +54 -0
  1024. package/src/errors.ts +7 -0
  1025. package/src/exposeFailure.ts +30 -0
  1026. package/src/fleet.ts +50 -0
  1027. package/src/fleetRecords.ts +4 -0
  1028. package/src/host/actionCommands.ts +77 -0
  1029. package/src/host/admission.ts +130 -0
  1030. package/src/host/answerText.ts +11 -0
  1031. package/src/host/answerWork.ts +104 -0
  1032. package/src/host/applyReportPatch.ts +111 -0
  1033. package/src/host/cliOptions.ts +15 -0
  1034. package/src/host/commands.ts +63 -0
  1035. package/src/host/config.ts +111 -0
  1036. package/src/host/continuationMessage.ts +19 -0
  1037. package/src/host/daemon.ts +45 -0
  1038. package/src/host/daemonClient.ts +36 -0
  1039. package/src/host/daemonContract.ts +64 -0
  1040. package/src/host/daemonDiagnostics.ts +20 -0
  1041. package/src/host/daemonHandlers.ts +33 -0
  1042. package/src/host/daemonSnapshots.ts +24 -0
  1043. package/src/host/defaults.ts +4 -0
  1044. package/src/host/fleetItems.ts +33 -0
  1045. package/src/host/follow.ts +44 -0
  1046. package/src/host/followCommands.ts +54 -0
  1047. package/src/host/followState.ts +41 -0
  1048. package/src/host/github.ts +32 -0
  1049. package/src/host/githubCheckState.ts +95 -0
  1050. package/src/host/githubChecks.ts +53 -0
  1051. package/src/host/githubDelivery.ts +65 -0
  1052. package/src/host/githubRead.ts +20 -0
  1053. package/src/host/githubRequiredChecks.ts +19 -0
  1054. package/src/host/githubResult.ts +76 -0
  1055. package/src/host/guidance.ts +28 -0
  1056. package/src/host/healthLayer.ts +19 -0
  1057. package/src/host/localOnlyBoardPath.ts +23 -0
  1058. package/src/host/mainSource.ts +97 -0
  1059. package/src/host/nameThreads.ts +61 -0
  1060. package/src/host/providerHealth.ts +57 -0
  1061. package/src/host/providers.ts +34 -0
  1062. package/src/host/quota.ts +46 -0
  1063. package/src/host/readCommand.ts +25 -0
  1064. package/src/host/readWaitStates.ts +39 -0
  1065. package/src/host/reassignWork.ts +17 -0
  1066. package/src/host/recordDecisionResponse.ts +44 -0
  1067. package/src/host/recordPayloads.ts +16 -0
  1068. package/src/host/releaseWork.ts +56 -0
  1069. package/src/host/renderStatus.ts +33 -0
  1070. package/src/host/reportAttachmentFiles.ts +91 -0
  1071. package/src/host/reportBoard.ts +143 -0
  1072. package/src/host/reportFileChanges.ts +32 -0
  1073. package/src/host/reportFileReplay.ts +118 -0
  1074. package/src/host/reportPublication.ts +36 -0
  1075. package/src/host/resultReport.ts +32 -0
  1076. package/src/host/runtime.ts +129 -0
  1077. package/src/host/snapshotStream.ts +21 -0
  1078. package/src/host/status.ts +16 -0
  1079. package/src/host/statusLayer.ts +101 -0
  1080. package/src/host/wait.ts +38 -0
  1081. package/src/host/waitOutcome.ts +47 -0
  1082. package/src/host/watch.ts +68 -0
  1083. package/src/model.ts +123 -0
  1084. package/src/operations.ts +76 -0
  1085. package/src/packageInfo.ts +3 -0
  1086. package/src/policy.ts +131 -0
  1087. package/src/policyGuidance.ts +6 -0
  1088. package/src/preparation/compatibility.ts +49 -0
  1089. package/src/preparation/schema.ts +55 -0
  1090. package/src/prompt/reviewer.ts +64 -0
  1091. package/src/prompt/worker.ts +132 -0
  1092. package/src/providers/capacity.ts +8 -0
  1093. package/src/providers/codexAdapter.ts +73 -0
  1094. package/src/providers/codexCloud.ts +112 -0
  1095. package/src/providers/codexCloudConnection.ts +49 -0
  1096. package/src/providers/codexLocal.ts +67 -0
  1097. package/src/providers/codexLogin.ts +87 -0
  1098. package/src/providers/codexProtocol.ts +33 -0
  1099. package/src/providers/codexReportAttachments.ts +23 -0
  1100. package/src/providers/codexRpc.ts +140 -0
  1101. package/src/providers/codexSettings.ts +31 -0
  1102. package/src/providers/codexTurns.ts +133 -0
  1103. package/src/providers/genericRejection.ts +12 -0
  1104. package/src/providers/makeWaitUntilIdle.ts +30 -0
  1105. package/src/providers/observeCodexTurn.ts +40 -0
  1106. package/src/providers/readActiveTurn.ts +26 -0
  1107. package/src/providers/recoverTurn.ts +69 -0
  1108. package/src/providers/startCodexTurn.ts +78 -0
  1109. package/src/qualifyDependencies.ts +54 -0
  1110. package/src/reportAttachments.ts +26 -0
  1111. package/src/reportFileDirectory.ts +33 -0
  1112. package/src/reportFileFailure.ts +27 -0
  1113. package/src/reportLimits.ts +19 -0
  1114. package/src/scheduling/areas.ts +81 -0
  1115. package/src/session/schema.ts +66 -0
  1116. package/src/session/service.ts +103 -0
  1117. package/src/session/transientFailure.ts +32 -0
  1118. package/src/session/validateReceipt.ts +9 -0
  1119. package/src/storage/FleetStoreOptions.ts +13 -0
  1120. package/src/storage/admission.ts +82 -0
  1121. package/src/storage/admissionReads.ts +16 -0
  1122. package/src/storage/backfillDecisionCodes.ts +89 -0
  1123. package/src/storage/errors.ts +23 -0
  1124. package/src/storage/fleetMigrations.ts +60 -0
  1125. package/src/storage/makeFleetTransaction.ts +16 -0
  1126. package/src/storage/makePostgresFleetStore.ts +147 -0
  1127. package/src/storage/migrateFleet.ts +11 -0
  1128. package/src/storage/model.ts +115 -0
  1129. package/src/storage/modelTables.ts +57 -0
  1130. package/src/storage/nextAdmissionOrder.ts +8 -0
  1131. package/src/storage/operationEntries.ts +24 -0
  1132. package/src/storage/pruneEmptyCycles.ts +20 -0
  1133. package/src/storage/recordTimes.ts +28 -0
  1134. package/src/storage/recordValue.ts +42 -0
package/src/policy.ts ADDED
@@ -0,0 +1,131 @@
1
+ import { Context, type Effect, Schema } from "effect";
2
+ import { AttentionOwner } from "#attention.ts";
3
+ import {
4
+ type BoardAcknowledgementStale,
5
+ BoardDecision,
6
+ type BoardDecisionAcknowledgement,
7
+ type BoardDecisionReading,
8
+ type BoardReport,
9
+ } from "#board/schema.ts";
10
+ import { DecisionCode } from "#DecisionCode.ts";
11
+ import type { FleetError } from "#errors.ts";
12
+ import type { MainObservation, Preparation } from "#preparation/schema.ts";
13
+ import type { SessionObservation } from "#session/schema.ts";
14
+ import { type LaunchSettings, SessionReceipt } from "#session/schema.ts";
15
+
16
+ export const BoardWork = Schema.Struct({
17
+ approved: Schema.Boolean,
18
+ areas: Schema.optional(Schema.Array(Schema.String)),
19
+ context: Schema.String,
20
+ deliverable: Schema.optional(Schema.Literal("report")),
21
+ dependsOn: Schema.Array(Schema.String),
22
+ revision: Schema.String,
23
+ sourcePath: Schema.String,
24
+ status: Schema.optional(Schema.String),
25
+ workId: Schema.String,
26
+ });
27
+ export type BoardWork = typeof BoardWork.Type;
28
+ export const Decision = Schema.Struct({
29
+ attentionOwner: Schema.optional(AttentionOwner),
30
+ boardAcknowledgementDisposition: Schema.optional(Schema.Literal("superseded")),
31
+ code: Schema.optional(DecisionCode),
32
+ id: Schema.String,
33
+ links: Schema.Array(Schema.String),
34
+ publicationWork: Schema.optional(BoardWork),
35
+ published: Schema.optional(BoardDecision),
36
+ reason: Schema.String,
37
+ recommendation: Schema.String,
38
+ worker: Schema.optional(SessionReceipt),
39
+ });
40
+ export type Decision = typeof Decision.Type;
41
+ export const SupersededDecision = Schema.Struct({
42
+ boardAcknowledged: Schema.optional(Schema.Boolean),
43
+ boardAcknowledgementDisposition: Schema.optional(Schema.Literal("superseded")),
44
+ published: BoardDecision,
45
+ reassignedTo: Schema.optional(Schema.Struct({ attentionOwner: AttentionOwner, decisionId: Schema.String })),
46
+ supersededAt: Schema.Number,
47
+ });
48
+ export const DecisionResponse = Schema.Struct({
49
+ action: Schema.optional(Schema.Literals(["retry", "release", "continue"])),
50
+ boardAcknowledged: Schema.optional(Schema.Boolean),
51
+ boardAcknowledgementDisposition: Schema.optional(Schema.Literal("superseded")),
52
+ decisionId: Schema.String,
53
+ processedAt: Schema.Number,
54
+ published: Schema.optional(BoardDecision),
55
+ questionId: Schema.String,
56
+ questionRevision: Schema.String,
57
+ responseId: Schema.String,
58
+ type: Schema.Literals(["answer", "clarify", "not_now"]),
59
+ });
60
+ export type DecisionResponse = typeof DecisionResponse.Type;
61
+ export class BoardFailure extends Schema.TaggedError<BoardFailure>()("BoardFailure", {
62
+ code: Schema.optional(DecisionCode),
63
+ message: Schema.String,
64
+ }) {}
65
+ export class BoardGateway extends Context.Service<
66
+ BoardGateway,
67
+ {
68
+ readonly acknowledgeDecision: (input: BoardDecisionAcknowledgement) => Effect.Effect<void, BoardFailure | BoardAcknowledgementStale>;
69
+ readonly complete?: (workId: string, sourcePath: string, nextAction: string) => Effect.Effect<void, BoardFailure>;
70
+ readonly get: (workId: string, options?: { readonly fresh?: boolean }) => Effect.Effect<BoardWork, BoardFailure>;
71
+ readonly decision: (workId: string, decision: Decision, original?: BoardWork) => Effect.Effect<BoardDecision, BoardFailure>;
72
+ readonly readDecision: (decision: BoardDecision) => Effect.Effect<BoardDecisionReading, BoardFailure>;
73
+ readonly report: (work: BoardWork, observation: SessionObservation) => Effect.Effect<BoardReport, BoardFailure>;
74
+ }
75
+ >()("@shivaedev/work-fleet/BoardGateway") {}
76
+ export const ChangeResult = Schema.Struct({
77
+ head: Schema.String,
78
+ kind: Schema.Literal("change"),
79
+ paths: Schema.Array(Schema.String),
80
+ pr: Schema.String,
81
+ prNumber: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))),
82
+ });
83
+ export const NoChangeResult = Schema.Struct({ evidence: Schema.Array(Schema.String), head: Schema.String, kind: Schema.Literal("no-change") });
84
+ export const WorkResult = Schema.Union([ChangeResult, NoChangeResult]);
85
+ export type WorkResult = typeof WorkResult.Type;
86
+ export const Review = Schema.Struct({
87
+ evidence: Schema.Array(Schema.String),
88
+ findings: Schema.optional(Schema.Array(Schema.String)),
89
+ head: Schema.String,
90
+ receipt: SessionReceipt,
91
+ repairPrompt: Schema.String,
92
+ verdict: Schema.Literals(["approved", "changes"]),
93
+ });
94
+ export type Review = typeof Review.Type;
95
+ export const Checks = Schema.Struct({
96
+ evidence: Schema.Array(Schema.String),
97
+ failedChecks: Schema.optional(Schema.Array(Schema.String)),
98
+ head: Schema.String,
99
+ passed: Schema.Boolean,
100
+ pending: Schema.optional(Schema.Boolean),
101
+ repairPrompt: Schema.optional(Schema.String),
102
+ });
103
+ export type Checks = typeof Checks.Type;
104
+ export const Delivery = Schema.Struct({ head: Schema.String, revision: Schema.String, url: Schema.String });
105
+ export type Delivery = typeof Delivery.Type;
106
+ export interface FleetConfiguration {
107
+ readonly areaMergeWaitMs?: number;
108
+ readonly deliveryBacklog?: number;
109
+ readonly executionConcurrency?: number;
110
+ readonly launch?: LaunchSettings;
111
+ readonly localOnlyBoardPath?: string;
112
+ readonly now: () => number;
113
+ readonly operationId: () => string;
114
+ readonly quota: { readonly available?: number; readonly observedAt: number; readonly expiresAt: number };
115
+ readonly readGuidance?: (role: "worker" | "reviewer") => Effect.Effect<string | undefined, FleetError>;
116
+ readonly refreshQuota?: () => Effect.Effect<FleetConfiguration["quota"], FleetError>;
117
+ readonly reviewerGuidance?: string;
118
+ readonly sharedEnvironment?: string;
119
+ readonly stallMinutes?: number;
120
+ readonly workerGuidance?: string;
121
+ }
122
+ export class FleetPolicy extends Context.Service<FleetPolicy, FleetConfiguration>()("@shivaedev/work-fleet/FleetPolicy") {}
123
+ export class FleetIntegrations extends Context.Service<
124
+ FleetIntegrations,
125
+ {
126
+ readonly main: (preparation: Preparation) => Effect.Effect<MainObservation, FleetError>;
127
+ readonly result: (work: BoardWork, observation: SessionObservation) => Effect.Effect<WorkResult, FleetError>;
128
+ readonly checks: (work: BoardWork, result: WorkResult) => Effect.Effect<Checks, FleetError>;
129
+ readonly delivery: (result: typeof ChangeResult.Type) => Effect.Effect<Delivery | undefined, FleetError>;
130
+ }
131
+ >()("@shivaedev/work-fleet/FleetIntegrations") {}
@@ -0,0 +1,6 @@
1
+ import { Effect } from "effect";
2
+ import type { FleetConfiguration } from "#policy.ts";
3
+
4
+ export function policyGuidance(policy: FleetConfiguration, role: "worker" | "reviewer") {
5
+ return policy.readGuidance?.(role) ?? Effect.succeed(role === "worker" ? policy.workerGuidance : policy.reviewerGuidance);
6
+ }
@@ -0,0 +1,49 @@
1
+ import { Effect } from "effect";
2
+ import type { MainObservation, Preparation, PreparationAssessment } from "#preparation/schema.ts";
3
+
4
+ export function pathsOverlap(left: string, right: string): boolean {
5
+ return left === "." || right === "." || left === right || left.startsWith(`${right}/`) || right.startsWith(`${left}/`);
6
+ }
7
+
8
+ function keyOverlaps(left: string, right: string): boolean {
9
+ return left === right || left.startsWith(`${right}.`) || right.startsWith(`${left}.`);
10
+ }
11
+
12
+ function relevantPath(preparation: Preparation, observation: MainObservation, path: string): boolean {
13
+ if (preparation.ownedPaths.some((owned) => pathsOverlap(owned, path))) {
14
+ return true;
15
+ }
16
+ const coverage = preparation.configuration.find((entry) => entry.path === path);
17
+ if (coverage !== undefined) {
18
+ const changes = observation.configurationChanges.filter((entry) => entry.path === path);
19
+ if (changes.length !== 1 || changes[0]?.complete !== true) {
20
+ return true;
21
+ }
22
+ return changes[0].keys.some((changed) => coverage.relevantKeys.some((key) => keyOverlaps(key, changed)));
23
+ }
24
+ return [preparation.sourcePaths, preparation.setupPaths, preparation.dependencyPaths, preparation.qualityPaths, preparation.baselinePaths].some(
25
+ (paths) => paths.some((context) => pathsOverlap(context, path)),
26
+ );
27
+ }
28
+
29
+ export const assessPreparation = Effect.fn("Preparation.assessPreparation")(
30
+ (preparation: Preparation, observation: MainObservation): Effect.Effect<PreparationAssessment> => {
31
+ if (observation.fromRevision !== preparation.baseRevision || !observation.complete || observation.observedAt < preparation.observedAt) {
32
+ return Effect.succeed({ _tag: "Reprepare", code: "incomplete-observation", paths: observation.changedPaths, reason: "incomplete-observation" });
33
+ }
34
+ if (!observation.ancestor) {
35
+ return Effect.succeed({ _tag: "Reprepare", code: "not-ancestor", paths: observation.changedPaths, reason: "not-ancestor" });
36
+ }
37
+ if (observation.revision !== preparation.baseRevision && !preparation.contextComplete) {
38
+ return Effect.succeed({ _tag: "Reprepare", code: "incomplete-context", paths: observation.changedPaths, reason: "incomplete-context" });
39
+ }
40
+ const paths = observation.changedPaths.filter((path) => relevantPath(preparation, observation, path));
41
+ if (paths.length > 0) {
42
+ return Effect.succeed({ _tag: "Reprepare", code: "relevant-change", paths, reason: "relevant-change" });
43
+ }
44
+ return Effect.succeed({
45
+ _tag: "Compatible",
46
+ preparation: { ...preparation, baseRevision: observation.revision, observedAt: observation.observedAt },
47
+ });
48
+ },
49
+ );
@@ -0,0 +1,55 @@
1
+ import { Schema } from "effect";
2
+ import { DecisionCode } from "#DecisionCode.ts";
3
+
4
+ const Text = Schema.String.check(Schema.isMinLength(1));
5
+ export const RepositoryPath = Text.check(
6
+ Schema.makeFilter(
7
+ (value) =>
8
+ value === "."
9
+ || (!(value.startsWith("/") || value.includes("\\"))
10
+ && value.split("/").every((segment) => segment !== "" && segment !== "." && segment !== ".."))
11
+ || "Expected a normalized repository-relative path",
12
+ ),
13
+ );
14
+
15
+ export const ValidationEvidence = Schema.Struct({ command: Text, revision: Text });
16
+ export const ConfigurationCoverage = Schema.Struct({ path: RepositoryPath, relevantKeys: Schema.Array(Text) });
17
+ export const Preparation = Schema.Struct({
18
+ baselinePaths: Schema.Array(RepositoryPath),
19
+ baseRevision: Text,
20
+ configuration: Schema.Array(ConfigurationCoverage),
21
+ contextComplete: Schema.Boolean,
22
+ dependencyPaths: Schema.Array(RepositoryPath),
23
+ observedAt: Schema.Number,
24
+ ownedPaths: Schema.Array(RepositoryPath).check(Schema.isMinLength(1)),
25
+ qualityPaths: Schema.Array(RepositoryPath),
26
+ setupPaths: Schema.Array(RepositoryPath),
27
+ sourcePaths: Schema.Array(RepositoryPath),
28
+ validation: Schema.Array(ValidationEvidence),
29
+ });
30
+ export type Preparation = typeof Preparation.Type;
31
+
32
+ export const ConfigurationChange = Schema.Struct({ complete: Schema.Boolean, keys: Schema.Array(Text), path: RepositoryPath });
33
+ export const MainObservation = Schema.Struct({
34
+ ancestor: Schema.Boolean,
35
+ changedPaths: Schema.Array(RepositoryPath),
36
+ complete: Schema.Boolean,
37
+ configurationChanges: Schema.Array(ConfigurationChange),
38
+ fromRevision: Text,
39
+ observedAt: Schema.Number,
40
+ revision: Text,
41
+ });
42
+ export type MainObservation = typeof MainObservation.Type;
43
+
44
+ const ReprepareCode = DecisionCode.pick(["not-ancestor", "incomplete-observation", "incomplete-context", "relevant-change"]);
45
+
46
+ export const PreparationAssessment = Schema.Union([
47
+ Schema.Struct({ _tag: Schema.Literal("Compatible"), preparation: Preparation }),
48
+ Schema.Struct({
49
+ _tag: Schema.Literal("Reprepare"),
50
+ code: Schema.optional(ReprepareCode),
51
+ paths: Schema.Array(RepositoryPath),
52
+ reason: ReprepareCode,
53
+ }),
54
+ ]);
55
+ export type PreparationAssessment = typeof PreparationAssessment.Type;
@@ -0,0 +1,64 @@
1
+ import { Effect, Schema } from "effect";
2
+ import { BadRequest } from "@shivaedev/platform/errors/taxonomy.ts";
3
+ import type { FleetError } from "#errors.ts";
4
+ import type { Review, WorkResult } from "#policy.ts";
5
+ import { cloudStartup } from "#prompt/worker.ts";
6
+ import type { SessionReceipt } from "#session/schema.ts";
7
+
8
+ export const REVIEW_MARKER = "FLEET_REVIEW:";
9
+ const Text = Schema.String.check(Schema.isPattern(/\S/u));
10
+ export const ReviewerVerdict = Schema.Struct({
11
+ evidence: Schema.Array(Text).check(Schema.isMinLength(1)),
12
+ findings: Schema.Array(Text),
13
+ head: Text,
14
+ verdict: Schema.Literals(["approve", "changes"]),
15
+ });
16
+
17
+ export function reviewerPrompt(input: {
18
+ readonly task: string;
19
+ readonly result: WorkResult;
20
+ readonly reviewerGuidance?: string;
21
+ readonly sharedEnvironment?: string;
22
+ }) {
23
+ return [
24
+ "Independently review this task against its acceptance criteria.",
25
+ ...(input.sharedEnvironment === undefined ? [] : ["", cloudStartup({ sharedEnvironment: input.sharedEnvironment }, "read-only")]),
26
+ "",
27
+ "Task and criteria:",
28
+ "---",
29
+ input.task.trim(),
30
+ "---",
31
+ "",
32
+ `Review target: ${JSON.stringify(input.result)}`,
33
+ "",
34
+ "Read root and package AGENTS.md. Inspect only the exact target head, using existing repository objects or read-only repository tools. The checkout may be a different revision; never review that revision in its place.",
35
+ "You have no worker conversation. Judge the implementation and acceptance evidence independently.",
36
+ "This session is read-only. Do not edit, commit, push, merge, publish comments or reviews, or launch workers. Do not request escalation. Shell network access is enabled for read-only inspection. Use `gh pr view`, `gh pr diff` and `gh api --method GET` to read the PR and exact-head CI results; verify the PR head before using its diff. Network writes are prohibited.",
37
+ "When you can inspect the diff at the exact target head and its check results, always end with a verdict: approve or request changes in the format below. Never approve from the task text or a worker's claims alone.",
38
+ "Passing required checks at that exact head are the CI evidence. Unavailable CI job logs or artifacts (including HTTP 403 from the Cloud GitHub token) alone must not withhold a verdict. Include the passing checks and the access limitation in your evidence list, then decide from the diff and available evidence.",
39
+ "`main` is protected by a merge queue that re-runs CI against the latest main before merging. A branch behind main without conflicts is not a reason to request changes, repeat review or re-run validation; judge the exact target head and its checks. Workers merge main only when GitHub reports a conflict or the change needs something that landed there.",
40
+ ...(input.reviewerGuidance === undefined ? [] : ["Repository reviewer guidance:", input.reviewerGuidance]),
41
+ "If the exact head, diff or check results cannot be inspected, report that limitation. Request changes for concrete implementation or validation gaps; unavailable job logs or artifacts alone are not such a gap.",
42
+ "End with exactly one machine-readable line, with no Markdown fencing:",
43
+ `${REVIEW_MARKER} ${JSON.stringify({ evidence: ["Evidence you inspected"], findings: [], head: input.result.head, verdict: "approve" })}`,
44
+ 'Use verdict "changes" with nonempty findings that give concrete repair guidance. Use "approve" only with no findings. Evidence must be nonempty for either verdict.',
45
+ ].join("\n");
46
+ }
47
+
48
+ export const readReviewerVerdict = Effect.fn("Fleet.readReviewerVerdict")(function* (
49
+ output: string,
50
+ receipt: SessionReceipt,
51
+ ): Effect.fn.Return<Review, FleetError> {
52
+ const lines = output.split("\n").filter((entry) => entry.trim().startsWith(REVIEW_MARKER));
53
+ const line = lines.length === 1 ? lines[0] : undefined;
54
+ if (line === undefined || output.trim().split("\n").at(-1)?.trim() !== line.trim()) {
55
+ return yield* new BadRequest({ message: "Reviewer must end with one machine-readable verdict" });
56
+ }
57
+ const verdict = yield* Schema.decodeUnknownEffect(Schema.fromJsonString(ReviewerVerdict))(line.trim().slice(REVIEW_MARKER.length).trim()).pipe(
58
+ Effect.mapError(() => new BadRequest({ message: "Reviewer verdict is malformed or lacks evidence" })),
59
+ );
60
+ if ((verdict.verdict === "changes") !== verdict.findings.length > 0) {
61
+ return yield* new BadRequest({ message: "Reviewer changes require findings; approval requires no findings" });
62
+ }
63
+ return { ...verdict, receipt, repairPrompt: verdict.findings.join("\n"), verdict: verdict.verdict === "approve" ? "approved" : "changes" };
64
+ });
@@ -0,0 +1,132 @@
1
+ import { REPORT_ATTACHMENT_DIRECTORY, REPORT_ATTACHMENT_MARKER } from "#reportAttachments.ts";
2
+
3
+ export interface CloudStartup {
4
+ readonly sharedEnvironment: string;
5
+ }
6
+ export interface WorkerPrompt extends CloudStartup {
7
+ readonly branch: string;
8
+ readonly deliverable?: "report" | undefined;
9
+ readonly task: string;
10
+ readonly workId: string;
11
+ }
12
+ export const MAINTAINER_QUESTION_MARKER = "FLEET_MAINTAINER_QUESTION:";
13
+ export const QUESTION_MARKER = "FLEET_QUESTION:";
14
+ export const PULL_REQUEST_MARKER = "FLEET_PR:";
15
+ const GUIDANCE_HEADING =
16
+ "Repository worker guidance: maintainer's standing answers to the repository's 'ask the maintainer first' rules; takes precedence for this task";
17
+ const GUIDANCE_END = "End repository worker guidance.";
18
+ const QUESTION_INSTRUCTIONS = [
19
+ "When you need a decision:",
20
+ "- Do not ask about anything covered by Repository worker guidance; follow its standing answers.",
21
+ `- Stop the turn with \`${QUESTION_MARKER} <question>\`, including the context and choices needed to answer. Do not report a PR or no-change outcome while waiting for an answer.`,
22
+ `- Questions go to the orchestrator by default. Only when a decision requires maintainer authority, use \`${MAINTAINER_QUESTION_MARKER} <question>\` instead.`,
23
+ "- Fleet publishes the question on the Board and continues this same thread with the recorded answer. Treat that answer as task input; repository rules and runtime authority still apply.",
24
+ ].join("\n");
25
+ const REPORT_INSTRUCTIONS = [
26
+ "Report deliverable:",
27
+ "- Leave repository sources unchanged. Commit nothing, push nothing, and open no PR. Do not create a branch or launch other workers.",
28
+ `- Write report attachments as new uncommitted files under ${REPORT_ATTACHMENT_DIRECTORY}, using the file-edit/apply_patch tool for every add and update. Fleet reconstructs files from this turn's fileChange items; files created or changed by shell commands are not retrievable. Never publish attachments to git or GitHub.`,
29
+ `- Use UTF-8 text attachments. For binary evidence, write a base64 text file with the file-edit tool and describe its encoding. List every promised attachment in the final report on its own line: ${REPORT_ATTACHMENT_MARKER} <path relative to ${REPORT_ATTACHMENT_DIRECTORY}>. Do not reuse files from earlier turns.`,
30
+ "- Read the root and package AGENTS.md and use read-only research to answer the approved task.",
31
+ "- Return the whole report as your final message, with evidence for each acceptance criterion and any remaining uncertainty.",
32
+ ].join("\n");
33
+
34
+ // Codex Cloud cannot run startup steps; without this block workers spend minutes probing a provisioning sandbox.
35
+ export function cloudStartup({ sharedEnvironment }: CloudStartup, access?: "read-only") {
36
+ return [
37
+ "Cloud startup:",
38
+ "- Your workspace may still be provisioning when this message arrives. If the cloud-environment runtime skill offers wait_for_environment, call it and wait calmly until the environment is ready; this usually takes about 90 seconds. Do not explore the snapshot or retry commands while waiting. Your instructions below stay valid.",
39
+ `- Source ${sharedEnvironment} at the start of EVERY independent shell command when it exists. The pinned Node, pnpm and Bun, the proxy, CA trust, caches and database settings come from it.`,
40
+ ...(access === "read-only"
41
+ ? []
42
+ : [
43
+ "- Request escalation (require_escalated) from the FIRST network-dependent command, such as git fetch or dependency installation, instead of waiting for it to fail.",
44
+ ]),
45
+ ].join("\n");
46
+ }
47
+
48
+ export function workerPrompt(input: WorkerPrompt) {
49
+ if (input.deliverable === "report") {
50
+ return [`Work Board task: ${input.workId}`, "", cloudStartup(input), "", reportPrompt(input.task.trim())].join("\n");
51
+ }
52
+ return [
53
+ `Work Board task: ${input.workId}`,
54
+ "",
55
+ cloudStartup(input),
56
+ `- Fetch origin/main and create ${input.branch} from that exact current revision, not from the environment snapshot. Use the supplied checkout and leave unrelated state alone.`,
57
+ "",
58
+ "Implement this approved Board task:",
59
+ "---",
60
+ input.task.trim(),
61
+ "---",
62
+ "",
63
+ "Evidence rules:",
64
+ "- Read the root and package AGENTS.md before editing, and follow the repository's documentation and pull request skills.",
65
+ "- Run focused tests while working, then `pnpm ready` before handing off. Never bypass or skip hooks, and never raise the quality baseline.",
66
+ "- Open exactly ONE pull request for human review. Do not merge it and do not launch other workers.",
67
+ "- Keep Board IDs, environment IDs, prompts and other private identifiers out of source, docs and pull request metadata.",
68
+ "- After every push, watch your PR's CI until all checks finish. Fix failures on the same branch, push again and repeat.",
69
+ "- `main` is protected by a merge queue that re-runs CI against the latest main before merging. Merge main only when GitHub reports a conflict or your change needs something that landed there. A branch behind main without conflicts does not need a merge, fresh review or revalidation. Never wait for main to stop moving or request a merge freeze.",
70
+ "- If you merge main or otherwise change the head, run `pnpm ready`, push and watch CI again for the new head. Report once all checks are green for your exact head, or when genuinely blocked. If blocked, explain why and identify the failed or pending checks.",
71
+ "",
72
+ QUESTION_INSTRUCTIONS,
73
+ "",
74
+ "Final report:",
75
+ "- The pull request URL, its head SHA and base, the changed paths and the exact commands you ran with their results.",
76
+ "- A short result against each acceptance criterion, separating proven behavior from anything still pending.",
77
+ "- State the CI result for the exact head SHA you report, including any failed or pending checks and why you are blocked. Put the CI result before the final `FLEET_PR:` line.",
78
+ "- Before the final PR line, include one line `FLEET_HEAD: <sha>` with the full 40-character PR head SHA, or the exact checked main SHA when no change was needed.",
79
+ `- End with one line \`${PULL_REQUEST_MARKER} <url>\` naming the pull request, or \`${PULL_REQUEST_MARKER} none\` when no change was needed.`,
80
+ ].join("\n");
81
+ }
82
+
83
+ export function reportPrompt(task: string): string {
84
+ return task.endsWith(REPORT_INSTRUCTIONS) ? task : [task, "", QUESTION_INSTRUCTIONS, "", REPORT_INSTRUCTIONS].join("\n");
85
+ }
86
+
87
+ export function withWorkerGuidance(prompt: string, guidance?: string): string {
88
+ if (guidance === undefined) {
89
+ return prompt;
90
+ }
91
+ const block = [GUIDANCE_HEADING, guidance, GUIDANCE_END].join("\n");
92
+ const task = prompt.replaceAll(new RegExp(`\\n\\n${GUIDANCE_HEADING}\\n[\\s\\S]*?\\nEnd repository worker guidance\\.`, "gu"), "");
93
+ const evidence = task.indexOf("\n\nEvidence rules:");
94
+ const boundary = evidence < 0 ? task.indexOf("\n\nWhen you need a decision:") : evidence;
95
+ return boundary < 0 ? [task, block].join("\n\n") : `${task.slice(0, boundary)}\n\n${block}${task.slice(boundary)}`;
96
+ }
97
+
98
+ export function reportedPullRequest(output: string) {
99
+ const lines = output
100
+ .trim()
101
+ .split(/\r?\n/u)
102
+ .map((line) => line.trim());
103
+ const markers = lines.filter((line) => line.startsWith(PULL_REQUEST_MARKER));
104
+ if (markers.length !== 1 || markers[0] !== lines.at(-1)) {
105
+ return undefined;
106
+ }
107
+ const value = markers[0]
108
+ ?.slice(PULL_REQUEST_MARKER.length)
109
+ .trim()
110
+ .replace(/^`(?<value>[^`]*)`$/u, "$<value>")
111
+ .trim();
112
+ if (value === "none") {
113
+ return { kind: "none" } as const;
114
+ }
115
+ if (value === undefined || /^https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/pull\/[1-9]\d*$/u.exec(value) === null) {
116
+ return undefined;
117
+ }
118
+ return { kind: "url", url: value } as const;
119
+ }
120
+
121
+ export function reportedQuestion(output: string) {
122
+ const lines = output.split("\n");
123
+ const index = lines.findIndex((line) => [QUESTION_MARKER, MAINTAINER_QUESTION_MARKER].some((candidate) => line.trim().startsWith(candidate)));
124
+ if (index < 0) {
125
+ return undefined;
126
+ }
127
+ const first = lines[index]?.trim() ?? "";
128
+ const maintainer = first.startsWith(MAINTAINER_QUESTION_MARKER);
129
+ const marker = maintainer ? MAINTAINER_QUESTION_MARKER : QUESTION_MARKER;
130
+ const question = [first.slice(marker.length).trim(), ...lines.slice(index + 1)].join("\n").trim();
131
+ return question.length === 0 ? undefined : { attentionOwner: maintainer ? ("maintainer" as const) : ("orchestrator" as const), question };
132
+ }
@@ -0,0 +1,8 @@
1
+ import { Schema } from "effect";
2
+ import { ProviderCapacity } from "#session/schema.ts";
3
+
4
+ const ErrorData = Schema.Struct({ data: Schema.Struct({ codexErrorInfo: ProviderCapacity }) });
5
+ export function capacity(error: unknown) {
6
+ const decoded = Schema.decodeUnknownOption(ErrorData)(error);
7
+ return decoded._tag === "Some" ? decoded.value.data.codexErrorInfo : undefined;
8
+ }
@@ -0,0 +1,73 @@
1
+ import { Effect } from "effect";
2
+ import { ThreadResponse } from "#providers/codexProtocol.ts";
3
+ import { decode, failure } from "#providers/codexRpc.ts";
4
+ import { echoedSettings, settingsParams } from "#providers/codexSettings.ts";
5
+ import { type CodexRequest, codexTurns } from "#providers/codexTurns.ts";
6
+ import { observeCodexTurn } from "#providers/observeCodexTurn.ts";
7
+ import { recoverTurn } from "#providers/recoverTurn.ts";
8
+ import { startCodexTurn } from "#providers/startCodexTurn.ts";
9
+ import type { ContinueSession, ReconcileSession, SessionFailure, SessionObservation, SessionReceipt, StartSession } from "#session/schema.ts";
10
+ import type { SessionTransport } from "#session/service.ts";
11
+
12
+ export interface CodexDialect {
13
+ readonly beforeTurn: (input: ContinueSession) => Effect.Effect<Record<string, unknown>, SessionFailure>;
14
+ readonly provisioning: SessionObservation["provisioning"];
15
+ readonly recoveryGraceMs?: number;
16
+ readonly sessionStarted?: (sessionId: string) => void;
17
+ readonly threadStart: (input: StartSession) => Record<string, unknown>;
18
+ }
19
+ export function codexAdapter(rpc: CodexRequest, dialect: CodexDialect): typeof SessionTransport.Service {
20
+ const turns = codexTurns(rpc);
21
+ const { findTurn, operationTurn, waitUntilIdle } = turns;
22
+ const submitTurn = startCodexTurn(rpc, waitUntilIdle);
23
+ const startTurn = Effect.fn("Codex.startTurn")(function* (input: ContinueSession) {
24
+ const extra = yield* dialect.beforeTurn(input);
25
+ const result = yield* submitTurn(input.sessionId, {
26
+ ...extra,
27
+ ...settingsParams(input.settings),
28
+ clientUserMessageId: input.operationId,
29
+ input: [{ text: input.prompt, "text_elements": [], type: "text" }],
30
+ threadId: input.sessionId,
31
+ });
32
+ return { sessionId: input.sessionId, turnId: result.turn.id };
33
+ });
34
+ const recover = recoverTurn(operationTurn, startTurn, dialect.recoveryGraceMs);
35
+ return {
36
+ interrupt: Effect.fn("Codex.interrupt")(function* (receipt: SessionReceipt) {
37
+ yield* rpc("turn/interrupt", { threadId: receipt.sessionId, turnId: receipt.turnId }, true);
38
+ return receipt;
39
+ }),
40
+ observe: observeCodexTurn(turns, dialect.provisioning),
41
+ reconcile: Effect.fn("Codex.reconcile")(function* (input: ReconcileSession) {
42
+ if (input.sessionId === undefined) {
43
+ return yield* Effect.fail(
44
+ failure("ambiguous", "Lost thread acknowledgement cannot be reconciled by this Codex protocol; retain reservation"),
45
+ );
46
+ }
47
+ if (input.turnId !== undefined) {
48
+ yield* findTurn(input.sessionId, input.turnId);
49
+ return { sessionId: input.sessionId, turnId: input.turnId };
50
+ }
51
+ return yield* recover({ ...input, sessionId: input.sessionId });
52
+ }),
53
+ startSession: Effect.fn("Codex.startSession")(function* (input) {
54
+ const result = yield* rpc("thread/start", dialect.threadStart(input), true).pipe(Effect.flatMap((value) => decode(ThreadResponse, value)));
55
+ dialect.sessionStarted?.(result.thread.id);
56
+ yield* echoedSettings(input.settings, result).pipe(
57
+ Effect.mapError((error) => failure("ambiguous", `${error.message}; retain the started session reservation`)),
58
+ );
59
+ return result.thread.id;
60
+ }),
61
+ startTurn,
62
+ steer: (receipt, prompt) =>
63
+ rpc(
64
+ "turn/steer",
65
+ {
66
+ expectedTurnId: receipt.turnId,
67
+ input: [{ text: prompt, "text_elements": [], type: "text" }],
68
+ threadId: receipt.sessionId,
69
+ },
70
+ true,
71
+ ).pipe(Effect.asVoid),
72
+ };
73
+ }
@@ -0,0 +1,112 @@
1
+ import { Context, Effect, FileSystem, Layer, Schema } from "effect";
2
+ import { ChildProcessSpawner } from "effect/process";
3
+ import { defineService } from "@shivaedev/effect-service/define-service.ts";
4
+ import { codexAdapter } from "#providers/codexAdapter.ts";
5
+ import { codexCloudConnection } from "#providers/codexCloudConnection.ts";
6
+ import { decode, failure } from "#providers/codexRpc.ts";
7
+ import type { ContinueSession, StartSession } from "#session/schema.ts";
8
+ import { SessionTransport } from "#session/service.ts";
9
+
10
+ export const CODEX_CLOUD_ENDPOINT = "wss://codex-cloud-backend.chatgpt.com/";
11
+ export const CodexCloudConfiguration = Schema.Struct({
12
+ archiveThreads: Schema.optional(Schema.Boolean),
13
+ authFile: Schema.optional(Schema.String),
14
+ cwd: Schema.String.check(Schema.isNonEmpty()),
15
+ endpoint: Schema.optional(Schema.String),
16
+ environmentId: Schema.String.check(Schema.isNonEmpty()),
17
+ projectId: Schema.optional(Schema.String.check(Schema.isNonEmpty())),
18
+ refreshCommand: Schema.optional(Schema.Struct({ args: Schema.Array(Schema.String), command: Schema.String })),
19
+ requestTimeoutMs: Schema.Finite.check(Schema.isGreaterThan(0)),
20
+ threadNamePrefix: Schema.optional(Schema.String.check(Schema.isNonEmpty())),
21
+ writableRoots: Schema.optional(Schema.Array(Schema.String)),
22
+ });
23
+ export type CodexCloudConfiguration = typeof CodexCloudConfiguration.Type;
24
+ export class CodexCloudConfig extends Context.Service<CodexCloudConfig, CodexCloudConfiguration>()("@shivaedev/work-fleet/CodexCloudConfig") {}
25
+
26
+ const CloudThread = Schema.Struct({
27
+ thread: Schema.Struct({
28
+ environments: Schema.NullOr(
29
+ Schema.Array(
30
+ Schema.Struct({ cwd: Schema.String, environmentConfigId: Schema.optional(Schema.String), environmentId: Schema.optional(Schema.String) }),
31
+ ),
32
+ ),
33
+ }),
34
+ });
35
+ function threadStart(config: CodexCloudConfiguration, input: StartSession) {
36
+ return {
37
+ config: {
38
+ "sandbox_mode": input.access === "read-only" ? "read-only" : "workspace-write",
39
+ ...(input.access === "read-only" ? { "approval_policy": "never", "sandbox_read_only.network_access": true } : {}),
40
+ ...(input.settings?.effort === undefined ? {} : { "model_reasoning_effort": input.settings.effort }),
41
+ },
42
+ deferredEnvironment: true,
43
+ environments: [{ cwd: config.cwd, environmentConfigId: config.environmentId }],
44
+ experimentalRawEvents: false,
45
+ pluginsMcp: { productSku: "codex" },
46
+ serviceName: "codex_cloud",
47
+ threadSource: "user",
48
+ ...(config.projectId === undefined ? {} : { projectId: config.projectId }),
49
+ ...(input.settings?.model === undefined ? {} : { model: input.settings.model }),
50
+ ...(input.settings?.serviceTier === undefined ? {} : { serviceTier: input.settings.serviceTier }),
51
+ };
52
+ }
53
+
54
+ const CodexCloud = defineService({
55
+ id: "Fleet/CodexCloud",
56
+ initialize: Effect.gen(function* () {
57
+ const config = yield* Schema.decodeUnknownEffect(CodexCloudConfiguration)(yield* CodexCloudConfig).pipe(
58
+ Effect.mapError(() => failure("unavailable", "Codex Cloud configuration needs an environment, workspace cwd and positive timeout")),
59
+ );
60
+ const rpc = yield* codexCloudConnection(config.endpoint ?? CODEX_CLOUD_ENDPOINT, config, config.requestTimeoutMs);
61
+ const sandboxPolicy = {
62
+ excludeSlashTmp: false,
63
+ excludeTmpdirEnvVar: false,
64
+ networkAccess: true,
65
+ type: "workspaceWrite",
66
+ writableRoots: config.writableRoots ?? [config.cwd, "/tmp"],
67
+ };
68
+ const verifyEnvironment = Effect.fn("CodexCloud.verifyEnvironment")(function* (input: ContinueSession) {
69
+ const read = yield* rpc("thread/read", { includeTurns: false, threadId: input.sessionId }).pipe(
70
+ Effect.flatMap((value) => decode(CloudThread, value)),
71
+ );
72
+ const environments = read.thread.environments ?? [];
73
+ const [environment] = environments;
74
+ if (
75
+ environments.length !== 1
76
+ || environment === undefined
77
+ || (environment.environmentConfigId ?? environment.environmentId) !== config.environmentId
78
+ || environment.cwd !== config.cwd
79
+ ) {
80
+ return yield* Effect.fail(failure("protocol", "Codex Cloud did not confirm the configured environment and cwd; retain the session"));
81
+ }
82
+ return input.access === "read-only"
83
+ ? { approvalPolicy: "never", sandboxPolicy: { networkAccess: true, type: "readOnly" } }
84
+ : { approvalPolicy: "on-request", approvalsReviewer: "auto_review", sandboxPolicy };
85
+ });
86
+ const adapter = codexAdapter(rpc, {
87
+ beforeTurn: verifyEnvironment,
88
+ provisioning: "unknown",
89
+ recoveryGraceMs: 5000,
90
+ threadStart: (input) => threadStart(config, input),
91
+ });
92
+ return {
93
+ ...adapter,
94
+ archive: (sessionId: string) =>
95
+ config.archiveThreads === false ? Effect.void : rpc("thread/archive", { threadId: sessionId }, true).pipe(Effect.asVoid),
96
+ nameSession: (sessionId: string, name: string) =>
97
+ rpc("thread/name/set", { name: `${config.threadNamePrefix ?? "Fleet: "}${name}`, threadId: sessionId }, true).pipe(Effect.asVoid),
98
+ readSessionName: (sessionId: string) =>
99
+ rpc("thread/read", { includeTurns: false, threadId: sessionId }).pipe(
100
+ Effect.flatMap((value) => decode(Schema.Struct({ thread: Schema.Struct({ name: Schema.optional(Schema.NullOr(Schema.String)) }) }), value)),
101
+ Effect.map((value) => value.thread.name ?? undefined),
102
+ ),
103
+ startSession: (input: StartSession) =>
104
+ input.cwd === config.cwd
105
+ ? adapter.startSession(input)
106
+ : Effect.fail(failure("rejected", "Work cwd differs from the configured Codex Cloud workspace cwd")),
107
+ };
108
+ }),
109
+ methods: (adapter) => adapter,
110
+ requires: [CodexCloudConfig, FileSystem.FileSystem, ChildProcessSpawner.ChildProcessSpawner],
111
+ });
112
+ export const codexCloudLayer = Layer.effect(SessionTransport)(CodexCloud).pipe(Layer.provide(CodexCloud.layer));