@shivaedev/work-fleet 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +6 -4
  3. package/dist/DecisionCode.d.ts +1 -1
  4. package/dist/DecisionCode.d.ts.map +1 -1
  5. package/dist/DecisionCode.js +1 -0
  6. package/dist/DecisionCode.js.map +1 -1
  7. package/dist/admit.d.ts +2 -2
  8. package/dist/board/acknowledgeDecision.d.ts.map +1 -1
  9. package/dist/board/acknowledgeDecision.js +7 -3
  10. package/dist/board/acknowledgeDecision.js.map +1 -1
  11. package/dist/board/briefRevision.d.ts +1 -1
  12. package/dist/board/briefRevision.d.ts.map +1 -1
  13. package/dist/board/briefRevision.js +1 -1
  14. package/dist/board/briefRevision.js.map +1 -1
  15. package/dist/board/closePublishedDecision.d.ts +22 -0
  16. package/dist/board/closePublishedDecision.d.ts.map +1 -0
  17. package/dist/board/closePublishedDecision.js +41 -0
  18. package/dist/board/closePublishedDecision.js.map +1 -0
  19. package/dist/board/decisionAnswer.d.ts +2 -2
  20. package/dist/board/decisionAnswer.d.ts.map +1 -1
  21. package/dist/board/decisionAnswer.js +8 -8
  22. package/dist/board/decisionAnswer.js.map +1 -1
  23. package/dist/board/decisionReading.js +2 -2
  24. package/dist/board/decisionReading.js.map +1 -1
  25. package/dist/board/documents.d.ts +1 -2
  26. package/dist/board/documents.d.ts.map +1 -1
  27. package/dist/board/documents.js +4 -4
  28. package/dist/board/documents.js.map +1 -1
  29. package/dist/board/fleetField.d.ts +1 -1
  30. package/dist/board/fleetField.d.ts.map +1 -1
  31. package/dist/board/markdown.d.ts.map +1 -1
  32. package/dist/board/markdown.js +6 -5
  33. package/dist/board/markdown.js.map +1 -1
  34. package/dist/board/publish.d.ts +1 -1
  35. package/dist/board/publish.d.ts.map +1 -1
  36. package/dist/board/publish.js +10 -8
  37. package/dist/board/publish.js.map +1 -1
  38. package/dist/board/publishReport.js +2 -2
  39. package/dist/board/publishReport.js.map +1 -1
  40. package/dist/board/readDocument.js +1 -1
  41. package/dist/board/readDocument.js.map +1 -1
  42. package/dist/board/readPass.d.ts +1 -1
  43. package/dist/board/readPass.d.ts.map +1 -1
  44. package/dist/board/readPass.js +1 -1
  45. package/dist/board/readPass.js.map +1 -1
  46. package/dist/board/reportIdentity.js +1 -1
  47. package/dist/board/reportIdentity.js.map +1 -1
  48. package/dist/board/reportLinks.js +1 -1
  49. package/dist/board/reportLinks.js.map +1 -1
  50. package/dist/board/schema.d.ts +13 -13
  51. package/dist/board/schema.js +2 -2
  52. package/dist/board/schema.js.map +1 -1
  53. package/dist/board/upgradeDecisionClosure.d.ts +5 -0
  54. package/dist/board/upgradeDecisionClosure.d.ts.map +1 -0
  55. package/dist/board/upgradeDecisionClosure.js +46 -0
  56. package/dist/board/upgradeDecisionClosure.js.map +1 -0
  57. package/dist/board/workRevision.js +2 -2
  58. package/dist/board/workRevision.js.map +1 -1
  59. package/dist/board/writeHealth.d.ts +1 -1
  60. package/dist/board/writeHealth.d.ts.map +1 -1
  61. package/dist/board/writeHealth.js +1 -1
  62. package/dist/board/writeHealth.js.map +1 -1
  63. package/dist/board/writePublished.d.ts +1 -1
  64. package/dist/board/writePublished.d.ts.map +1 -1
  65. package/dist/board/writePublished.js +5 -1
  66. package/dist/board/writePublished.js.map +1 -1
  67. package/dist/cli.js +11 -5
  68. package/dist/cli.js.map +1 -1
  69. package/dist/engine/abandonStalled.d.ts +530 -533
  70. package/dist/engine/abandonStalled.d.ts.map +1 -1
  71. package/dist/engine/admissionOrder.d.ts +4 -4
  72. package/dist/engine/applyResolution.d.ts +4 -4
  73. package/dist/engine/approveBrief.d.ts +6 -6
  74. package/dist/engine/authorizeResolution.d.ts +528 -531
  75. package/dist/engine/authorizeResolution.d.ts.map +1 -1
  76. package/dist/engine/authorizeResolution.js +1 -1
  77. package/dist/engine/authorizeResolution.js.map +1 -1
  78. package/dist/engine/boardBrief.d.ts +7 -6
  79. package/dist/engine/boardBrief.d.ts.map +1 -1
  80. package/dist/engine/boardBrief.js +3 -10
  81. package/dist/engine/boardBrief.js.map +1 -1
  82. package/dist/engine/capacityRetry.d.ts +1715 -1724
  83. package/dist/engine/capacityRetry.d.ts.map +1 -1
  84. package/dist/engine/closeDecisions.d.ts +4 -4
  85. package/dist/engine/completeBoardWork.d.ts +4 -4
  86. package/dist/engine/completeReport.d.ts +277 -280
  87. package/dist/engine/completeReport.d.ts.map +1 -1
  88. package/dist/engine/continueCommand.d.ts +2 -2
  89. package/dist/engine/continueWorker.d.ts +4 -4
  90. package/dist/engine/decisionCopy.d.ts +15 -0
  91. package/dist/engine/decisionCopy.d.ts.map +1 -0
  92. package/dist/engine/decisionCopy.js +44 -0
  93. package/dist/engine/decisionCopy.js.map +1 -0
  94. package/dist/engine/deliverPendingAnswers.d.ts +534 -537
  95. package/dist/engine/deliverPendingAnswers.d.ts.map +1 -1
  96. package/dist/engine/dispatchCommand.d.ts +2 -2
  97. package/dist/engine/dispatchCommand.d.ts.map +1 -1
  98. package/dist/engine/dispatchCommand.js +4 -27
  99. package/dist/engine/dispatchCommand.js.map +1 -1
  100. package/dist/engine/dispatchFailure.d.ts +9391 -0
  101. package/dist/engine/dispatchFailure.d.ts.map +1 -0
  102. package/dist/engine/dispatchFailure.js +24 -0
  103. package/dist/engine/dispatchFailure.js.map +1 -0
  104. package/dist/engine/ensureDecisionOwner.d.ts +4 -4
  105. package/dist/engine/ensurePublication.d.ts +4 -4
  106. package/dist/engine/failureCode.js +1 -1
  107. package/dist/engine/failureCode.js.map +1 -1
  108. package/dist/engine/health.d.ts +1 -1
  109. package/dist/engine/health.d.ts.map +1 -1
  110. package/dist/engine/inspectRenewal.d.ts +4 -4
  111. package/dist/engine/launchInput.d.ts +2 -2
  112. package/dist/engine/launchReceipt.d.ts +2 -2
  113. package/dist/engine/makeAdopt.d.ts +4 -4
  114. package/dist/engine/makeAdvance.d.ts +2 -2
  115. package/dist/engine/makeDeliver.d.ts +4 -4
  116. package/dist/engine/makeDeliver.d.ts.map +1 -1
  117. package/dist/engine/makeDeliver.js +5 -1
  118. package/dist/engine/makeDeliver.js.map +1 -1
  119. package/dist/engine/makeHuman.d.ts +4 -4
  120. package/dist/engine/makeLaunch.d.ts +4 -4
  121. package/dist/engine/makeObserve.d.ts +4 -4
  122. package/dist/engine/makeReview.d.ts +4 -4
  123. package/dist/engine/makeState.d.ts +533 -536
  124. package/dist/engine/makeState.d.ts.map +1 -1
  125. package/dist/engine/makeState.js +9 -2
  126. package/dist/engine/makeState.js.map +1 -1
  127. package/dist/engine/makeValidate.d.ts +4 -4
  128. package/dist/engine/mergeReadiness.d.ts +536 -539
  129. package/dist/engine/mergeReadiness.d.ts.map +1 -1
  130. package/dist/engine/mergeReadiness.js +1 -1
  131. package/dist/engine/mergeReadiness.js.map +1 -1
  132. package/dist/engine/missingBoardWork.d.ts +9936 -0
  133. package/dist/engine/missingBoardWork.d.ts.map +1 -0
  134. package/dist/engine/missingBoardWork.js +17 -0
  135. package/dist/engine/missingBoardWork.js.map +1 -0
  136. package/dist/engine/observeDeliveryFailure.d.ts +530 -533
  137. package/dist/engine/observeDeliveryFailure.d.ts.map +1 -1
  138. package/dist/engine/observeRenewal.d.ts +6 -6
  139. package/dist/engine/obtainReview.d.ts +2 -2
  140. package/dist/engine/operationRecord.d.ts +26 -26
  141. package/dist/engine/persistTerminalReceipts.d.ts +4 -4
  142. package/dist/engine/prepareCommand.d.ts +2 -2
  143. package/dist/engine/queueAnswerCommand.d.ts +2 -2
  144. package/dist/engine/readOrContinueReview.d.ts +2 -2
  145. package/dist/engine/readResolution.d.ts +1 -1
  146. package/dist/engine/readResolution.js +1 -1
  147. package/dist/engine/readResolution.js.map +1 -1
  148. package/dist/engine/readRetry.d.ts +1177 -1183
  149. package/dist/engine/readRetry.d.ts.map +1 -1
  150. package/dist/engine/reassignCommand.d.ts +2 -2
  151. package/dist/engine/reconcileAttempt.d.ts +2 -2
  152. package/dist/engine/reconcileCommand.d.ts +2 -2
  153. package/dist/engine/reconcileCommand.d.ts.map +1 -1
  154. package/dist/engine/reconcileCommand.js +2 -1
  155. package/dist/engine/reconcileCommand.js.map +1 -1
  156. package/dist/engine/recordResponseCommand.d.ts +2 -2
  157. package/dist/engine/recoverStall.d.ts +530 -533
  158. package/dist/engine/recoverStall.d.ts.map +1 -1
  159. package/dist/engine/recoverUnobservable.d.ts +530 -533
  160. package/dist/engine/recoverUnobservable.d.ts.map +1 -1
  161. package/dist/engine/refreshBrief.d.ts +1177 -1183
  162. package/dist/engine/refreshBrief.d.ts.map +1 -1
  163. package/dist/engine/refreshReviewResult.d.ts +4 -4
  164. package/dist/engine/releaseClosedPreparation.d.ts +530 -533
  165. package/dist/engine/releaseClosedPreparation.d.ts.map +1 -1
  166. package/dist/engine/releaseExecution.d.ts +530 -533
  167. package/dist/engine/releaseExecution.d.ts.map +1 -1
  168. package/dist/engine/releaseFinishedWork.d.ts +2 -2
  169. package/dist/engine/repository.d.ts +24 -24
  170. package/dist/engine/repository.js +1 -1
  171. package/dist/engine/repository.js.map +1 -1
  172. package/dist/engine/requestConflictRepair.d.ts +530 -533
  173. package/dist/engine/requestConflictRepair.d.ts.map +1 -1
  174. package/dist/engine/requestRework.d.ts +4 -4
  175. package/dist/engine/resolveCommand.d.ts +2 -2
  176. package/dist/engine/resolveExecution.d.ts +530 -533
  177. package/dist/engine/resolveExecution.d.ts.map +1 -1
  178. package/dist/engine/resumeAttempt.d.ts +530 -533
  179. package/dist/engine/resumeAttempt.d.ts.map +1 -1
  180. package/dist/engine/retireUnacknowledged.d.ts +4 -4
  181. package/dist/engine/retryTerminal.d.ts +528 -531
  182. package/dist/engine/retryTerminal.d.ts.map +1 -1
  183. package/dist/engine/saveLaunch.d.ts +532 -535
  184. package/dist/engine/saveLaunch.d.ts.map +1 -1
  185. package/dist/engine/saveLaunch.js +2 -1
  186. package/dist/engine/saveLaunch.js.map +1 -1
  187. package/dist/engine/scheduler.d.ts +4 -4
  188. package/dist/engine/scheduler.d.ts.map +1 -1
  189. package/dist/engine/scheduler.js +4 -1
  190. package/dist/engine/scheduler.js.map +1 -1
  191. package/dist/engine/sessionCleanup.d.ts +4 -4
  192. package/dist/engine/settleMergedDelivery.d.ts +530 -533
  193. package/dist/engine/settleMergedDelivery.d.ts.map +1 -1
  194. package/dist/engine/situations/choices.d.ts +20 -0
  195. package/dist/engine/situations/choices.d.ts.map +1 -0
  196. package/dist/engine/situations/choices.js +21 -0
  197. package/dist/engine/situations/choices.js.map +1 -0
  198. package/dist/engine/situations/service.d.ts +60 -0
  199. package/dist/engine/situations/service.d.ts.map +1 -0
  200. package/dist/engine/situations/service.js +51 -0
  201. package/dist/engine/situations/service.js.map +1 -0
  202. package/dist/engine/situations/stop.d.ts +25 -0
  203. package/dist/engine/situations/stop.d.ts.map +1 -0
  204. package/dist/engine/situations/stop.js +25 -0
  205. package/dist/engine/situations/stop.js.map +1 -0
  206. package/dist/engine/situations/work.d.ts +114 -0
  207. package/dist/engine/situations/work.d.ts.map +1 -0
  208. package/dist/engine/situations/work.js +91 -0
  209. package/dist/engine/situations/work.js.map +1 -0
  210. package/dist/engine/steerBrief.d.ts +532 -535
  211. package/dist/engine/steerBrief.d.ts.map +1 -1
  212. package/dist/engine/submissionFailure.d.ts +526 -529
  213. package/dist/engine/submissionFailure.d.ts.map +1 -1
  214. package/dist/engine/submitLaunch.d.ts +528 -531
  215. package/dist/engine/submitLaunch.d.ts.map +1 -1
  216. package/dist/engine/threadNames.js +1 -1
  217. package/dist/engine/threadNames.js.map +1 -1
  218. package/dist/engine/workerReport.d.ts +7 -7
  219. package/dist/engine/workerReport.d.ts.map +1 -1
  220. package/dist/exposeFailure.js +1 -1
  221. package/dist/exposeFailure.js.map +1 -1
  222. package/dist/fleet.d.ts +26 -26
  223. package/dist/fleet.js +1 -1
  224. package/dist/fleet.js.map +1 -1
  225. package/dist/host/actionCommands.d.ts +10 -10
  226. package/dist/host/actionCommands.d.ts.map +1 -1
  227. package/dist/host/actionCommands.js +6 -6
  228. package/dist/host/actionCommands.js.map +1 -1
  229. package/dist/host/admission.d.ts +4 -4
  230. package/dist/host/answerWork.d.ts +4 -3
  231. package/dist/host/answerWork.d.ts.map +1 -1
  232. package/dist/host/cliOptions.d.ts +5 -1
  233. package/dist/host/cliOptions.d.ts.map +1 -1
  234. package/dist/host/cliOptions.js +6 -4
  235. package/dist/host/cliOptions.js.map +1 -1
  236. package/dist/host/commands.d.ts +1 -1
  237. package/dist/host/commands.d.ts.map +1 -1
  238. package/dist/host/configSettings.d.ts +5 -5
  239. package/dist/host/daemon.d.ts +133 -132
  240. package/dist/host/daemon.d.ts.map +1 -1
  241. package/dist/host/daemon.js +7 -3
  242. package/dist/host/daemon.js.map +1 -1
  243. package/dist/host/daemonClient.d.ts +28 -28
  244. package/dist/host/daemonClient.js +1 -1
  245. package/dist/host/daemonClient.js.map +1 -1
  246. package/dist/host/daemonContract.d.ts +146 -146
  247. package/dist/host/daemonContract.d.ts.map +1 -1
  248. package/dist/host/daemonContract.js +1 -1
  249. package/dist/host/daemonContract.js.map +1 -1
  250. package/dist/host/daemonDiagnostics.js +1 -1
  251. package/dist/host/daemonDiagnostics.js.map +1 -1
  252. package/dist/host/daemonHandlers.d.ts +1 -1
  253. package/dist/host/daemonHandlers.d.ts.map +1 -1
  254. package/dist/host/daemonPort.d.ts +6 -0
  255. package/dist/host/daemonPort.d.ts.map +1 -0
  256. package/dist/host/daemonPort.js +40 -0
  257. package/dist/host/daemonPort.js.map +1 -0
  258. package/dist/host/daemonSnapshots.d.ts +1 -1
  259. package/dist/host/daemonSnapshots.d.ts.map +1 -1
  260. package/dist/host/daemonSnapshots.js +1 -1
  261. package/dist/host/daemonSnapshots.js.map +1 -1
  262. package/dist/host/fleetStatus.d.ts +5 -5
  263. package/dist/host/follow.d.ts +1 -0
  264. package/dist/host/follow.d.ts.map +1 -1
  265. package/dist/host/follow.js +10 -4
  266. package/dist/host/follow.js.map +1 -1
  267. package/dist/host/followCommands.d.ts +2 -2
  268. package/dist/host/followCommands.d.ts.map +1 -1
  269. package/dist/host/followCommands.js +4 -2
  270. package/dist/host/followCommands.js.map +1 -1
  271. package/dist/host/githubApi.js +1 -1
  272. package/dist/host/githubApi.js.map +1 -1
  273. package/dist/host/githubDelivery.js +3 -1
  274. package/dist/host/githubDelivery.js.map +1 -1
  275. package/dist/host/healthLayer.js +1 -1
  276. package/dist/host/healthLayer.js.map +1 -1
  277. package/dist/host/integrations.js +1 -1
  278. package/dist/host/integrations.js.map +1 -1
  279. package/dist/host/mainSource.js +1 -1
  280. package/dist/host/mainSource.js.map +1 -1
  281. package/dist/host/providerHealth.js +1 -1
  282. package/dist/host/providerHealth.js.map +1 -1
  283. package/dist/host/quota.js +1 -1
  284. package/dist/host/quota.js.map +1 -1
  285. package/dist/host/recordDecisionResponse.d.ts +3 -2
  286. package/dist/host/recordDecisionResponse.d.ts.map +1 -1
  287. package/dist/host/recordDecisionResponse.js +1 -1
  288. package/dist/host/recordDecisionResponse.js.map +1 -1
  289. package/dist/host/releaseWork.d.ts +6 -5
  290. package/dist/host/releaseWork.d.ts.map +1 -1
  291. package/dist/host/releaseWork.js +2 -2
  292. package/dist/host/releaseWork.js.map +1 -1
  293. package/dist/host/renderStatus.d.ts +4 -1
  294. package/dist/host/renderStatus.d.ts.map +1 -1
  295. package/dist/host/renderStatus.js +6 -6
  296. package/dist/host/renderStatus.js.map +1 -1
  297. package/dist/host/reportBoard.js +1 -1
  298. package/dist/host/reportBoard.js.map +1 -1
  299. package/dist/host/runtime.d.ts +2 -2
  300. package/dist/host/runtime.d.ts.map +1 -1
  301. package/dist/host/runtime.js +1 -1
  302. package/dist/host/runtime.js.map +1 -1
  303. package/dist/host/statusLayer.js +2 -2
  304. package/dist/host/statusLayer.js.map +1 -1
  305. package/dist/host/watch.d.ts.map +1 -1
  306. package/dist/host/watch.js +1 -1
  307. package/dist/host/watch.js.map +1 -1
  308. package/dist/model.d.ts +9 -9
  309. package/dist/model.js +1 -1
  310. package/dist/model.js.map +1 -1
  311. package/dist/operations.d.ts +57 -57
  312. package/dist/packageInfo.d.ts +1 -1
  313. package/dist/packageInfo.js +1 -1
  314. package/dist/policy.d.ts +3 -2
  315. package/dist/policy.d.ts.map +1 -1
  316. package/dist/policy.js +2 -1
  317. package/dist/policy.js.map +1 -1
  318. package/dist/prompt/briefEdit.js +1 -1
  319. package/dist/prompt/briefEdit.js.map +1 -1
  320. package/dist/providers/codexCloud.js +1 -1
  321. package/dist/providers/codexCloud.js.map +1 -1
  322. package/dist/providers/codexLocal.js +1 -1
  323. package/dist/providers/codexLocal.js.map +1 -1
  324. package/dist/qualifyDependencies.d.ts +2 -2
  325. package/dist/reportFileDirectory.js +1 -1
  326. package/dist/reportFileDirectory.js.map +1 -1
  327. package/dist/scheduling/admission.d.ts +6 -6
  328. package/dist/scheduling/areas.d.ts +6 -6
  329. package/dist/scheduling/backPressure.d.ts +6 -6
  330. package/dist/session/schema.d.ts +1 -1
  331. package/dist/session/service.js +1 -1
  332. package/dist/session/service.js.map +1 -1
  333. package/dist/storage/fleetMigrations.d.ts.map +1 -1
  334. package/dist/storage/fleetMigrations.js +5 -0
  335. package/dist/storage/fleetMigrations.js.map +1 -1
  336. package/dist/storage/makeFleetTransaction.d.ts +1 -1
  337. package/dist/storage/makeFleetTransaction.d.ts.map +1 -1
  338. package/dist/storage/makeFleetTransaction.js +1 -1
  339. package/dist/storage/makeFleetTransaction.js.map +1 -1
  340. package/dist/storage/makeForeignReservations.d.ts.map +1 -1
  341. package/dist/storage/makeForeignReservations.js +16 -4
  342. package/dist/storage/makeForeignReservations.js.map +1 -1
  343. package/package.json +8 -9
  344. package/src/DecisionCode.ts +1 -0
  345. package/src/board/acknowledgeDecision.ts +7 -3
  346. package/src/board/briefRevision.ts +2 -2
  347. package/src/board/closePublishedDecision.ts +51 -0
  348. package/src/board/decisionAnswer.ts +11 -9
  349. package/src/board/decisionReading.ts +3 -3
  350. package/src/board/documents.ts +5 -6
  351. package/src/board/fleetField.ts +1 -1
  352. package/src/board/markdown.ts +6 -5
  353. package/src/board/publish.ts +10 -8
  354. package/src/board/publishReport.ts +2 -2
  355. package/src/board/readDocument.ts +1 -1
  356. package/src/board/readPass.ts +2 -2
  357. package/src/board/reportIdentity.ts +1 -1
  358. package/src/board/reportLinks.ts +1 -1
  359. package/src/board/schema.ts +2 -2
  360. package/src/board/upgradeDecisionClosure.ts +61 -0
  361. package/src/board/workRevision.ts +2 -2
  362. package/src/board/writeHealth.ts +2 -2
  363. package/src/board/writePublished.ts +13 -4
  364. package/src/cli.ts +13 -5
  365. package/src/engine/authorizeResolution.ts +1 -1
  366. package/src/engine/boardBrief.ts +11 -19
  367. package/src/engine/decisionCopy.ts +63 -0
  368. package/src/engine/dispatchCommand.ts +4 -34
  369. package/src/engine/dispatchFailure.ts +25 -0
  370. package/src/engine/failureCode.ts +1 -1
  371. package/src/engine/health.ts +1 -1
  372. package/src/engine/makeDeliver.ts +5 -1
  373. package/src/engine/makeState.ts +14 -4
  374. package/src/engine/mergeReadiness.ts +0 -2
  375. package/src/engine/missingBoardWork.ts +24 -0
  376. package/src/engine/readResolution.ts +2 -2
  377. package/src/engine/reconcileCommand.ts +7 -1
  378. package/src/engine/repository.ts +1 -1
  379. package/src/engine/saveLaunch.ts +2 -0
  380. package/src/engine/scheduler.ts +4 -1
  381. package/src/engine/situations/choices.ts +36 -0
  382. package/src/engine/situations/service.ts +82 -0
  383. package/src/engine/situations/stop.ts +60 -0
  384. package/src/engine/situations/work.ts +94 -0
  385. package/src/engine/threadNames.ts +1 -1
  386. package/src/exposeFailure.ts +1 -1
  387. package/src/fleet.ts +1 -1
  388. package/src/host/actionCommands.ts +6 -6
  389. package/src/host/cliOptions.ts +10 -5
  390. package/src/host/daemon.ts +7 -3
  391. package/src/host/daemonClient.ts +1 -1
  392. package/src/host/daemonContract.ts +1 -1
  393. package/src/host/daemonDiagnostics.ts +1 -1
  394. package/src/host/daemonPort.ts +50 -0
  395. package/src/host/daemonSnapshots.ts +1 -1
  396. package/src/host/follow.ts +16 -5
  397. package/src/host/followCommands.ts +4 -2
  398. package/src/host/githubApi.ts +1 -1
  399. package/src/host/githubDelivery.ts +3 -1
  400. package/src/host/healthLayer.ts +1 -1
  401. package/src/host/integrations.ts +1 -1
  402. package/src/host/mainSource.ts +1 -1
  403. package/src/host/providerHealth.ts +1 -1
  404. package/src/host/quota.ts +1 -1
  405. package/src/host/recordDecisionResponse.ts +1 -1
  406. package/src/host/releaseWork.ts +2 -2
  407. package/src/host/renderStatus.ts +6 -7
  408. package/src/host/reportBoard.ts +1 -1
  409. package/src/host/runtime.ts +1 -1
  410. package/src/host/statusLayer.ts +3 -3
  411. package/src/host/watch.ts +4 -1
  412. package/src/model.ts +1 -1
  413. package/src/packageInfo.ts +1 -1
  414. package/src/policy.ts +2 -1
  415. package/src/prompt/briefEdit.ts +1 -1
  416. package/src/providers/codexCloud.ts +1 -1
  417. package/src/providers/codexLocal.ts +1 -1
  418. package/src/reportFileDirectory.ts +1 -1
  419. package/src/session/service.ts +1 -1
  420. package/src/storage/fleetMigrations.ts +5 -0
  421. package/src/storage/makeFleetTransaction.ts +2 -2
  422. package/src/storage/makeForeignReservations.ts +15 -4
  423. package/dist/engine/releaseOnly.d.ts +0 -3
  424. package/dist/engine/releaseOnly.d.ts.map +0 -1
  425. package/dist/engine/releaseOnly.js +0 -19
  426. package/dist/engine/releaseOnly.js.map +0 -1
  427. package/src/engine/releaseOnly.ts +0 -24
