@elie-laloum/outpost 10.0.1 → 11.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 (963) hide show
  1. package/CHANGELOG.md +67 -1
  2. package/README.md +13 -9
  3. package/SECURITY.md +38 -4
  4. package/dist/adapters/agents/antigravity/antigravity-adapter.js +2 -0
  5. package/dist/adapters/agents/antigravity/antigravity-adapter.js.map +1 -1
  6. package/dist/adapters/agents/antigravity/antigravity-request.js +4 -4
  7. package/dist/adapters/agents/antigravity/antigravity-request.js.map +1 -1
  8. package/dist/adapters/agents/antigravity/antigravity.types.d.ts +2 -0
  9. package/dist/adapters/agents/antigravity/antigravity.types.js.map +1 -1
  10. package/dist/adapters/agents/claude/claude-adapter.js +3 -0
  11. package/dist/adapters/agents/claude/claude-adapter.js.map +1 -1
  12. package/dist/adapters/agents/claude/claude-profile.constants.d.ts +6 -0
  13. package/dist/adapters/agents/claude/claude-profile.constants.js +25 -0
  14. package/dist/adapters/agents/claude/claude-profile.constants.js.map +1 -0
  15. package/dist/adapters/agents/claude/claude-profile.d.ts +3 -0
  16. package/dist/adapters/agents/claude/claude-profile.js +69 -0
  17. package/dist/adapters/agents/claude/claude-profile.js.map +1 -0
  18. package/dist/adapters/agents/claude/claude-request.js +9 -3
  19. package/dist/adapters/agents/claude/claude-request.js.map +1 -1
  20. package/dist/adapters/agents/codex/codex-adapter.js +2 -0
  21. package/dist/adapters/agents/codex/codex-adapter.js.map +1 -1
  22. package/dist/adapters/agents/codex/codex-app-session.js +3 -0
  23. package/dist/adapters/agents/codex/codex-app-session.js.map +1 -1
  24. package/dist/adapters/agents/codex/codex-profile.d.ts +2 -0
  25. package/dist/adapters/agents/codex/codex-profile.js +9 -0
  26. package/dist/adapters/agents/codex/codex-profile.js.map +1 -0
  27. package/dist/adapters/agents/codex/codex-request.js +5 -1
  28. package/dist/adapters/agents/codex/codex-request.js.map +1 -1
  29. package/dist/adapters/agents/copilot/copilot-adapter.js +2 -0
  30. package/dist/adapters/agents/copilot/copilot-adapter.js.map +1 -1
  31. package/dist/adapters/agents/copilot/copilot-request.js +4 -2
  32. package/dist/adapters/agents/copilot/copilot-request.js.map +1 -1
  33. package/dist/adapters/agents/copilot/copilot.types.d.ts +2 -0
  34. package/dist/adapters/agents/copilot/copilot.types.js.map +1 -1
  35. package/dist/adapters/agents/kimi/kimi-adapter.js +3 -0
  36. package/dist/adapters/agents/kimi/kimi-adapter.js.map +1 -1
  37. package/dist/adapters/agents/kimi/kimi-request.js +4 -2
  38. package/dist/adapters/agents/kimi/kimi-request.js.map +1 -1
  39. package/dist/adapters/agents/kimi/kimi.types.d.ts +2 -0
  40. package/dist/adapters/agents/kimi/kimi.types.js.map +1 -1
  41. package/dist/adapters/agents/model-support.js +5 -3
  42. package/dist/adapters/agents/model-support.js.map +1 -1
  43. package/dist/adapters/agents/profile-support.d.ts +3 -0
  44. package/dist/adapters/agents/profile-support.js +10 -0
  45. package/dist/adapters/agents/profile-support.js.map +1 -0
  46. package/dist/adapters/agents/settings.types.d.ts +3 -0
  47. package/dist/adapters/agents/settings.types.js.map +1 -1
  48. package/dist/adapters/models/model-prices.constants.d.ts +10 -0
  49. package/dist/adapters/models/model-prices.constants.js +11 -0
  50. package/dist/adapters/models/model-prices.constants.js.map +1 -0
  51. package/dist/adapters/models/model-prices.d.ts +3 -0
  52. package/dist/adapters/models/model-prices.js +105 -0
  53. package/dist/adapters/models/model-prices.js.map +1 -0
  54. package/dist/adapters/models/model-prices.types.d.ts +11 -0
  55. package/dist/adapters/models/model-prices.types.js +2 -0
  56. package/dist/adapters/models/model-prices.types.js.map +1 -0
  57. package/dist/adapters/secrets/aws.d.ts +4 -0
  58. package/dist/adapters/secrets/aws.js +43 -0
  59. package/dist/adapters/secrets/aws.js.map +1 -0
  60. package/dist/adapters/secrets/aws.types.d.ts +11 -0
  61. package/dist/adapters/secrets/aws.types.js +2 -0
  62. package/dist/adapters/secrets/aws.types.js.map +1 -0
  63. package/dist/adapters/secrets/azure.d.ts +4 -0
  64. package/dist/adapters/secrets/azure.js +23 -0
  65. package/dist/adapters/secrets/azure.js.map +1 -0
  66. package/dist/adapters/secrets/azure.types.d.ts +9 -0
  67. package/dist/adapters/secrets/azure.types.js +2 -0
  68. package/dist/adapters/secrets/azure.types.js.map +1 -0
  69. package/dist/adapters/secrets/gcp.d.ts +4 -0
  70. package/dist/adapters/secrets/gcp.js +28 -0
  71. package/dist/adapters/secrets/gcp.js.map +1 -0
  72. package/dist/adapters/secrets/gcp.types.d.ts +5 -0
  73. package/dist/adapters/secrets/gcp.types.js +2 -0
  74. package/dist/adapters/secrets/gcp.types.js.map +1 -0
  75. package/dist/adapters/secrets/infisical.d.ts +4 -0
  76. package/dist/adapters/secrets/infisical.js +40 -0
  77. package/dist/adapters/secrets/infisical.js.map +1 -0
  78. package/dist/adapters/secrets/infisical.types.d.ts +11 -0
  79. package/dist/adapters/secrets/infisical.types.js +2 -0
  80. package/dist/adapters/secrets/infisical.types.js.map +1 -0
  81. package/dist/adapters/secrets/onepassword.d.ts +4 -0
  82. package/dist/adapters/secrets/onepassword.js +12 -0
  83. package/dist/adapters/secrets/onepassword.js.map +1 -0
  84. package/dist/adapters/secrets/onepassword.types.d.ts +7 -0
  85. package/dist/adapters/secrets/onepassword.types.js +2 -0
  86. package/dist/adapters/secrets/onepassword.types.js.map +1 -0
  87. package/dist/adapters/secrets/secret-source.d.ts +4 -0
  88. package/dist/adapters/secrets/secret-source.js +29 -0
  89. package/dist/adapters/secrets/secret-source.js.map +1 -0
  90. package/dist/adapters/secrets/secret-source.types.d.ts +2 -0
  91. package/dist/adapters/secrets/secret-source.types.js +2 -0
  92. package/dist/adapters/secrets/secret-source.types.js.map +1 -0
  93. package/dist/adapters/secrets/vault-response.d.ts +1 -0
  94. package/dist/adapters/secrets/vault-response.js +43 -0
  95. package/dist/adapters/secrets/vault-response.js.map +1 -0
  96. package/dist/adapters/secrets/vault.constants.d.ts +1 -0
  97. package/dist/adapters/secrets/vault.constants.js +2 -0
  98. package/dist/adapters/secrets/vault.constants.js.map +1 -0
  99. package/dist/adapters/secrets/vault.d.ts +4 -0
  100. package/dist/adapters/secrets/vault.js +63 -0
  101. package/dist/adapters/secrets/vault.js.map +1 -0
  102. package/dist/adapters/secrets/vault.types.d.ts +8 -0
  103. package/dist/adapters/secrets/vault.types.js +2 -0
  104. package/dist/adapters/secrets/vault.types.js.map +1 -0
  105. package/dist/adapters/testing/scripted-agent.d.ts +3 -0
  106. package/dist/adapters/testing/scripted-agent.js +77 -0
  107. package/dist/adapters/testing/scripted-agent.js.map +1 -0
  108. package/dist/adapters/testing/scripted-agent.types.d.ts +17 -0
  109. package/dist/adapters/testing/scripted-agent.types.js +2 -0
  110. package/dist/adapters/testing/scripted-agent.types.js.map +1 -0
  111. package/dist/adapters/tools/file-tools.d.ts +2 -1
  112. package/dist/adapters/tools/file-tools.js +37 -15
  113. package/dist/adapters/tools/file-tools.js.map +1 -1
  114. package/dist/adapters/tools/filesystem-selection.constants.d.ts +1 -0
  115. package/dist/adapters/tools/filesystem-selection.constants.js +7 -0
  116. package/dist/adapters/tools/filesystem-selection.constants.js.map +1 -0
  117. package/dist/adapters/tools/git-tools.js +1 -0
  118. package/dist/adapters/tools/git-tools.js.map +1 -1
  119. package/dist/adapters/tools/search-tools.d.ts +2 -1
  120. package/dist/adapters/tools/search-tools.js +52 -22
  121. package/dist/adapters/tools/search-tools.js.map +1 -1
  122. package/dist/adapters/tools/tools.types.d.ts +3 -0
  123. package/dist/adapters/tools/tools.types.js.map +1 -1
  124. package/dist/application/activity-watchdog.d.ts +2 -1
  125. package/dist/application/activity-watchdog.js +2 -1
  126. package/dist/application/activity-watchdog.js.map +1 -1
  127. package/dist/application/agent-conflict-resolver.d.ts +3 -0
  128. package/dist/application/agent-conflict-resolver.js +71 -0
  129. package/dist/application/agent-conflict-resolver.js.map +1 -0
  130. package/dist/application/agent-turn.js +17 -2
  131. package/dist/application/agent-turn.js.map +1 -1
  132. package/dist/application/attach.d.ts +4 -0
  133. package/dist/application/attach.js +20 -0
  134. package/dist/application/attach.js.map +1 -1
  135. package/dist/application/brief-renderer.d.ts +2 -3
  136. package/dist/application/brief-renderer.js +6 -4
  137. package/dist/application/brief-renderer.js.map +1 -1
  138. package/dist/application/conflict-merge.d.ts +5 -0
  139. package/dist/application/conflict-merge.js +31 -0
  140. package/dist/application/conflict-merge.js.map +1 -0
  141. package/dist/application/conflict-resolution.constants.d.ts +4 -0
  142. package/dist/application/conflict-resolution.constants.js +5 -0
  143. package/dist/application/conflict-resolution.constants.js.map +1 -0
  144. package/dist/application/conflict-resolution.types.d.ts +35 -0
  145. package/dist/application/conflict-resolution.types.js +2 -0
  146. package/dist/application/conflict-resolution.types.js.map +1 -0
  147. package/dist/application/conflict-verification.d.ts +4 -0
  148. package/dist/application/conflict-verification.js +45 -0
  149. package/dist/application/conflict-verification.js.map +1 -0
  150. package/dist/application/custom-turn.js +18 -6
  151. package/dist/application/custom-turn.js.map +1 -1
  152. package/dist/application/decision-task.js +4 -1
  153. package/dist/application/decision-task.js.map +1 -1
  154. package/dist/application/dispatch-observation.js +63 -5
  155. package/dist/application/dispatch-observation.js.map +1 -1
  156. package/dist/application/dispatch-observation.types.d.ts +3 -0
  157. package/dist/application/dispatch-observation.types.js.map +1 -1
  158. package/dist/application/dispatch-validation.js +13 -1
  159. package/dist/application/dispatch-validation.js.map +1 -1
  160. package/dist/application/dispatch.d.ts +4 -0
  161. package/dist/application/dispatch.js +23 -0
  162. package/dist/application/dispatch.js.map +1 -1
  163. package/dist/application/doctor-image.js +4 -2
  164. package/dist/application/doctor-image.js.map +1 -1
  165. package/dist/application/doctor-sandbox.js +3 -1
  166. package/dist/application/doctor-sandbox.js.map +1 -1
  167. package/dist/application/doctor-sandbox.types.d.ts +1 -0
  168. package/dist/application/doctor-sandbox.types.js.map +1 -1
  169. package/dist/application/doctor.js +16 -8
  170. package/dist/application/doctor.js.map +1 -1
  171. package/dist/application/doctor.types.d.ts +2 -0
  172. package/dist/application/doctor.types.js.map +1 -1
  173. package/dist/application/execution.d.ts +2 -3
  174. package/dist/application/execution.js +35 -4
  175. package/dist/application/execution.js.map +1 -1
  176. package/dist/application/execution.types.d.ts +15 -0
  177. package/dist/application/execution.types.js.map +1 -1
  178. package/dist/application/file-interactive-task.d.ts +3 -0
  179. package/dist/application/file-interactive-task.js +189 -0
  180. package/dist/application/file-interactive-task.js.map +1 -0
  181. package/dist/application/file-run-report.d.ts +6 -0
  182. package/dist/application/file-run-report.js +33 -0
  183. package/dist/application/file-run-report.js.map +1 -0
  184. package/dist/application/file-sandbox.d.ts +9 -0
  185. package/dist/application/file-sandbox.js +674 -0
  186. package/dist/application/file-sandbox.js.map +1 -0
  187. package/dist/application/file-sandbox.types.d.ts +62 -0
  188. package/dist/application/file-sandbox.types.js +2 -0
  189. package/dist/application/file-sandbox.types.js.map +1 -0
  190. package/dist/application/file-workspace-recovery.d.ts +5 -0
  191. package/dist/application/file-workspace-recovery.js +80 -0
  192. package/dist/application/file-workspace-recovery.js.map +1 -0
  193. package/dist/application/file-workspace-recovery.types.d.ts +18 -0
  194. package/dist/application/file-workspace-recovery.types.js +2 -0
  195. package/dist/application/file-workspace-recovery.types.js.map +1 -0
  196. package/dist/application/file-workspace-registry.d.ts +2 -0
  197. package/dist/application/file-workspace-registry.js +2 -0
  198. package/dist/application/file-workspace-registry.js.map +1 -0
  199. package/dist/application/file-workspace.d.ts +9 -0
  200. package/dist/application/file-workspace.js +583 -0
  201. package/dist/application/file-workspace.js.map +1 -0
  202. package/dist/application/file-workspace.types.d.ts +79 -0
  203. package/dist/application/file-workspace.types.js +2 -0
  204. package/dist/application/file-workspace.types.js.map +1 -0
  205. package/dist/application/harness-budget.js +2 -1
  206. package/dist/application/harness-budget.js.map +1 -1
  207. package/dist/application/harness-model-provider.js +18 -3
  208. package/dist/application/harness-model-provider.js.map +1 -1
  209. package/dist/application/harness-model-provider.types.d.ts +1 -0
  210. package/dist/application/harness-model-provider.types.js.map +1 -1
  211. package/dist/application/harness-routing.js +7 -1
  212. package/dist/application/harness-routing.js.map +1 -1
  213. package/dist/application/harness-subagent.js +10 -1
  214. package/dist/application/harness-subagent.js.map +1 -1
  215. package/dist/application/harness.types.d.ts +2 -1
  216. package/dist/application/harness.types.js.map +1 -1
  217. package/dist/application/interactive-task-execution.js +1 -0
  218. package/dist/application/interactive-task-execution.js.map +1 -1
  219. package/dist/application/interactive-task.d.ts +2 -1
  220. package/dist/application/interactive-task.js +3 -0
  221. package/dist/application/interactive-task.js.map +1 -1
  222. package/dist/application/interactive-task.types.d.ts +20 -0
  223. package/dist/application/interactive-task.types.js.map +1 -1
  224. package/dist/application/lifecycle-hooks.d.ts +4 -2
  225. package/dist/application/lifecycle-hooks.js +46 -12
  226. package/dist/application/lifecycle-hooks.js.map +1 -1
  227. package/dist/application/lifecycle.constants.d.ts +1 -1
  228. package/dist/application/lifecycle.constants.js +1 -0
  229. package/dist/application/lifecycle.constants.js.map +1 -1
  230. package/dist/application/outpost.types.d.ts +6 -0
  231. package/dist/application/outpost.types.js.map +1 -1
  232. package/dist/application/recipe-configuration-providers.d.ts +3 -0
  233. package/dist/application/recipe-configuration-providers.js +45 -0
  234. package/dist/application/recipe-configuration-providers.js.map +1 -0
  235. package/dist/application/recipe-configuration-values.d.ts +10 -0
  236. package/dist/application/recipe-configuration-values.js +96 -0
  237. package/dist/application/recipe-configuration-values.js.map +1 -0
  238. package/dist/application/recipe-configuration.constants.d.ts +7 -0
  239. package/dist/application/recipe-configuration.constants.js +16 -0
  240. package/dist/application/recipe-configuration.constants.js.map +1 -0
  241. package/dist/application/recipe-configuration.d.ts +2 -0
  242. package/dist/application/recipe-configuration.js +52 -0
  243. package/dist/application/recipe-configuration.js.map +1 -0
  244. package/dist/application/recipe-report.constants.d.ts +5 -0
  245. package/dist/application/recipe-report.constants.js +15 -0
  246. package/dist/application/recipe-report.constants.js.map +1 -0
  247. package/dist/application/recipe-report.d.ts +4 -0
  248. package/dist/application/recipe-report.js +69 -0
  249. package/dist/application/recipe-report.js.map +1 -0
  250. package/dist/application/recipe-report.types.d.ts +33 -0
  251. package/dist/application/recipe-report.types.js +2 -0
  252. package/dist/application/recipe-report.types.js.map +1 -0
  253. package/dist/application/recipe-run.d.ts +7 -0
  254. package/dist/application/recipe-run.js +86 -0
  255. package/dist/application/recipe-run.js.map +1 -0
  256. package/dist/application/recipe.d.ts +6 -0
  257. package/dist/application/recipe.js +86 -0
  258. package/dist/application/recipe.js.map +1 -0
  259. package/dist/application/recipe.types.d.ts +22 -0
  260. package/dist/application/recipe.types.js +2 -0
  261. package/dist/application/recipe.types.js.map +1 -0
  262. package/dist/application/recipes/advanced-components.d.ts +15 -0
  263. package/dist/application/recipes/advanced-components.js +35 -0
  264. package/dist/application/recipes/advanced-components.js.map +1 -0
  265. package/dist/application/recipes/advanced-components.types.d.ts +16 -0
  266. package/dist/application/recipes/advanced-components.types.js +2 -0
  267. package/dist/application/recipes/advanced-components.types.js.map +1 -0
  268. package/dist/application/recipes/agent-components.d.ts +5 -0
  269. package/dist/application/recipes/agent-components.js +22 -0
  270. package/dist/application/recipes/agent-components.js.map +1 -0
  271. package/dist/application/recipes/agent-components.types.d.ts +32 -0
  272. package/dist/application/recipes/agent-components.types.js +2 -0
  273. package/dist/application/recipes/agent-components.types.js.map +1 -0
  274. package/dist/application/recipes/agent-preflight.d.ts +3 -0
  275. package/dist/application/recipes/agent-preflight.js +15 -0
  276. package/dist/application/recipes/agent-preflight.js.map +1 -0
  277. package/dist/application/recipes/components.types.d.ts +50 -0
  278. package/dist/application/recipes/components.types.js +2 -0
  279. package/dist/application/recipes/components.types.js.map +1 -0
  280. package/dist/application/recipes/configuration.d.ts +4 -0
  281. package/dist/application/recipes/configuration.js +76 -0
  282. package/dist/application/recipes/configuration.js.map +1 -0
  283. package/dist/application/recipes/durable-resources.d.ts +5 -0
  284. package/dist/application/recipes/durable-resources.js +183 -0
  285. package/dist/application/recipes/durable-resources.js.map +1 -0
  286. package/dist/application/recipes/durable-resources.types.d.ts +17 -0
  287. package/dist/application/recipes/durable-resources.types.js +2 -0
  288. package/dist/application/recipes/durable-resources.types.js.map +1 -0
  289. package/dist/application/recipes/durable-run.d.ts +28 -0
  290. package/dist/application/recipes/durable-run.js +89 -0
  291. package/dist/application/recipes/durable-run.js.map +1 -0
  292. package/dist/application/recipes/durable-schema.constants.d.ts +557 -0
  293. package/dist/application/recipes/durable-schema.constants.js +138 -0
  294. package/dist/application/recipes/durable-schema.constants.js.map +1 -0
  295. package/dist/application/recipes/durable-session.d.ts +8 -0
  296. package/dist/application/recipes/durable-session.js +178 -0
  297. package/dist/application/recipes/durable-session.js.map +1 -0
  298. package/dist/application/recipes/durable.types.d.ts +49 -0
  299. package/dist/application/recipes/durable.types.js +2 -0
  300. package/dist/application/recipes/durable.types.js.map +1 -0
  301. package/dist/application/recipes/errors.d.ts +2 -0
  302. package/dist/application/recipes/errors.js +21 -0
  303. package/dist/application/recipes/errors.js.map +1 -0
  304. package/dist/application/recipes/file-configuration.d.ts +3 -0
  305. package/dist/application/recipes/file-configuration.js +195 -0
  306. package/dist/application/recipes/file-configuration.js.map +1 -0
  307. package/dist/application/recipes/file-configuration.types.d.ts +26 -0
  308. package/dist/application/recipes/file-configuration.types.js +2 -0
  309. package/dist/application/recipes/file-configuration.types.js.map +1 -0
  310. package/dist/application/recipes/file-publication-report.constants.d.ts +1 -0
  311. package/dist/application/recipes/file-publication-report.constants.js +2 -0
  312. package/dist/application/recipes/file-publication-report.constants.js.map +1 -0
  313. package/dist/application/recipes/file-publication-report.d.ts +3 -0
  314. package/dist/application/recipes/file-publication-report.js +110 -0
  315. package/dist/application/recipes/file-publication-report.js.map +1 -0
  316. package/dist/application/recipes/file-run.d.ts +6 -0
  317. package/dist/application/recipes/file-run.js +263 -0
  318. package/dist/application/recipes/file-run.js.map +1 -0
  319. package/dist/application/recipes/file-validation.d.ts +3 -0
  320. package/dist/application/recipes/file-validation.js +32 -0
  321. package/dist/application/recipes/file-validation.js.map +1 -0
  322. package/dist/application/recipes/graph.d.ts +4 -0
  323. package/dist/application/recipes/graph.js +208 -0
  324. package/dist/application/recipes/graph.js.map +1 -0
  325. package/dist/application/recipes/job.d.ts +3 -0
  326. package/dist/application/recipes/job.js +100 -0
  327. package/dist/application/recipes/job.js.map +1 -0
  328. package/dist/application/recipes/native-catalog.constants.d.ts +4 -0
  329. package/dist/application/recipes/native-catalog.constants.js +930 -0
  330. package/dist/application/recipes/native-catalog.constants.js.map +1 -0
  331. package/dist/application/recipes/native-factories.d.ts +1 -0
  332. package/dist/application/recipes/native-factories.js +136 -0
  333. package/dist/application/recipes/native-factories.js.map +1 -0
  334. package/dist/application/recipes/native-schemas.constants.d.ts +2 -0
  335. package/dist/application/recipes/native-schemas.constants.js +26619 -0
  336. package/dist/application/recipes/native-schemas.constants.js.map +1 -0
  337. package/dist/application/recipes/native.d.ts +7 -0
  338. package/dist/application/recipes/native.js +184 -0
  339. package/dist/application/recipes/native.js.map +1 -0
  340. package/dist/application/recipes/observation.d.ts +4 -0
  341. package/dist/application/recipes/observation.js +88 -0
  342. package/dist/application/recipes/observation.js.map +1 -0
  343. package/dist/application/recipes/project-expressions.d.ts +3 -0
  344. package/dist/application/recipes/project-expressions.js +28 -0
  345. package/dist/application/recipes/project-expressions.js.map +1 -0
  346. package/dist/application/recipes/project.d.ts +3 -0
  347. package/dist/application/recipes/project.js +165 -0
  348. package/dist/application/recipes/project.js.map +1 -0
  349. package/dist/application/recipes/project.types.d.ts +53 -0
  350. package/dist/application/recipes/project.types.js +2 -0
  351. package/dist/application/recipes/project.types.js.map +1 -0
  352. package/dist/application/recipes/projection.d.ts +2 -0
  353. package/dist/application/recipes/projection.js +9 -0
  354. package/dist/application/recipes/projection.js.map +1 -0
  355. package/dist/application/recipes/reports.d.ts +4 -0
  356. package/dist/application/recipes/reports.js +27 -0
  357. package/dist/application/recipes/reports.js.map +1 -0
  358. package/dist/application/recipes/runtime.d.ts +4 -0
  359. package/dist/application/recipes/runtime.js +179 -0
  360. package/dist/application/recipes/runtime.js.map +1 -0
  361. package/dist/application/recipes/sandbox.d.ts +6 -0
  362. package/dist/application/recipes/sandbox.js +31 -0
  363. package/dist/application/recipes/sandbox.js.map +1 -0
  364. package/dist/application/recipes/schemas.constants.d.ts +2 -0
  365. package/dist/application/recipes/schemas.constants.js +15 -0
  366. package/dist/application/recipes/schemas.constants.js.map +1 -0
  367. package/dist/application/recipes/scope.d.ts +3 -0
  368. package/dist/application/recipes/scope.js +180 -0
  369. package/dist/application/recipes/scope.js.map +1 -0
  370. package/dist/application/recipes/service-components.d.ts +10 -0
  371. package/dist/application/recipes/service-components.js +78 -0
  372. package/dist/application/recipes/service-components.js.map +1 -0
  373. package/dist/application/recipes/service-components.types.d.ts +57 -0
  374. package/dist/application/recipes/service-components.types.js +2 -0
  375. package/dist/application/recipes/service-components.types.js.map +1 -0
  376. package/dist/application/recipes/services.d.ts +4 -0
  377. package/dist/application/recipes/services.js +60 -0
  378. package/dist/application/recipes/services.js.map +1 -0
  379. package/dist/application/recipes/speculation-usage.d.ts +3 -0
  380. package/dist/application/recipes/speculation-usage.js +69 -0
  381. package/dist/application/recipes/speculation-usage.js.map +1 -0
  382. package/dist/application/recipes/speculation.d.ts +3 -0
  383. package/dist/application/recipes/speculation.js +55 -0
  384. package/dist/application/recipes/speculation.js.map +1 -0
  385. package/dist/application/recipes/status.d.ts +4 -0
  386. package/dist/application/recipes/status.js +72 -0
  387. package/dist/application/recipes/status.js.map +1 -0
  388. package/dist/application/recipes/storage-components.d.ts +2 -0
  389. package/dist/application/recipes/storage-components.js +10 -0
  390. package/dist/application/recipes/storage-components.js.map +1 -0
  391. package/dist/application/recipes/storage-components.types.d.ts +13 -0
  392. package/dist/application/recipes/storage-components.types.js +2 -0
  393. package/dist/application/recipes/storage-components.types.js.map +1 -0
  394. package/dist/application/recipes/variables.d.ts +2 -0
  395. package/dist/application/recipes/variables.js +31 -0
  396. package/dist/application/recipes/variables.js.map +1 -0
  397. package/dist/application/recipes/variables.types.d.ts +7 -0
  398. package/dist/application/recipes/variables.types.js +2 -0
  399. package/dist/application/recipes/variables.types.js.map +1 -0
  400. package/dist/application/recipes/workflow-components.d.ts +6 -0
  401. package/dist/application/recipes/workflow-components.js +106 -0
  402. package/dist/application/recipes/workflow-components.js.map +1 -0
  403. package/dist/application/recipes/workflow-components.types.d.ts +52 -0
  404. package/dist/application/recipes/workflow-components.types.js +2 -0
  405. package/dist/application/recipes/workflow-components.types.js.map +1 -0
  406. package/dist/application/recipes/workflow-report.d.ts +3 -0
  407. package/dist/application/recipes/workflow-report.js +48 -0
  408. package/dist/application/recipes/workflow-report.js.map +1 -0
  409. package/dist/application/recipes/workflow-run.d.ts +6 -0
  410. package/dist/application/recipes/workflow-run.js +70 -0
  411. package/dist/application/recipes/workflow-run.js.map +1 -0
  412. package/dist/application/recipes/workflow-validation.d.ts +3 -0
  413. package/dist/application/recipes/workflow-validation.js +85 -0
  414. package/dist/application/recipes/workflow-validation.js.map +1 -0
  415. package/dist/application/recipes/workflow.constants.d.ts +1 -0
  416. package/dist/application/recipes/workflow.constants.js +20 -0
  417. package/dist/application/recipes/workflow.constants.js.map +1 -0
  418. package/dist/application/recipes/workflow.d.ts +6 -0
  419. package/dist/application/recipes/workflow.js +348 -0
  420. package/dist/application/recipes/workflow.js.map +1 -0
  421. package/dist/application/recipes/workspace.d.ts +4 -0
  422. package/dist/application/recipes/workspace.js +44 -0
  423. package/dist/application/recipes/workspace.js.map +1 -0
  424. package/dist/application/repetition-watchdog.d.ts +3 -0
  425. package/dist/application/repetition-watchdog.js +118 -0
  426. package/dist/application/repetition-watchdog.js.map +1 -0
  427. package/dist/application/repetition-watchdog.types.d.ts +12 -0
  428. package/dist/application/repetition-watchdog.types.js +2 -0
  429. package/dist/application/repetition-watchdog.types.js.map +1 -0
  430. package/dist/application/run-report-events.d.ts +2 -0
  431. package/dist/application/run-report-events.js +72 -0
  432. package/dist/application/run-report-events.js.map +1 -0
  433. package/dist/application/run-report.d.ts +5 -0
  434. package/dist/application/run-report.js +32 -0
  435. package/dist/application/run-report.js.map +1 -0
  436. package/dist/application/run-report.types.d.ts +13 -0
  437. package/dist/application/run-report.types.js +2 -0
  438. package/dist/application/run-report.types.js.map +1 -0
  439. package/dist/application/sandbox-attach.js +3 -0
  440. package/dist/application/sandbox-attach.js.map +1 -1
  441. package/dist/application/sandbox-dispatch.js +51 -2
  442. package/dist/application/sandbox-dispatch.js.map +1 -1
  443. package/dist/application/sandbox-provision.js +38 -13
  444. package/dist/application/sandbox-provision.js.map +1 -1
  445. package/dist/application/sandbox-session.types.d.ts +1 -0
  446. package/dist/application/sandbox-session.types.js.map +1 -1
  447. package/dist/application/sandbox.d.ts +6 -0
  448. package/dist/application/sandbox.js +23 -3
  449. package/dist/application/sandbox.js.map +1 -1
  450. package/dist/application/secrets.d.ts +2 -0
  451. package/dist/application/secrets.js +67 -0
  452. package/dist/application/secrets.js.map +1 -0
  453. package/dist/application/speculation-checkpoint.d.ts +1 -1
  454. package/dist/application/speculation-checkpoint.js +21 -4
  455. package/dist/application/speculation-checkpoint.js.map +1 -1
  456. package/dist/application/speculation-resume.js +1 -1
  457. package/dist/application/speculation-resume.js.map +1 -1
  458. package/dist/application/speculation-run.js +59 -8
  459. package/dist/application/speculation-run.js.map +1 -1
  460. package/dist/application/speculation-validation.d.ts +5 -0
  461. package/dist/application/speculation-validation.js +29 -0
  462. package/dist/application/speculation-validation.js.map +1 -0
  463. package/dist/application/speculation.js +3 -19
  464. package/dist/application/speculation.js.map +1 -1
  465. package/dist/application/speculation.types.d.ts +4 -1
  466. package/dist/application/speculation.types.js.map +1 -1
  467. package/dist/application/stop-reason.js +2 -0
  468. package/dist/application/stop-reason.js.map +1 -1
  469. package/dist/application/task-file-workspace.d.ts +8 -0
  470. package/dist/application/task-file-workspace.js +74 -0
  471. package/dist/application/task-file-workspace.js.map +1 -0
  472. package/dist/application/task-file-workspace.types.d.ts +6 -0
  473. package/dist/application/task-file-workspace.types.js +2 -0
  474. package/dist/application/task-file-workspace.types.js.map +1 -0
  475. package/dist/application/task-usage.d.ts +2 -0
  476. package/dist/application/task-usage.js +34 -15
  477. package/dist/application/task-usage.js.map +1 -1
  478. package/dist/application/task-usage.types.d.ts +4 -0
  479. package/dist/application/task-usage.types.js.map +1 -1
  480. package/dist/application/tasks.d.ts +7 -1
  481. package/dist/application/tasks.js +92 -5
  482. package/dist/application/tasks.js.map +1 -1
  483. package/dist/application/tasks.types.d.ts +28 -1
  484. package/dist/application/tasks.types.js.map +1 -1
  485. package/dist/application/transport-inspection.constants.js +1 -0
  486. package/dist/application/transport-inspection.constants.js.map +1 -1
  487. package/dist/application/workflow-job.d.ts +5 -1
  488. package/dist/application/workflow-job.js +11 -16
  489. package/dist/application/workflow-job.js.map +1 -1
  490. package/dist/application/workflow-job.types.d.ts +2 -1
  491. package/dist/application/workflow-job.types.js.map +1 -1
  492. package/dist/application/workspace-integration.d.ts +4 -0
  493. package/dist/application/workspace-integration.js +94 -0
  494. package/dist/application/workspace-integration.js.map +1 -0
  495. package/dist/application/workspace-output-baseline.d.ts +5 -0
  496. package/dist/application/workspace-output-baseline.js +44 -0
  497. package/dist/application/workspace-output-baseline.js.map +1 -0
  498. package/dist/application/workspace-publication-directories.d.ts +8 -0
  499. package/dist/application/workspace-publication-directories.js +170 -0
  500. package/dist/application/workspace-publication-directories.js.map +1 -0
  501. package/dist/application/workspace-publication.d.ts +7 -0
  502. package/dist/application/workspace-publication.js +537 -0
  503. package/dist/application/workspace-publication.js.map +1 -0
  504. package/dist/application/workspace-publication.types.d.ts +37 -0
  505. package/dist/application/workspace-publication.types.js +2 -0
  506. package/dist/application/workspace-publication.types.js.map +1 -0
  507. package/dist/application/workspace-source.d.ts +8 -0
  508. package/dist/application/workspace-source.js +18 -0
  509. package/dist/application/workspace-source.js.map +1 -0
  510. package/dist/application/workspace.d.ts +2 -0
  511. package/dist/application/workspace.js +10 -1
  512. package/dist/application/workspace.js.map +1 -1
  513. package/dist/cli/commands.js +17 -2
  514. package/dist/cli/commands.js.map +1 -1
  515. package/dist/cli/doctor-command.js +6 -1
  516. package/dist/cli/doctor-command.js.map +1 -1
  517. package/dist/cli/main.constants.d.ts +191 -3
  518. package/dist/cli/main.constants.js +275 -3
  519. package/dist/cli/main.constants.js.map +1 -1
  520. package/dist/cli/main.types.d.ts +1 -1
  521. package/dist/cli/main.types.js.map +1 -1
  522. package/dist/cli/recipe-actor.d.ts +2 -0
  523. package/dist/cli/recipe-actor.js +14 -0
  524. package/dist/cli/recipe-actor.js.map +1 -0
  525. package/dist/cli/recipe-catalog.d.ts +2 -0
  526. package/dist/cli/recipe-catalog.js +54 -0
  527. package/dist/cli/recipe-catalog.js.map +1 -0
  528. package/dist/cli/recipe-command.d.ts +2 -0
  529. package/dist/cli/recipe-command.js +184 -0
  530. package/dist/cli/recipe-command.js.map +1 -0
  531. package/dist/cli/recipe-configuration-providers.d.ts +1 -0
  532. package/dist/cli/recipe-configuration-providers.js +2 -0
  533. package/dist/cli/recipe-configuration-providers.js.map +1 -0
  534. package/dist/cli/recipe-configuration-values.d.ts +1 -0
  535. package/dist/cli/recipe-configuration-values.js +2 -0
  536. package/dist/cli/recipe-configuration-values.js.map +1 -0
  537. package/dist/cli/recipe-configuration.constants.d.ts +1 -0
  538. package/dist/cli/recipe-configuration.constants.js +2 -0
  539. package/dist/cli/recipe-configuration.constants.js.map +1 -0
  540. package/dist/cli/recipe-configuration.d.ts +1 -0
  541. package/dist/cli/recipe-configuration.js +2 -0
  542. package/dist/cli/recipe-configuration.js.map +1 -0
  543. package/dist/cli/recipe-dialogue.d.ts +5 -0
  544. package/dist/cli/recipe-dialogue.js +69 -0
  545. package/dist/cli/recipe-dialogue.js.map +1 -0
  546. package/dist/cli/recipe-dialogue.types.d.ts +11 -0
  547. package/dist/cli/recipe-dialogue.types.js +2 -0
  548. package/dist/cli/recipe-dialogue.types.js.map +1 -0
  549. package/dist/cli/recipe-gates.d.ts +5 -0
  550. package/dist/cli/recipe-gates.js +51 -0
  551. package/dist/cli/recipe-gates.js.map +1 -0
  552. package/dist/cli/recipe-init.constants.d.ts +7 -0
  553. package/dist/cli/recipe-init.constants.js +64 -0
  554. package/dist/cli/recipe-init.constants.js.map +1 -0
  555. package/dist/cli/recipe-init.d.ts +2 -0
  556. package/dist/cli/recipe-init.js +39 -0
  557. package/dist/cli/recipe-init.js.map +1 -0
  558. package/dist/cli/recipe-inputs.d.ts +2 -0
  559. package/dist/cli/recipe-inputs.js +31 -0
  560. package/dist/cli/recipe-inputs.js.map +1 -0
  561. package/dist/cli/recipe-report.constants.d.ts +1 -0
  562. package/dist/cli/recipe-report.constants.js +2 -0
  563. package/dist/cli/recipe-report.constants.js.map +1 -0
  564. package/dist/cli/recipe-report.d.ts +1 -0
  565. package/dist/cli/recipe-report.js +2 -0
  566. package/dist/cli/recipe-report.js.map +1 -0
  567. package/dist/cli/recipe-report.types.d.ts +1 -0
  568. package/dist/cli/recipe-report.types.js +2 -0
  569. package/dist/cli/recipe-report.types.js.map +1 -0
  570. package/dist/cli/recipe-run.d.ts +1 -0
  571. package/dist/cli/recipe-run.js +2 -0
  572. package/dist/cli/recipe-run.js.map +1 -0
  573. package/dist/cli/recipe-terminal.d.ts +4 -0
  574. package/dist/cli/recipe-terminal.js +52 -0
  575. package/dist/cli/recipe-terminal.js.map +1 -0
  576. package/dist/cli/recipe-yaml.d.ts +3 -0
  577. package/dist/cli/recipe-yaml.js +193 -0
  578. package/dist/cli/recipe-yaml.js.map +1 -0
  579. package/dist/cli/recovery-command.js +57 -0
  580. package/dist/cli/recovery-command.js.map +1 -1
  581. package/dist/cli/recovery-file-transport.d.ts +4 -0
  582. package/dist/cli/recovery-file-transport.js +40 -0
  583. package/dist/cli/recovery-file-transport.js.map +1 -0
  584. package/dist/cli/recovery-publication-command.d.ts +2 -0
  585. package/dist/cli/recovery-publication-command.js +121 -0
  586. package/dist/cli/recovery-publication-command.js.map +1 -0
  587. package/dist/cli/recovery-workspace-command.d.ts +2 -0
  588. package/dist/cli/recovery-workspace-command.js +63 -0
  589. package/dist/cli/recovery-workspace-command.js.map +1 -0
  590. package/dist/domain/agent-profile-permissions.d.ts +4 -0
  591. package/dist/domain/agent-profile-permissions.js +38 -0
  592. package/dist/domain/agent-profile-permissions.js.map +1 -0
  593. package/dist/domain/agent-profile.constants.d.ts +7 -0
  594. package/dist/domain/agent-profile.constants.js +16 -0
  595. package/dist/domain/agent-profile.constants.js.map +1 -0
  596. package/dist/domain/agent-profile.d.ts +5 -0
  597. package/dist/domain/agent-profile.js +45 -0
  598. package/dist/domain/agent-profile.js.map +1 -0
  599. package/dist/domain/agent-profile.types.d.ts +10 -0
  600. package/dist/domain/agent-profile.types.js +2 -0
  601. package/dist/domain/agent-profile.types.js.map +1 -0
  602. package/dist/domain/agent.types.d.ts +13 -2
  603. package/dist/domain/agent.types.js.map +1 -1
  604. package/dist/domain/conversation.types.d.ts +4 -1
  605. package/dist/domain/conversation.types.js.map +1 -1
  606. package/dist/domain/diff-guard.d.ts +4 -0
  607. package/dist/domain/diff-guard.js +56 -0
  608. package/dist/domain/diff-guard.js.map +1 -0
  609. package/dist/domain/diff-guard.types.d.ts +10 -0
  610. package/dist/domain/diff-guard.types.js +2 -0
  611. package/dist/domain/diff-guard.types.js.map +1 -0
  612. package/dist/domain/errors.types.d.ts +1 -1
  613. package/dist/domain/errors.types.js.map +1 -1
  614. package/dist/domain/file-workspace.constants.d.ts +476 -0
  615. package/dist/domain/file-workspace.constants.js +237 -0
  616. package/dist/domain/file-workspace.constants.js.map +1 -0
  617. package/dist/domain/file-workspace.types.d.ts +133 -0
  618. package/dist/domain/file-workspace.types.js +2 -0
  619. package/dist/domain/file-workspace.types.js.map +1 -0
  620. package/dist/domain/harness.constants.js +1 -0
  621. package/dist/domain/harness.constants.js.map +1 -1
  622. package/dist/domain/harness.js +7 -2
  623. package/dist/domain/harness.js.map +1 -1
  624. package/dist/domain/harness.types.d.ts +4 -1
  625. package/dist/domain/harness.types.js.map +1 -1
  626. package/dist/domain/lifecycle.d.ts +2 -0
  627. package/dist/domain/lifecycle.js +17 -0
  628. package/dist/domain/lifecycle.js.map +1 -0
  629. package/dist/domain/lifecycle.types.d.ts +8 -0
  630. package/dist/domain/lifecycle.types.js +2 -0
  631. package/dist/domain/lifecycle.types.js.map +1 -0
  632. package/dist/domain/observation.js +12 -6
  633. package/dist/domain/observation.js.map +1 -1
  634. package/dist/domain/observation.types.d.ts +4 -1
  635. package/dist/domain/observation.types.js.map +1 -1
  636. package/dist/domain/pricing.constants.d.ts +1 -0
  637. package/dist/domain/pricing.constants.js +2 -0
  638. package/dist/domain/pricing.constants.js.map +1 -0
  639. package/dist/domain/pricing.d.ts +4 -0
  640. package/dist/domain/pricing.js +60 -0
  641. package/dist/domain/pricing.js.map +1 -0
  642. package/dist/domain/pricing.types.d.ts +20 -0
  643. package/dist/domain/pricing.types.js +2 -0
  644. package/dist/domain/pricing.types.js.map +1 -0
  645. package/dist/domain/prompts.d.ts +1 -1
  646. package/dist/domain/prompts.js.map +1 -1
  647. package/dist/domain/recipe-catalog.constants.d.ts +7 -0
  648. package/dist/domain/recipe-catalog.constants.js +14 -0
  649. package/dist/domain/recipe-catalog.constants.js.map +1 -0
  650. package/dist/domain/recipe-catalog.d.ts +2 -0
  651. package/dist/domain/recipe-catalog.js +41 -0
  652. package/dist/domain/recipe-catalog.js.map +1 -0
  653. package/dist/domain/recipe-catalog.types.d.ts +11 -0
  654. package/dist/domain/recipe-catalog.types.js +2 -0
  655. package/dist/domain/recipe-catalog.types.js.map +1 -0
  656. package/dist/domain/recipe-inputs.d.ts +5 -0
  657. package/dist/domain/recipe-inputs.js +110 -0
  658. package/dist/domain/recipe-inputs.js.map +1 -0
  659. package/dist/domain/recipe-templates.d.ts +7 -0
  660. package/dist/domain/recipe-templates.js +85 -0
  661. package/dist/domain/recipe-templates.js.map +1 -0
  662. package/dist/domain/recipe.constants.d.ts +21 -0
  663. package/dist/domain/recipe.constants.js +59 -0
  664. package/dist/domain/recipe.constants.js.map +1 -0
  665. package/dist/domain/recipe.d.ts +2 -0
  666. package/dist/domain/recipe.js +294 -0
  667. package/dist/domain/recipe.js.map +1 -0
  668. package/dist/domain/recipe.types.d.ts +52 -0
  669. package/dist/domain/recipe.types.js +2 -0
  670. package/dist/domain/recipe.types.js.map +1 -0
  671. package/dist/domain/recipes/checkpoint-store.types.d.ts +10 -0
  672. package/dist/domain/recipes/checkpoint-store.types.js +2 -0
  673. package/dist/domain/recipes/checkpoint-store.types.js.map +1 -0
  674. package/dist/domain/recipes/component.d.ts +3 -0
  675. package/dist/domain/recipes/component.js +27 -0
  676. package/dist/domain/recipes/component.js.map +1 -0
  677. package/dist/domain/recipes/component.types.d.ts +39 -0
  678. package/dist/domain/recipes/component.types.js +2 -0
  679. package/dist/domain/recipes/component.types.js.map +1 -0
  680. package/dist/domain/recipes/expression-text.d.ts +2 -0
  681. package/dist/domain/recipes/expression-text.js +22 -0
  682. package/dist/domain/recipes/expression-text.js.map +1 -0
  683. package/dist/domain/recipes/expressions.d.ts +7 -0
  684. package/dist/domain/recipes/expressions.js +209 -0
  685. package/dist/domain/recipes/expressions.js.map +1 -0
  686. package/dist/domain/recipes/expressions.types.d.ts +17 -0
  687. package/dist/domain/recipes/expressions.types.js +2 -0
  688. package/dist/domain/recipes/expressions.types.js.map +1 -0
  689. package/dist/domain/recipes/schema-walk.d.ts +3 -0
  690. package/dist/domain/recipes/schema-walk.js +151 -0
  691. package/dist/domain/recipes/schema-walk.js.map +1 -0
  692. package/dist/domain/recipes/schema-walk.types.d.ts +2 -0
  693. package/dist/domain/recipes/schema-walk.types.js +2 -0
  694. package/dist/domain/recipes/schema-walk.types.js.map +1 -0
  695. package/dist/domain/recipes/schema.constants.d.ts +41 -0
  696. package/dist/domain/recipes/schema.constants.js +59 -0
  697. package/dist/domain/recipes/schema.constants.js.map +1 -0
  698. package/dist/domain/recipes/values.d.ts +6 -0
  699. package/dist/domain/recipes/values.js +24 -0
  700. package/dist/domain/recipes/values.js.map +1 -0
  701. package/dist/domain/redaction.constants.d.ts +1 -0
  702. package/dist/domain/redaction.constants.js +2 -0
  703. package/dist/domain/redaction.constants.js.map +1 -0
  704. package/dist/domain/redaction.d.ts +1 -0
  705. package/dist/domain/redaction.js +74 -0
  706. package/dist/domain/redaction.js.map +1 -0
  707. package/dist/domain/replay.constants.js +1 -0
  708. package/dist/domain/replay.constants.js.map +1 -1
  709. package/dist/domain/replay.js +3 -1
  710. package/dist/domain/replay.js.map +1 -1
  711. package/dist/domain/run-report.constants.d.ts +5 -0
  712. package/dist/domain/run-report.constants.js +6 -0
  713. package/dist/domain/run-report.constants.js.map +1 -0
  714. package/dist/domain/run-report.d.ts +2 -0
  715. package/dist/domain/run-report.js +84 -0
  716. package/dist/domain/run-report.js.map +1 -0
  717. package/dist/domain/run-report.types.d.ts +47 -0
  718. package/dist/domain/run-report.types.js +2 -0
  719. package/dist/domain/run-report.types.js.map +1 -0
  720. package/dist/domain/run.constants.d.ts +9 -0
  721. package/dist/domain/run.constants.js +34 -0
  722. package/dist/domain/run.constants.js.map +1 -0
  723. package/dist/domain/run.d.ts +8 -0
  724. package/dist/domain/run.js +154 -0
  725. package/dist/domain/run.js.map +1 -0
  726. package/dist/domain/run.types.d.ts +90 -0
  727. package/dist/domain/run.types.js +2 -0
  728. package/dist/domain/run.types.js.map +1 -0
  729. package/dist/domain/sandbox.types.d.ts +14 -0
  730. package/dist/domain/sandbox.types.js.map +1 -1
  731. package/dist/domain/secrets.constants.d.ts +4 -0
  732. package/dist/domain/secrets.constants.js +5 -0
  733. package/dist/domain/secrets.constants.js.map +1 -0
  734. package/dist/domain/secrets.d.ts +2 -0
  735. package/dist/domain/secrets.js +18 -0
  736. package/dist/domain/secrets.js.map +1 -0
  737. package/dist/domain/secrets.types.d.ts +10 -0
  738. package/dist/domain/secrets.types.js +2 -0
  739. package/dist/domain/secrets.types.js.map +1 -0
  740. package/dist/domain/task-queue.js +4 -12
  741. package/dist/domain/task-queue.js.map +1 -1
  742. package/dist/domain/tool.constants.js +1 -0
  743. package/dist/domain/tool.constants.js.map +1 -1
  744. package/dist/domain/tool.js +2 -0
  745. package/dist/domain/tool.js.map +1 -1
  746. package/dist/domain/tool.types.d.ts +2 -0
  747. package/dist/domain/tool.types.js.map +1 -1
  748. package/dist/domain/usage.d.ts +2 -0
  749. package/dist/domain/usage.js +83 -0
  750. package/dist/domain/usage.js.map +1 -1
  751. package/dist/domain/watchdog.constants.d.ts +2 -0
  752. package/dist/domain/watchdog.constants.js +3 -0
  753. package/dist/domain/watchdog.constants.js.map +1 -0
  754. package/dist/domain/watchdog.d.ts +2 -0
  755. package/dist/domain/watchdog.js +15 -0
  756. package/dist/domain/watchdog.js.map +1 -0
  757. package/dist/domain/watchdog.types.d.ts +20 -0
  758. package/dist/domain/watchdog.types.js +2 -0
  759. package/dist/domain/watchdog.types.js.map +1 -0
  760. package/dist/domain/workflow/budget.d.ts +7 -3
  761. package/dist/domain/workflow/budget.js +48 -12
  762. package/dist/domain/workflow/budget.js.map +1 -1
  763. package/dist/domain/workflow/budget.types.d.ts +8 -1
  764. package/dist/domain/workflow/budget.types.js.map +1 -1
  765. package/dist/domain/workflow/checkpoint-validation.js +9 -0
  766. package/dist/domain/workflow/checkpoint-validation.js.map +1 -1
  767. package/dist/domain/workflow/checkpoint.js +28 -1
  768. package/dist/domain/workflow/checkpoint.js.map +1 -1
  769. package/dist/domain/workflow/checkpoint.types.d.ts +11 -0
  770. package/dist/domain/workflow/checkpoint.types.js.map +1 -1
  771. package/dist/domain/workflow/task-runner.js +3 -2
  772. package/dist/domain/workflow/task-runner.js.map +1 -1
  773. package/dist/domain/workflow/termination.js +3 -1
  774. package/dist/domain/workflow/termination.js.map +1 -1
  775. package/dist/domain/workflow/workflow-scheduler.js +13 -1
  776. package/dist/domain/workflow/workflow-scheduler.js.map +1 -1
  777. package/dist/domain/workflow/workflow-state.js +22 -1
  778. package/dist/domain/workflow/workflow-state.js.map +1 -1
  779. package/dist/domain/workflow.types.d.ts +6 -0
  780. package/dist/domain/workflow.types.js.map +1 -1
  781. package/dist/domain/workspace.types.d.ts +4 -4
  782. package/dist/domain/workspace.types.js.map +1 -1
  783. package/dist/index.d.ts +43 -3
  784. package/dist/index.js +17 -1
  785. package/dist/index.js.map +1 -1
  786. package/dist/infrastructure/conversations/harness-store.d.ts +1 -1
  787. package/dist/infrastructure/conversations/harness-store.js +5 -5
  788. package/dist/infrastructure/conversations/harness-store.js.map +1 -1
  789. package/dist/infrastructure/conversations/harness-transcript.js +11 -6
  790. package/dist/infrastructure/conversations/harness-transcript.js.map +1 -1
  791. package/dist/infrastructure/conversations/harness-transcript.types.d.ts +3 -0
  792. package/dist/infrastructure/conversations/harness-transcript.types.js.map +1 -1
  793. package/dist/infrastructure/conversations/redaction.d.ts +3 -0
  794. package/dist/infrastructure/conversations/redaction.js +45 -0
  795. package/dist/infrastructure/conversations/redaction.js.map +1 -0
  796. package/dist/infrastructure/conversations/session-bundle.js +4 -1
  797. package/dist/infrastructure/conversations/session-bundle.js.map +1 -1
  798. package/dist/infrastructure/conversations/transcript-store.js +3 -2
  799. package/dist/infrastructure/conversations/transcript-store.js.map +1 -1
  800. package/dist/infrastructure/file-fingerprint.constants.d.ts +2 -0
  801. package/dist/infrastructure/file-fingerprint.constants.js +20 -0
  802. package/dist/infrastructure/file-fingerprint.constants.js.map +1 -0
  803. package/dist/infrastructure/file-fingerprint.d.ts +3 -0
  804. package/dist/infrastructure/file-fingerprint.js +23 -0
  805. package/dist/infrastructure/file-fingerprint.js.map +1 -0
  806. package/dist/infrastructure/file-manifest.d.ts +1 -0
  807. package/dist/infrastructure/file-manifest.js +17 -4
  808. package/dist/infrastructure/file-manifest.js.map +1 -1
  809. package/dist/infrastructure/git/diff-guard.d.ts +5 -0
  810. package/dist/infrastructure/git/diff-guard.js +76 -0
  811. package/dist/infrastructure/git/diff-guard.js.map +1 -0
  812. package/dist/infrastructure/git/diff-guard.types.d.ts +5 -0
  813. package/dist/infrastructure/git/diff-guard.types.js +2 -0
  814. package/dist/infrastructure/git/diff-guard.types.js.map +1 -0
  815. package/dist/infrastructure/git/diff-statistics.d.ts +4 -0
  816. package/dist/infrastructure/git/diff-statistics.js +79 -0
  817. package/dist/infrastructure/git/diff-statistics.js.map +1 -0
  818. package/dist/infrastructure/git/integration-candidate.d.ts +3 -0
  819. package/dist/infrastructure/git/integration-candidate.js +91 -0
  820. package/dist/infrastructure/git/integration-candidate.js.map +1 -0
  821. package/dist/infrastructure/git/workspace-lease.js +55 -4
  822. package/dist/infrastructure/git/workspace-lease.js.map +1 -1
  823. package/dist/infrastructure/git/workspace.js +2 -0
  824. package/dist/infrastructure/git/workspace.js.map +1 -1
  825. package/dist/infrastructure/git/workspace.types.d.ts +14 -1
  826. package/dist/infrastructure/git/workspace.types.js.map +1 -1
  827. package/dist/infrastructure/inspection-file.d.ts +2 -1
  828. package/dist/infrastructure/inspection-file.js +3 -1
  829. package/dist/infrastructure/inspection-file.js.map +1 -1
  830. package/dist/infrastructure/local-transport.js +1 -1
  831. package/dist/infrastructure/local-transport.js.map +1 -1
  832. package/dist/infrastructure/recipe-download.d.ts +2 -0
  833. package/dist/infrastructure/recipe-download.js +72 -0
  834. package/dist/infrastructure/recipe-download.js.map +1 -0
  835. package/dist/infrastructure/recipe-download.types.d.ts +4 -0
  836. package/dist/infrastructure/recipe-download.types.js +2 -0
  837. package/dist/infrastructure/recipe-download.types.js.map +1 -0
  838. package/dist/infrastructure/recipe.d.ts +7 -0
  839. package/dist/infrastructure/recipe.js +51 -0
  840. package/dist/infrastructure/recipe.js.map +1 -0
  841. package/dist/infrastructure/recipes/checkpoint-store.d.ts +3 -0
  842. package/dist/infrastructure/recipes/checkpoint-store.js +25 -0
  843. package/dist/infrastructure/recipes/checkpoint-store.js.map +1 -0
  844. package/dist/infrastructure/recipes/diagnostic.d.ts +1 -0
  845. package/dist/infrastructure/recipes/diagnostic.js +38 -0
  846. package/dist/infrastructure/recipes/diagnostic.js.map +1 -0
  847. package/dist/infrastructure/recipes/extensions.d.ts +3 -0
  848. package/dist/infrastructure/recipes/extensions.js +33 -0
  849. package/dist/infrastructure/recipes/extensions.js.map +1 -0
  850. package/dist/infrastructure/recipes/read.d.ts +1 -0
  851. package/dist/infrastructure/recipes/read.js +22 -0
  852. package/dist/infrastructure/recipes/read.js.map +1 -0
  853. package/dist/infrastructure/recipes/schema.d.ts +3 -0
  854. package/dist/infrastructure/recipes/schema.js +40 -0
  855. package/dist/infrastructure/recipes/schema.js.map +1 -0
  856. package/dist/infrastructure/recipes/workspace.d.ts +4 -0
  857. package/dist/infrastructure/recipes/workspace.js +49 -0
  858. package/dist/infrastructure/recipes/workspace.js.map +1 -0
  859. package/dist/infrastructure/reporter.js +3 -0
  860. package/dist/infrastructure/reporter.js.map +1 -1
  861. package/dist/infrastructure/run-observer.d.ts +2 -0
  862. package/dist/infrastructure/run-observer.js +143 -0
  863. package/dist/infrastructure/run-observer.js.map +1 -0
  864. package/dist/infrastructure/run-reader.d.ts +3 -0
  865. package/dist/infrastructure/run-reader.js +47 -0
  866. package/dist/infrastructure/run-reader.js.map +1 -0
  867. package/dist/infrastructure/run-storage.d.ts +6 -0
  868. package/dist/infrastructure/run-storage.js +200 -0
  869. package/dist/infrastructure/run-storage.js.map +1 -0
  870. package/dist/infrastructure/scripted-commit.d.ts +3 -0
  871. package/dist/infrastructure/scripted-commit.js +62 -0
  872. package/dist/infrastructure/scripted-commit.js.map +1 -0
  873. package/dist/infrastructure/scripted-turn.constants.d.ts +1 -0
  874. package/dist/infrastructure/scripted-turn.constants.js +2 -0
  875. package/dist/infrastructure/scripted-turn.constants.js.map +1 -0
  876. package/dist/infrastructure/scripted-turn.d.ts +3 -0
  877. package/dist/infrastructure/scripted-turn.js +53 -0
  878. package/dist/infrastructure/scripted-turn.js.map +1 -0
  879. package/dist/infrastructure/scripted-turn.types.d.ts +9 -0
  880. package/dist/infrastructure/scripted-turn.types.js +2 -0
  881. package/dist/infrastructure/scripted-turn.types.js.map +1 -0
  882. package/dist/infrastructure/storage-inventory.types.d.ts +1 -1
  883. package/dist/infrastructure/storage-inventory.types.js.map +1 -1
  884. package/dist/infrastructure/transport-checkpoint.d.ts +1 -0
  885. package/dist/infrastructure/transport-checkpoint.js +3 -3
  886. package/dist/infrastructure/transport-checkpoint.js.map +1 -1
  887. package/dist/infrastructure/workspace-cleanup.d.ts +1 -0
  888. package/dist/infrastructure/workspace-cleanup.js +33 -0
  889. package/dist/infrastructure/workspace-cleanup.js.map +1 -0
  890. package/dist/infrastructure/workspace-files.constants.d.ts +6 -0
  891. package/dist/infrastructure/workspace-files.constants.js +7 -0
  892. package/dist/infrastructure/workspace-files.constants.js.map +1 -0
  893. package/dist/infrastructure/workspace-files.d.ts +6 -0
  894. package/dist/infrastructure/workspace-files.js +214 -0
  895. package/dist/infrastructure/workspace-files.js.map +1 -0
  896. package/dist/infrastructure/workspace-lock.constants.d.ts +2 -0
  897. package/dist/infrastructure/workspace-lock.constants.js +6 -0
  898. package/dist/infrastructure/workspace-lock.constants.js.map +1 -0
  899. package/dist/infrastructure/workspace-lock.d.ts +9 -0
  900. package/dist/infrastructure/workspace-lock.js +208 -0
  901. package/dist/infrastructure/workspace-lock.js.map +1 -0
  902. package/dist/infrastructure/workspace-lock.types.d.ts +20 -0
  903. package/dist/infrastructure/workspace-lock.types.js +2 -0
  904. package/dist/infrastructure/workspace-lock.types.js.map +1 -0
  905. package/dist/infrastructure/workspace-snapshot.d.ts +3 -0
  906. package/dist/infrastructure/workspace-snapshot.js +69 -0
  907. package/dist/infrastructure/workspace-snapshot.js.map +1 -0
  908. package/dist/providers/cloud-cache.constants.d.ts +6 -0
  909. package/dist/providers/cloud-cache.constants.js +7 -0
  910. package/dist/providers/cloud-cache.constants.js.map +1 -0
  911. package/dist/providers/cloud-cache.d.ts +5 -0
  912. package/dist/providers/cloud-cache.js +151 -0
  913. package/dist/providers/cloud-cache.js.map +1 -0
  914. package/dist/providers/cloud-cache.types.d.ts +5 -0
  915. package/dist/providers/cloud-cache.types.js +2 -0
  916. package/dist/providers/cloud-cache.types.js.map +1 -0
  917. package/dist/providers/container-cache.d.ts +2 -1
  918. package/dist/providers/container-cache.js +8 -5
  919. package/dist/providers/container-cache.js.map +1 -1
  920. package/dist/providers/container-mounts.js +15 -3
  921. package/dist/providers/container-mounts.js.map +1 -1
  922. package/dist/providers/container.js +26 -2
  923. package/dist/providers/container.js.map +1 -1
  924. package/dist/providers/daytona.d.ts +1 -0
  925. package/dist/providers/daytona.js +28 -8
  926. package/dist/providers/daytona.js.map +1 -1
  927. package/dist/providers/daytona.types.d.ts +2 -0
  928. package/dist/providers/daytona.types.js.map +1 -1
  929. package/dist/providers/firecracker.js +4 -3
  930. package/dist/providers/firecracker.js.map +1 -1
  931. package/dist/providers/local.js +16 -1
  932. package/dist/providers/local.js.map +1 -1
  933. package/dist/providers/memory.d.ts +3 -0
  934. package/dist/providers/memory.js +134 -0
  935. package/dist/providers/memory.js.map +1 -0
  936. package/dist/providers/memory.types.d.ts +8 -0
  937. package/dist/providers/memory.types.js +2 -0
  938. package/dist/providers/memory.types.js.map +1 -0
  939. package/dist/providers/vercel.d.ts +1 -0
  940. package/dist/providers/vercel.js +28 -8
  941. package/dist/providers/vercel.js.map +1 -1
  942. package/dist/providers/vercel.types.d.ts +2 -0
  943. package/dist/providers/vercel.types.js.map +1 -1
  944. package/dist/providers/workspace-context.d.ts +3 -0
  945. package/dist/providers/workspace-context.js +31 -0
  946. package/dist/providers/workspace-context.js.map +1 -0
  947. package/dist/recipes.d.ts +7 -0
  948. package/dist/recipes.js +4 -0
  949. package/dist/recipes.js.map +1 -0
  950. package/dist/testing.d.ts +4 -0
  951. package/dist/testing.js +3 -0
  952. package/dist/testing.js.map +1 -0
  953. package/package.json +76 -9
  954. package/recipe-configuration.schema.json +44324 -0
  955. package/recipe.schema.json +38554 -0
  956. package/recipes/catalog.json +54 -0
  957. package/recipes/compare-candidates.yaml +12 -0
  958. package/recipes/fix-and-check.yaml +22 -0
  959. package/recipes/queued-review.yaml +20 -0
  960. package/recipes/review-and-approve.yaml +27 -0
  961. package/recipes/review-change.yaml +24 -0
  962. package/recipes/review.yaml +13 -0
  963. package/recipes/update-docs.yaml +16 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-inputs.js","sourceRoot":"","sources":["../../src/cli/recipe-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,UAAU,gBAAgB,CAC9B,QAAwB,EACxB,aAAgC,EAAE;IAElC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC9C,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE,CAAC;QAClC,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,SAAS,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACxE,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;QACnD,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;QACzE,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;QAC1C,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;QAC7C,IAAI,KAAK,GAAY,MAAM,CAAC;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACjC,IAAI,CAAC;gBACH,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,IAAI,KAAK,CACb,wBAAwB,IAAI,cAAc,UAAU,CAAC,IAAI,EAAE,CAC5D,CAAC;YACJ,CAAC;QACH,CAAC;QACD,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["import { recipeJson } from \"../domain/recipes/expressions.ts\";\nimport {\n matchesRecipeInput,\n resolveRecipeInputs,\n} from \"../domain/recipe-inputs.ts\";\nimport type { RecipeDocument, RecipeValue } from \"../domain/recipe.types.ts\";\n\nexport function readRecipeInputs(\n document: RecipeDocument,\n arguments_: readonly string[] = [],\n): Readonly<Record<string, RecipeValue>> {\n const values = new Map<string, RecipeValue>();\n for (const argument of arguments_) {\n const separator = argument.indexOf(\"=\");\n if (separator < 1) throw new Error(\"Recipe --input expects name=value\");\n const name = argument.slice(0, separator);\n if (!Object.hasOwn(document.inputs, name))\n throw new Error(`Unknown recipe input: ${name}`);\n if (values.has(name)) throw new Error(`Duplicate recipe input: ${name}`);\n const definition = document.inputs[name]!;\n const source = argument.slice(separator + 1);\n let value: unknown = source;\n if (definition.type !== \"string\") {\n try {\n value = JSON.parse(source);\n } catch {\n throw new Error(\n `Invalid recipe input ${name}: expected ${definition.type}`,\n );\n }\n }\n if (!matchesRecipeInput(value, definition.type))\n throw new Error(`Invalid recipe input: ${name}`);\n values.set(name, recipeJson(value));\n }\n return resolveRecipeInputs(document.inputs, Object.fromEntries(values));\n}\n"]}
