@amsterdamdatalabs/enact-operator 0.1.2

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 (377) hide show
  1. package/README.md +33 -0
  2. package/dist/index.d.ts +24 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +24 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lanes/autopilot/index.d.ts +95 -0
  7. package/dist/lanes/autopilot/index.d.ts.map +1 -0
  8. package/dist/lanes/autopilot/index.js +499 -0
  9. package/dist/lanes/autopilot/index.js.map +1 -0
  10. package/dist/lanes/ralph/index.d.ts +118 -0
  11. package/dist/lanes/ralph/index.d.ts.map +1 -0
  12. package/dist/lanes/ralph/index.js +680 -0
  13. package/dist/lanes/ralph/index.js.map +1 -0
  14. package/dist/lanes/team/index.d.ts +110 -0
  15. package/dist/lanes/team/index.d.ts.map +1 -0
  16. package/dist/lanes/team/index.js +748 -0
  17. package/dist/lanes/team/index.js.map +1 -0
  18. package/dist/lanes/team/roles.d.ts +15 -0
  19. package/dist/lanes/team/roles.d.ts.map +1 -0
  20. package/dist/lanes/team/roles.js +89 -0
  21. package/dist/lanes/team/roles.js.map +1 -0
  22. package/dist/lanes/ultrawork/burst.d.ts +69 -0
  23. package/dist/lanes/ultrawork/burst.d.ts.map +1 -0
  24. package/dist/lanes/ultrawork/burst.js +254 -0
  25. package/dist/lanes/ultrawork/burst.js.map +1 -0
  26. package/dist/lanes/ultrawork/index.d.ts +159 -0
  27. package/dist/lanes/ultrawork/index.d.ts.map +1 -0
  28. package/dist/lanes/ultrawork/index.js +919 -0
  29. package/dist/lanes/ultrawork/index.js.map +1 -0
  30. package/dist/lanes/ultrawork/phases.d.ts +57 -0
  31. package/dist/lanes/ultrawork/phases.d.ts.map +1 -0
  32. package/dist/lanes/ultrawork/phases.js +116 -0
  33. package/dist/lanes/ultrawork/phases.js.map +1 -0
  34. package/dist/mcp/activation.d.ts +5 -0
  35. package/dist/mcp/activation.d.ts.map +1 -0
  36. package/dist/mcp/activation.js +234 -0
  37. package/dist/mcp/activation.js.map +1 -0
  38. package/dist/mcp/cli.d.ts +11 -0
  39. package/dist/mcp/cli.d.ts.map +1 -0
  40. package/dist/mcp/cli.js +140 -0
  41. package/dist/mcp/cli.js.map +1 -0
  42. package/dist/mcp/continuation.d.ts +5 -0
  43. package/dist/mcp/continuation.d.ts.map +1 -0
  44. package/dist/mcp/continuation.js +360 -0
  45. package/dist/mcp/continuation.js.map +1 -0
  46. package/dist/mcp/jobs.d.ts +5 -0
  47. package/dist/mcp/jobs.d.ts.map +1 -0
  48. package/dist/mcp/jobs.js +212 -0
  49. package/dist/mcp/jobs.js.map +1 -0
  50. package/dist/mcp/laneSupport.d.ts +19 -0
  51. package/dist/mcp/laneSupport.d.ts.map +1 -0
  52. package/dist/mcp/laneSupport.js +21 -0
  53. package/dist/mcp/laneSupport.js.map +1 -0
  54. package/dist/mcp/lanes/autopilot.d.ts +5 -0
  55. package/dist/mcp/lanes/autopilot.d.ts.map +1 -0
  56. package/dist/mcp/lanes/autopilot.js +227 -0
  57. package/dist/mcp/lanes/autopilot.js.map +1 -0
  58. package/dist/mcp/lanes/ralph.d.ts +5 -0
  59. package/dist/mcp/lanes/ralph.d.ts.map +1 -0
  60. package/dist/mcp/lanes/ralph.js +392 -0
  61. package/dist/mcp/lanes/ralph.js.map +1 -0
  62. package/dist/mcp/lanes/team.d.ts +5 -0
  63. package/dist/mcp/lanes/team.d.ts.map +1 -0
  64. package/dist/mcp/lanes/team.js +413 -0
  65. package/dist/mcp/lanes/team.js.map +1 -0
  66. package/dist/mcp/lanes/ultrawork.d.ts +5 -0
  67. package/dist/mcp/lanes/ultrawork.d.ts.map +1 -0
  68. package/dist/mcp/lanes/ultrawork.js +497 -0
  69. package/dist/mcp/lanes/ultrawork.js.map +1 -0
  70. package/dist/mcp/linkage.d.ts +5 -0
  71. package/dist/mcp/linkage.d.ts.map +1 -0
  72. package/dist/mcp/linkage.js +126 -0
  73. package/dist/mcp/linkage.js.map +1 -0
  74. package/dist/mcp/planning.d.ts +5 -0
  75. package/dist/mcp/planning.d.ts.map +1 -0
  76. package/dist/mcp/planning.js +584 -0
  77. package/dist/mcp/planning.js.map +1 -0
  78. package/dist/mcp/rpcTransport.d.ts +17 -0
  79. package/dist/mcp/rpcTransport.d.ts.map +1 -0
  80. package/dist/mcp/rpcTransport.js +90 -0
  81. package/dist/mcp/rpcTransport.js.map +1 -0
  82. package/dist/mcp/schemas/ralphVerify.d.ts +32 -0
  83. package/dist/mcp/schemas/ralphVerify.d.ts.map +1 -0
  84. package/dist/mcp/schemas/ralphVerify.js +20 -0
  85. package/dist/mcp/schemas/ralphVerify.js.map +1 -0
  86. package/dist/mcp/server.d.ts +5 -0
  87. package/dist/mcp/server.d.ts.map +1 -0
  88. package/dist/mcp/server.js +176 -0
  89. package/dist/mcp/server.js.map +1 -0
  90. package/dist/mcp/system.d.ts +5 -0
  91. package/dist/mcp/system.d.ts.map +1 -0
  92. package/dist/mcp/system.js +445 -0
  93. package/dist/mcp/system.js.map +1 -0
  94. package/dist/mcp/toolFilter.d.ts +2 -0
  95. package/dist/mcp/toolFilter.d.ts.map +1 -0
  96. package/dist/mcp/toolFilter.js +2 -0
  97. package/dist/mcp/toolFilter.js.map +1 -0
  98. package/dist/mcp/toolPartitions.d.ts +20 -0
  99. package/dist/mcp/toolPartitions.d.ts.map +1 -0
  100. package/dist/mcp/toolPartitions.js +280 -0
  101. package/dist/mcp/toolPartitions.js.map +1 -0
  102. package/dist/mcp/toolRuntime.d.ts +9 -0
  103. package/dist/mcp/toolRuntime.d.ts.map +1 -0
  104. package/dist/mcp/toolRuntime.js +179 -0
  105. package/dist/mcp/toolRuntime.js.map +1 -0
  106. package/dist/mcp/workflow.d.ts +12 -0
  107. package/dist/mcp/workflow.d.ts.map +1 -0
  108. package/dist/mcp/workflow.js +723 -0
  109. package/dist/mcp/workflow.js.map +1 -0
  110. package/dist/operator/hooks/hookDispatcher.d.ts +39 -0
  111. package/dist/operator/hooks/hookDispatcher.d.ts.map +1 -0
  112. package/dist/operator/hooks/hookDispatcher.js +58 -0
  113. package/dist/operator/hooks/hookDispatcher.js.map +1 -0
  114. package/dist/operator/hooks/hookGating.d.ts +28 -0
  115. package/dist/operator/hooks/hookGating.d.ts.map +1 -0
  116. package/dist/operator/hooks/hookGating.js +61 -0
  117. package/dist/operator/hooks/hookGating.js.map +1 -0
  118. package/dist/operator/hooks/hooks.d.ts +20 -0
  119. package/dist/operator/hooks/hooks.d.ts.map +1 -0
  120. package/dist/operator/hooks/hooks.js +124 -0
  121. package/dist/operator/hooks/hooks.js.map +1 -0
  122. package/dist/operator/hooks/toolGuardHooks.d.ts +86 -0
  123. package/dist/operator/hooks/toolGuardHooks.d.ts.map +1 -0
  124. package/dist/operator/hooks/toolGuardHooks.js +163 -0
  125. package/dist/operator/hooks/toolGuardHooks.js.map +1 -0
  126. package/dist/operator/hud.d.ts +115 -0
  127. package/dist/operator/hud.d.ts.map +1 -0
  128. package/dist/operator/hud.js +229 -0
  129. package/dist/operator/hud.js.map +1 -0
  130. package/dist/operator/missions.d.ts +125 -0
  131. package/dist/operator/missions.d.ts.map +1 -0
  132. package/dist/operator/missions.js +304 -0
  133. package/dist/operator/missions.js.map +1 -0
  134. package/dist/operator/operatorCore.d.ts +11 -0
  135. package/dist/operator/operatorCore.d.ts.map +1 -0
  136. package/dist/operator/operatorCore.js +9 -0
  137. package/dist/operator/operatorCore.js.map +1 -0
  138. package/dist/operator/operatorRuntimeCore.d.ts +17 -0
  139. package/dist/operator/operatorRuntimeCore.d.ts.map +1 -0
  140. package/dist/operator/operatorRuntimeCore.js +17 -0
  141. package/dist/operator/operatorRuntimeCore.js.map +1 -0
  142. package/dist/operator/runtime.d.ts +74 -0
  143. package/dist/operator/runtime.d.ts.map +1 -0
  144. package/dist/operator/runtime.js +357 -0
  145. package/dist/operator/runtime.js.map +1 -0
  146. package/dist/shared/core/bootstrap.d.ts +16 -0
  147. package/dist/shared/core/bootstrap.d.ts.map +1 -0
  148. package/dist/shared/core/bootstrap.js +77 -0
  149. package/dist/shared/core/bootstrap.js.map +1 -0
  150. package/dist/shared/core/contract.d.ts +71 -0
  151. package/dist/shared/core/contract.d.ts.map +1 -0
  152. package/dist/shared/core/contract.js +452 -0
  153. package/dist/shared/core/contract.js.map +1 -0
  154. package/dist/shared/core/events.d.ts +57 -0
  155. package/dist/shared/core/events.d.ts.map +1 -0
  156. package/dist/shared/core/events.js +36 -0
  157. package/dist/shared/core/events.js.map +1 -0
  158. package/dist/shared/core/jobs.d.ts +46 -0
  159. package/dist/shared/core/jobs.d.ts.map +1 -0
  160. package/dist/shared/core/jobs.js +137 -0
  161. package/dist/shared/core/jobs.js.map +1 -0
  162. package/dist/shared/core/json.d.ts +12 -0
  163. package/dist/shared/core/json.d.ts.map +1 -0
  164. package/dist/shared/core/json.js +52 -0
  165. package/dist/shared/core/json.js.map +1 -0
  166. package/dist/shared/core/layoutMigration.d.ts +11 -0
  167. package/dist/shared/core/layoutMigration.d.ts.map +1 -0
  168. package/dist/shared/core/layoutMigration.js +56 -0
  169. package/dist/shared/core/layoutMigration.js.map +1 -0
  170. package/dist/shared/core/lifecycle.d.ts +61 -0
  171. package/dist/shared/core/lifecycle.d.ts.map +1 -0
  172. package/dist/shared/core/lifecycle.js +123 -0
  173. package/dist/shared/core/lifecycle.js.map +1 -0
  174. package/dist/shared/core/packagePaths.d.ts +2 -0
  175. package/dist/shared/core/packagePaths.d.ts.map +1 -0
  176. package/dist/shared/core/packagePaths.js +9 -0
  177. package/dist/shared/core/packagePaths.js.map +1 -0
  178. package/dist/shared/core/terminology.d.ts +38 -0
  179. package/dist/shared/core/terminology.d.ts.map +1 -0
  180. package/dist/shared/core/terminology.js +54 -0
  181. package/dist/shared/core/terminology.js.map +1 -0
  182. package/dist/shared/core/types.d.ts +30 -0
  183. package/dist/shared/core/types.d.ts.map +1 -0
  184. package/dist/shared/core/types.js +2 -0
  185. package/dist/shared/core/types.js.map +1 -0
  186. package/dist/shared/diagnostics/doctor.d.ts +19 -0
  187. package/dist/shared/diagnostics/doctor.d.ts.map +1 -0
  188. package/dist/shared/diagnostics/doctor.js +82 -0
  189. package/dist/shared/diagnostics/doctor.js.map +1 -0
  190. package/dist/shared/diagnostics/hostRollout.d.ts +16 -0
  191. package/dist/shared/diagnostics/hostRollout.d.ts.map +1 -0
  192. package/dist/shared/diagnostics/hostRollout.js +78 -0
  193. package/dist/shared/diagnostics/hostRollout.js.map +1 -0
  194. package/dist/shared/observability/emit.d.ts +3 -0
  195. package/dist/shared/observability/emit.d.ts.map +1 -0
  196. package/dist/shared/observability/emit.js +17 -0
  197. package/dist/shared/observability/emit.js.map +1 -0
  198. package/dist/shared/observability/testWorkspace.d.ts +4 -0
  199. package/dist/shared/observability/testWorkspace.d.ts.map +1 -0
  200. package/dist/shared/observability/testWorkspace.js +35 -0
  201. package/dist/shared/observability/testWorkspace.js.map +1 -0
  202. package/dist/shared/state/installRegistry.d.ts +22 -0
  203. package/dist/shared/state/installRegistry.d.ts.map +1 -0
  204. package/dist/shared/state/installRegistry.js +51 -0
  205. package/dist/shared/state/installRegistry.js.map +1 -0
  206. package/dist/shared/state/session.d.ts +18 -0
  207. package/dist/shared/state/session.d.ts.map +1 -0
  208. package/dist/shared/state/session.js +127 -0
  209. package/dist/shared/state/session.js.map +1 -0
  210. package/dist/shared/state/state.d.ts +16 -0
  211. package/dist/shared/state/state.d.ts.map +1 -0
  212. package/dist/shared/state/state.js +91 -0
  213. package/dist/shared/state/state.js.map +1 -0
  214. package/dist/shared/state/tasks.d.ts +113 -0
  215. package/dist/shared/state/tasks.d.ts.map +1 -0
  216. package/dist/shared/state/tasks.js +274 -0
  217. package/dist/shared/state/tasks.js.map +1 -0
  218. package/dist/shared/workflow/activation/activeSkill.d.ts +46 -0
  219. package/dist/shared/workflow/activation/activeSkill.d.ts.map +1 -0
  220. package/dist/shared/workflow/activation/activeSkill.js +158 -0
  221. package/dist/shared/workflow/activation/activeSkill.js.map +1 -0
  222. package/dist/shared/workflow/activation/gateProfiles.d.ts +26 -0
  223. package/dist/shared/workflow/activation/gateProfiles.d.ts.map +1 -0
  224. package/dist/shared/workflow/activation/gateProfiles.js +102 -0
  225. package/dist/shared/workflow/activation/gateProfiles.js.map +1 -0
  226. package/dist/shared/workflow/activation/modeMatrix.d.ts +28 -0
  227. package/dist/shared/workflow/activation/modeMatrix.d.ts.map +1 -0
  228. package/dist/shared/workflow/activation/modeMatrix.js +91 -0
  229. package/dist/shared/workflow/activation/modeMatrix.js.map +1 -0
  230. package/dist/shared/workflow/activation/skillActivation.d.ts +74 -0
  231. package/dist/shared/workflow/activation/skillActivation.d.ts.map +1 -0
  232. package/dist/shared/workflow/activation/skillActivation.js +485 -0
  233. package/dist/shared/workflow/activation/skillActivation.js.map +1 -0
  234. package/dist/shared/workflow/activation/skillVariant.d.ts +18 -0
  235. package/dist/shared/workflow/activation/skillVariant.d.ts.map +1 -0
  236. package/dist/shared/workflow/activation/skillVariant.js +44 -0
  237. package/dist/shared/workflow/activation/skillVariant.js.map +1 -0
  238. package/dist/shared/workflow/authority/authority.d.ts +34 -0
  239. package/dist/shared/workflow/authority/authority.d.ts.map +1 -0
  240. package/dist/shared/workflow/authority/authority.js +64 -0
  241. package/dist/shared/workflow/authority/authority.js.map +1 -0
  242. package/dist/shared/workflow/closure/closureManifest.d.ts +39 -0
  243. package/dist/shared/workflow/closure/closureManifest.d.ts.map +1 -0
  244. package/dist/shared/workflow/closure/closureManifest.js +62 -0
  245. package/dist/shared/workflow/closure/closureManifest.js.map +1 -0
  246. package/dist/shared/workflow/closure/closureRequirements.d.ts +12 -0
  247. package/dist/shared/workflow/closure/closureRequirements.d.ts.map +1 -0
  248. package/dist/shared/workflow/closure/closureRequirements.js +30 -0
  249. package/dist/shared/workflow/closure/closureRequirements.js.map +1 -0
  250. package/dist/shared/workflow/closure/contractParity.d.ts +24 -0
  251. package/dist/shared/workflow/closure/contractParity.d.ts.map +1 -0
  252. package/dist/shared/workflow/closure/contractParity.js +238 -0
  253. package/dist/shared/workflow/closure/contractParity.js.map +1 -0
  254. package/dist/shared/workflow/closure/contractParityContext.d.ts +8 -0
  255. package/dist/shared/workflow/closure/contractParityContext.d.ts.map +1 -0
  256. package/dist/shared/workflow/closure/contractParityContext.js +50 -0
  257. package/dist/shared/workflow/closure/contractParityContext.js.map +1 -0
  258. package/dist/shared/workflow/closure/scopeGuard.d.ts +11 -0
  259. package/dist/shared/workflow/closure/scopeGuard.d.ts.map +1 -0
  260. package/dist/shared/workflow/closure/scopeGuard.js +69 -0
  261. package/dist/shared/workflow/closure/scopeGuard.js.map +1 -0
  262. package/dist/shared/workflow/closure/ultragoalArtifact.d.ts +13 -0
  263. package/dist/shared/workflow/closure/ultragoalArtifact.d.ts.map +1 -0
  264. package/dist/shared/workflow/closure/ultragoalArtifact.js +31 -0
  265. package/dist/shared/workflow/closure/ultragoalArtifact.js.map +1 -0
  266. package/dist/shared/workflow/closure/workflowReconcile.d.ts +70 -0
  267. package/dist/shared/workflow/closure/workflowReconcile.d.ts.map +1 -0
  268. package/dist/shared/workflow/closure/workflowReconcile.js +267 -0
  269. package/dist/shared/workflow/closure/workflowReconcile.js.map +1 -0
  270. package/dist/shared/workflow/continuation/continuation.d.ts +109 -0
  271. package/dist/shared/workflow/continuation/continuation.d.ts.map +1 -0
  272. package/dist/shared/workflow/continuation/continuation.js +550 -0
  273. package/dist/shared/workflow/continuation/continuation.js.map +1 -0
  274. package/dist/shared/workflow/continuation/continuationEventReservations.d.ts +17 -0
  275. package/dist/shared/workflow/continuation/continuationEventReservations.d.ts.map +1 -0
  276. package/dist/shared/workflow/continuation/continuationEventReservations.js +88 -0
  277. package/dist/shared/workflow/continuation/continuationEventReservations.js.map +1 -0
  278. package/dist/shared/workflow/continuation/continuationFollowUp.d.ts +114 -0
  279. package/dist/shared/workflow/continuation/continuationFollowUp.d.ts.map +1 -0
  280. package/dist/shared/workflow/continuation/continuationFollowUp.js +330 -0
  281. package/dist/shared/workflow/continuation/continuationFollowUp.js.map +1 -0
  282. package/dist/shared/workflow/continuation/continuationOrchestrator.d.ts +66 -0
  283. package/dist/shared/workflow/continuation/continuationOrchestrator.d.ts.map +1 -0
  284. package/dist/shared/workflow/continuation/continuationOrchestrator.js +144 -0
  285. package/dist/shared/workflow/continuation/continuationOrchestrator.js.map +1 -0
  286. package/dist/shared/workflow/continuation/hookContinuation.d.ts +44 -0
  287. package/dist/shared/workflow/continuation/hookContinuation.d.ts.map +1 -0
  288. package/dist/shared/workflow/continuation/hookContinuation.js +85 -0
  289. package/dist/shared/workflow/continuation/hookContinuation.js.map +1 -0
  290. package/dist/shared/workflow/continuation/stopPolicy.d.ts +38 -0
  291. package/dist/shared/workflow/continuation/stopPolicy.d.ts.map +1 -0
  292. package/dist/shared/workflow/continuation/stopPolicy.js +435 -0
  293. package/dist/shared/workflow/continuation/stopPolicy.js.map +1 -0
  294. package/dist/shared/workflow/continuation/stopVerdict.d.ts +31 -0
  295. package/dist/shared/workflow/continuation/stopVerdict.d.ts.map +1 -0
  296. package/dist/shared/workflow/continuation/stopVerdict.js +98 -0
  297. package/dist/shared/workflow/continuation/stopVerdict.js.map +1 -0
  298. package/dist/shared/workflow/delegation/delegatedSession.d.ts +118 -0
  299. package/dist/shared/workflow/delegation/delegatedSession.d.ts.map +1 -0
  300. package/dist/shared/workflow/delegation/delegatedSession.js +496 -0
  301. package/dist/shared/workflow/delegation/delegatedSession.js.map +1 -0
  302. package/dist/shared/workflow/delegation/delegationPrompt.d.ts +3 -0
  303. package/dist/shared/workflow/delegation/delegationPrompt.d.ts.map +1 -0
  304. package/dist/shared/workflow/delegation/delegationPrompt.js +15 -0
  305. package/dist/shared/workflow/delegation/delegationPrompt.js.map +1 -0
  306. package/dist/shared/workflow/delegation/sessionTasks.d.ts +40 -0
  307. package/dist/shared/workflow/delegation/sessionTasks.d.ts.map +1 -0
  308. package/dist/shared/workflow/delegation/sessionTasks.js +73 -0
  309. package/dist/shared/workflow/delegation/sessionTasks.js.map +1 -0
  310. package/dist/shared/workflow/delegation/subagentRuntime.d.ts +26 -0
  311. package/dist/shared/workflow/delegation/subagentRuntime.d.ts.map +1 -0
  312. package/dist/shared/workflow/delegation/subagentRuntime.js +231 -0
  313. package/dist/shared/workflow/delegation/subagentRuntime.js.map +1 -0
  314. package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.d.ts +79 -0
  315. package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.d.ts.map +1 -0
  316. package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.js +166 -0
  317. package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.js.map +1 -0
  318. package/dist/shared/workflow/delivery/finalWave.d.ts +57 -0
  319. package/dist/shared/workflow/delivery/finalWave.d.ts.map +1 -0
  320. package/dist/shared/workflow/delivery/finalWave.js +123 -0
  321. package/dist/shared/workflow/delivery/finalWave.js.map +1 -0
  322. package/dist/shared/workflow/delivery/lifecyclePushMap.d.ts +68 -0
  323. package/dist/shared/workflow/delivery/lifecyclePushMap.d.ts.map +1 -0
  324. package/dist/shared/workflow/delivery/lifecyclePushMap.js +82 -0
  325. package/dist/shared/workflow/delivery/lifecyclePushMap.js.map +1 -0
  326. package/dist/shared/workflow/delivery/prSidecar.d.ts +7 -0
  327. package/dist/shared/workflow/delivery/prSidecar.d.ts.map +1 -0
  328. package/dist/shared/workflow/delivery/prSidecar.js +4 -0
  329. package/dist/shared/workflow/delivery/prSidecar.js.map +1 -0
  330. package/dist/shared/workflow/delivery/reviewStaleness.d.ts +37 -0
  331. package/dist/shared/workflow/delivery/reviewStaleness.d.ts.map +1 -0
  332. package/dist/shared/workflow/delivery/reviewStaleness.js +94 -0
  333. package/dist/shared/workflow/delivery/reviewStaleness.js.map +1 -0
  334. package/dist/shared/workflow/planning/hyperplan.d.ts +40 -0
  335. package/dist/shared/workflow/planning/hyperplan.d.ts.map +1 -0
  336. package/dist/shared/workflow/planning/hyperplan.js +133 -0
  337. package/dist/shared/workflow/planning/hyperplan.js.map +1 -0
  338. package/dist/shared/workflow/planning/notepad.d.ts +17 -0
  339. package/dist/shared/workflow/planning/notepad.d.ts.map +1 -0
  340. package/dist/shared/workflow/planning/notepad.js +84 -0
  341. package/dist/shared/workflow/planning/notepad.js.map +1 -0
  342. package/dist/shared/workflow/planning/planFormat.d.ts +3 -0
  343. package/dist/shared/workflow/planning/planFormat.d.ts.map +1 -0
  344. package/dist/shared/workflow/planning/planFormat.js +14 -0
  345. package/dist/shared/workflow/planning/planFormat.js.map +1 -0
  346. package/package.json +155 -0
  347. package/runtime/hooks/_continuation.mjs +2 -0
  348. package/runtime/hooks/_lib.mjs +2 -0
  349. package/runtime/hooks/_toolGuards.mjs +2 -0
  350. package/runtime/hooks/lanes/resolveSkillActivation.mjs +241 -0
  351. package/runtime/hooks/lanes/user-prompt-submit.mjs +326 -0
  352. package/runtime/hooks/layout-dir.mjs +2 -0
  353. package/runtime/hooks/lifecycle/pre-compact.mjs +121 -0
  354. package/runtime/hooks/lifecycle/session-start.mjs +356 -0
  355. package/runtime/hooks/lifecycle/stop.mjs +223 -0
  356. package/runtime/hooks/observability.mjs +2 -0
  357. package/runtime/hooks/post-tool-use-failure.mjs +5 -0
  358. package/runtime/hooks/post-tool-use.mjs +4 -0
  359. package/runtime/hooks/pre-compact.mjs +4 -0
  360. package/runtime/hooks/pre-tool-use.mjs +4 -0
  361. package/runtime/hooks/resolveSkillActivation.mjs +4 -0
  362. package/runtime/hooks/root-dir.mjs +2 -0
  363. package/runtime/hooks/session-start.mjs +4 -0
  364. package/runtime/hooks/shared/_continuation.mjs +341 -0
  365. package/runtime/hooks/shared/_lib.mjs +60 -0
  366. package/runtime/hooks/shared/_toolGuards.mjs +237 -0
  367. package/runtime/hooks/shared/config.mjs +143 -0
  368. package/runtime/hooks/shared/layout-dir.mjs +12 -0
  369. package/runtime/hooks/shared/observability.mjs +257 -0
  370. package/runtime/hooks/shared/root-dir.mjs +9 -0
  371. package/runtime/hooks/stop.mjs +4 -0
  372. package/runtime/hooks/subagent-tracker.mjs +4 -0
  373. package/runtime/hooks/subagents/subagent-tracker.mjs +106 -0
  374. package/runtime/hooks/tools/post-tool-use-failure.mjs +251 -0
  375. package/runtime/hooks/tools/post-tool-use.mjs +205 -0
  376. package/runtime/hooks/tools/pre-tool-use.mjs +268 -0
  377. package/runtime/hooks/user-prompt-submit.mjs +4 -0