@@ -1,3 +1,3 @@
1
1
  export const NAME = "work-fleet";
2
2
  export const TITLE = "Work Fleet";
3
- export const VERSION = "0.6.0";
3
+ export const VERSION = "0.7.0";
package/src/policy.ts CHANGED
@@ -63,8 +63,9 @@ export const DecisionResponse = Schema.Struct({
63
63
  });
64
64
  export type DecisionResponse = typeof DecisionResponse.Type;
65
65
  export class BoardFailure extends Schema.TaggedError<BoardFailure>()("BoardFailure", {
66
- code: Schema.optional(DecisionCode),
66
+ code: Schema.optional(Schema.Union([DecisionCode, Schema.Literal("board-item-missing")])),
67
67
  message: Schema.String,
68
+ workId: Schema.optional(Schema.String),
68
69
  }) {}
69
70
  export class BoardGateway extends Context.Service<
70
71
  BoardGateway,
@@ -1,4 +1,4 @@
1
- import { board as boardApi } from "@shivaedev/work-board/integration/board.ts";
1
+ import { board as boardApi } from "@shivaedev/work-board/server/integration/board.ts";
2
2
  import { fleetDeliverable } from "#board/fleetField.ts";
3
3
 
4
4
  export function briefEditPrompt(previous: string | undefined, current: string): string {
@@ -1,6 +1,6 @@
1
1
  import { Context, Effect, FileSystem, Layer, Schema } from "effect";
2
2
  import { ChildProcessSpawner } from "effect/process";
3
- import { defineService } from "@shivaedev/effect-service/define-service.ts";
3
+ import { defineService } from "@shivaedev/effect-service/defineService.ts";
4
4
  import { codexAdapter } from "#providers/codexAdapter.ts";
5
5
  import { codexCloudConnection } from "#providers/codexCloudConnection.ts";
6
6
  import { decode, failure } from "#providers/codexRpc.ts";
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect, Layer, Schema } from "effect";
2
- import { defineService } from "@shivaedev/effect-service/define-service.ts";
2
+ import { defineService } from "@shivaedev/effect-service/defineService.ts";
3
3
  import { codexAdapter } from "#providers/codexAdapter.ts";