@@ -0,0 +1 @@
1
+ export { recipeReportLimits, recipeOutputFields, } from "../application/recipe-report.constants.ts";
@@ -0,0 +1,2 @@
1
+ export { recipeReportLimits, recipeOutputFields, } from "../application/recipe-report.constants.js";
2
+ //# sourceMappingURL=recipe-report.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-report.constants.js","sourceRoot":"","sources":["../../src/cli/recipe-report.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,2CAA2C,CAAC","sourcesContent":["export {\n recipeReportLimits,\n recipeOutputFields,\n} from \"../application/recipe-report.constants.ts\";\n"]}
@@ -0,0 +1 @@
1
+ export { recipeOutput, recipeDiagnostic, printRecipeReport, } from "../application/recipe-report.ts";
@@ -0,0 +1,2 @@
1
+ export { recipeOutput, recipeDiagnostic, printRecipeReport, } from "../application/recipe-report.js";
2
+ //# sourceMappingURL=recipe-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-report.js","sourceRoot":"","sources":["../../src/cli/recipe-report.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC","sourcesContent":["export {\n recipeOutput,\n recipeDiagnostic,\n printRecipeReport,\n} from \"../application/recipe-report.ts\";\n"]}
@@ -0,0 +1 @@
1
+ export type { RecipeDiagnostic, RecipeReport, } from "../application/recipe-report.types.ts";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=recipe-report.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-report.types.js","sourceRoot":"","sources":["../../src/cli/recipe-report.types.ts"],"names":[],"mappings":"","sourcesContent":["export type {\n RecipeDiagnostic,\n RecipeReport,\n} from \"../application/recipe-report.types.ts\";\n"]}
@@ -0,0 +1 @@
1
+ export { runRecipe } from "../application/recipe-run.ts";
@@ -0,0 +1,2 @@
1
+ export { runRecipe } from "../application/recipe-run.js";
2
+ //# sourceMappingURL=recipe-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-run.js","sourceRoot":"","sources":["../../src/cli/recipe-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["export { runRecipe } from \"../application/recipe-run.ts\";\n"]}
@@ -0,0 +1,4 @@
1
+ import type { CliValues } from "./main.types.ts";
2
+ import type { RecipeInputPrompts } from "./recipe-dialogue.types.ts";
3
+ export declare function recipeInteractiveMode(values: CliValues, terminal?: boolean): boolean;
4
+ export declare function createRecipeInputPrompts(): RecipeInputPrompts;
@@ -0,0 +1,52 @@
1
+ import { isCancel, select, text } from "@clack/prompts";
2
+ export function recipeInteractiveMode(values, terminal = Boolean(process.stdin.isTTY && process.stderr.isTTY)) {
3
+ if (values.interactive === false)
4
+ return false;
5
+ if (values.interactive === true && !terminal)
6
+ throw new Error("--interactive requires a terminal on stdin and stderr");
7
+ return values.interactive ?? (terminal && !values.json);
8
+ }
9
+ export function createRecipeInputPrompts() {
10
+ return {
11
+ write(message) {
12
+ process.stderr.write(message);
13
+ },
14
+ async text(message, signal) {
15
+ const answer = await withRecipeInput(signal, (signal) => text({
16
+ message,
17
+ input: process.stdin,
18
+ output: process.stderr,
19
+ signal,
20
+ validate: (value) => value?.trim() ? undefined : "Enter a non-empty answer",
21
+ }));
22
+ return isCancel(answer) ? undefined : answer;
23
+ },
24
+ async select(message, choices, signal) {
25
+ const answer = await withRecipeInput(signal, (signal) => select({
26
+ message,
27
+ input: process.stdin,
28
+ output: process.stderr,
29
+ signal,
30
+ options: choices.map((label, value) => ({ label, value })),
31
+ }));
32
+ return isCancel(answer) ? undefined : answer;
33
+ },
34
+ };
35
+ }
36
+ async function withRecipeInput(signal, perform) {
37
+ if (process.stdin.readableEnded || process.stdin.destroyed)
38
+ return undefined;
39
+ const closed = new AbortController();
40
+ const end = () => closed.abort();
41
+ process.stdin.once("end", end);
42
+ process.stdin.once("close", end);
43
+ try {
44
+ return await perform(AbortSignal.any([signal, closed.signal]));
45
+ }
46
+ finally {
47
+ process.stdin.pause();
48
+ process.stdin.off("end", end);
49
+ process.stdin.off("close", end);
50
+ }
51
+ }
52
+ //# sourceMappingURL=recipe-terminal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-terminal.js","sourceRoot":"","sources":["../../src/cli/recipe-terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,UAAU,qBAAqB,CACnC,MAAiB,EACjB,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IAE/D,IAAI,MAAM,CAAC,WAAW,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAC/C,IAAI,MAAM,CAAC,WAAW,KAAK,IAAI,IAAI,CAAC,QAAQ;QAC1C,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,OAAO,MAAM,CAAC,WAAW,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO;QACL,KAAK,CAAC,OAAO;YACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM;YACxB,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CACtD,IAAI,CAAC;gBACH,OAAO;gBACP,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,MAAM;gBACN,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,KAAK,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AM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;AACH,CAAC","sourcesContent":["import { isCancel, select, text } from \"@clack/prompts\";\nimport type { CliValues } from \"./main.types.ts\";\nimport type { RecipeInputPrompts } from \"./recipe-dialogue.types.ts\";\n\nexport function recipeInteractiveMode(\n values: CliValues,\n terminal = Boolean(process.stdin.isTTY && process.stderr.isTTY),\n): boolean {\n if (values.interactive === false) return false;\n if (values.interactive === true && !terminal)\n throw new Error(\"--interactive requires a terminal on stdin and stderr\");\n return values.interactive ?? (terminal && !values.json);\n}\n\nexport function createRecipeInputPrompts(): RecipeInputPrompts {\n return {\n write(message) {\n process.stderr.write(message);\n },\n async text(message, signal) {\n const answer = await withRecipeInput(signal, (signal) =>\n text({\n message,\n input: process.stdin,\n output: process.stderr,\n signal,\n validate: (value) =>\n value?.trim() ? undefined : \"Enter a non-empty answer\",\n }),\n );\n return isCancel(answer) ? undefined : answer;\n },\n async select(message, choices, signal) {\n const answer = await withRecipeInput(signal, (signal) =>\n select({\n message,\n input: process.stdin,\n output: process.stderr,\n signal,\n options: choices.map((label, value) => ({ label, value })),\n }),\n );\n return isCancel(answer) ? undefined : answer;\n },\n };\n}\n\nasync function withRecipeInput<T>(\n signal: AbortSignal,\n perform: (signal: AbortSignal) => Promise<T>,\n): Promise<T | undefined> {\n if (process.stdin.readableEnded || process.stdin.destroyed) return undefined;\n const closed = new AbortController();\n const end = () => closed.abort();\n process.stdin.once(\"end\", end);\n process.stdin.once(\"close\", end);\n try {\n return await perform(AbortSignal.any([signal, closed.signal]));\n } finally {\n process.stdin.pause();\n process.stdin.off(\"end\", end);\n process.stdin.off(\"close\", end);\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { WorkflowJson } from "../domain/workflow/checkpoint.types.ts";
2
+ import type { CliInvocation } from "./main.types.ts";
3
+ export declare function recipeYamlCommand({ values, positionals }: CliInvocation, inputs?: Readonly<Record<string, WorkflowJson>>): Promise<void>;
@@ -0,0 +1,193 @@
1
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
+ env.stack.push({ value: value, dispose: dispose, async: async });
17
+ }
18
+ else if (async) {
19
+ env.stack.push({ async: true });
20
+ }
21
+ return value;
22
+ };
23
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
+ return function (env) {
25
+ function fail(e) {
26
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
+ env.hasError = true;
28
+ }
29
+ var r, s = 0;
30
+ function next() {
31
+ while (r = env.stack.pop()) {
32
+ try {
33
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
+ if (r.dispose) {
35
+ var result = r.dispose.call(r.value);
36
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
+ }
38
+ else s |= 1;
39
+ }
40
+ catch (e) {
41
+ fail(e);
42
+ }
43
+ }
44
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
+ if (env.hasError) throw env.error;
46
+ }
47
+ return next();
48
+ };
49
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
+ var e = new Error(message);
51
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
+ });
53
+ import { createRecipeProjectRuntime } from "../application/recipes/runtime.js";
54
+ import { readRecipeProject } from "../application/recipes/project.js";
55
+ import { printRecipeErrors, publishRecipeReport, } from "../application/recipes/reports.js";
56
+ import { continueRecipeDialogue } from "./recipe-dialogue.js";
57
+ import { createRecipeInputPrompts, recipeInteractiveMode, } from "./recipe-terminal.js";
58
+ import { nativeRecipeSchemas } from "../application/recipes/native-schemas.constants.js";
59
+ import { validateRecipeSchema } from "../infrastructure/recipes/schema.js";
60
+ import { readRecipeFile } from "../infrastructure/recipes/read.js";
61
+ import { workspaceRecoverySchema } from "../domain/file-workspace.constants.js";
62
+ export async function recipeYamlCommand({ values, positionals }, inputs) {
63
+ if (!values.file || !values.config)
64
+ throw new Error("Recipe requires --file and --config");
65
+ const action = positionals[1];
66
+ const runId = values["run-id"];
67
+ if (action !== "run" && action !== "serve" && !runId)
68
+ throw new Error(`Recipe ${action} requires --run-id`);
69
+ const interactive = recipeInteractiveMode(values);
70
+ const controller = new AbortController();
71
+ const interrupt = () => {
72
+ process.exitCode = 130;
73
+ controller.abort();
74
+ };
75
+ const terminate = () => {
76
+ process.exitCode = 143;
77
+ controller.abort();
78
+ };
79
+ process.on("SIGINT", interrupt);
80
+ process.on("SIGTERM", terminate);
81
+ try {
82
+ const env_1 = { stack: [], error: void 0, hasError: false };
83
+ try {
84
+ const project = await readRecipeProject({
85
+ file: values.file,
86
+ config: values.config,
87
+ });
88
+ const runtime = __addDisposableResource(env_1, createRecipeProjectRuntime(project, () => { }), true);
89
+ if (action === "serve") {
90
+ if (!values.service)
91
+ throw new Error("Recipe serve requires --service");
92
+ await runtime.serve({
93
+ service: values.service,
94
+ signal: controller.signal,
95
+ });
96
+ return;
97
+ }
98
+ if (action === "enqueue") {
99
+ if (!values.queue || !values.handler)
100
+ throw new Error("Recipe enqueue requires --queue and --handler");
101
+ const job = await runtime.enqueue({
102
+ queue: values.queue,
103
+ handler: values.handler,
104
+ runId: runId,
105
+ ...(inputs ? { inputs } : {}),
106
+ signal: controller.signal,
107
+ ...(values["job-id"] ? { id: values["job-id"] } : {}),
108
+ ...(values["idempotency-key"]
109
+ ? { idempotencyKey: values["idempotency-key"] }
110
+ : {}),
111
+ ...(values.deadline ? { deadline: Number(values.deadline) } : {}),
112
+ });
113
+ if (values.json)
114
+ process.stdout.write(`${JSON.stringify(job)}\n`);
115
+ return;
116
+ }
117
+ if (action === "status") {
118
+ const status = await runtime.status(runId);
119
+ process.stdout.write(values.json
120
+ ? `${JSON.stringify(status ?? null)}\n`
121
+ : `${runId}: ${status ? (status.owned ? "owned" : (status.report?.status ?? "interrupted")) : "not found"}\n`);
122
+ if (!status)
123
+ process.exitCode = 1;
124
+ return;
125
+ }
126
+ let intervention = {};
127
+ if (action === "answer" || action === "decide") {
128
+ const path = action === "answer" ? values.answer : values.decision;
129
+ if (!path)
130
+ throw new Error(`Recipe ${action} requires --${action === "answer" ? "answer" : "decision"} file.json`);
131
+ intervention = validateRecipeSchema(nativeRecipeSchemas["workflow.options"], {
132
+ [action === "answer" ? "answers" : "decisions"]: [
133
+ JSON.parse(await readRecipeFile(path)),
134
+ ],
135
+ }, path);
136
+ }
137
+ const settings = {
138
+ ...(inputs ? { inputs } : {}),
139
+ signal: controller.signal,
140
+ ...(values.json ? { report: "json" } : {}),
141
+ };
142
+ const workspaceRecovery = values["workspace-recovery"]
143
+ ? validateRecipeSchema(workspaceRecoverySchema, JSON.parse(await readRecipeFile(values["workspace-recovery"])), "workspace recovery")
144
+ : undefined;
145
+ let report = action === "run"
146
+ ? await runtime.run({ ...settings, ...(runId ? { runId } : {}) })
147
+ : await runtime.resume({
148
+ ...settings,
149
+ runId: runId,
150
+ ...intervention,
151
+ ...(workspaceRecovery ? { workspaceRecovery } : {}),
152
+ ...(values["retry-incomplete"] ? { retryIncomplete: true } : {}),
153
+ ...(values["recover-revision"]
154
+ ? { recoverRevision: values["recover-revision"] }
155
+ : {}),
156
+ });
157
+ if (interactive)
158
+ report = await continueRecipeDialogue(runtime, report, project.document, {
159
+ ...(values.actor !== undefined ? { actor: values.actor } : {}),
160
+ signal: controller.signal,
161
+ prompts: createRecipeInputPrompts(),
162
+ cancel() {
163
+ if (!controller.signal.aborted)
164
+ interrupt();
165
+ },
166
+ });
167
+ publishRecipeReport(report, project.reports, values.json ? "json" : undefined);
168
+ printRecipeErrors(report);
169
+ if (report.status === "waiting-input" && !values.json)
170
+ process.stderr.write(`Recipe ${report.runId} is waiting for input. Use outpost recipe resume with the same --file, --config and --run-id.\n`);
171
+ if (report.status === "paused" &&
172
+ report.tasks.some((task) => task.pause) &&
173
+ !values.json)
174
+ process.stderr.write(`Recipe ${report.runId} is waiting for a gate decision. Resume interactively or use outpost recipe decide --decision decision.json; signed gates require a proof.\n`);
175
+ if (report.status !== "done" && !process.exitCode)
176
+ process.exitCode = 1;
177
+ }
178
+ catch (e_1) {
179
+ env_1.error = e_1;
180
+ env_1.hasError = true;
181
+ }
182
+ finally {
183
+ const result_1 = __disposeResources(env_1);
184
+ if (result_1)
185
+ await result_1;
186
+ }
187
+ }
188
+ finally {
189
+ process.off("SIGINT", interrupt);
190
+ process.off("SIGTERM", terminate);
191
+ }
192
+ }
193
+ //# sourceMappingURL=recipe-yaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-yaml.js","sourceRoot":"","sources":["../../src/cli/recipe-yaml.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EACL,iBAAiB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AM,CAAC,MAAM,KAAK,QAAQ;gBAC1B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;gBACvC,CAAC,MAAM,CAAC,IAAI;gBAEZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,UAAU,MAAM,CAAC,KAAK,8IAA8I,CACrK,CAAC;YACJ,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ;gBAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;;;;;;;;;;;KACzE;YAAS,CAAC;QACT,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACpC,CAAC;AACH,CAAC","sourcesContent":["import { createRecipeProjectRuntime } from \"../application/recipes/runtime.ts\";\nimport { readRecipeProject } from \"../application/recipes/project.ts\";\nimport {\n printRecipeErrors,\n publishRecipeReport,\n} from \"../application/recipes/reports.ts\";\nimport { continueRecipeDialogue } from \"./recipe-dialogue.ts\";\nimport {\n createRecipeInputPrompts,\n recipeInteractiveMode,\n} from \"./recipe-terminal.ts\";\nimport { nativeRecipeSchemas } from \"../application/recipes/native-schemas.constants.ts\";\nimport { validateRecipeSchema } from \"../infrastructure/recipes/schema.ts\";\nimport { readRecipeFile } from \"../infrastructure/recipes/read.ts\";\nimport { workspaceRecoverySchema } from \"../domain/file-workspace.constants.ts\";\nimport type { RecipeResumeOptions } from \"../application/recipes/durable.types.ts\";\nimport type { WorkflowOptions } from \"../domain/workflow.types.ts\";\nimport type { WorkflowJson } from \"../domain/workflow/checkpoint.types.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\n\nexport async function recipeYamlCommand(\n { values, positionals }: CliInvocation,\n inputs?: Readonly<Record<string, WorkflowJson>>,\n): Promise<void> {\n if (!values.file || !values.config)\n throw new Error(\"Recipe requires --file and --config\");\n const action = positionals[1];\n const runId = values[\"run-id\"];\n if (action !== \"run\" && action !== \"serve\" && !runId)\n throw new Error(`Recipe ${action} requires --run-id`);\n const interactive = recipeInteractiveMode(values);\n const controller = new AbortController();\n const interrupt = () => {\n process.exitCode = 130;\n controller.abort();\n };\n const terminate = () => {\n process.exitCode = 143;\n controller.abort();\n };\n process.on(\"SIGINT\", interrupt);\n process.on(\"SIGTERM\", terminate);\n try {\n const project = await readRecipeProject({\n file: values.file,\n config: values.config,\n });\n await using runtime = createRecipeProjectRuntime(project, () => {});\n if (action === \"serve\") {\n if (!values.service) throw new Error(\"Recipe serve requires --service\");\n await runtime.serve({\n service: values.service,\n signal: controller.signal,\n });\n return;\n }\n if (action === \"enqueue\") {\n if (!values.queue || !values.handler)\n throw new Error(\"Recipe enqueue requires --queue and --handler\");\n const job = await runtime.enqueue({\n queue: values.queue,\n handler: values.handler,\n runId: runId!,\n ...(inputs ? { inputs } : {}),\n signal: controller.signal,\n ...(values[\"job-id\"] ? { id: values[\"job-id\"] } : {}),\n ...(values[\"idempotency-key\"]\n ? { idempotencyKey: values[\"idempotency-key\"] }\n : {}),\n ...(values.deadline ? { deadline: Number(values.deadline) } : {}),\n });\n if (values.json) process.stdout.write(`${JSON.stringify(job)}\\n`);\n return;\n }\n if (action === \"status\") {\n const status = await runtime.status(runId!);\n process.stdout.write(\n values.json\n ? `${JSON.stringify(status ?? null)}\\n`\n : `${runId}: ${status ? (status.owned ? \"owned\" : (status.report?.status ?? \"interrupted\")) : \"not found\"}\\n`,\n );\n if (!status) process.exitCode = 1;\n return;\n }\n let intervention: Pick<WorkflowOptions, \"answers\" | \"decisions\"> = {};\n if (action === \"answer\" || action === \"decide\") {\n const path = action === \"answer\" ? values.answer : values.decision;\n if (!path)\n throw new Error(\n `Recipe ${action} requires --${action === \"answer\" ? \"answer\" : \"decision\"} file.json`,\n );\n intervention = validateRecipeSchema<\n Pick<WorkflowOptions, \"answers\" | \"decisions\">\n >(\n nativeRecipeSchemas[\"workflow.options\"]!,\n {\n [action === \"answer\" ? \"answers\" : \"decisions\"]: [\n JSON.parse(await readRecipeFile(path)),\n ],\n },\n path,\n );\n }\n const settings = {\n ...(inputs ? { inputs } : {}),\n signal: controller.signal,\n ...(values.json ? { report: \"json\" as const } : {}),\n };\n const workspaceRecovery = values[\"workspace-recovery\"]\n ? validateRecipeSchema<\n NonNullable<RecipeResumeOptions[\"workspaceRecovery\"]>\n >(\n workspaceRecoverySchema,\n JSON.parse(await readRecipeFile(values[\"workspace-recovery\"])),\n \"workspace recovery\",\n )\n : undefined;\n let report =\n action === \"run\"\n ? await runtime.run({ ...settings, ...(runId ? { runId } : {}) })\n : await runtime.resume({\n ...settings,\n runId: runId!,\n ...intervention,\n ...(workspaceRecovery ? { workspaceRecovery } : {}),\n ...(values[\"retry-incomplete\"] ? { retryIncomplete: true } : {}),\n ...(values[\"recover-revision\"]\n ? { recoverRevision: values[\"recover-revision\"] }\n : {}),\n });\n if (interactive)\n report = await continueRecipeDialogue(runtime, report, project.document, {\n ...(values.actor !== undefined ? { actor: values.actor } : {}),\n signal: controller.signal,\n prompts: createRecipeInputPrompts(),\n cancel() {\n if (!controller.signal.aborted) interrupt();\n },\n });\n publishRecipeReport(\n report,\n project.reports,\n values.json ? \"json\" : undefined,\n );\n printRecipeErrors(report);\n if (report.status === \"waiting-input\" && !values.json)\n process.stderr.write(\n `Recipe ${report.runId} is waiting for input. Use outpost recipe resume with the same --file, --config and --run-id.\\n`,\n );\n if (\n report.status === \"paused\" &&\n report.tasks.some((task) => task.pause) &&\n !values.json\n )\n process.stderr.write(\n `Recipe ${report.runId} is waiting for a gate decision. Resume interactively or use outpost recipe decide --decision decision.json; signed gates require a proof.\\n`,\n );\n if (report.status !== \"done\" && !process.exitCode) process.exitCode = 1;\n } finally {\n process.off(\"SIGINT\", interrupt);\n process.off(\"SIGTERM\", terminate);\n }\n}\n"]}
@@ -3,7 +3,37 @@ import { recoveryPruneCommand } from "./recovery-prune-command.js";
3
3
  import { recoveryVerifyCommand } from "./recovery-verify-command.js";