@@ -0,0 +1,140 @@
1
+ import { applySetup } from '../shared/core/bootstrap.js';
2
+ import { resolveOperatorRoot } from '../shared/core/contract.js';
3
+ import { runDoctor } from '../shared/diagnostics/doctor.js';
4
+ function cliIoDefault() {
5
+ return {
6
+ stdout: (text) => process.stdout.write(text),
7
+ stderr: (text) => process.stderr.write(text),
8
+ };
9
+ }
10
+ function operatorCliUsage() {
11
+ return [
12
+ 'usage: enact-operator <command> [options]',
13
+ '',
14
+ 'Commands:',
15
+ ' setup Initialize the Operator layout in the current repo',
16
+ ' doctor Run Operator health checks',
17
+ ' hook Internal runtime hook dispatch',
18
+ '',
19
+ 'Setup options:',
20
+ ' --root <path> Override operator root',
21
+ ' --codex-home <path> Override codex home for setup bookkeeping',
22
+ ' --force Force setup behavior where supported',
23
+ ' --dry-run Preview setup actions without mutating state',
24
+ ' --json Emit JSON',
25
+ '',
26
+ 'Doctor options:',
27
+ ' --root <path> Override operator root',
28
+ ' --json Emit JSON',
29
+ '',
30
+ 'General:',
31
+ ' -v, --version Print version and exit',
32
+ ' -h, --help Show this help',
33
+ '',
34
+ ].join('\n');
35
+ }
36
+ function parseCliFlags(args) {
37
+ const parsed = {};
38
+ for (let index = 0; index < args.length; index += 1) {
39
+ const arg = args[index];
40
+ switch (arg) {
41
+ case '--root':
42
+ if (typeof args[index + 1] !== 'string' || args[index + 1].trim() === '') {
43
+ throw new Error('Missing value for --root');
44
+ }
45
+ parsed.root = args[index + 1];
46
+ index += 1;
47
+ break;
48
+ case '--codex-home':
49
+ if (typeof args[index + 1] !== 'string' || args[index + 1].trim() === '') {
50
+ throw new Error('Missing value for --codex-home');
51
+ }
52
+ parsed.codexHome = args[index + 1];
53
+ index += 1;
54
+ break;
55
+ case '--force':
56
+ parsed.force = true;
57
+ break;
58
+ case '--dry-run':
59
+ parsed.dryRun = true;
60
+ break;
61
+ case '--json':
62
+ parsed.json = true;
63
+ break;
64
+ case '-h':
65
+ case '--help':
66
+ parsed.help = true;
67
+ break;
68
+ default:
69
+ throw new Error(`Unknown option: ${arg}`);
70
+ }
71
+ }
72
+ return parsed;
73
+ }
74
+ function formatSetupResultCli(result) {
75
+ const lines = [
76
+ `root: ${result.root}`,
77
+ `codexHome: ${result.codexHome}`,
78
+ `layoutPath: ${result.layoutPath}`,
79
+ `dryRun: ${result.dryRun ? 'true' : 'false'}`,
80
+ `syncedTasks: ${result.syncedTasks}`,
81
+ ];
82
+ if (result.plannedActions?.length) {
83
+ lines.push('plannedActions:');
84
+ for (const action of result.plannedActions) {
85
+ lines.push(` - ${action}`);
86
+ }
87
+ }
88
+ return `${lines.join('\n')}\n`;
89
+ }
90
+ function formatDoctorReportCli(report) {
91
+ const lines = [
92
+ `summary: passed=${report.summary.passed} warnings=${report.summary.warnings} failed=${report.summary.failed}`,
93
+ 'checks:',
94
+ ];
95
+ for (const check of report.checks) {
96
+ const badge = check.level === 'pass' ? 'PASS' : check.level === 'warn' ? 'WARN' : 'FAIL';
97
+ lines.push(` - [${badge}] ${check.name}: ${check.detail}`);
98
+ }
99
+ return `${lines.join('\n')}\n`;
100
+ }
101
+ export function handleCliSubcommand(argv, io = cliIoDefault()) {
102
+ const [command, ...rest] = argv;
103
+ if (!command) {
104
+ return { handled: false, exitCode: 0 };
105
+ }
106
+ if (command === '-h' || command === '--help' || command === 'help') {
107
+ io.stdout(operatorCliUsage());
108
+ return { handled: true, exitCode: 0 };
109
+ }
110
+ if (command !== 'setup' && command !== 'doctor') {
111
+ return { handled: false, exitCode: 0 };
112
+ }
113
+ try {
114
+ const flags = parseCliFlags(rest);
115
+ if (flags.help) {
116
+ io.stdout(operatorCliUsage());
117
+ return { handled: true, exitCode: 0 };
118
+ }
119
+ if (command === 'setup') {
120
+ const result = applySetup({
121
+ root: flags.root,
122
+ codexHome: flags.codexHome,
123
+ force: flags.force,
124
+ dryRun: flags.dryRun,
125
+ });
126
+ io.stdout(flags.json ? `${JSON.stringify(result, null, 2)}\n` : formatSetupResultCli(result));
127
+ return { handled: true, exitCode: 0 };
128
+ }
129
+ const root = resolveOperatorRoot(flags.root);
130
+ const report = runDoctor(root);
131
+ io.stdout(flags.json ? `${JSON.stringify(report, null, 2)}\n` : formatDoctorReportCli(report));
132
+ return { handled: true, exitCode: report.summary.failed > 0 ? 1 : 0 };
133
+ }
134
+ catch (error) {
135
+ const message = error instanceof Error ? error.message : String(error);
136
+ io.stderr(`${message}\n\n${operatorCliUsage()}`);
137
+ return { handled: true, exitCode: 2 };
138
+ }
139
+ }
140
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/mcp/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAqB3D,SAAS,YAAY;IACnB,OAAO;QACL,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QACpD,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;KACrD,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO;QACL,2CAA2C;QAC3C,EAAE;QACF,WAAW;QACX,iEAAiE;QACjE,yCAAyC;QACzC,6CAA6C;QAC7C,EAAE;QACF,gBAAgB;QAChB,gDAAgD;QAChD,mEAAmE;QACnE,8DAA8D;QAC9D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ACvE,EAAE,CAAC,MAAM,CAAC,GAAG,OAAO,OAAO,gBAAgB,EAAE,EAAE,CAAC,CAAC;QACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACxC,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type LaneToolContext, type LaneToolResult } from '../mcp/laneSupport.js';
2
+ import type { ToolDefinition } from '../mcp/toolPartitions.js';
3
+ export declare const continuationToolDefinitions: ToolDefinition[];
4
+ export declare function handleContinuationTool(name: string, context: LaneToolContext): Promise<LaneToolResult>;
5
+ //# sourceMappingURL=continuation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continuation.d.ts","sourceRoot":"","sources":["../../src/mcp/continuation.ts"],"names":[],"mappings":"AAUA,OAAO,EAAW,KAAK,eAAe,EAAE,KAAK,cAAc,EAAa,MAAM,sBAAsB,CAAC;AACrG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAK9D,eAAO,MAAM,2BAA2B,EAAE,cAAc,EA4KvD,CAAC;AAEF,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAyK5G"}
@@ -0,0 +1,360 @@
1
+ import { appendLedger } from '../operator/runtime.js';
2
+ import { createEvidenceHorizon } from '../shared/core/events.js';
3
+ import { layoutPath } from '../shared/core/contract.js';
4
+ import { detectStaleDelegatedSessions, listDelegatedSessions, buildDelegatedSessionResumePlan, orphanDelegatedSession, refreshDelegatedSessionFollowUp, delegatedSessionStatusSummary } from '../shared/workflow/delegation/delegatedSession.js';
5
+ import { readLogicalIdleStatus, readContinuationState, clearContinuationState } from '../shared/workflow/continuation/continuation.js';
6
+ import { readContinuationFollowUpQueue, acknowledgeContinuationFollowUp } from '../shared/workflow/continuation/continuationFollowUp.js';
7
+ import { writeStopVerdict, readStopVerdict, markStopVerdictAcknowledged } from '../shared/workflow/continuation/stopVerdict.js';
8
+ import { evaluateStopPolicy } from '../shared/workflow/continuation/stopPolicy.js';
9
+ import { readSubagentRuntimeState } from '../shared/workflow/delegation/subagentRuntime.js';
10
+ import { readOperatorAuthority } from '../shared/workflow/authority/authority.js';
11
+ import { handled, UNHANDLED } from '../mcp/laneSupport.js';
12
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
13
+ import { dirname } from 'node:path';
14
+ import { randomUUID } from 'node:crypto';
15
+ export const continuationToolDefinitions = [
16
+ {
17
+ name: 'operator_stop_evaluate',
18
+ description: 'Phase 7: Pure dry-run stop-policy evaluation. Returns current StopVerdict without writing to disk. Use before stopping to check if stop would be allowed.',
19
+ inputSchema: {
20
+ type: 'object',
21
+ properties: {
22
+ root: { type: 'string' },
23
+ },
24
+ },
25
+ },
26
+ {
27
+ name: 'operator_stop_acknowledge',
28
+ description: 'Phase 7: Operator override — write an allow verdict with blockerCategory=closure-evidence-missing and record reason in ledger. Use as explicit escape hatch when policy would deny.',
29
+ inputSchema: {
30
+ type: 'object',
31
+ properties: {
32
+ root: { type: 'string' },
33
+ reason: { type: 'string', description: 'Explicit reason for overriding the stop policy.' },
34
+ },
35
+ required: ['reason'],
36
+ },
37
+ },
38
+ {
39
+ name: 'operator_stop_verdict_status',
40
+ description: 'Phase 7: Returns the latest stop verdict and whether it has been acknowledged by a later session-start.',
41
+ inputSchema: {
42
+ type: 'object',
43
+ properties: {
44
+ root: { type: 'string' },
45
+ },
46
+ },
47
+ },
48
+ {
49
+ name: 'operator_continuation_status',
50
+ description: 'Returns the current owned continuation controller state (blocked/cleared lifecycle, resume hints, recommended tools). See also operator_continuation_followup_status for the Phase 1 reinjection queue.',
51
+ inputSchema: {
52
+ type: 'object',
53
+ properties: {
54
+ root: { type: 'string' },
55
+ },
56
+ },
57
+ },
58
+ {
59
+ name: 'operator_continuation_clear',
60
+ description: 'Explicitly clear the current continuation controller state with an audit reason. Also acknowledges continuation follow-up queue entries for the active lane/session when progress is recorded. Use when the operator intentionally restarts or overrides the blocked continuation flow.',
61
+ inputSchema: {
62
+ type: 'object',
63
+ properties: {
64
+ root: { type: 'string' },
65
+ reason: { type: 'string' },
66
+ },
67
+ required: ['reason'],
68
+ },
69
+ },
70
+ {
71
+ name: 'operator_continuation_followup_status',
72
+ description: 'Returns the Phase 1 continuation follow-up reinjection queue: items, per-status counts, and durable replay state under .enact/operator/state/continuation-follow-up-queue.json.',
73
+ inputSchema: {
74
+ type: 'object',
75
+ properties: {
76
+ root: { type: 'string' },
77
+ },
78
+ },
79
+ },
80
+ {
81
+ name: 'operator_continuation_followup_ack',
82
+ description: 'Acknowledge one or more continuation follow-up queue entries (operator or progress path). Pass followUpId to ack a single item; dedupeKey for a specific queue row; continuationId to ack all queued/replayed items tagged with that delegated continuation id; or omit all three to ack all active follow-ups for the lane + session inferred from continuation-state.json.',
83
+ inputSchema: {
84
+ type: 'object',
85
+ properties: {
86
+ root: { type: 'string' },
87
+ followUpId: { type: 'string', description: 'Optional. When omitted, acks all active follow-ups for the lane + session inferred from continuation-state.json.' },
88
+ dedupeKey: { type: 'string', description: 'Optional. Ack a single queued/replayed item by its dedupeKey (e.g. team-message or subagent-stop keys).' },
89
+ continuationId: { type: 'string', description: 'Optional (Phase 3). Ack all queued/replayed follow-ups whose metadata.continuationId matches this delegated-session id.' },
90
+ reason: { type: 'string', description: 'Required audit reason.' },
91
+ },
92
+ required: ['reason'],
93
+ },
94
+ },
95
+ {
96
+ name: 'operator_idle_status',
97
+ description: 'Phase 2: Returns Operator-owned logical idle status derived from last real activity timestamps rather than host SessionIdle emission alone.',
98
+ inputSchema: {
99
+ type: 'object',
100
+ properties: {
101
+ root: { type: 'string' },
102
+ },
103
+ },
104
+ },
105
+ {
106
+ name: 'operator_subagent_runtime_status',
107
+ description: 'Phase 2: Returns durable subagent lifecycle registry from .enact/operator/state/subagent-runtime.json (child ids, parent session, status, follow-up linkage).',
108
+ inputSchema: {
109
+ type: 'object',
110
+ properties: {
111
+ root: { type: 'string' },
112
+ },
113
+ },
114
+ },
115
+ {
116
+ name: 'operator_delegated_session_status',
117
+ description: 'Phase 3: Lists delegated-session registry under state/delegated-sessions.json (stable continuation ids for subagents, team executors, and autopilot lane delegations). Runs stale detection before returning.',
118
+ inputSchema: {
119
+ type: 'object',
120
+ properties: {
121
+ root: { type: 'string' },
122
+ continuationId: { type: 'string' },
123
+ kind: { type: 'string', enum: ['subagent', 'team_executor', 'lane_delegation'] },
124
+ status: { type: 'string', enum: ['active', 'completed', 'failed', 'stale', 'orphaned'] },
125
+ },
126
+ },
127
+ },
128
+ {
129
+ name: 'operator_delegated_session_resume',
130
+ description: 'Phase 3: Read-only resume plan for a delegated continuation id (recommended MCP tools; does not spawn host processes). Optional refreshFollowUp re-queues a recovery-class follow-up tied to the session.',
131
+ inputSchema: {
132
+ type: 'object',
133
+ properties: {
134
+ root: { type: 'string' },
135
+ continuationId: { type: 'string', description: 'deleg_* id from delegated-session registry.' },
136
+ refreshFollowUp: { type: 'boolean', description: 'When true, enqueue or refresh the deleg-scoped recovery follow-up.' },
137
+ },
138
+ required: ['continuationId'],
139
+ },
140
+ },
141
+ {
142
+ name: 'operator_delegated_session_orphan',
143
+ description: 'Phase 3: Mark a delegated session orphaned with operator-visible inbox remediation (does not terminate OS processes).',
144
+ inputSchema: {
145
+ type: 'object',
146
+ properties: {
147
+ root: { type: 'string' },
148
+ continuationId: { type: 'string' },
149
+ reason: { type: 'string' },
150
+ by: { type: 'string' },
151
+ },
152
+ required: ['continuationId', 'reason'],
153
+ },
154
+ },
155
+ {
156
+ name: 'operator_review_handoff_create',
157
+ description: 'Phase 7: Additive write — record an executor->reviewer handoff artifact. Does NOT auto-advance any state. First executor->reviewer artifact for future Phase 7C work.',
158
+ inputSchema: {
159
+ type: 'object',
160
+ properties: {
161
+ root: { type: 'string' },
162
+ fromExecutor: { type: 'string', description: 'Executor agent/lane ID handing off.' },
163
+ toReviewer: { type: 'string', description: 'Reviewer agent/lane ID to receive.' },
164
+ taskId: { type: 'string', description: 'Internal task being handed off.' },
165
+ },
166
+ required: ['fromExecutor', 'toReviewer', 'taskId'],
167
+ },
168
+ },
169
+ {
170
+ name: 'operator_review_handoff_status',
171
+ description: 'Phase 7: Read the current executor->reviewer handoff state.',
172
+ inputSchema: {
173
+ type: 'object',
174
+ properties: {
175
+ root: { type: 'string' },
176
+ },
177
+ },
178
+ },
179
+ ];
180
+ export async function handleContinuationTool(name, context) {
181
+ const { root, args } = context;
182
+ switch (name) {
183
+ case 'operator_stop_evaluate': {
184
+ const authority = readOperatorAuthority(root);
185
+ return handled(evaluateStopPolicy({ authority, root }));
186
+ }
187
+ case 'operator_stop_acknowledge': {
188
+ const reason = typeof args.reason === 'string' ? args.reason : 'operator-override';
189
+ const evidenceHorizon = createEvidenceHorizon(root);
190
+ const overrideVerdict = {
191
+ outcome: 'allow',
192
+ reasons: [{ lane: 'session', blocker: 'operator-override', blockerCategory: 'closure-evidence-missing' }],
193
+ capturedAt: new Date().toISOString(),
194
+ evidenceHorizon,
195
+ transportCanBlock: false,
196
+ };
197
+ const written = writeStopVerdict(root, overrideVerdict);
198
+ markStopVerdictAcknowledged(root, reason);
199
+ appendLedger(root, {
200
+ kind: 'stop_verdict',
201
+ action: 'stop_operator_override',
202
+ detail: `Operator acknowledged stop policy with reason: ${reason}`,
203
+ metadata: { reason, capturedAt: overrideVerdict.capturedAt },
204
+ });
205
+ return handled({ acknowledged: true, reason, verdict: written });
206
+ }
207
+ case 'operator_stop_verdict_status': {
208
+ const verdict = readStopVerdict(root);
209
+ if (verdict === null)
210
+ return handled({ verdict: null, acknowledged: null, exists: false });
211
+ return handled({
212
+ exists: true,
213
+ verdict,
214
+ acknowledged: Boolean(verdict.acknowledgedAt),
215
+ acknowledgedAt: verdict.acknowledgedAt ?? null,
216
+ acknowledgedReason: verdict.acknowledgedReason ?? null,
217
+ continuation: readContinuationState(root),
218
+ logicalIdle: readLogicalIdleStatus(root),
219
+ });
220
+ }
221
+ case 'operator_continuation_status':
222
+ return handled(readContinuationState(root));
223
+ case 'operator_continuation_clear': {
224
+ const reason = typeof args.reason === 'string' ? args.reason : 'operator-clear';
225
+ return handled(clearContinuationState(root, reason, 'operator_continuation_clear'));
226
+ }
227
+ case 'operator_continuation_followup_status':
228
+ return handled(readContinuationFollowUpQueue(root));
229
+ case 'operator_continuation_followup_ack': {
230
+ const reason = typeof args.reason === 'string' ? args.reason : '';
231
+ if (!reason.trim()) {
232
+ throw new Error('operator_continuation_followup_ack: reason is required');
233
+ }
234
+ const followUpId = typeof args.followUpId === 'string' ? args.followUpId : undefined;
235
+ const dedupeKey = typeof args.dedupeKey === 'string' ? args.dedupeKey : undefined;
236
+ const continuationId = typeof args.continuationId === 'string' ? args.continuationId : undefined;
237
+ if (followUpId) {
238
+ return handled(acknowledgeContinuationFollowUp(root, {
239
+ followUpId,
240
+ reason,
241
+ source: 'operator_continuation_followup_ack',
242
+ }));
243
+ }
244
+ if (dedupeKey) {
245
+ return handled(acknowledgeContinuationFollowUp(root, {
246
+ dedupeKey,
247
+ reason,
248
+ source: 'operator_continuation_followup_ack',
249
+ }));
250
+ }
251
+ if (continuationId) {
252
+ return handled(acknowledgeContinuationFollowUp(root, {
253
+ continuationId,
254
+ reason,
255
+ source: 'operator_continuation_followup_ack',
256
+ }));
257
+ }
258
+ const continuation = readContinuationState(root);
259
+ return handled(acknowledgeContinuationFollowUp(root, {
260
+ lane: continuation.lane,
261
+ sessionId: continuation.lastSessionId,
262
+ reason,
263
+ source: 'operator_continuation_followup_ack',
264
+ }));
265
+ }
266
+ case 'operator_delegated_session_status': {
267
+ detectStaleDelegatedSessions(root, {});
268
+ const validKinds = new Set(['subagent', 'team_executor', 'lane_delegation']);
269
+ const validStatuses = new Set(['active', 'completed', 'failed', 'stale', 'orphaned']);
270
+ const kind = typeof args.kind === 'string' && validKinds.has(args.kind)
271
+ ? args.kind
272
+ : undefined;
273
+ const status = typeof args.status === 'string' && validStatuses.has(args.status)
274
+ ? args.status
275
+ : undefined;
276
+ const continuationId = typeof args.continuationId === 'string' ? args.continuationId : undefined;
277
+ return handled({
278
+ summary: delegatedSessionStatusSummary(root),
279
+ sessions: listDelegatedSessions(root, { continuationId, kind, status }),
280
+ });
281
+ }
282
+ case 'operator_delegated_session_resume': {
283
+ const continuationId = String(args.continuationId ?? '').trim();
284
+ if (!continuationId) {
285
+ throw new Error('operator_delegated_session_resume: continuationId is required');
286
+ }
287
+ const plan = buildDelegatedSessionResumePlan(root, continuationId);
288
+ const refreshFollowUp = args.refreshFollowUp === true;
289
+ const refresh = refreshFollowUp ? refreshDelegatedSessionFollowUp(root, continuationId) : null;
290
+ return handled({ plan, refreshFollowUp: refresh });
291
+ }
292
+ case 'operator_delegated_session_orphan': {
293
+ const continuationId = String(args.continuationId ?? '').trim();
294
+ const reason = typeof args.reason === 'string' ? args.reason : '';
295
+ if (!continuationId)
296
+ throw new Error('operator_delegated_session_orphan: continuationId is required');
297
+ if (!reason.trim())
298
+ throw new Error('operator_delegated_session_orphan: reason is required');
299
+ return handled({ session: orphanDelegatedSession(root, {
300
+ continuationId,
301
+ reason,
302
+ by: typeof args.by === 'string' ? args.by : undefined,
303
+ }) });
304
+ }
305
+ case 'operator_subagent_runtime_status':
306
+ return handled(readSubagentRuntimeState(root));
307
+ case 'operator_idle_status':
308
+ return handled(readLogicalIdleStatus(root));
309
+ case 'operator_review_handoff_create': {
310
+ const fromExecutor = String(args.fromExecutor);
311
+ const toReviewer = String(args.toReviewer);
312
+ const taskId = String(args.taskId);
313
+ const handoffPath = layoutPath(root, 'state', 'review-handoff.json');
314
+ let existing = [];
315
+ if (existsSync(handoffPath)) {
316
+ try {
317
+ existing = JSON.parse(readFileSync(handoffPath, 'utf8'));
318
+ }
319
+ catch {
320
+ existing = [];
321
+ }
322
+ if (!Array.isArray(existing))
323
+ existing = [];
324
+ }
325
+ const entry = {
326
+ id: `handoff_${randomUUID().slice(0, 12)}`,
327
+ fromExecutor,
328
+ toReviewer,
329
+ taskId,
330
+ createdAt: new Date().toISOString(),
331
+ };
332
+ existing.push(entry);
333
+ mkdirSync(dirname(handoffPath), { recursive: true });
334
+ writeFileSync(handoffPath, JSON.stringify(existing, null, 2), 'utf8');
335
+ appendLedger(root, {
336
+ kind: 'executor',
337
+ action: 'review_handoff_created',
338
+ detail: `Executor "${fromExecutor}" handed off task "${taskId}" to reviewer "${toReviewer}"`,
339
+ taskId,
340
+ metadata: { fromExecutor, toReviewer, taskId, handoffId: entry.id },
341
+ });
342
+ return handled({ handoff: entry });
343
+ }
344
+ case 'operator_review_handoff_status': {
345
+ const handoffPath = layoutPath(root, 'state', 'review-handoff.json');
346
+ if (!existsSync(handoffPath))
347
+ return handled({ handoffs: [], count: 0 });
348
+ try {
349
+ const handoffs = JSON.parse(readFileSync(handoffPath, 'utf8'));
350
+ return handled({ handoffs: Array.isArray(handoffs) ? handoffs : [], count: Array.isArray(handoffs) ? handoffs.length : 0 });
351
+ }
352
+ catch {
353
+ return handled({ handoffs: [], count: 0, error: 'Failed to parse review-handoff.json' });
354
+ }
355
+ }
356
+ default:
357
+ return UNHANDLED;
358
+ }
359
+ }
360
+ //# sourceMappingURL=continuation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../src/mcp/continuation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,6BAA6B,EAA0D,MAAM,kDAAkD,CAAC;AACxS,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACtI,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,wDAAw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AAC;QACD,KAAK,gCAAgC,CAAC,CAAC,CAAC;YACtC,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC;YACrE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;gBAAE,OAAO,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;YACzE,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;gBAC/D,OAAO,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC9H,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,qCAAqC,EAAE,CAAC,CAAC;YAC3F,CAAC;QACH,CAAC;QACD;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type LaneToolContext, type LaneToolResult } from '../mcp/laneSupport.js';
2
+ import type { ToolDefinition } from '../mcp/toolPartitions.js';
3
+ export declare const jobsToolDefinitions: ToolDefinition[];
4
+ export declare function handleJobsTool(name: string, context: LaneToolContext): Promise<LaneToolResult>;
5
+ //# sourceMappingURL=jobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/mcp/jobs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,eAAe,EAAE,KAAK,cAAc,EAAa,MAAM,sBAAsB,CAAC;AACrG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,mBAAmB,EAAE,cAAc,EAiH/C,CAAC;AAEF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA+FpG"}