4
4
  import { connect, failure, initialize, request } from "#providers/codexRpc.ts";
5
5
  import { SessionTransport } from "#session/service.ts";
@@ -1,7 +1,7 @@
1
1
  import { constants } from "node:fs";
2
2
  import { type FileHandle, open } from "node:fs/promises";
3
3
  import { Effect } from "effect";
4
- import { publication } from "@shivaedev/work-board/integration/publication.ts";
4
+ import { publication } from "@shivaedev/work-board/server/integration/publication.ts";
5
5
  import { reportFileIo, withReportFile } from "#reportFileFailure.ts";
6
6
 
7
7
  export interface ReportDirectory {
@@ -1,5 +1,5 @@
1
1
  import { Cause, Context, Effect } from "effect";
2
- import { defineService } from "@shivaedev/effect-service/define-service.ts";
2
+ import { defineService } from "@shivaedev/effect-service/defineService.ts";
3
3
  import {
4
4
  type ContinueSession,
5
5
  type ReconcileSession,
@@ -61,5 +61,10 @@ export const fleetMigrations = Effect.fn("FleetStore.fleetMigrations")(function*
61
61
  yield* sql`alter table ${sql(`${namespace}_records`)} drop column ${sql("admissionReady")}`;
62
62
  yield* sql`alter table ${sql(childTable(namespace, ["history"]))} drop column ${sql("admissionReady")}`;
63
63
  }),
64
+ "16_orchestrator_decisions": sql`update ${sql(`${namespace}_records`)} as records set version = version + 1, "attentionOwner" = 'orchestrator'
65
+ where stage = 'needs-human' and "attentionOwner" = 'maintainer'
66
+ and ("decision__code" = 'reviewed-pr-ready' or ("decision__code" = 'fleet-stale' and "decision__reason" = 'Board context changed'))
67
+ and not exists (select 1 from ${sql(childTable(namespace, ["supersededDecisions"]))} as superseded
68
+ where superseded.work_id = records.work_id and superseded."reassignedTo__decisionId" = records."decision__id")`,
64
69
  });