4
4
  import { inspectRecovery } from "../application/recovery-inspection.js";
5
5
  import { invariant, positive } from "../domain/errors.js";
6
+ import { recoveryPublicationCommand } from "./recovery-publication-command.js";
7
+ import { recoveryWorkspaceCommand } from "./recovery-workspace-command.js";
8
+ import { inspectWorkspacePathLocks, inspectWorkspaceRegistryGate, recoverWorkspaceRegistryGate, } from "../infrastructure/workspace-lock.js";
9
+ import { createLocalTransport } from "../infrastructure/local-transport.js";
10
+ import { join, resolve } from "node:path";
6
11
  export async function recoveryCommand({ values, positionals, }) {
12
+ if (positionals[1] === "registry") {
13
+ const action = positionals[2];
14
+ invariant(positionals.length === 3 &&
15
+ (action === "inspect" || action === "recover"), "Usage: outpost recovery registry inspect|recover [--revision DEVICE:INODE --processes-stopped]");
16
+ let gate = await inspectWorkspaceRegistryGate();
17
+ if (action === "recover") {
18
+ invariant(values["processes-stopped"] &&
19
+ values.revision &&
20
+ /^\d+:\d+$/.test(values.revision), "Registry recovery requires --processes-stopped and the inspected --revision DEVICE:INODE");
21
+ const [device, inode] = values.revision.split(":").map(Number);
22
+ invariant(Number.isSafeInteger(device) && Number.isSafeInteger(inode), "Invalid registry revision");
23
+ await recoverWorkspaceRegistryGate({ device: device, inode: inode }, { processesStopped: true });
24
+ gate = await inspectWorkspaceRegistryGate();
25
+ }
26
+ process.stdout.write(values.json
27
+ ? `${JSON.stringify(gate ?? null)}\n`
28
+ : gate
29
+ ? `Registry revision: ${gate.device}:${gate.inode}\n`
30
+ : "Registry gate is clear\n");
31
+ return;
32
+ }
33
+ if (positionals[1] === "publication")
34
+ return recoveryPublicationCommand({ values, positionals });
35
+ if (positionals[1] === "workspace")
36
+ return recoveryWorkspaceCommand({ values, positionals });
7
37
  if (positionals[1] === "restore")
8
38
  return recoveryRestoreCommand({ values, positionals });
9
39
  if (positionals[1] === "prune")
@@ -14,6 +44,7 @@ export async function recoveryCommand({ values, positionals, }) {
14
44
  for (const key of Object.keys(values))
15
45
  invariant([
16
46
  "repository",
47
+ "runtime-directory",
17
48
  "max-entries",
18
49
  "git",
19
50
  "locks",
@@ -23,6 +54,32 @@ export async function recoveryCommand({ values, positionals, }) {
23
54
  const maxEntries = values["max-entries"] === undefined
24
55
  ? undefined
25
56
  : positive(Number(values["max-entries"]), "max-entries");
57
+ if (values["runtime-directory"]) {
58
+ invariant(!values.repository && !values.git, "Runtime inspection cannot request repository or Git state");
59
+ const runtimeDirectory = resolve(values["runtime-directory"]);
60
+ const transport = createLocalTransport({
61
+ directory: join(runtimeDirectory, "storage"),
62
+ });
63
+ const entries = [];
64
+ for await (const entry of transport.list()) {
65
+ if (entries.length >= (maxEntries ?? 1000))
66
+ break;
67
+ entries.push(entry);
68
+ }
69
+ const registryGate = await inspectWorkspaceRegistryGate();
70
+ const report = {
71
+ runtimeDirectory,
72
+ entries,
73
+ ...(registryGate ? { registryGate } : {}),
74
+ ...(values.locks && !registryGate
75
+ ? { locks: await inspectWorkspacePathLocks() }
76
+ : {}),
77
+ };
78
+ process.stdout.write(values.json
79
+ ? `${JSON.stringify(report)}\n`
80
+ : `Runtime: ${runtimeDirectory}\n${entries.length} stored objects\n`);
81
+ return;
82
+ }
26
83
  const report = await inspectRecovery({
27
84
  ...(values.repository !== undefined
28
85
  ? { repository: values.repository }
@@ -1 +1 @@
1
- {"version":3,"file":"recovery-command.js","sourceRoot":"","sources":["../../src/cli/recovery-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG1D,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,EACpC,MAAM,E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AAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,2CAA2C,gEAAgE,CACzJ,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS;YAC5C,CAAC,CAAC,yGAAyG;YAC3G,CAAC,CAAC,8FAA8F,CACnG,CAAC;IACJ,CAAC;IACD,IACE,CAAC,MAAM,CAAC,QAAQ;QAChB,MAAM,CAAC,GAAG,EAAE,QAAQ,KAAK,KAAK;QAC9B,MAAM,CAAC,KAAK,EAAE,QAAQ,KAAK,KAAK;QAChC,MAAM,CAAC,SAAS,EAAE,QAAQ,KAAK,KAAK;QAEpC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { recoveryRestoreCommand } from \"./recovery-restore-command.ts\";\nimport { recoveryPruneCommand } from \"./recovery-prune-command.ts\";\nimport { recoveryVerifyCommand } from \"./recovery-verify-command.ts\";\nimport { inspectRecovery } from \"../application/recovery-inspection.ts\";\nimport { invariant, positive } from \"../domain/errors.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\n\nexport async function recoveryCommand({\n values,\n positionals,\n}: CliInvocation): Promise<void> {\n if (positionals[1] === \"restore\")\n return recoveryRestoreCommand({ values, positionals });\n if (positionals[1] === \"prune\")\n return recoveryPruneCommand({ values, positionals });\n if (positionals[1] === \"verify\")\n return recoveryVerifyCommand({ values, positionals });\n invariant(\n positionals.length === 2 && positionals[1] === \"inspect\",\n \"Usage: outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]\",\n );\n for (const key of Object.keys(values))\n invariant(\n [\n \"repository\",\n \"max-entries\",\n \"git\",\n \"locks\",\n \"resources\",\n \"json\",\n ].includes(key),\n `Unsupported recovery option: --${key}`,\n );\n const maxEntries =\n values[\"max-entries\"] === undefined\n ? undefined\n : positive(Number(values[\"max-entries\"]), \"max-entries\");\n const report = await inspectRecovery({\n ...(values.repository !== undefined\n ? { repository: values.repository }\n : {}),\n ...(maxEntries !== undefined ? { maxEntries } : {}),\n ...(values.git ? { git: true } : {}),\n ...(values.resources ? { resources: true } : {}),\n ...(values.locks ? { locks: true } : {}),\n });\n if (values.json) process.stdout.write(`${JSON.stringify(report, null, 2)}\\n`);\n else {\n process.stdout.write(\n `Outpost recovery inspection — ${JSON.stringify(report.repository)}\\n`,\n );\n for (const category of report.categories) {\n process.stdout.write(\n `${category.name}: ${category.entries.length} listed entries\\n`,\n );\n for (const entry of category.entries)\n process.stdout.write(\n ` ${JSON.stringify(entry.name)} | ${entry.kind} | ${entry.bytes} bytes | ${entry.files} files | ${entry.symlinks} symlinks | ${entry.modifiedAt ?? \"unknown time\"} | ${entry.complete ? \"complete\" : \"partial\"}\\n`,\n );\n }\n if (report.git) {\n process.stdout.write(\n `Workspace Git inspection: ${report.git.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const workspace of report.git.workspaces) {\n const detail =\n workspace.state === \"registered\"\n ? `${workspace.branch === null ? \"detached HEAD\" : JSON.stringify(workspace.branch)} | ${workspace.dirty ? \"dirty\" : \"clean\"} | ${workspace.head}${workspace.locked ? \" | Git locked\" : \"\"}`\n : workspace.state;\n process.stdout.write(\n ` ${JSON.stringify(workspace.name)} | ${detail}\\n`,\n );\n }\n for (const issue of report.git.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"Git status excludes ignored files. Clean does not mean safe to delete.\\n\",\n );\n }\n if (report.locks) {\n process.stdout.write(\n `Lock PID inspection (local host): ${report.locks.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const lock of report.locks.entries) {\n const pid = \"pid\" in lock ? ` | PID ${lock.pid}` : \"\";\n const reason = \"reason\" in lock ? ` | ${lock.reason}` : \"\";\n process.stdout.write(\n ` ${JSON.stringify(lock.name)} | ${lock.state}${pid}${reason}${lock.ownership ? ` | ownership ${lock.ownership.status}: ${lock.ownership.reason}` : \"\"}\\n`,\n );\n }\n for (const issue of report.locks.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"PID presence does not prove lock ownership; PID absence does not authorize deletion.\\n\",\n );\n }\n if (report.resources) {\n process.stdout.write(\n `Recorded sandbox activity: ${report.resources.complete ? \"complete for listed records\" : \"partial\"}\\n`,\n );\n for (const entry of report.resources.entries) {\n const detail = entry.record\n ? `${JSON.stringify(entry.record.sandboxProvider)} | ${entry.record.phase} | ${entry.record.operations.map((operation) => `${operation.kind} (${operation.count})`).join(\", \") || \"idle\"}`\n : \"unreadable\";\n process.stdout.write(\n ` ${JSON.stringify(entry.path)} | ${detail} | ownership ${entry.ownership.status}: ${entry.ownership.reason}\\n`,\n );\n }\n for (const issue of report.resources.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"Recorded activity is a snapshot; stale or unknown ownership does not authorize resource deletion. Provider resources are not queried.\\n\",\n );\n }\n for (const issue of report.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n `Total observed: ${report.usage.bytes} bytes in ${report.usage.files} files; ${report.scannedEntries}/${report.maxEntries} entries scanned.\\n`,\n );\n process.stdout.write(\n `${report.complete ? \"Inventory complete.\" : \"Inventory incomplete; totals are partial.\"} File sizes are logical bytes; symlink targets are excluded.\\n`,\n );\n process.stdout.write(\n report.git || report.locks || report.resources\n ? \"Activity and recovery integrity are unverified. No raw file contents were displayed or files removed.\\n\"\n : \"Activity and recovery integrity are unverified. No files were read for content or removed.\\n\",\n );\n }\n if (\n !report.complete ||\n report.git?.complete === false ||\n report.locks?.complete === false ||\n report.resources?.complete === false\n )\n process.exitCode = 1;\n}\n"]}
1
+ {"version":3,"file":"recovery-command.js","sourceR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AM,CAAC,KAAK,EAAE,QAAQ,KAAK,KAAK;QAChC,MAAM,CAAC,SAAS,EAAE,QAAQ,KAAK,KAAK;QAEpC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { recoveryRestoreCommand } from \"./recovery-restore-command.ts\";\nimport { recoveryPruneCommand } from \"./recovery-prune-command.ts\";\nimport { recoveryVerifyCommand } from \"./recovery-verify-command.ts\";\nimport { inspectRecovery } from \"../application/recovery-inspection.ts\";\nimport { invariant, positive } from \"../domain/errors.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\nimport { recoveryPublicationCommand } from \"./recovery-publication-command.ts\";\nimport { recoveryWorkspaceCommand } from \"./recovery-workspace-command.ts\";\nimport {\n inspectWorkspacePathLocks,\n inspectWorkspaceRegistryGate,\n recoverWorkspaceRegistryGate,\n} from \"../infrastructure/workspace-lock.ts\";\nimport { createLocalTransport } from \"../infrastructure/local-transport.ts\";\nimport { join, resolve } from \"node:path\";\n\nexport async function recoveryCommand({\n values,\n positionals,\n}: CliInvocation): Promise<void> {\n if (positionals[1] === \"registry\") {\n const action = positionals[2];\n invariant(\n positionals.length === 3 &&\n (action === \"inspect\" || action === \"recover\"),\n \"Usage: outpost recovery registry inspect|recover [--revision DEVICE:INODE --processes-stopped]\",\n );\n let gate = await inspectWorkspaceRegistryGate();\n if (action === \"recover\") {\n invariant(\n values[\"processes-stopped\"] &&\n values.revision &&\n /^\\d+:\\d+$/.test(values.revision),\n \"Registry recovery requires --processes-stopped and the inspected --revision DEVICE:INODE\",\n );\n const [device, inode] = values.revision.split(\":\").map(Number);\n invariant(\n Number.isSafeInteger(device) && Number.isSafeInteger(inode),\n \"Invalid registry revision\",\n );\n await recoverWorkspaceRegistryGate(\n { device: device!, inode: inode! },\n { processesStopped: true },\n );\n gate = await inspectWorkspaceRegistryGate();\n }\n process.stdout.write(\n values.json\n ? `${JSON.stringify(gate ?? null)}\\n`\n : gate\n ? `Registry revision: ${gate.device}:${gate.inode}\\n`\n : \"Registry gate is clear\\n\",\n );\n return;\n }\n if (positionals[1] === \"publication\")\n return recoveryPublicationCommand({ values, positionals });\n if (positionals[1] === \"workspace\")\n return recoveryWorkspaceCommand({ values, positionals });\n if (positionals[1] === \"restore\")\n return recoveryRestoreCommand({ values, positionals });\n if (positionals[1] === \"prune\")\n return recoveryPruneCommand({ values, positionals });\n if (positionals[1] === \"verify\")\n return recoveryVerifyCommand({ values, positionals });\n invariant(\n positionals.length === 2 && positionals[1] === \"inspect\",\n \"Usage: outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]\",\n );\n for (const key of Object.keys(values))\n invariant(\n [\n \"repository\",\n \"runtime-directory\",\n \"max-entries\",\n \"git\",\n \"locks\",\n \"resources\",\n \"json\",\n ].includes(key),\n `Unsupported recovery option: --${key}`,\n );\n const maxEntries =\n values[\"max-entries\"] === undefined\n ? undefined\n : positive(Number(values[\"max-entries\"]), \"max-entries\");\n if (values[\"runtime-directory\"]) {\n invariant(\n !values.repository && !values.git,\n \"Runtime inspection cannot request repository or Git state\",\n );\n const runtimeDirectory = resolve(values[\"runtime-directory\"]);\n const transport = createLocalTransport({\n directory: join(runtimeDirectory, \"storage\"),\n });\n const entries = [];\n for await (const entry of transport.list()) {\n if (entries.length >= (maxEntries ?? 1000)) break;\n entries.push(entry);\n }\n const registryGate = await inspectWorkspaceRegistryGate();\n const report = {\n runtimeDirectory,\n entries,\n ...(registryGate ? { registryGate } : {}),\n ...(values.locks && !registryGate\n ? { locks: await inspectWorkspacePathLocks() }\n : {}),\n };\n process.stdout.write(\n values.json\n ? `${JSON.stringify(report)}\\n`\n : `Runtime: ${runtimeDirectory}\\n${entries.length} stored objects\\n`,\n );\n return;\n }\n const report = await inspectRecovery({\n ...(values.repository !== undefined\n ? { repository: values.repository }\n : {}),\n ...(maxEntries !== undefined ? { maxEntries } : {}),\n ...(values.git ? { git: true } : {}),\n ...(values.resources ? { resources: true } : {}),\n ...(values.locks ? { locks: true } : {}),\n });\n if (values.json) process.stdout.write(`${JSON.stringify(report, null, 2)}\\n`);\n else {\n process.stdout.write(\n `Outpost recovery inspection — ${JSON.stringify(report.repository)}\\n`,\n );\n for (const category of report.categories) {\n process.stdout.write(\n `${category.name}: ${category.entries.length} listed entries\\n`,\n );\n for (const entry of category.entries)\n process.stdout.write(\n ` ${JSON.stringify(entry.name)} | ${entry.kind} | ${entry.bytes} bytes | ${entry.files} files | ${entry.symlinks} symlinks | ${entry.modifiedAt ?? \"unknown time\"} | ${entry.complete ? \"complete\" : \"partial\"}\\n`,\n );\n }\n if (report.git) {\n process.stdout.write(\n `Workspace Git inspection: ${report.git.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const workspace of report.git.workspaces) {\n const detail =\n workspace.state === \"registered\"\n ? `${workspace.branch === null ? \"detached HEAD\" : JSON.stringify(workspace.branch)} | ${workspace.dirty ? \"dirty\" : \"clean\"} | ${workspace.head}${workspace.locked ? \" | Git locked\" : \"\"}`\n : workspace.state;\n process.stdout.write(\n ` ${JSON.stringify(workspace.name)} | ${detail}\\n`,\n );\n }\n for (const issue of report.git.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"Git status excludes ignored files. Clean does not mean safe to delete.\\n\",\n );\n }\n if (report.locks) {\n process.stdout.write(\n `Lock PID inspection (local host): ${report.locks.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const lock of report.locks.entries) {\n const pid = \"pid\" in lock ? ` | PID ${lock.pid}` : \"\";\n const reason = \"reason\" in lock ? ` | ${lock.reason}` : \"\";\n process.stdout.write(\n ` ${JSON.stringify(lock.name)} | ${lock.state}${pid}${reason}${lock.ownership ? ` | ownership ${lock.ownership.status}: ${lock.ownership.reason}` : \"\"}\\n`,\n );\n }\n for (const issue of report.locks.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"PID presence does not prove lock ownership; PID absence does not authorize deletion.\\n\",\n );\n }\n if (report.resources) {\n process.stdout.write(\n `Recorded sandbox activity: ${report.resources.complete ? \"complete for listed records\" : \"partial\"}\\n`,\n );\n for (const entry of report.resources.entries) {\n const detail = entry.record\n ? `${JSON.stringify(entry.record.sandboxProvider)} | ${entry.record.phase} | ${entry.record.operations.map((operation) => `${operation.kind} (${operation.count})`).join(\", \") || \"idle\"}`\n : \"unreadable\";\n process.stdout.write(\n ` ${JSON.stringify(entry.path)} | ${detail} | ownership ${entry.ownership.status}: ${entry.ownership.reason}\\n`,\n );\n }\n for (const issue of report.resources.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"Recorded activity is a snapshot; stale or unknown ownership does not authorize resource deletion. Provider resources are not queried.\\n\",\n );\n }\n for (const issue of report.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n `Total observed: ${report.usage.bytes} bytes in ${report.usage.files} files; ${report.scannedEntries}/${report.maxEntries} entries scanned.\\n`,\n );\n process.stdout.write(\n `${report.complete ? \"Inventory complete.\" : \"Inventory incomplete; totals are partial.\"} File sizes are logical bytes; symlink targets are excluded.\\n`,\n );\n process.stdout.write(\n report.git || report.locks || report.resources\n ? \"Activity and recovery integrity are unverified. No raw file contents were displayed or files removed.\\n\"\n : \"Activity and recovery integrity are unverified. No files were read for content or removed.\\n\",\n );\n }\n if (\n !report.complete ||\n report.git?.complete === false ||\n report.locks?.complete === false ||\n report.resources?.complete === false\n )\n process.exitCode = 1;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { Transport } from "../domain/transport.types.ts";
2
+ import type { WorkspaceRetention } from "../domain/file-workspace.types.ts";
3
+ import type { CliInvocation } from "./main.types.ts";
4
+ export declare function useFileRecoveryTransport(values: CliInvocation["values"], inspect: (transporter: Transport, retention?: WorkspaceRetention) => Promise<void>): Promise<void>;
@@ -0,0 +1,40 @@
1
+ import { join, resolve } from "node:path";
2
+ import { invariant } from "../domain/errors.js";
3
+ import { createLocalTransport } from "../infrastructure/local-transport.js";
4
+ import { readRecipeProject } from "../application/recipes/project.js";
5
+ import { createRecipeComponentScope } from "../application/recipes/scope.js";
6
+ import { nativeRecipeGuards } from "../application/recipes/native.js";
7
+ function isRecoveryTransport(value) {
8
+ return nativeRecipeGuards.transport(value);
9
+ }
10
+ export async function useFileRecoveryTransport(values, inspect) {
11
+ const local = () => createLocalTransport({
12
+ directory: join(resolve(values["runtime-directory"]), "storage"),
13
+ });
14
+ if (!values.file && !values.config) {
15
+ await inspect(local());
16
+ return;
17
+ }
18
+ invariant(values.file && values.config, "Configured file recovery requires --file and --config together");
19
+ const project = await readRecipeProject({
20
+ file: values.file,
21
+ config: values.config,
22
+ });
23
+ const scope = createRecipeComponentScope(project.graph, project.registry, project.directory, new AbortController().signal);
24
+ try {
25
+ await scope.prepare();
26
+ const retention = project.files?.retention;
27
+ if (retention?.policy !== "portable") {
28
+ await inspect(local());
29
+ return;
30
+ }
31
+ invariant(project.files?.runtime.namespace === values.namespace, "Recovery namespace does not match configured portable workspace");
32
+ const transporter = await scope.resolve(retention.transporter, "transport");
33
+ invariant(isRecoveryTransport(transporter), "Invalid configured recovery Transport");
34
+ await inspect(transporter, { policy: "portable", transporter });
35
+ }
36
+ finally {
37
+ await scope.close();
38
+ }
39
+ }
40
+ //# sourceMappingURL=recovery-file-transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recovery-file-transport.js","sourceRoot":"","sources":["../../src/cli/recovery-file-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBA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,CAAC;QACD,SAAS,CACP,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,KAAK,MAAM,CAAC,SAAS,EACrD,iEAAiE,CAClE,CAAC;QACF,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAC5E,SAAS,CACP,mBAAmB,CAAC,WAAW,CAAC,EAChC,uCAAuC,CACxC,CAAC;QACF,MAAM,OAAO,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;IAClE,CAAC;YAAS,CAAC;QACT,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;AACH,CAAC","sourcesContent":["import { join, resolve } from \"node:path\";\nimport { invariant } from \"../domain/errors.ts\";\nimport type { Transport } from \"../domain/transport.types.ts\";\nimport type { WorkspaceRetention } from \"../domain/file-workspace.types.ts\";\nimport { createLocalTransport } from \"../infrastructure/local-transport.ts\";\nimport { readRecipeProject } from \"../application/recipes/project.ts\";\nimport { createRecipeComponentScope } from \"../application/recipes/scope.ts\";\nimport { nativeRecipeGuards } from \"../application/recipes/native.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\n\nfunction isRecoveryTransport(value: unknown): value is Transport {\n return nativeRecipeGuards.transport!(value);\n}\n\nexport async function useFileRecoveryTransport(\n values: CliInvocation[\"values\"],\n inspect: (\n transporter: Transport,\n retention?: WorkspaceRetention,\n ) => Promise<void>,\n): Promise<void> {\n const local = () =>\n createLocalTransport({\n directory: join(resolve(values[\"runtime-directory\"]!), \"storage\"),\n });\n if (!values.file && !values.config) {\n await inspect(local());\n return;\n }\n invariant(\n values.file && values.config,\n \"Configured file recovery requires --file and --config together\",\n );\n const project = await readRecipeProject({\n file: values.file,\n config: values.config,\n });\n const scope = createRecipeComponentScope(\n project.graph,\n project.registry,\n project.directory,\n new AbortController().signal,\n );\n try {\n await scope.prepare();\n const retention = project.files?.retention;\n if (retention?.policy !== \"portable\") {\n await inspect(local());\n return;\n }\n invariant(\n project.files?.runtime.namespace === values.namespace,\n \"Recovery namespace does not match configured portable workspace\",\n );\n const transporter = await scope.resolve(retention.transporter, \"transport\");\n invariant(\n isRecoveryTransport(transporter),\n \"Invalid configured recovery Transport\",\n );\n await inspect(transporter, { policy: \"portable\", transporter });\n } finally {\n await scope.close();\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { CliInvocation } from "./main.types.ts";
2
+ export declare function recoveryPublicationCommand({ values, positionals, }: CliInvocation): Promise<void>;