65
70
  });
@@ -8,9 +8,9 @@ export const makeFleetTransaction = Effect.gen(function* () {
8
8
  const sql = yield* SqlClient.SqlClient;
9
9
  const current = yield* Effect.serviceOption(Reactivity.Reactivity);
10
10
  const reactivity = current._tag === "Some" ? current.value : yield* Reactivity.make;
11
- return <A, E, R>(keys: readonly Key[], body: Effect.Effect<A, E, R>) =>
11
+ return <A, E, R>(keys: readonly Key[] | ((value: A) => readonly Key[]), body: Effect.Effect<A, E, R>) =>
12
12
  transact(
13
- Effect.tap(body, () => invalidateOnCommit(invalidationKeys(keys))),
13
+ Effect.tap(body, (value) => invalidateOnCommit(invalidationKeys(typeof keys === "function" ? keys(value) : keys))),
14
14
  { onSqlError: (error) => error },
15
15
  ).pipe(Effect.provideService(SqlClient.SqlClient, sql), Effect.provideService(Reactivity.Reactivity, reactivity));
16
16
  });
@@ -14,16 +14,27 @@ export const makeForeignReservations = Effect.fn("FleetStore.makeForeignReservat
14
14
  tableName: `${namespace}_foreign_reservations`,
15
15
  });
16
16
  const lock = sql`select pg_advisory_xact_lock(hashtextextended(${`work_fleet_admission:${namespace}`}, 0))`;
17
+ function exists(owner: string) {
18
+ return reservations.findMany({ where: { owner } }).pipe(Effect.map((rows) => rows.length > 0));
19
+ }
17
20
  return {
18
21
  foreignReservations: () => reservations.findMany({ orderBy: { direction: "asc", field: "owner" } }),
19
- releaseForeign: (owner: string) =>
20
- commit(
21
- [fleetRecords.list],
22
+ releaseForeign: Effect.fn("FleetStore.releaseForeign")(function* (owner: string) {
23
+ if (!(yield* exists(owner))) {
24
+ return;
25
+ }
26
+ yield* commit(
27
+ (deleted) => (deleted ? [fleetRecords.list] : []),
22
28
  Effect.gen(function* () {
23
29
  yield* lock;
30
+ if (!(yield* exists(owner))) {
31
+ return false;
32
+ }
24
33
  yield* reservations.delete(owner);
34
+ return true;
25
35
  }),
26
- ),
36
+ );
37
+ }),
27
38
  reserveForeign: (owner: string, occupancy: { readonly executing: boolean; readonly backlog: boolean } = { backlog: true, executing: true }) =>
28
39
  commit(
29
40
  [fleetRecords.list],
@@ -1,3 +0,0 @@
1
- import type { DecisionCode } from "#DecisionCode.ts";
2
- export declare function releaseOnly(code: DecisionCode | undefined): string | undefined;
3
- //# sourceMappingURL=releaseOnly.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"releaseOnly.d.ts","sourceRoot":"","sources":["../../src/engine/releaseOnly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAqBrD,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,sBAEzD"}
@@ -1,19 +0,0 @@
1
- const explanations = {
2
- "checks-result-invalid": "Retry cannot validate a malformed adopted result; release and prepare with a valid PR identity and commit SHA.",
3
- "delivery-pr-required": "Retry cannot replace an adopted PR identity; release and inspect ownership before preparing a valid GitHub result.",
4
- "duplicate-turns": "Retry cannot select one result from duplicate accepted turns; release only after every matching turn is confirmed terminal.",
5
- "foreign-pr": "Retry cannot move a PR into the configured repository; release this cycle and prepare work with the correct repository ownership.",
6
- "incomplete-context": "Retry cannot reconstruct missing preparation context; release and prepare with complete context.",
7
- "incomplete-observation": "Retry cannot establish preparation compatibility; release and prepare with a complete main observation.",
8
- "no-change-checks-unconfigured": "Retry cannot validate a no-change result in this host; release and prepare work in a runtime with configured no-change checks.",
9
- "not-ancestor": "Retry cannot rebase preparation onto unrelated main history; release and prepare against current main.",
10
- "relevant-change": "Retry cannot refresh affected preparation context; release and prepare against current main.",
11
- "report-published": "Retry cannot undo GitHub publication because closed pull requests remain publication evidence; release this report cycle and inspect the published work.",
12
- "report-too-large": "Retry cannot shorten the immutable completed report; release and prepare a worker to produce a shorter report.",
13
- "result-identity-changed": "Retry cannot transfer ownership to a different result; release and inspect the replacement before preparing again.",
14
- "worker-receipt-missing": "Retry cannot establish adopted worker ownership from the saved evidence; release and inspect ownership before preparing again.",
15
- };
16
- export function releaseOnly(code) {
17
- return code === undefined ? undefined : explanations[code];
18
- }
19
- //# sourceMappingURL=releaseOnly.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"releaseOnly.js","sourceRoot":"","sources":["../../src/engine/releaseOnly.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAoD;IACrE,uBAAuB,EAAE,gHAAgH;IACzI,sBAAsB,EAAE,oHAAoH;IAC5I,iBAAiB,EAAE,6HAA6H;IAChJ,YAAY,EAAE,mIAAmI;IACjJ,oBAAoB,EAAE,kGAAkG;IACxH,wBAAwB,EAAE,yGAAyG;IACnI,+BAA+B,EAC9B,gIAAgI;IACjI,cAAc,EAAE,wGAAwG;IACxH,iBAAiB,EAAE,8FAA8F;IACjH,kBAAkB,EACjB,0JAA0J;IAC3J,kBAAkB,EAAE,gHAAgH;IACpI,yBAAyB,EAAE,oHAAoH;IAC/I,wBAAwB,EACvB,gIAAgI;CACjI,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,IAA8B;IACzD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AAC5D,CAAC"}
@@ -1,24 +0,0 @@
1
- import type { DecisionCode } from "#DecisionCode.ts";
2
-
3
- const explanations: Readonly<Partial<Record<DecisionCode, string>>> = {
4
- "checks-result-invalid": "Retry cannot validate a malformed adopted result; release and prepare with a valid PR identity and commit SHA.",
5
- "delivery-pr-required": "Retry cannot replace an adopted PR identity; release and inspect ownership before preparing a valid GitHub result.",
6
- "duplicate-turns": "Retry cannot select one result from duplicate accepted turns; release only after every matching turn is confirmed terminal.",
7
- "foreign-pr": "Retry cannot move a PR into the configured repository; release this cycle and prepare work with the correct repository ownership.",
8
- "incomplete-context": "Retry cannot reconstruct missing preparation context; release and prepare with complete context.",
9
- "incomplete-observation": "Retry cannot establish preparation compatibility; release and prepare with a complete main observation.",
10
- "no-change-checks-unconfigured":
11
- "Retry cannot validate a no-change result in this host; release and prepare work in a runtime with configured no-change checks.",
12
- "not-ancestor": "Retry cannot rebase preparation onto unrelated main history; release and prepare against current main.",
13
- "relevant-change": "Retry cannot refresh affected preparation context; release and prepare against current main.",
14
- "report-published":
15
- "Retry cannot undo GitHub publication because closed pull requests remain publication evidence; release this report cycle and inspect the published work.",
16
- "report-too-large": "Retry cannot shorten the immutable completed report; release and prepare a worker to produce a shorter report.",
17
- "result-identity-changed": "Retry cannot transfer ownership to a different result; release and inspect the replacement before preparing again.",
18
- "worker-receipt-missing":
19
- "Retry cannot establish adopted worker ownership from the saved evidence; release and inspect ownership before preparing again.",
20
- };
21
-
22
- export function releaseOnly(code: DecisionCode | undefined) {
23
- return code === undefined ? undefined : explanations[code];
24
- }