alchemy 2.0.0-beta.76 → 2.0.0-beta.77

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 (1418) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_LICENSES.md +11 -11
  3. package/bin/cli.js +88 -11
  4. package/bin/exec.js +11828 -5720
  5. package/bin/exec.js.map +1 -1
  6. package/bin/register-oxc.js +27 -0
  7. package/lib/AWS/AMP/Scraper.js +1 -1
  8. package/lib/AWS/AMP/Scraper.js.map +1 -1
  9. package/lib/AWS/AppRunner/Service.d.ts +11 -27
  10. package/lib/AWS/AppRunner/Service.d.ts.map +1 -1
  11. package/lib/AWS/AppRunner/Service.js +7 -21
  12. package/lib/AWS/AppRunner/Service.js.map +1 -1
  13. package/lib/AWS/Assets.d.ts +1 -1
  14. package/lib/AWS/Assets.js +2 -2
  15. package/lib/AWS/Assets.js.map +1 -1
  16. package/lib/AWS/AuthProvider.d.ts +40 -53
  17. package/lib/AWS/AuthProvider.d.ts.map +1 -1
  18. package/lib/AWS/AuthProvider.js +480 -215
  19. package/lib/AWS/AuthProvider.js.map +1 -1
  20. package/lib/AWS/Batch/JobDefinition.d.ts +11 -27
  21. package/lib/AWS/Batch/JobDefinition.d.ts.map +1 -1
  22. package/lib/AWS/Batch/JobDefinition.js +7 -21
  23. package/lib/AWS/Batch/JobDefinition.js.map +1 -1
  24. package/lib/AWS/EC2/GetAmi.d.ts +2 -0
  25. package/lib/AWS/EC2/GetAmi.d.ts.map +1 -1
  26. package/lib/AWS/EC2/Instance.d.ts +11 -27
  27. package/lib/AWS/EC2/Instance.d.ts.map +1 -1
  28. package/lib/AWS/EC2/Instance.js +7 -21
  29. package/lib/AWS/EC2/Instance.js.map +1 -1
  30. package/lib/AWS/EC2/hosted.d.ts +5 -6
  31. package/lib/AWS/EC2/hosted.d.ts.map +1 -1
  32. package/lib/AWS/EC2/hosted.js.map +1 -1
  33. package/lib/AWS/ECR/Image.d.ts +1 -1
  34. package/lib/AWS/ECR/ImageSource.d.ts +4 -5
  35. package/lib/AWS/ECR/ImageSource.d.ts.map +1 -1
  36. package/lib/AWS/ECR/ImageSource.js.map +1 -1
  37. package/lib/AWS/ECS/Service.d.ts +7 -21
  38. package/lib/AWS/ECS/Service.d.ts.map +1 -1
  39. package/lib/AWS/ECS/Service.js +7 -21
  40. package/lib/AWS/ECS/Service.js.map +1 -1
  41. package/lib/AWS/ECS/Task.d.ts +7 -21
  42. package/lib/AWS/ECS/Task.d.ts.map +1 -1
  43. package/lib/AWS/ECS/Task.js +7 -21
  44. package/lib/AWS/ECS/Task.js.map +1 -1
  45. package/lib/AWS/ElastiCache/CacheCluster.d.ts +60 -0
  46. package/lib/AWS/ElastiCache/CacheCluster.d.ts.map +1 -0
  47. package/lib/AWS/ElastiCache/CacheCluster.js +199 -0
  48. package/lib/AWS/ElastiCache/CacheCluster.js.map +1 -0
  49. package/lib/AWS/ElastiCache/ConnectCacheCluster.d.ts +46 -0
  50. package/lib/AWS/ElastiCache/ConnectCacheCluster.d.ts.map +1 -0
  51. package/lib/AWS/ElastiCache/ConnectCacheCluster.js +5 -0
  52. package/lib/AWS/ElastiCache/ConnectCacheCluster.js.map +1 -0
  53. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.d.ts +4 -0
  54. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.d.ts.map +1 -0
  55. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.js +52 -0
  56. package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.js.map +1 -0
  57. package/lib/AWS/ElastiCache/ConnectReplicationGroup.d.ts +47 -0
  58. package/lib/AWS/ElastiCache/ConnectReplicationGroup.d.ts.map +1 -0
  59. package/lib/AWS/ElastiCache/ConnectReplicationGroup.js +5 -0
  60. package/lib/AWS/ElastiCache/ConnectReplicationGroup.js.map +1 -0
  61. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.d.ts +4 -0
  62. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.d.ts.map +1 -0
  63. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.js +77 -0
  64. package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.js.map +1 -0
  65. package/lib/AWS/ElastiCache/ReplicationGroup.d.ts +95 -0
  66. package/lib/AWS/ElastiCache/ReplicationGroup.d.ts.map +1 -0
  67. package/lib/AWS/ElastiCache/ReplicationGroup.js +383 -0
  68. package/lib/AWS/ElastiCache/ReplicationGroup.js.map +1 -0
  69. package/lib/AWS/ElastiCache/SubnetGroup.d.ts +39 -0
  70. package/lib/AWS/ElastiCache/SubnetGroup.d.ts.map +1 -0
  71. package/lib/AWS/ElastiCache/SubnetGroup.js +136 -0
  72. package/lib/AWS/ElastiCache/SubnetGroup.js.map +1 -0
  73. package/lib/AWS/ElastiCache/index.d.ts +7 -0
  74. package/lib/AWS/ElastiCache/index.d.ts.map +1 -1
  75. package/lib/AWS/ElastiCache/index.js +7 -0
  76. package/lib/AWS/ElastiCache/index.js.map +1 -1
  77. package/lib/AWS/ElastiCache/internal.d.ts +13 -0
  78. package/lib/AWS/ElastiCache/internal.d.ts.map +1 -0
  79. package/lib/AWS/ElastiCache/internal.js +19 -0
  80. package/lib/AWS/ElastiCache/internal.js.map +1 -0
  81. package/lib/AWS/Environment.d.ts +2 -3
  82. package/lib/AWS/Environment.d.ts.map +1 -1
  83. package/lib/AWS/Environment.js +11 -41
  84. package/lib/AWS/Environment.js.map +1 -1
  85. package/lib/AWS/IAM/actions.generated.js +1 -1
  86. package/lib/AWS/IAM/actions.generated.js.map +1 -1
  87. package/lib/AWS/IdentityCenter/AccountAssignment.js +6 -0
  88. package/lib/AWS/IdentityCenter/AccountAssignment.js.map +1 -1
  89. package/lib/AWS/Lambda/Function.d.ts +14 -23
  90. package/lib/AWS/Lambda/Function.d.ts.map +1 -1
  91. package/lib/AWS/Lambda/Function.js +15 -20
  92. package/lib/AWS/Lambda/Function.js.map +1 -1
  93. package/lib/AWS/Lambda/MicrovmImage.d.ts +12 -28
  94. package/lib/AWS/Lambda/MicrovmImage.d.ts.map +1 -1
  95. package/lib/AWS/Lambda/MicrovmImage.js +8 -22
  96. package/lib/AWS/Lambda/MicrovmImage.js.map +1 -1
  97. package/lib/AWS/Local/DevWatchProvider.d.ts.map +1 -1
  98. package/lib/AWS/Local/DevWatchProvider.js +10 -1
  99. package/lib/AWS/Local/DevWatchProvider.js.map +1 -1
  100. package/lib/AWS/Organizations/Account.d.ts +2 -2
  101. package/lib/AWS/Organizations/Account.d.ts.map +1 -1
  102. package/lib/AWS/Organizations/Account.js +16 -8
  103. package/lib/AWS/Organizations/Account.js.map +1 -1
  104. package/lib/AWS/Organizations/DelegatedAdministrator.d.ts +2 -3
  105. package/lib/AWS/Organizations/DelegatedAdministrator.d.ts.map +1 -1
  106. package/lib/AWS/Organizations/DelegatedAdministrator.js +5 -5
  107. package/lib/AWS/Organizations/DelegatedAdministrator.js.map +1 -1
  108. package/lib/AWS/Organizations/Organization.d.ts +1 -1
  109. package/lib/AWS/Organizations/Organization.d.ts.map +1 -1
  110. package/lib/AWS/Organizations/Organization.js +2 -2
  111. package/lib/AWS/Organizations/Organization.js.map +1 -1
  112. package/lib/AWS/Organizations/common.d.ts +9 -0
  113. package/lib/AWS/Organizations/common.d.ts.map +1 -1
  114. package/lib/AWS/Organizations/common.js +13 -0
  115. package/lib/AWS/Organizations/common.js.map +1 -1
  116. package/lib/AWS/Providers.d.ts.map +1 -1
  117. package/lib/AWS/Providers.js +4 -1
  118. package/lib/AWS/Providers.js.map +1 -1
  119. package/lib/AWS/StateStore/State.d.ts +1 -1
  120. package/lib/AWS/StateStore/State.d.ts.map +1 -1
  121. package/lib/Alchemist/Errors.d.ts +31 -0
  122. package/lib/Alchemist/Errors.d.ts.map +1 -0
  123. package/lib/Alchemist/Errors.js +19 -0
  124. package/lib/Alchemist/Errors.js.map +1 -0
  125. package/lib/Alchemist/Progress.d.ts +16 -0
  126. package/lib/Alchemist/Progress.d.ts.map +1 -0
  127. package/lib/Alchemist/Progress.js +129 -0
  128. package/lib/Alchemist/Progress.js.map +1 -0
  129. package/lib/Alchemist/Runtime.d.ts +22 -0
  130. package/lib/Alchemist/Runtime.d.ts.map +1 -0
  131. package/lib/Alchemist/Runtime.js +28 -0
  132. package/lib/Alchemist/Runtime.js.map +1 -0
  133. package/lib/Alchemist/Session.d.ts +124 -0
  134. package/lib/Alchemist/Session.d.ts.map +1 -0
  135. package/lib/Alchemist/Session.js +223 -0
  136. package/lib/Alchemist/Session.js.map +1 -0
  137. package/lib/Alchemist/index.d.ts +15 -0
  138. package/lib/Alchemist/index.d.ts.map +1 -0
  139. package/lib/Alchemist/index.js +15 -0
  140. package/lib/Alchemist/index.js.map +1 -0
  141. package/lib/Alchemist/routes/aws.d.ts +21 -0
  142. package/lib/Alchemist/routes/aws.d.ts.map +1 -0
  143. package/lib/Alchemist/routes/aws.js +54 -0
  144. package/lib/Alchemist/routes/aws.js.map +1 -0
  145. package/lib/Alchemist/routes/cloudflare.d.ts +63 -0
  146. package/lib/Alchemist/routes/cloudflare.d.ts.map +1 -0
  147. package/lib/Alchemist/routes/cloudflare.js +113 -0
  148. package/lib/Alchemist/routes/cloudflare.js.map +1 -0
  149. package/lib/Alchemist/routes/cloudflareToken.d.ts +93 -0
  150. package/lib/Alchemist/routes/cloudflareToken.d.ts.map +1 -0
  151. package/lib/Alchemist/routes/cloudflareToken.js +111 -0
  152. package/lib/Alchemist/routes/cloudflareToken.js.map +1 -0
  153. package/lib/Alchemist/routes/drift.d.ts +55 -0
  154. package/lib/Alchemist/routes/drift.d.ts.map +1 -0
  155. package/lib/Alchemist/routes/drift.js +52 -0
  156. package/lib/Alchemist/routes/drift.js.map +1 -0
  157. package/lib/Alchemist/routes/logs.d.ts +41 -0
  158. package/lib/Alchemist/routes/logs.d.ts.map +1 -0
  159. package/lib/Alchemist/routes/logs.js +112 -0
  160. package/lib/Alchemist/routes/logs.js.map +1 -0
  161. package/lib/Alchemist/routes/nuke.d.ts +46 -0
  162. package/lib/Alchemist/routes/nuke.d.ts.map +1 -0
  163. package/lib/Alchemist/routes/nuke.js +80 -0
  164. package/lib/Alchemist/routes/nuke.js.map +1 -0
  165. package/lib/Alchemist/routes/profile.d.ts +133 -0
  166. package/lib/Alchemist/routes/profile.d.ts.map +1 -0
  167. package/lib/Alchemist/routes/profile.js +257 -0
  168. package/lib/Alchemist/routes/profile.js.map +1 -0
  169. package/lib/Alchemist/routes/provider.d.ts +33 -0
  170. package/lib/Alchemist/routes/provider.d.ts.map +1 -0
  171. package/lib/Alchemist/routes/provider.js +65 -0
  172. package/lib/Alchemist/routes/provider.js.map +1 -0
  173. package/lib/Alchemist/routes/stack.d.ts +78 -0
  174. package/lib/Alchemist/routes/stack.d.ts.map +1 -0
  175. package/lib/Alchemist/routes/stack.js +67 -0
  176. package/lib/Alchemist/routes/stack.js.map +1 -0
  177. package/lib/Alchemist/routes/state.d.ts +35 -0
  178. package/lib/Alchemist/routes/state.d.ts.map +1 -0
  179. package/lib/Alchemist/routes/state.js +42 -0
  180. package/lib/Alchemist/routes/state.js.map +1 -0
  181. package/lib/Apply.d.ts +8 -6
  182. package/lib/Apply.d.ts.map +1 -1
  183. package/lib/Apply.js +209 -103
  184. package/lib/Apply.js.map +1 -1
  185. package/lib/Auth/AuthProvider.d.ts +201 -25
  186. package/lib/Auth/AuthProvider.d.ts.map +1 -1
  187. package/lib/Auth/AuthProvider.js +180 -40
  188. package/lib/Auth/AuthProvider.js.map +1 -1
  189. package/lib/Auth/BrowserOAuth.d.ts +27 -0
  190. package/lib/Auth/BrowserOAuth.d.ts.map +1 -0
  191. package/lib/Auth/BrowserOAuth.js +41 -0
  192. package/lib/Auth/BrowserOAuth.js.map +1 -0
  193. package/lib/Auth/Credentials.d.ts +11 -6
  194. package/lib/Auth/Credentials.d.ts.map +1 -1
  195. package/lib/Auth/Credentials.js +62 -23
  196. package/lib/Auth/Credentials.js.map +1 -1
  197. package/lib/Auth/CredentialsCache.d.ts +15 -0
  198. package/lib/Auth/CredentialsCache.d.ts.map +1 -0
  199. package/lib/Auth/CredentialsCache.js +34 -0
  200. package/lib/Auth/CredentialsCache.js.map +1 -0
  201. package/lib/Auth/Demand.d.ts +59 -34
  202. package/lib/Auth/Demand.d.ts.map +1 -1
  203. package/lib/Auth/Demand.js +150 -60
  204. package/lib/Auth/Demand.js.map +1 -1
  205. package/lib/Auth/Env.d.ts +4 -4
  206. package/lib/Auth/Env.d.ts.map +1 -1
  207. package/lib/Auth/Env.js +18 -9
  208. package/lib/Auth/Env.js.map +1 -1
  209. package/lib/Auth/Inspect.d.ts +33 -0
  210. package/lib/Auth/Inspect.d.ts.map +1 -0
  211. package/lib/Auth/Inspect.js +67 -0
  212. package/lib/Auth/Inspect.js.map +1 -0
  213. package/lib/Auth/Lock.d.ts +6 -0
  214. package/lib/Auth/Lock.d.ts.map +1 -1
  215. package/lib/Auth/Lock.js +22 -11
  216. package/lib/Auth/Lock.js.map +1 -1
  217. package/lib/Auth/OAuthFlow.d.ts +119 -0
  218. package/lib/Auth/OAuthFlow.d.ts.map +1 -0
  219. package/lib/Auth/OAuthFlow.js +314 -0
  220. package/lib/Auth/OAuthFlow.js.map +1 -0
  221. package/lib/Auth/Paths.d.ts +18 -0
  222. package/lib/Auth/Paths.d.ts.map +1 -0
  223. package/lib/Auth/Paths.js +20 -0
  224. package/lib/Auth/Paths.js.map +1 -0
  225. package/lib/Auth/Profile.d.ts +91 -67
  226. package/lib/Auth/Profile.d.ts.map +1 -1
  227. package/lib/Auth/Profile.js +449 -92
  228. package/lib/Auth/Profile.js.map +1 -1
  229. package/lib/Auth/Resolve.d.ts +42 -0
  230. package/lib/Auth/Resolve.d.ts.map +1 -0
  231. package/lib/Auth/Resolve.js +90 -0
  232. package/lib/Auth/Resolve.js.map +1 -0
  233. package/lib/Auth/StoredAuthProvider.d.ts +84 -0
  234. package/lib/Auth/StoredAuthProvider.d.ts.map +1 -0
  235. package/lib/Auth/StoredAuthProvider.js +179 -0
  236. package/lib/Auth/StoredAuthProvider.js.map +1 -0
  237. package/lib/Auth/index.d.ts +1 -0
  238. package/lib/Auth/index.d.ts.map +1 -1
  239. package/lib/Auth/index.js +1 -0
  240. package/lib/Auth/index.js.map +1 -1
  241. package/lib/Axiom/AuthProvider.d.ts +17 -26
  242. package/lib/Axiom/AuthProvider.d.ts.map +1 -1
  243. package/lib/Axiom/AuthProvider.js +89 -172
  244. package/lib/Axiom/AuthProvider.js.map +1 -1
  245. package/lib/Axiom/Credentials.d.ts +2 -4
  246. package/lib/Axiom/Credentials.d.ts.map +1 -1
  247. package/lib/Axiom/Credentials.js +5 -10
  248. package/lib/Axiom/Credentials.js.map +1 -1
  249. package/lib/Axiom/Providers.d.ts +2 -2
  250. package/lib/Axiom/Providers.d.ts.map +1 -1
  251. package/lib/Axiom/Providers.js +3 -3
  252. package/lib/Axiom/Providers.js.map +1 -1
  253. package/lib/Bundle/Bundle.d.ts +3 -5
  254. package/lib/Bundle/Bundle.d.ts.map +1 -1
  255. package/lib/Bundle/Bundle.js.map +1 -1
  256. package/lib/Cli/CliKit/CliKit.d.ts +92 -0
  257. package/lib/Cli/CliKit/CliKit.d.ts.map +1 -0
  258. package/lib/Cli/CliKit/CliKit.js +27 -0
  259. package/lib/Cli/CliKit/CliKit.js.map +1 -0
  260. package/lib/Cli/CliKit/index.d.ts +9 -0
  261. package/lib/Cli/CliKit/index.d.ts.map +1 -0
  262. package/lib/Cli/CliKit/index.js +9 -0
  263. package/lib/Cli/CliKit/index.js.map +1 -0
  264. package/lib/Cli/CliKit/interaction.d.ts +13 -0
  265. package/lib/Cli/CliKit/interaction.d.ts.map +1 -0
  266. package/lib/Cli/CliKit/interaction.js +17 -0
  267. package/lib/Cli/CliKit/interaction.js.map +1 -0
  268. package/lib/Cli/CliKit/layer.d.ts +7 -0
  269. package/lib/Cli/CliKit/layer.d.ts.map +1 -0
  270. package/lib/Cli/CliKit/layer.js +34 -0
  271. package/lib/Cli/CliKit/layer.js.map +1 -0
  272. package/lib/Cli/DevOptions.d.ts +17 -0
  273. package/lib/Cli/DevOptions.d.ts.map +1 -0
  274. package/lib/Cli/DevOptions.js +16 -0
  275. package/lib/Cli/DevOptions.js.map +1 -0
  276. package/lib/Cli/Format.d.ts +5 -0
  277. package/lib/Cli/Format.d.ts.map +1 -0
  278. package/lib/Cli/Format.js +27 -0
  279. package/lib/Cli/Format.js.map +1 -0
  280. package/lib/Cli/GlobalLog.d.ts +41 -0
  281. package/lib/Cli/GlobalLog.d.ts.map +1 -0
  282. package/lib/Cli/GlobalLog.js +112 -0
  283. package/lib/Cli/GlobalLog.js.map +1 -0
  284. package/lib/Cli/LoggingCli.d.ts +4 -3
  285. package/lib/Cli/LoggingCli.d.ts.map +1 -1
  286. package/lib/Cli/LoggingCli.js +240 -100
  287. package/lib/Cli/LoggingCli.js.map +1 -1
  288. package/lib/Cli/ModeTag.d.ts +1 -1
  289. package/lib/Cli/ModeTag.js +1 -1
  290. package/lib/Cli/NamespaceTree.d.ts +18 -8
  291. package/lib/Cli/NamespaceTree.d.ts.map +1 -1
  292. package/lib/Cli/NamespaceTree.js +52 -11
  293. package/lib/Cli/NamespaceTree.js.map +1 -1
  294. package/lib/Cli/PlainCliFormatter.d.ts +11 -0
  295. package/lib/Cli/PlainCliFormatter.d.ts.map +1 -0
  296. package/lib/Cli/PlainCliFormatter.js +70 -0
  297. package/lib/Cli/PlainCliFormatter.js.map +1 -0
  298. package/lib/Cli/PropertyDiff.d.ts +37 -0
  299. package/lib/Cli/PropertyDiff.d.ts.map +1 -0
  300. package/lib/Cli/PropertyDiff.js +162 -0
  301. package/lib/Cli/PropertyDiff.js.map +1 -0
  302. package/lib/Cli/checkVersion.d.ts.map +1 -1
  303. package/lib/Cli/checkVersion.js +10 -6
  304. package/lib/Cli/checkVersion.js.map +1 -1
  305. package/lib/Cli/commands/aws.d.ts +2 -4
  306. package/lib/Cli/commands/aws.d.ts.map +1 -1
  307. package/lib/Cli/commands/aws.js +43 -55
  308. package/lib/Cli/commands/aws.js.map +1 -1
  309. package/lib/Cli/commands/cloudflare.d.ts +6 -7
  310. package/lib/Cli/commands/cloudflare.d.ts.map +1 -1
  311. package/lib/Cli/commands/cloudflare.js +149 -307
  312. package/lib/Cli/commands/cloudflare.js.map +1 -1
  313. package/lib/Cli/commands/compat.d.ts +11 -0
  314. package/lib/Cli/commands/compat.d.ts.map +1 -0
  315. package/lib/Cli/commands/compat.js +19 -0
  316. package/lib/Cli/commands/compat.js.map +1 -0
  317. package/lib/Cli/commands/confirm.d.ts +33 -0
  318. package/lib/Cli/commands/confirm.d.ts.map +1 -0
  319. package/lib/Cli/commands/confirm.js +39 -0
  320. package/lib/Cli/commands/confirm.js.map +1 -0
  321. package/lib/Cli/commands/deploy.d.ts +20 -32
  322. package/lib/Cli/commands/deploy.d.ts.map +1 -1
  323. package/lib/Cli/commands/deploy.js +140 -140
  324. package/lib/Cli/commands/deploy.js.map +1 -1
  325. package/lib/Cli/commands/dev.d.ts +5 -4
  326. package/lib/Cli/commands/dev.d.ts.map +1 -1
  327. package/lib/Cli/commands/dev.js +52 -26
  328. package/lib/Cli/commands/dev.js.map +1 -1
  329. package/lib/Cli/commands/drift.d.ts +12 -0
  330. package/lib/Cli/commands/drift.d.ts.map +1 -0
  331. package/lib/Cli/commands/drift.js +68 -0
  332. package/lib/Cli/commands/drift.js.map +1 -0
  333. package/lib/Cli/commands/errors.d.ts +35 -0
  334. package/lib/Cli/commands/errors.d.ts.map +1 -0
  335. package/lib/Cli/commands/errors.js +106 -0
  336. package/lib/Cli/commands/errors.js.map +1 -0
  337. package/lib/Cli/commands/flags.d.ts +46 -0
  338. package/lib/Cli/commands/flags.d.ts.map +1 -0
  339. package/lib/Cli/commands/flags.js +98 -0
  340. package/lib/Cli/commands/flags.js.map +1 -0
  341. package/lib/Cli/commands/instrument.d.ts +3 -0
  342. package/lib/Cli/commands/instrument.d.ts.map +1 -0
  343. package/lib/Cli/commands/instrument.js +6 -0
  344. package/lib/Cli/commands/instrument.js.map +1 -0
  345. package/lib/Cli/commands/logs.d.ts +5 -4
  346. package/lib/Cli/commands/logs.d.ts.map +1 -1
  347. package/lib/Cli/commands/logs.js +63 -88
  348. package/lib/Cli/commands/logs.js.map +1 -1
  349. package/lib/Cli/commands/nuke.d.ts +3 -2
  350. package/lib/Cli/commands/nuke.d.ts.map +1 -1
  351. package/lib/Cli/commands/nuke.js +89 -588
  352. package/lib/Cli/commands/nuke.js.map +1 -1
  353. package/lib/Cli/commands/profile/commands.d.ts +9 -0
  354. package/lib/Cli/commands/profile/commands.d.ts.map +1 -0
  355. package/lib/Cli/commands/profile/commands.js +276 -0
  356. package/lib/Cli/commands/profile/commands.js.map +1 -0
  357. package/lib/Cli/commands/profile/flows.d.ts +36 -0
  358. package/lib/Cli/commands/profile/flows.d.ts.map +1 -0
  359. package/lib/Cli/commands/profile/flows.js +155 -0
  360. package/lib/Cli/commands/profile/flows.js.map +1 -0
  361. package/lib/Cli/commands/profile/hub.d.ts +8 -0
  362. package/lib/Cli/commands/profile/hub.d.ts.map +1 -0
  363. package/lib/Cli/commands/profile/hub.js +154 -0
  364. package/lib/Cli/commands/profile/hub.js.map +1 -0
  365. package/lib/Cli/commands/profile/index.d.ts +2 -0
  366. package/lib/Cli/commands/profile/index.d.ts.map +1 -0
  367. package/lib/Cli/commands/profile/index.js +2 -0
  368. package/lib/Cli/commands/profile/index.js.map +1 -0
  369. package/lib/Cli/commands/provider.d.ts +17 -0
  370. package/lib/Cli/commands/provider.d.ts.map +1 -0
  371. package/lib/Cli/commands/provider.js +44 -0
  372. package/lib/Cli/commands/provider.js.map +1 -0
  373. package/lib/Cli/commands/render.d.ts +12 -0
  374. package/lib/Cli/commands/render.d.ts.map +1 -0
  375. package/lib/Cli/commands/render.js +82 -0
  376. package/lib/Cli/commands/render.js.map +1 -0
  377. package/lib/Cli/commands/state.d.ts +8 -1
  378. package/lib/Cli/commands/state.d.ts.map +1 -1
  379. package/lib/Cli/commands/state.js +125 -248
  380. package/lib/Cli/commands/state.js.map +1 -1
  381. package/lib/Cli/components/types.d.ts +104 -0
  382. package/lib/Cli/components/types.d.ts.map +1 -0
  383. package/lib/Cli/components/types.js +4 -0
  384. package/lib/Cli/components/types.js.map +1 -0
  385. package/lib/Cli/components/ui/Data.d.ts +15 -0
  386. package/lib/Cli/components/ui/Data.d.ts.map +1 -0
  387. package/lib/Cli/components/ui/Data.js +8 -0
  388. package/lib/Cli/components/ui/Data.js.map +1 -0
  389. package/lib/Cli/components/ui/Environment.d.ts +45 -0
  390. package/lib/Cli/components/ui/Environment.d.ts.map +1 -0
  391. package/lib/Cli/components/ui/Environment.js +38 -0
  392. package/lib/Cli/components/ui/Environment.js.map +1 -0
  393. package/lib/Cli/components/ui/Feedback.d.ts +57 -0
  394. package/lib/Cli/components/ui/Feedback.d.ts.map +1 -0
  395. package/lib/Cli/components/ui/Feedback.js +83 -0
  396. package/lib/Cli/components/ui/Feedback.js.map +1 -0
  397. package/lib/Cli/components/ui/Interactive.d.ts +157 -0
  398. package/lib/Cli/components/ui/Interactive.d.ts.map +1 -0
  399. package/lib/Cli/components/ui/Interactive.js +527 -0
  400. package/lib/Cli/components/ui/Interactive.js.map +1 -0
  401. package/lib/Cli/components/ui/Layout.d.ts +74 -0
  402. package/lib/Cli/components/ui/Layout.d.ts.map +1 -0
  403. package/lib/Cli/components/ui/Layout.js +91 -0
  404. package/lib/Cli/components/ui/Layout.js.map +1 -0
  405. package/lib/Cli/components/ui/Live.d.ts +49 -0
  406. package/lib/Cli/components/ui/Live.d.ts.map +1 -0
  407. package/lib/Cli/components/ui/Live.js +43 -0
  408. package/lib/Cli/components/ui/Live.js.map +1 -0
  409. package/lib/Cli/components/ui/ProgressBar.d.ts +16 -0
  410. package/lib/Cli/components/ui/ProgressBar.d.ts.map +1 -0
  411. package/lib/Cli/components/ui/ProgressBar.js +17 -0
  412. package/lib/Cli/components/ui/ProgressBar.js.map +1 -0
  413. package/lib/Cli/components/ui/Transcript.d.ts +12 -0
  414. package/lib/Cli/components/ui/Transcript.d.ts.map +1 -0
  415. package/lib/Cli/components/ui/Transcript.js +14 -0
  416. package/lib/Cli/components/ui/Transcript.js.map +1 -0
  417. package/lib/Cli/components/ui/Typography.d.ts +17 -0
  418. package/lib/Cli/components/ui/Typography.d.ts.map +1 -0
  419. package/lib/Cli/components/ui/Typography.js +21 -0
  420. package/lib/Cli/components/ui/Typography.js.map +1 -0
  421. package/lib/Cli/components/ui/index.d.ts +16 -0
  422. package/lib/Cli/components/ui/index.d.ts.map +1 -0
  423. package/lib/Cli/components/ui/index.js +16 -0
  424. package/lib/Cli/components/ui/index.js.map +1 -0
  425. package/lib/Cli/components/view/ApprovePlan.d.ts +17 -0
  426. package/lib/Cli/components/view/ApprovePlan.d.ts.map +1 -0
  427. package/lib/Cli/components/view/ApprovePlan.js +59 -0
  428. package/lib/Cli/components/view/ApprovePlan.js.map +1 -0
  429. package/lib/Cli/components/view/Help.d.ts +4 -0
  430. package/lib/Cli/components/view/Help.d.ts.map +1 -0
  431. package/lib/Cli/components/view/Help.js +116 -0
  432. package/lib/Cli/components/view/Help.js.map +1 -0
  433. package/lib/Cli/components/view/Logo.d.ts +7 -0
  434. package/lib/Cli/components/view/Logo.d.ts.map +1 -0
  435. package/lib/Cli/components/view/Logo.js +118 -0
  436. package/lib/Cli/components/view/Logo.js.map +1 -0
  437. package/lib/Cli/components/view/Nuke.d.ts +36 -0
  438. package/lib/Cli/components/view/Nuke.d.ts.map +1 -0
  439. package/lib/Cli/components/view/Nuke.js +148 -0
  440. package/lib/Cli/components/view/Nuke.js.map +1 -0
  441. package/lib/Cli/components/view/PlanDecision.d.ts +15 -0
  442. package/lib/Cli/components/view/PlanDecision.d.ts.map +1 -0
  443. package/lib/Cli/components/view/PlanDecision.js +26 -0
  444. package/lib/Cli/components/view/PlanDecision.js.map +1 -0
  445. package/lib/Cli/components/view/PlanRow.d.ts +17 -0
  446. package/lib/Cli/components/view/PlanRow.d.ts.map +1 -0
  447. package/lib/Cli/components/view/PlanRow.js +14 -0
  448. package/lib/Cli/components/view/PlanRow.js.map +1 -0
  449. package/lib/Cli/components/view/PlanTree.d.ts +116 -0
  450. package/lib/Cli/components/view/PlanTree.d.ts.map +1 -0
  451. package/lib/Cli/components/view/PlanTree.js +207 -0
  452. package/lib/Cli/components/view/PlanTree.js.map +1 -0
  453. package/lib/Cli/components/view/PlanView.d.ts +42 -0
  454. package/lib/Cli/components/view/PlanView.d.ts.map +1 -0
  455. package/lib/Cli/components/view/PlanView.js +310 -0
  456. package/lib/Cli/components/view/PlanView.js.map +1 -0
  457. package/lib/Cli/components/view/Profile.d.ts +130 -0
  458. package/lib/Cli/components/view/Profile.d.ts.map +1 -0
  459. package/lib/Cli/components/view/Profile.js +147 -0
  460. package/lib/Cli/components/view/Profile.js.map +1 -0
  461. package/lib/Cli/components/view/ProfileDashboard.d.ts +152 -0
  462. package/lib/Cli/components/view/ProfileDashboard.d.ts.map +1 -0
  463. package/lib/Cli/components/view/ProfileDashboard.js +485 -0
  464. package/lib/Cli/components/view/ProfileDashboard.js.map +1 -0
  465. package/lib/Cli/components/view/Prompts.d.ts +10 -0
  466. package/lib/Cli/components/view/Prompts.d.ts.map +1 -0
  467. package/lib/Cli/components/view/Prompts.js +440 -0
  468. package/lib/Cli/components/view/Prompts.js.map +1 -0
  469. package/lib/Cli/components/view/Runtime.d.ts +8 -0
  470. package/lib/Cli/components/view/Runtime.d.ts.map +1 -0
  471. package/lib/Cli/components/view/Runtime.js +670 -0
  472. package/lib/Cli/components/view/Runtime.js.map +1 -0
  473. package/lib/Cli/components/view/SigilCli.d.ts +5 -0
  474. package/lib/Cli/components/view/SigilCli.d.ts.map +1 -0
  475. package/lib/Cli/components/view/SigilCli.js +134 -0
  476. package/lib/Cli/components/view/SigilCli.js.map +1 -0
  477. package/lib/Cli/components/view/StackOutputs.d.ts +10 -0
  478. package/lib/Cli/components/view/StackOutputs.d.ts.map +1 -0
  479. package/lib/Cli/components/view/StackOutputs.js +14 -0
  480. package/lib/Cli/components/view/StackOutputs.js.map +1 -0
  481. package/lib/Cli/components/view/StateExplorer.d.ts +118 -0
  482. package/lib/Cli/components/view/StateExplorer.d.ts.map +1 -0
  483. package/lib/Cli/components/view/StateExplorer.js +664 -0
  484. package/lib/Cli/components/view/StateExplorer.js.map +1 -0
  485. package/lib/Cli/components/view/statusStyle.d.ts +18 -0
  486. package/lib/Cli/components/view/statusStyle.d.ts.map +1 -0
  487. package/lib/Cli/components/view/statusStyle.js +69 -0
  488. package/lib/Cli/components/view/statusStyle.js.map +1 -0
  489. package/lib/Cli/components/view/usePlanPresentation.d.ts +25 -0
  490. package/lib/Cli/components/view/usePlanPresentation.d.ts.map +1 -0
  491. package/lib/Cli/components/view/usePlanPresentation.js +54 -0
  492. package/lib/Cli/components/view/usePlanPresentation.js.map +1 -0
  493. package/lib/Cli/components/view/usePlanViewport.d.ts +31 -0
  494. package/lib/Cli/components/view/usePlanViewport.d.ts.map +1 -0
  495. package/lib/Cli/components/view/usePlanViewport.js +113 -0
  496. package/lib/Cli/components/view/usePlanViewport.js.map +1 -0
  497. package/lib/Cli/exec.d.ts +5 -1
  498. package/lib/Cli/exec.d.ts.map +1 -1
  499. package/lib/Cli/exec.js +173 -19
  500. package/lib/Cli/exec.js.map +1 -1
  501. package/lib/Cli/main.d.ts +4 -1
  502. package/lib/Cli/main.d.ts.map +1 -1
  503. package/lib/Cli/main.js +129 -38
  504. package/lib/Cli/main.js.map +1 -1
  505. package/lib/Cli/selectCli.d.ts +5 -3
  506. package/lib/Cli/selectCli.d.ts.map +1 -1
  507. package/lib/Cli/selectCli.js +16 -9
  508. package/lib/Cli/selectCli.js.map +1 -1
  509. package/lib/Cloudflare/ApiToken/UserApiToken.d.ts +1 -1
  510. package/lib/Cloudflare/ApiToken/UserApiToken.js +1 -1
  511. package/lib/Cloudflare/Auth/AuthConfig.d.ts +60 -0
  512. package/lib/Cloudflare/Auth/AuthConfig.d.ts.map +1 -0
  513. package/lib/Cloudflare/Auth/AuthConfig.js +68 -0
  514. package/lib/Cloudflare/Auth/AuthConfig.js.map +1 -0
  515. package/lib/Cloudflare/Auth/AuthProvider.d.ts +2 -142
  516. package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
  517. package/lib/Cloudflare/Auth/AuthProvider.js +473 -327
  518. package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
  519. package/lib/Cloudflare/Auth/OAuthClient.d.ts +16 -48
  520. package/lib/Cloudflare/Auth/OAuthClient.d.ts.map +1 -1
  521. package/lib/Cloudflare/Auth/OAuthClient.js +25 -260
  522. package/lib/Cloudflare/Auth/OAuthClient.js.map +1 -1
  523. package/lib/Cloudflare/Auth/OAuthScopes.d.ts +88 -0
  524. package/lib/Cloudflare/Auth/OAuthScopes.d.ts.map +1 -0
  525. package/lib/Cloudflare/Auth/OAuthScopes.js +887 -0
  526. package/lib/Cloudflare/Auth/OAuthScopes.js.map +1 -0
  527. package/lib/Cloudflare/Auth/TokenPolicy.d.ts +34 -0
  528. package/lib/Cloudflare/Auth/TokenPolicy.d.ts.map +1 -0
  529. package/lib/Cloudflare/Auth/TokenPolicy.js +51 -0
  530. package/lib/Cloudflare/Auth/TokenPolicy.js.map +1 -0
  531. package/lib/Cloudflare/CloudflareEnvironment.d.ts +2 -3
  532. package/lib/Cloudflare/CloudflareEnvironment.d.ts.map +1 -1
  533. package/lib/Cloudflare/CloudflareEnvironment.js +7 -11
  534. package/lib/Cloudflare/CloudflareEnvironment.js.map +1 -1
  535. package/lib/Cloudflare/Containers/Container.d.ts +10 -25
  536. package/lib/Cloudflare/Containers/Container.d.ts.map +1 -1
  537. package/lib/Cloudflare/Containers/Container.js +9 -23
  538. package/lib/Cloudflare/Containers/Container.js.map +1 -1
  539. package/lib/Cloudflare/Containers/ContainerApplication.d.ts +12 -27
  540. package/lib/Cloudflare/Containers/ContainerApplication.d.ts.map +1 -1
  541. package/lib/Cloudflare/Containers/ContainerApplication.js.map +1 -1
  542. package/lib/Cloudflare/Containers/StartContainer.d.ts +1 -1
  543. package/lib/Cloudflare/Containers/StartContainer.d.ts.map +1 -1
  544. package/lib/Cloudflare/Credentials.d.ts +6 -20
  545. package/lib/Cloudflare/Credentials.d.ts.map +1 -1
  546. package/lib/Cloudflare/Credentials.js +12 -54
  547. package/lib/Cloudflare/Credentials.js.map +1 -1
  548. package/lib/Cloudflare/D1/ImportDatabase.d.ts +1 -1
  549. package/lib/Cloudflare/D1/ImportDatabase.d.ts.map +1 -1
  550. package/lib/Cloudflare/EdgeSession.d.ts +1 -1
  551. package/lib/Cloudflare/EdgeSession.d.ts.map +1 -1
  552. package/lib/Cloudflare/EdgeSession.js +1 -1
  553. package/lib/Cloudflare/EdgeSession.js.map +1 -1
  554. package/lib/Cloudflare/Logs.d.ts.map +1 -1
  555. package/lib/Cloudflare/Logs.js +10 -6
  556. package/lib/Cloudflare/Logs.js.map +1 -1
  557. package/lib/Cloudflare/Pages/Project.d.ts +1 -1
  558. package/lib/Cloudflare/Pages/Project.js +1 -1
  559. package/lib/Cloudflare/Providers.d.ts +2 -2
  560. package/lib/Cloudflare/Providers.d.ts.map +1 -1
  561. package/lib/Cloudflare/Providers.js +2 -2
  562. package/lib/Cloudflare/Providers.js.map +1 -1
  563. package/lib/Cloudflare/StateStore/Api.d.ts +3 -0
  564. package/lib/Cloudflare/StateStore/Api.d.ts.map +1 -1
  565. package/lib/Cloudflare/StateStore/Api.js +2 -2
  566. package/lib/Cloudflare/StateStore/Api.js.map +1 -1
  567. package/lib/Cloudflare/StateStore/CredentialsFile.d.ts +10 -6
  568. package/lib/Cloudflare/StateStore/CredentialsFile.d.ts.map +1 -1
  569. package/lib/Cloudflare/StateStore/CredentialsFile.js +23 -1
  570. package/lib/Cloudflare/StateStore/CredentialsFile.js.map +1 -1
  571. package/lib/Cloudflare/StateStore/State.d.ts +9 -5
  572. package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
  573. package/lib/Cloudflare/StateStore/State.js +132 -99
  574. package/lib/Cloudflare/StateStore/State.js.map +1 -1
  575. package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js +1 -1
  576. package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js.map +1 -1
  577. package/lib/Cloudflare/Website/Nextjs.d.ts.map +1 -1
  578. package/lib/Cloudflare/Website/Nextjs.js +4 -12
  579. package/lib/Cloudflare/Website/Nextjs.js.map +1 -1
  580. package/lib/Cloudflare/Website/Vocs.d.ts +1 -1
  581. package/lib/Cloudflare/Website/Vocs.d.ts.map +1 -1
  582. package/lib/Cloudflare/Website/Vocs.js +3 -7
  583. package/lib/Cloudflare/Website/Vocs.js.map +1 -1
  584. package/lib/Cloudflare/Workers/Assets.d.ts +2 -2
  585. package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
  586. package/lib/Cloudflare/Workers/Assets.js +74 -26
  587. package/lib/Cloudflare/Workers/Assets.js.map +1 -1
  588. package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts +2 -2
  589. package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts.map +1 -1
  590. package/lib/Cloudflare/Workers/BrowserHttpClient.js +10 -3
  591. package/lib/Cloudflare/Workers/BrowserHttpClient.js.map +1 -1
  592. package/lib/Cloudflare/Workers/CloudflareTracer.d.ts +9 -0
  593. package/lib/Cloudflare/Workers/CloudflareTracer.d.ts.map +1 -0
  594. package/lib/Cloudflare/Workers/CloudflareTracer.js +87 -0
  595. package/lib/Cloudflare/Workers/CloudflareTracer.js.map +1 -0
  596. package/lib/Cloudflare/Workers/Compatibility.d.ts +13 -0
  597. package/lib/Cloudflare/Workers/Compatibility.d.ts.map +1 -1
  598. package/lib/Cloudflare/Workers/Compatibility.js +31 -6
  599. package/lib/Cloudflare/Workers/Compatibility.js.map +1 -1
  600. package/lib/Cloudflare/Workers/DurableObject.d.ts +50 -4
  601. package/lib/Cloudflare/Workers/DurableObject.d.ts.map +1 -1
  602. package/lib/Cloudflare/Workers/DurableObject.js +44 -3
  603. package/lib/Cloudflare/Workers/DurableObject.js.map +1 -1
  604. package/lib/Cloudflare/Workers/DurableObjectBridge.d.ts.map +1 -1
  605. package/lib/Cloudflare/Workers/DurableObjectBridge.js +4 -0
  606. package/lib/Cloudflare/Workers/DurableObjectBridge.js.map +1 -1
  607. package/lib/Cloudflare/Workers/DurableObjectState.d.ts +25 -2
  608. package/lib/Cloudflare/Workers/DurableObjectState.d.ts.map +1 -1
  609. package/lib/Cloudflare/Workers/DurableObjectState.js +7 -2
  610. package/lib/Cloudflare/Workers/DurableObjectState.js.map +1 -1
  611. package/lib/Cloudflare/Workers/DurableObjectStorage.d.ts +7 -1
  612. package/lib/Cloudflare/Workers/DurableObjectStorage.d.ts.map +1 -1
  613. package/lib/Cloudflare/Workers/DurableObjectStorage.js +6 -1
  614. package/lib/Cloudflare/Workers/DurableObjectStorage.js.map +1 -1
  615. package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
  616. package/lib/Cloudflare/Workers/LocalWorkerProvider.js +125 -58
  617. package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
  618. package/lib/Cloudflare/Workers/RpcWorker.d.ts +12 -5
  619. package/lib/Cloudflare/Workers/RpcWorker.d.ts.map +1 -1
  620. package/lib/Cloudflare/Workers/RpcWorker.js +8 -2
  621. package/lib/Cloudflare/Workers/RpcWorker.js.map +1 -1
  622. package/lib/Cloudflare/Workers/Source.d.ts +3 -0
  623. package/lib/Cloudflare/Workers/Source.d.ts.map +1 -1
  624. package/lib/Cloudflare/Workers/Source.js +3 -1
  625. package/lib/Cloudflare/Workers/Source.js.map +1 -1
  626. package/lib/Cloudflare/Workers/Sources/Python.d.ts +2 -0
  627. package/lib/Cloudflare/Workers/Sources/Python.d.ts.map +1 -1
  628. package/lib/Cloudflare/Workers/Sources/Python.js +16 -12
  629. package/lib/Cloudflare/Workers/Sources/Python.js.map +1 -1
  630. package/lib/Cloudflare/Workers/Sources/Rolldown.js +1 -1
  631. package/lib/Cloudflare/Workers/Sources/Rolldown.js.map +1 -1
  632. package/lib/Cloudflare/Workers/Sources/Vite.d.ts +1 -1
  633. package/lib/Cloudflare/Workers/Sources/Vite.d.ts.map +1 -1
  634. package/lib/Cloudflare/Workers/Sources/Vite.js +6 -4
  635. package/lib/Cloudflare/Workers/Sources/Vite.js.map +1 -1
  636. package/lib/Cloudflare/Workers/Telemetry.d.ts +113 -0
  637. package/lib/Cloudflare/Workers/Telemetry.d.ts.map +1 -0
  638. package/lib/Cloudflare/Workers/Telemetry.js +129 -0
  639. package/lib/Cloudflare/Workers/Telemetry.js.map +1 -0
  640. package/lib/Cloudflare/Workers/ViteBuildChildRunner.js +6 -1
  641. package/lib/Cloudflare/Workers/ViteBuildChildRunner.js.map +1 -1
  642. package/lib/Cloudflare/Workers/ViteChild.d.ts +2 -2
  643. package/lib/Cloudflare/Workers/ViteChild.d.ts.map +1 -1
  644. package/lib/Cloudflare/Workers/ViteChild.js +19 -17
  645. package/lib/Cloudflare/Workers/ViteChild.js.map +1 -1
  646. package/lib/Cloudflare/Workers/ViteChild.shared.d.ts +1 -0
  647. package/lib/Cloudflare/Workers/ViteChild.shared.d.ts.map +1 -1
  648. package/lib/Cloudflare/Workers/ViteChild.shared.js.map +1 -1
  649. package/lib/Cloudflare/Workers/ViteChildRunner.js +2 -1
  650. package/lib/Cloudflare/Workers/ViteChildRunner.js.map +1 -1
  651. package/lib/Cloudflare/Workers/Worker.d.ts +101 -52
  652. package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
  653. package/lib/Cloudflare/Workers/Worker.js +91 -50
  654. package/lib/Cloudflare/Workers/Worker.js.map +1 -1
  655. package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts +9 -1
  656. package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
  657. package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +23 -0
  658. package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
  659. package/lib/Cloudflare/Workers/WorkerBinding.d.ts +6 -0
  660. package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
  661. package/lib/Cloudflare/Workers/WorkerLoader.d.ts +30 -4
  662. package/lib/Cloudflare/Workers/WorkerLoader.d.ts.map +1 -1
  663. package/lib/Cloudflare/Workers/WorkerLoader.js +36 -5
  664. package/lib/Cloudflare/Workers/WorkerLoader.js.map +1 -1
  665. package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
  666. package/lib/Cloudflare/Workers/WorkerProvider.js +52 -45
  667. package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
  668. package/lib/Cloudflare/Workers/cloudflare_workers.d.ts.map +1 -1
  669. package/lib/Cloudflare/Workers/cloudflare_workers.js +4 -1
  670. package/lib/Cloudflare/Workers/cloudflare_workers.js.map +1 -1
  671. package/lib/Cloudflare/Workers/index.d.ts +1 -0
  672. package/lib/Cloudflare/Workers/index.d.ts.map +1 -1
  673. package/lib/Cloudflare/Workers/index.js +1 -0
  674. package/lib/Cloudflare/Workers/index.js.map +1 -1
  675. package/lib/Cloudflare/Workflows/Workflow.d.ts +84 -0
  676. package/lib/Cloudflare/Workflows/Workflow.d.ts.map +1 -1
  677. package/lib/Cloudflare/Workflows/Workflow.js +47 -0
  678. package/lib/Cloudflare/Workflows/Workflow.js.map +1 -1
  679. package/lib/Cloudflare/Workflows/WorkflowBridge.js +7 -4
  680. package/lib/Cloudflare/Workflows/WorkflowBridge.js.map +1 -1
  681. package/lib/Command/Command.d.ts +1 -1
  682. package/lib/Command/Command.d.ts.map +1 -1
  683. package/lib/Command/Command.js +2 -2
  684. package/lib/Command/Command.js.map +1 -1
  685. package/lib/Command/Dev.d.ts +5 -2
  686. package/lib/Command/Dev.d.ts.map +1 -1
  687. package/lib/Command/Dev.js +31 -7
  688. package/lib/Command/Dev.js.map +1 -1
  689. package/lib/Command/Providers.d.ts +1 -1
  690. package/lib/Command/Providers.d.ts.map +1 -1
  691. package/lib/Deploy.d.ts +1 -1
  692. package/lib/Deploy.d.ts.map +1 -1
  693. package/lib/Destroy.d.ts +1 -1
  694. package/lib/Destroy.d.ts.map +1 -1
  695. package/lib/Docker/BuildHash.d.ts +13 -0
  696. package/lib/Docker/BuildHash.d.ts.map +1 -1
  697. package/lib/Docker/BuildHash.js +53 -3
  698. package/lib/Docker/BuildHash.js.map +1 -1
  699. package/lib/Docker/Docker.d.ts +1 -1
  700. package/lib/Docker/Docker.d.ts.map +1 -1
  701. package/lib/Docker/Docker.js +1 -1
  702. package/lib/Docker/Docker.js.map +1 -1
  703. package/lib/Docker/Service.d.ts +7 -21
  704. package/lib/Docker/Service.d.ts.map +1 -1
  705. package/lib/Docker/Service.js +7 -21
  706. package/lib/Docker/Service.js.map +1 -1
  707. package/lib/Docker/ServiceImage.d.ts +4 -5
  708. package/lib/Docker/ServiceImage.d.ts.map +1 -1
  709. package/lib/Docker/ServiceImage.js.map +1 -1
  710. package/lib/Drift.d.ts +91 -0
  711. package/lib/Drift.d.ts.map +1 -0
  712. package/lib/{Sync.js → Drift.js} +98 -29
  713. package/lib/Drift.js.map +1 -0
  714. package/lib/Drizzle/Schema.d.ts.map +1 -1
  715. package/lib/Drizzle/Schema.js +5 -5
  716. package/lib/Drizzle/Schema.js.map +1 -1
  717. package/lib/Fly/App.d.ts +1 -1
  718. package/lib/Fly/App.d.ts.map +1 -1
  719. package/lib/Fly/AuthProvider.d.ts +6 -20
  720. package/lib/Fly/AuthProvider.d.ts.map +1 -1
  721. package/lib/Fly/AuthProvider.js +32 -124
  722. package/lib/Fly/AuthProvider.js.map +1 -1
  723. package/lib/Fly/Bucket.d.ts +1 -1
  724. package/lib/Fly/Bucket.d.ts.map +1 -1
  725. package/lib/Fly/Catalog.d.ts +1 -1
  726. package/lib/Fly/Catalog.d.ts.map +1 -1
  727. package/lib/Fly/CheckpointHttp.d.ts.map +1 -1
  728. package/lib/Fly/CheckpointHttp.js +2 -2
  729. package/lib/Fly/CheckpointHttp.js.map +1 -1
  730. package/lib/Fly/Credentials.d.ts +15 -6
  731. package/lib/Fly/Credentials.d.ts.map +1 -1
  732. package/lib/Fly/Credentials.js +25 -13
  733. package/lib/Fly/Credentials.js.map +1 -1
  734. package/lib/Fly/DecryptHttp.d.ts.map +1 -1
  735. package/lib/Fly/DecryptHttp.js +2 -2
  736. package/lib/Fly/DecryptHttp.js.map +1 -1
  737. package/lib/Fly/EncryptHttp.d.ts.map +1 -1
  738. package/lib/Fly/EncryptHttp.js +2 -2
  739. package/lib/Fly/EncryptHttp.js.map +1 -1
  740. package/lib/Fly/Environment.d.ts +1 -1
  741. package/lib/Fly/Environment.d.ts.map +1 -1
  742. package/lib/Fly/ExecHttp.d.ts.map +1 -1
  743. package/lib/Fly/ExecHttp.js +2 -2
  744. package/lib/Fly/ExecHttp.js.map +1 -1
  745. package/lib/Fly/GetSecretHttp.d.ts.map +1 -1
  746. package/lib/Fly/GetSecretHttp.js +2 -2
  747. package/lib/Fly/GetSecretHttp.js.map +1 -1
  748. package/lib/Fly/ListSecretsHttp.d.ts.map +1 -1
  749. package/lib/Fly/ListSecretsHttp.js +2 -2
  750. package/lib/Fly/ListSecretsHttp.js.map +1 -1
  751. package/lib/Fly/Machine.d.ts +65 -0
  752. package/lib/Fly/Machine.d.ts.map +1 -1
  753. package/lib/Fly/Machine.js +34 -19
  754. package/lib/Fly/Machine.js.map +1 -1
  755. package/lib/Fly/Postgres.d.ts +1 -1
  756. package/lib/Fly/Postgres.d.ts.map +1 -1
  757. package/lib/Fly/Providers.d.ts +1 -1
  758. package/lib/Fly/Providers.d.ts.map +1 -1
  759. package/lib/Fly/Providers.js +2 -2
  760. package/lib/Fly/Providers.js.map +1 -1
  761. package/lib/Fly/Redis.d.ts +1 -1
  762. package/lib/Fly/Redis.d.ts.map +1 -1
  763. package/lib/Fly/Service.d.ts +43 -0
  764. package/lib/Fly/Service.d.ts.map +1 -1
  765. package/lib/Fly/Service.js +44 -19
  766. package/lib/Fly/Service.js.map +1 -1
  767. package/lib/Fly/SignHttp.d.ts.map +1 -1
  768. package/lib/Fly/SignHttp.js +2 -2
  769. package/lib/Fly/SignHttp.js.map +1 -1
  770. package/lib/Fly/VerifyHttp.d.ts.map +1 -1
  771. package/lib/Fly/VerifyHttp.js +2 -2
  772. package/lib/Fly/VerifyHttp.js.map +1 -1
  773. package/lib/Fly/Volume.d.ts +8 -8
  774. package/lib/Fly/Volume.d.ts.map +1 -1
  775. package/lib/Fly/WriteSecretHttp.d.ts.map +1 -1
  776. package/lib/Fly/WriteSecretHttp.js +2 -2
  777. package/lib/Fly/WriteSecretHttp.js.map +1 -1
  778. package/lib/Fly/replicas.d.ts +12 -10
  779. package/lib/Fly/replicas.d.ts.map +1 -1
  780. package/lib/Fly/replicas.js +35 -0
  781. package/lib/Fly/replicas.js.map +1 -1
  782. package/lib/GitHub/AuthProvider.d.ts +20 -29
  783. package/lib/GitHub/AuthProvider.d.ts.map +1 -1
  784. package/lib/GitHub/AuthProvider.js +141 -75
  785. package/lib/GitHub/AuthProvider.js.map +1 -1
  786. package/lib/GitHub/Credentials.d.ts +2 -3
  787. package/lib/GitHub/Credentials.d.ts.map +1 -1
  788. package/lib/GitHub/Credentials.js +6 -10
  789. package/lib/GitHub/Credentials.js.map +1 -1
  790. package/lib/GitHub/Providers.d.ts +3 -3
  791. package/lib/GitHub/Providers.d.ts.map +1 -1
  792. package/lib/GitHub/Providers.js +4 -4
  793. package/lib/GitHub/Providers.js.map +1 -1
  794. package/lib/Hetzner/AuthProvider.d.ts +7 -20
  795. package/lib/Hetzner/AuthProvider.d.ts.map +1 -1
  796. package/lib/Hetzner/AuthProvider.js +42 -130
  797. package/lib/Hetzner/AuthProvider.js.map +1 -1
  798. package/lib/Hetzner/Catalog.d.ts +5 -5
  799. package/lib/Hetzner/Catalog.d.ts.map +1 -1
  800. package/lib/Hetzner/Credentials.d.ts +1 -3
  801. package/lib/Hetzner/Credentials.d.ts.map +1 -1
  802. package/lib/Hetzner/Credentials.js +4 -9
  803. package/lib/Hetzner/Credentials.js.map +1 -1
  804. package/lib/Hetzner/PlacementGroup.d.ts +1 -1
  805. package/lib/Hetzner/PlacementGroup.d.ts.map +1 -1
  806. package/lib/Hetzner/Providers.d.ts +1 -1
  807. package/lib/Hetzner/Providers.d.ts.map +1 -1
  808. package/lib/Hetzner/Providers.js +2 -2
  809. package/lib/Hetzner/Providers.js.map +1 -1
  810. package/lib/Hetzner/hosted.d.ts +1 -1
  811. package/lib/Interaction.d.ts +186 -0
  812. package/lib/Interaction.d.ts.map +1 -0
  813. package/lib/Interaction.js +149 -0
  814. package/lib/Interaction.js.map +1 -0
  815. package/lib/Kubernetes/ClusterAdapter.d.ts +4 -5
  816. package/lib/Kubernetes/ClusterAdapter.d.ts.map +1 -1
  817. package/lib/Kubernetes/ClusterAdapter.js.map +1 -1
  818. package/lib/Kubernetes/Deployment.d.ts +7 -21
  819. package/lib/Kubernetes/Deployment.d.ts.map +1 -1
  820. package/lib/Kubernetes/Deployment.js +7 -21
  821. package/lib/Kubernetes/Deployment.js.map +1 -1
  822. package/lib/Kubernetes/Job.d.ts +7 -21
  823. package/lib/Kubernetes/Job.d.ts.map +1 -1
  824. package/lib/Kubernetes/Job.js +7 -21
  825. package/lib/Kubernetes/Job.js.map +1 -1
  826. package/lib/Local/DevLog.d.ts +32 -0
  827. package/lib/Local/DevLog.d.ts.map +1 -0
  828. package/lib/Local/DevLog.js +114 -0
  829. package/lib/Local/DevLog.js.map +1 -0
  830. package/lib/Local/LocalProvider.d.ts +1 -1
  831. package/lib/Local/LocalProvider.d.ts.map +1 -1
  832. package/lib/Local/LocalProvider.js +2 -2
  833. package/lib/Local/LocalProvider.js.map +1 -1
  834. package/lib/Local/RpcServer.d.ts.map +1 -1
  835. package/lib/Local/RpcServer.js +10 -1
  836. package/lib/Local/RpcServer.js.map +1 -1
  837. package/lib/Local/RpcServerEnvironment.d.ts +2 -2
  838. package/lib/Local/RpcServerEnvironment.d.ts.map +1 -1
  839. package/lib/Local/RpcServerEnvironment.js +3 -2
  840. package/lib/Local/RpcServerEnvironment.js.map +1 -1
  841. package/lib/Local/RpcSpawner.d.ts +14 -5
  842. package/lib/Local/RpcSpawner.d.ts.map +1 -1
  843. package/lib/Local/RpcSpawner.js +105 -38
  844. package/lib/Local/RpcSpawner.js.map +1 -1
  845. package/lib/Neon/AuthProvider.d.ts +4 -13
  846. package/lib/Neon/AuthProvider.d.ts.map +1 -1
  847. package/lib/Neon/AuthProvider.js +24 -107
  848. package/lib/Neon/AuthProvider.js.map +1 -1
  849. package/lib/Neon/Credentials.d.ts +1 -3
  850. package/lib/Neon/Credentials.d.ts.map +1 -1
  851. package/lib/Neon/Credentials.js +4 -9
  852. package/lib/Neon/Credentials.js.map +1 -1
  853. package/lib/Neon/Providers.d.ts +1 -1
  854. package/lib/Neon/Providers.d.ts.map +1 -1
  855. package/lib/Neon/Providers.js +2 -2
  856. package/lib/Neon/Providers.js.map +1 -1
  857. package/lib/Nuke.d.ts +89 -0
  858. package/lib/Nuke.d.ts.map +1 -0
  859. package/lib/Nuke.js +265 -0
  860. package/lib/Nuke.js.map +1 -0
  861. package/lib/Plan.d.ts +27 -5
  862. package/lib/Plan.d.ts.map +1 -1
  863. package/lib/Plan.js +167 -21
  864. package/lib/Plan.js.map +1 -1
  865. package/lib/Planetscale/AuthProvider.d.ts +25 -37
  866. package/lib/Planetscale/AuthProvider.d.ts.map +1 -1
  867. package/lib/Planetscale/AuthProvider.js +267 -150
  868. package/lib/Planetscale/AuthProvider.js.map +1 -1
  869. package/lib/Planetscale/Credentials.d.ts +2 -3
  870. package/lib/Planetscale/Credentials.d.ts.map +1 -1
  871. package/lib/Planetscale/Credentials.js +16 -13
  872. package/lib/Planetscale/Credentials.js.map +1 -1
  873. package/lib/Planetscale/OAuthClient.d.ts +8 -52
  874. package/lib/Planetscale/OAuthClient.d.ts.map +1 -1
  875. package/lib/Planetscale/OAuthClient.js +18 -240
  876. package/lib/Planetscale/OAuthClient.js.map +1 -1
  877. package/lib/Planetscale/Providers.d.ts +1 -1
  878. package/lib/Planetscale/Providers.d.ts.map +1 -1
  879. package/lib/Planetscale/Providers.js +2 -2
  880. package/lib/Planetscale/Providers.js.map +1 -1
  881. package/lib/Planetscale/Util.d.ts +1 -1
  882. package/lib/Planetscale/Util.d.ts.map +1 -1
  883. package/lib/Prisma/AuthProvider.d.ts +7 -15
  884. package/lib/Prisma/AuthProvider.d.ts.map +1 -1
  885. package/lib/Prisma/AuthProvider.js +54 -121
  886. package/lib/Prisma/AuthProvider.js.map +1 -1
  887. package/lib/Prisma/Compute.d.ts +7 -21
  888. package/lib/Prisma/Compute.d.ts.map +1 -1
  889. package/lib/Prisma/Compute.js +7 -21
  890. package/lib/Prisma/Compute.js.map +1 -1
  891. package/lib/Prisma/PrismaEnvironment.d.ts +1 -2
  892. package/lib/Prisma/PrismaEnvironment.d.ts.map +1 -1
  893. package/lib/Prisma/PrismaEnvironment.js +3 -8
  894. package/lib/Prisma/PrismaEnvironment.js.map +1 -1
  895. package/lib/Prisma/Providers.d.ts +3 -3
  896. package/lib/Prisma/Providers.d.ts.map +1 -1
  897. package/lib/Prisma/Providers.js +7 -7
  898. package/lib/Prisma/Providers.js.map +1 -1
  899. package/lib/Provider.d.ts +10 -2
  900. package/lib/Provider.d.ts.map +1 -1
  901. package/lib/Provider.js +9 -10
  902. package/lib/Provider.js.map +1 -1
  903. package/lib/Railway/AuditLog.d.ts +2 -2
  904. package/lib/Railway/AuditLog.d.ts.map +1 -1
  905. package/lib/Railway/AuthProvider.d.ts +19 -19
  906. package/lib/Railway/AuthProvider.d.ts.map +1 -1
  907. package/lib/Railway/AuthProvider.js +193 -127
  908. package/lib/Railway/AuthProvider.js.map +1 -1
  909. package/lib/Railway/Bucket.js +2 -2
  910. package/lib/Railway/CloudAgent.js +2 -2
  911. package/lib/Railway/Credentials.d.ts +2 -5
  912. package/lib/Railway/Credentials.d.ts.map +1 -1
  913. package/lib/Railway/Credentials.js +5 -11
  914. package/lib/Railway/Credentials.js.map +1 -1
  915. package/lib/Railway/CustomDomain.js +3 -3
  916. package/lib/Railway/Function.js +6 -6
  917. package/lib/Railway/Group.js +2 -2
  918. package/lib/Railway/LoginSession.d.ts +3 -3
  919. package/lib/Railway/LoginSession.js +5 -5
  920. package/lib/Railway/Mongo.js +13 -13
  921. package/lib/Railway/MySQL.js +13 -13
  922. package/lib/Railway/Postgres.js +13 -13
  923. package/lib/Railway/PrivateNetwork.js +2 -2
  924. package/lib/Railway/Project.d.ts +3 -3
  925. package/lib/Railway/Project.d.ts.map +1 -1
  926. package/lib/Railway/Project.js +3 -3
  927. package/lib/Railway/ProjectEnvironment.js +3 -3
  928. package/lib/Railway/Providers.d.ts +1 -1
  929. package/lib/Railway/Providers.d.ts.map +1 -1
  930. package/lib/Railway/Providers.js +2 -2
  931. package/lib/Railway/Providers.js.map +1 -1
  932. package/lib/Railway/Redis.js +5 -5
  933. package/lib/Railway/Sandbox.d.ts +6 -6
  934. package/lib/Railway/Sandbox.js +5 -5
  935. package/lib/Railway/Service.d.ts +72 -1
  936. package/lib/Railway/Service.d.ts.map +1 -1
  937. package/lib/Railway/Service.js +42 -0
  938. package/lib/Railway/Service.js.map +1 -1
  939. package/lib/Railway/ServiceDomain.d.ts +28 -2
  940. package/lib/Railway/ServiceDomain.d.ts.map +1 -1
  941. package/lib/Railway/ServiceDomain.js +134 -17
  942. package/lib/Railway/ServiceDomain.js.map +1 -1
  943. package/lib/Railway/ServiceProvider.d.ts +2 -10
  944. package/lib/Railway/ServiceProvider.d.ts.map +1 -1
  945. package/lib/Railway/ServiceProvider.js +170 -64
  946. package/lib/Railway/ServiceProvider.js.map +1 -1
  947. package/lib/Railway/TcpProxy.js +2 -2
  948. package/lib/Railway/Template.js +2 -2
  949. package/lib/Railway/Usage.js +2 -2
  950. package/lib/Railway/Variable.js +2 -2
  951. package/lib/Railway/Volume.d.ts +1 -1
  952. package/lib/Railway/Volume.d.ts.map +1 -1
  953. package/lib/Railway/Volume.js +4 -4
  954. package/lib/Railway/VolumeBackup.d.ts +2 -2
  955. package/lib/Railway/VolumeBackup.js +8 -8
  956. package/lib/Railway/local-context.d.ts +125 -0
  957. package/lib/Railway/local-context.d.ts.map +1 -0
  958. package/lib/Railway/local-context.js +254 -0
  959. package/lib/Railway/local-context.js.map +1 -0
  960. package/lib/Report.d.ts +248 -0
  961. package/lib/Report.d.ts.map +1 -0
  962. package/lib/Report.js +18 -0
  963. package/lib/Report.js.map +1 -0
  964. package/lib/Stack.d.ts +7 -6
  965. package/lib/Stack.d.ts.map +1 -1
  966. package/lib/Stack.js +2 -4
  967. package/lib/Stack.js.map +1 -1
  968. package/lib/State/Export.d.ts +6 -4
  969. package/lib/State/Export.d.ts.map +1 -1
  970. package/lib/State/Export.js +13 -18
  971. package/lib/State/Export.js.map +1 -1
  972. package/lib/State/HttpStateStore.d.ts +1 -1
  973. package/lib/State/HttpStateStore.d.ts.map +1 -1
  974. package/lib/State/HttpStateStore.js +10 -6
  975. package/lib/State/HttpStateStore.js.map +1 -1
  976. package/lib/State/LocalState.d.ts.map +1 -1
  977. package/lib/State/LocalState.js +6 -13
  978. package/lib/State/LocalState.js.map +1 -1
  979. package/lib/State/Tree.d.ts +62 -0
  980. package/lib/State/Tree.d.ts.map +1 -0
  981. package/lib/State/Tree.js +166 -0
  982. package/lib/State/Tree.js.map +1 -0
  983. package/lib/State/index.d.ts +1 -0
  984. package/lib/State/index.d.ts.map +1 -1
  985. package/lib/State/index.js +1 -0
  986. package/lib/State/index.js.map +1 -1
  987. package/lib/Telemetry/Layer.d.ts +6 -0
  988. package/lib/Telemetry/Layer.d.ts.map +1 -1
  989. package/lib/Telemetry/Layer.js +16 -5
  990. package/lib/Telemetry/Layer.js.map +1 -1
  991. package/lib/Telemetry.d.ts +5 -0
  992. package/lib/Telemetry.d.ts.map +1 -1
  993. package/lib/Telemetry.js +6 -1
  994. package/lib/Telemetry.js.map +1 -1
  995. package/lib/Test/Core.d.ts +4 -3
  996. package/lib/Test/Core.d.ts.map +1 -1
  997. package/lib/Test/Core.js +5 -3
  998. package/lib/Test/Core.js.map +1 -1
  999. package/lib/UserFacingError.d.ts +26 -0
  1000. package/lib/UserFacingError.d.ts.map +1 -0
  1001. package/lib/UserFacingError.js +25 -0
  1002. package/lib/UserFacingError.js.map +1 -0
  1003. package/lib/Util/AtomicFile.d.ts +19 -0
  1004. package/lib/Util/AtomicFile.d.ts.map +1 -0
  1005. package/lib/Util/AtomicFile.js +22 -0
  1006. package/lib/Util/AtomicFile.js.map +1 -0
  1007. package/lib/Util/ConsoleSink.d.ts +4 -0
  1008. package/lib/Util/ConsoleSink.d.ts.map +1 -0
  1009. package/lib/Util/ConsoleSink.js +24 -0
  1010. package/lib/Util/ConsoleSink.js.map +1 -0
  1011. package/lib/Util/LineBuffer.d.ts +9 -0
  1012. package/lib/Util/LineBuffer.d.ts.map +1 -0
  1013. package/lib/Util/LineBuffer.js +23 -0
  1014. package/lib/Util/LineBuffer.js.map +1 -0
  1015. package/lib/Util/Memoize.d.ts +20 -0
  1016. package/lib/Util/Memoize.d.ts.map +1 -0
  1017. package/lib/Util/Memoize.js +38 -0
  1018. package/lib/Util/Memoize.js.map +1 -0
  1019. package/lib/Util/Node.d.ts +22 -5
  1020. package/lib/Util/Node.d.ts.map +1 -1
  1021. package/lib/Util/Node.js +30 -10
  1022. package/lib/Util/Node.js.map +1 -1
  1023. package/lib/Util/PlatformServices.d.ts +6 -2
  1024. package/lib/Util/PlatformServices.d.ts.map +1 -1
  1025. package/lib/Util/PlatformServices.js +6 -2
  1026. package/lib/Util/PlatformServices.js.map +1 -1
  1027. package/lib/Util/ResourceOutput.d.ts +30 -0
  1028. package/lib/Util/ResourceOutput.d.ts.map +1 -0
  1029. package/lib/Util/ResourceOutput.js +60 -0
  1030. package/lib/Util/ResourceOutput.js.map +1 -0
  1031. package/lib/Util/Terminal.d.ts +23 -0
  1032. package/lib/Util/Terminal.d.ts.map +1 -0
  1033. package/lib/Util/Terminal.js +57 -0
  1034. package/lib/Util/Terminal.js.map +1 -0
  1035. package/lib/Util/Theme.d.ts +123 -0
  1036. package/lib/Util/Theme.d.ts.map +1 -0
  1037. package/lib/Util/Theme.js +133 -0
  1038. package/lib/Util/Theme.js.map +1 -0
  1039. package/lib/Util/interactive.d.ts +17 -12
  1040. package/lib/Util/interactive.d.ts.map +1 -1
  1041. package/lib/Util/interactive.js +81 -13
  1042. package/lib/Util/interactive.js.map +1 -1
  1043. package/lib/Util/scc.d.ts +11 -3
  1044. package/lib/Util/scc.d.ts.map +1 -1
  1045. package/lib/Util/scc.js +35 -22
  1046. package/lib/Util/scc.js.map +1 -1
  1047. package/lib/Util/tarGzip.d.ts +3 -1
  1048. package/lib/Util/tarGzip.d.ts.map +1 -1
  1049. package/lib/Util/tarGzip.js +15 -5
  1050. package/lib/Util/tarGzip.js.map +1 -1
  1051. package/lib/index.d.ts +4 -2
  1052. package/lib/index.d.ts.map +1 -1
  1053. package/lib/index.js +4 -2
  1054. package/lib/index.js.map +1 -1
  1055. package/package.json +40 -38
  1056. package/src/AWS/AGENTS.md +1 -1
  1057. package/src/AWS/AMP/Scraper.ts +1 -1
  1058. package/src/AWS/AppRunner/Service.ts +11 -27
  1059. package/src/AWS/Assets.ts +2 -2
  1060. package/src/AWS/AuthProvider.ts +748 -429
  1061. package/src/AWS/Batch/JobDefinition.ts +11 -27
  1062. package/src/AWS/EC2/Instance.ts +12 -28
  1063. package/src/AWS/EC2/InternetGateway.ts +1 -1
  1064. package/src/AWS/EC2/NatGateway.ts +1 -1
  1065. package/src/AWS/EC2/NetworkInterface.ts +1 -1
  1066. package/src/AWS/EC2/NetworkInterfaceAttachment.ts +1 -1
  1067. package/src/AWS/EC2/RouteTable.ts +1 -1
  1068. package/src/AWS/EC2/RouteTableAssociation.ts +1 -1
  1069. package/src/AWS/EC2/Snapshot.ts +1 -1
  1070. package/src/AWS/EC2/Subnet.ts +1 -1
  1071. package/src/AWS/EC2/Volume.ts +1 -1
  1072. package/src/AWS/EC2/VolumeAttachment.ts +1 -1
  1073. package/src/AWS/EC2/Vpc.ts +1 -1
  1074. package/src/AWS/EC2/VpcEndpoint.ts +1 -1
  1075. package/src/AWS/EC2/hosted.ts +5 -6
  1076. package/src/AWS/ECR/ImageSource.ts +4 -5
  1077. package/src/AWS/ECS/Service.ts +7 -21
  1078. package/src/AWS/ECS/Task.ts +7 -21
  1079. package/src/AWS/ElastiCache/CacheCluster.ts +323 -0
  1080. package/src/AWS/ElastiCache/ConnectCacheCluster.ts +58 -0
  1081. package/src/AWS/ElastiCache/ConnectCacheClusterHttp.ts +77 -0
  1082. package/src/AWS/ElastiCache/ConnectReplicationGroup.ts +62 -0
  1083. package/src/AWS/ElastiCache/ConnectReplicationGroupHttp.ts +110 -0
  1084. package/src/AWS/ElastiCache/ReplicationGroup.ts +594 -0
  1085. package/src/AWS/ElastiCache/SubnetGroup.ts +208 -0
  1086. package/src/AWS/ElastiCache/index.ts +7 -0
  1087. package/src/AWS/ElastiCache/internal.ts +36 -0
  1088. package/src/AWS/Environment.ts +15 -48
  1089. package/src/AWS/IAM/actions.generated.ts +1 -1
  1090. package/src/AWS/IdentityCenter/AccountAssignment.ts +7 -0
  1091. package/src/AWS/Lambda/Function.ts +26 -28
  1092. package/src/AWS/Lambda/MicrovmImage.ts +12 -28
  1093. package/src/AWS/Lambda/MicrovmProvider.ts +1 -1
  1094. package/src/AWS/Lambda/NetworkConnector.ts +1 -1
  1095. package/src/AWS/Local/DevWatchProvider.ts +10 -1
  1096. package/src/AWS/Organizations/Account.ts +18 -10
  1097. package/src/AWS/Organizations/DelegatedAdministrator.ts +7 -7
  1098. package/src/AWS/Organizations/Organization.ts +3 -5
  1099. package/src/AWS/Organizations/common.ts +17 -0
  1100. package/src/AWS/Providers.ts +12 -0
  1101. package/src/AWS/S3/Bucket.ts +1 -1
  1102. package/src/Alchemist/Errors.ts +36 -0
  1103. package/src/Alchemist/Progress.ts +175 -0
  1104. package/src/Alchemist/Runtime.ts +40 -0
  1105. package/src/Alchemist/Session.ts +460 -0
  1106. package/src/Alchemist/index.ts +24 -0
  1107. package/src/Alchemist/routes/aws.ts +88 -0
  1108. package/src/Alchemist/routes/cloudflare.ts +188 -0
  1109. package/src/Alchemist/routes/cloudflareToken.ts +215 -0
  1110. package/src/Alchemist/routes/drift.ts +94 -0
  1111. package/src/Alchemist/routes/logs.ts +185 -0
  1112. package/src/Alchemist/routes/nuke.ts +146 -0
  1113. package/src/Alchemist/routes/profile.ts +427 -0
  1114. package/src/Alchemist/routes/provider.ts +107 -0
  1115. package/src/Alchemist/routes/stack.ts +137 -0
  1116. package/src/Alchemist/routes/state.ts +77 -0
  1117. package/src/Apply.ts +312 -173
  1118. package/src/Auth/AuthProvider.ts +416 -158
  1119. package/src/Auth/BrowserOAuth.ts +68 -0
  1120. package/src/Auth/Credentials.ts +155 -46
  1121. package/src/Auth/CredentialsCache.ts +57 -0
  1122. package/src/Auth/Demand.ts +208 -83
  1123. package/src/Auth/Env.ts +38 -14
  1124. package/src/Auth/Inspect.ts +129 -0
  1125. package/src/Auth/Lock.ts +26 -11
  1126. package/src/Auth/OAuthFlow.ts +551 -0
  1127. package/src/Auth/Paths.ts +30 -0
  1128. package/src/Auth/Profile.ts +768 -164
  1129. package/src/Auth/Resolve.ts +136 -0
  1130. package/src/Auth/StoredAuthProvider.ts +291 -0
  1131. package/src/Auth/index.ts +1 -0
  1132. package/src/Axiom/AuthProvider.ts +112 -314
  1133. package/src/Axiom/Credentials.ts +5 -13
  1134. package/src/Axiom/Providers.ts +3 -3
  1135. package/src/Bundle/Bundle.ts +3 -5
  1136. package/src/Cli/CliKit/CliKit.ts +183 -0
  1137. package/src/Cli/CliKit/index.ts +50 -0
  1138. package/src/Cli/CliKit/interaction.ts +19 -0
  1139. package/src/Cli/CliKit/layer.ts +50 -0
  1140. package/src/Cli/DevOptions.ts +19 -0
  1141. package/src/Cli/Format.ts +31 -0
  1142. package/src/Cli/GlobalLog.ts +147 -0
  1143. package/src/Cli/LoggingCli.ts +312 -108
  1144. package/src/Cli/ModeTag.ts +1 -1
  1145. package/src/Cli/NamespaceTree.ts +94 -21
  1146. package/src/Cli/PlainCliFormatter.ts +75 -0
  1147. package/src/Cli/PropertyDiff.ts +229 -0
  1148. package/src/Cli/checkVersion.ts +19 -6
  1149. package/src/Cli/commands/aws.ts +67 -100
  1150. package/src/Cli/commands/cloudflare.ts +195 -435
  1151. package/src/Cli/commands/compat.ts +25 -0
  1152. package/src/Cli/commands/confirm.ts +46 -0
  1153. package/src/Cli/commands/deploy.ts +225 -212
  1154. package/src/Cli/commands/dev.ts +72 -34
  1155. package/src/Cli/commands/drift.ts +107 -0
  1156. package/src/Cli/commands/errors.ts +162 -0
  1157. package/src/Cli/commands/flags.ts +199 -0
  1158. package/src/Cli/commands/instrument.ts +18 -0
  1159. package/src/Cli/commands/logs.ts +125 -143
  1160. package/src/Cli/commands/nuke.ts +138 -811
  1161. package/src/Cli/commands/profile/commands.ts +482 -0
  1162. package/src/Cli/commands/profile/flows.ts +218 -0
  1163. package/src/Cli/commands/profile/hub.ts +191 -0
  1164. package/src/Cli/commands/profile/index.ts +1 -0
  1165. package/src/Cli/commands/provider.ts +63 -0
  1166. package/src/Cli/commands/render.ts +121 -0
  1167. package/src/Cli/commands/state.ts +250 -387
  1168. package/src/Cli/components/types.ts +141 -0
  1169. package/src/Cli/components/ui/Data.tsx +44 -0
  1170. package/src/Cli/components/ui/Environment.tsx +86 -0
  1171. package/src/Cli/components/ui/Feedback.tsx +269 -0
  1172. package/src/Cli/components/ui/Interactive.tsx +1062 -0
  1173. package/src/Cli/components/ui/Layout.tsx +252 -0
  1174. package/src/Cli/components/ui/Live.tsx +131 -0
  1175. package/src/Cli/components/ui/ProgressBar.tsx +57 -0
  1176. package/src/Cli/components/ui/Transcript.tsx +42 -0
  1177. package/src/Cli/components/ui/Typography.tsx +83 -0
  1178. package/src/Cli/components/ui/index.ts +68 -0
  1179. package/src/Cli/components/view/ApprovePlan.tsx +101 -0
  1180. package/src/Cli/components/view/Help.tsx +381 -0
  1181. package/src/Cli/components/view/Logo.tsx +168 -0
  1182. package/src/Cli/components/view/Nuke.tsx +258 -0
  1183. package/src/Cli/components/view/PlanDecision.tsx +80 -0
  1184. package/src/Cli/components/view/PlanRow.tsx +39 -0
  1185. package/src/Cli/components/view/PlanTree.ts +354 -0
  1186. package/src/Cli/components/view/PlanView.tsx +825 -0
  1187. package/src/Cli/components/view/Profile.tsx +446 -0
  1188. package/src/Cli/components/view/ProfileDashboard.tsx +929 -0
  1189. package/src/Cli/components/view/Prompts.tsx +793 -0
  1190. package/src/Cli/components/view/Runtime.tsx +975 -0
  1191. package/src/Cli/components/view/SigilCli.tsx +186 -0
  1192. package/src/Cli/components/view/StackOutputs.tsx +38 -0
  1193. package/src/Cli/components/view/StateExplorer.tsx +1179 -0
  1194. package/src/Cli/components/view/statusStyle.ts +97 -0
  1195. package/src/Cli/components/view/usePlanPresentation.ts +82 -0
  1196. package/src/Cli/components/view/usePlanViewport.ts +172 -0
  1197. package/src/Cli/exec.ts +278 -32
  1198. package/src/Cli/main.ts +189 -42
  1199. package/src/Cli/selectCli.ts +30 -15
  1200. package/src/Cloudflare/ApiToken/UserApiToken.ts +1 -1
  1201. package/src/Cloudflare/Auth/AuthConfig.ts +117 -0
  1202. package/src/Cloudflare/Auth/AuthProvider.ts +712 -608
  1203. package/src/Cloudflare/Auth/OAuthClient.ts +40 -366
  1204. package/src/Cloudflare/Auth/OAuthScopes.ts +921 -0
  1205. package/src/Cloudflare/Auth/TokenPolicy.ts +79 -0
  1206. package/src/Cloudflare/CloudflareEnvironment.ts +7 -17
  1207. package/src/Cloudflare/Containers/Container.ts +12 -24
  1208. package/src/Cloudflare/Containers/ContainerApplication.ts +12 -27
  1209. package/src/Cloudflare/Credentials.ts +18 -72
  1210. package/src/Cloudflare/EdgeSession.ts +2 -3
  1211. package/src/Cloudflare/Logs.ts +16 -10
  1212. package/src/Cloudflare/Pages/Project.ts +1 -1
  1213. package/src/Cloudflare/Providers.ts +2 -2
  1214. package/src/Cloudflare/StateStore/Api.ts +2 -2
  1215. package/src/Cloudflare/StateStore/CredentialsFile.ts +11 -6
  1216. package/src/Cloudflare/StateStore/State.ts +247 -194
  1217. package/src/Cloudflare/Vectorize/SearchIndexHttpClient.ts +2 -2
  1218. package/src/Cloudflare/Website/Nextjs.ts +4 -15
  1219. package/src/Cloudflare/Website/Vocs.ts +3 -7
  1220. package/src/Cloudflare/Workers/Assets.ts +106 -38
  1221. package/src/Cloudflare/Workers/BrowserHttpClient.ts +10 -3
  1222. package/src/Cloudflare/Workers/CloudflareTracer.ts +113 -0
  1223. package/src/Cloudflare/Workers/Compatibility.ts +37 -7
  1224. package/src/Cloudflare/Workers/DurableObject.ts +50 -4
  1225. package/src/Cloudflare/Workers/DurableObjectBridge.ts +8 -0
  1226. package/src/Cloudflare/Workers/DurableObjectState.ts +46 -9
  1227. package/src/Cloudflare/Workers/DurableObjectStorage.ts +25 -12
  1228. package/src/Cloudflare/Workers/LocalWorkerProvider.ts +172 -58
  1229. package/src/Cloudflare/Workers/RpcWorker.ts +44 -18
  1230. package/src/Cloudflare/Workers/Source.ts +9 -1
  1231. package/src/Cloudflare/Workers/Sources/Python.ts +18 -12
  1232. package/src/Cloudflare/Workers/Sources/Rolldown.ts +1 -1
  1233. package/src/Cloudflare/Workers/Sources/Vite.ts +42 -34
  1234. package/src/Cloudflare/Workers/Telemetry.ts +170 -0
  1235. package/src/Cloudflare/Workers/ViteBuildChildRunner.ts +6 -1
  1236. package/src/Cloudflare/Workers/ViteChild.shared.ts +1 -0
  1237. package/src/Cloudflare/Workers/ViteChild.ts +21 -19
  1238. package/src/Cloudflare/Workers/ViteChildRunner.ts +2 -1
  1239. package/src/Cloudflare/Workers/Worker.ts +101 -50
  1240. package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +29 -0
  1241. package/src/Cloudflare/Workers/WorkerLoader.ts +40 -8
  1242. package/src/Cloudflare/Workers/WorkerProvider.ts +64 -29
  1243. package/src/Cloudflare/Workers/cloudflare_workers.ts +5 -1
  1244. package/src/Cloudflare/Workers/index.ts +1 -0
  1245. package/src/Cloudflare/Workflows/Workflow.ts +105 -0
  1246. package/src/Cloudflare/Workflows/WorkflowBridge.ts +5 -3
  1247. package/src/Command/Command.ts +11 -3
  1248. package/src/Command/Dev.ts +33 -8
  1249. package/src/Docker/BuildHash.ts +75 -8
  1250. package/src/Docker/Docker.ts +7 -2
  1251. package/src/Docker/Service.ts +7 -21
  1252. package/src/Docker/ServiceImage.ts +4 -5
  1253. package/src/{Sync.ts → Drift.ts} +161 -59
  1254. package/src/Drizzle/Schema.ts +5 -7
  1255. package/src/Fly/AuthProvider.ts +44 -232
  1256. package/src/Fly/CheckpointHttp.ts +5 -2
  1257. package/src/Fly/Credentials.ts +29 -16
  1258. package/src/Fly/DecryptHttp.ts +5 -2
  1259. package/src/Fly/EncryptHttp.ts +5 -2
  1260. package/src/Fly/ExecHttp.ts +5 -2
  1261. package/src/Fly/GetSecretHttp.ts +5 -2
  1262. package/src/Fly/ListSecretsHttp.ts +5 -2
  1263. package/src/Fly/Machine.ts +67 -20
  1264. package/src/Fly/Providers.ts +2 -2
  1265. package/src/Fly/Service.ts +44 -20
  1266. package/src/Fly/SignHttp.ts +5 -2
  1267. package/src/Fly/VerifyHttp.ts +5 -2
  1268. package/src/Fly/WriteSecretHttp.ts +5 -2
  1269. package/src/Fly/replicas.ts +47 -1
  1270. package/src/GitHub/AuthProvider.ts +225 -143
  1271. package/src/GitHub/Credentials.ts +6 -13
  1272. package/src/GitHub/Providers.ts +4 -4
  1273. package/src/Hetzner/AuthProvider.ts +50 -238
  1274. package/src/Hetzner/Credentials.ts +4 -12
  1275. package/src/Hetzner/Providers.ts +2 -2
  1276. package/src/Interaction.ts +354 -0
  1277. package/src/Kubernetes/ClusterAdapter.ts +4 -5
  1278. package/src/Kubernetes/Deployment.ts +7 -21
  1279. package/src/Kubernetes/Job.ts +7 -21
  1280. package/src/Local/DevLog.ts +135 -0
  1281. package/src/Local/LocalProvider.ts +3 -3
  1282. package/src/Local/RpcServer.ts +11 -0
  1283. package/src/Local/RpcServerEnvironment.ts +3 -2
  1284. package/src/Local/RpcSpawner.ts +161 -78
  1285. package/src/Neon/AuthProvider.ts +31 -203
  1286. package/src/Neon/Credentials.ts +4 -12
  1287. package/src/Neon/Providers.ts +2 -2
  1288. package/src/Nuke.ts +463 -0
  1289. package/src/Plan.ts +920 -708
  1290. package/src/Planetscale/AuthProvider.ts +397 -324
  1291. package/src/Planetscale/Credentials.ts +21 -19
  1292. package/src/Planetscale/OAuthClient.ts +34 -328
  1293. package/src/Planetscale/Providers.ts +2 -2
  1294. package/src/Planetscale/Util.ts +1 -1
  1295. package/src/Prisma/AuthProvider.ts +62 -240
  1296. package/src/Prisma/Compute.ts +7 -21
  1297. package/src/Prisma/PrismaEnvironment.ts +6 -14
  1298. package/src/Prisma/Providers.ts +7 -7
  1299. package/src/Provider.ts +12 -13
  1300. package/src/Railway/AuthProvider.ts +291 -235
  1301. package/src/Railway/Bucket.ts +6 -6
  1302. package/src/Railway/CloudAgent.ts +4 -4
  1303. package/src/Railway/Credentials.ts +5 -14
  1304. package/src/Railway/CustomDomain.ts +5 -5
  1305. package/src/Railway/Function.ts +10 -10
  1306. package/src/Railway/Group.ts +2 -2
  1307. package/src/Railway/LoginSession.ts +5 -5
  1308. package/src/Railway/Mongo.ts +19 -19
  1309. package/src/Railway/MySQL.ts +19 -19
  1310. package/src/Railway/Postgres.ts +19 -19
  1311. package/src/Railway/PrivateNetwork.ts +2 -2
  1312. package/src/Railway/Project.ts +7 -7
  1313. package/src/Railway/ProjectEnvironment.ts +7 -7
  1314. package/src/Railway/Providers.ts +2 -2
  1315. package/src/Railway/Redis.ts +9 -9
  1316. package/src/Railway/Sandbox.ts +10 -10
  1317. package/src/Railway/Service.ts +72 -1
  1318. package/src/Railway/ServiceDomain.ts +253 -27
  1319. package/src/Railway/ServiceProvider.ts +234 -87
  1320. package/src/Railway/TcpProxy.ts +4 -4
  1321. package/src/Railway/Template.ts +12 -12
  1322. package/src/Railway/Usage.ts +2 -2
  1323. package/src/Railway/Variable.ts +2 -2
  1324. package/src/Railway/Volume.ts +4 -4
  1325. package/src/Railway/VolumeBackup.ts +11 -11
  1326. package/src/Railway/local-context.ts +333 -0
  1327. package/src/Report.ts +365 -0
  1328. package/src/Stack.ts +12 -8
  1329. package/src/State/Export.ts +28 -47
  1330. package/src/State/HttpStateStore.ts +15 -8
  1331. package/src/State/LocalState.ts +6 -16
  1332. package/src/State/Tree.ts +277 -0
  1333. package/src/State/index.ts +1 -0
  1334. package/src/Telemetry/Layer.ts +16 -5
  1335. package/src/Telemetry.ts +6 -1
  1336. package/src/Test/Core.ts +10 -4
  1337. package/src/UserFacingError.ts +35 -0
  1338. package/src/Util/AtomicFile.ts +36 -0
  1339. package/src/Util/ConsoleSink.ts +23 -0
  1340. package/src/Util/LineBuffer.ts +20 -0
  1341. package/src/Util/Memoize.ts +48 -0
  1342. package/src/Util/Node.ts +35 -14
  1343. package/src/Util/PlatformServices.ts +11 -1
  1344. package/src/Util/ResourceOutput.ts +77 -0
  1345. package/src/Util/Terminal.ts +81 -0
  1346. package/src/Util/Theme.ts +150 -0
  1347. package/src/Util/interactive.ts +103 -16
  1348. package/src/Util/scc.ts +43 -23
  1349. package/src/Util/tarGzip.ts +33 -5
  1350. package/src/index.ts +4 -2
  1351. package/lib/Cli/Cli.d.ts +0 -21
  1352. package/lib/Cli/Cli.d.ts.map +0 -1
  1353. package/lib/Cli/Cli.js +0 -5
  1354. package/lib/Cli/Cli.js.map +0 -1
  1355. package/lib/Cli/Event.d.ts +0 -29
  1356. package/lib/Cli/Event.d.ts.map +0 -1
  1357. package/lib/Cli/Event.js +0 -1
  1358. package/lib/Cli/Event.js.map +0 -1
  1359. package/lib/Cli/commands/_shared.d.ts +0 -138
  1360. package/lib/Cli/commands/_shared.d.ts.map +0 -1
  1361. package/lib/Cli/commands/_shared.js +0 -298
  1362. package/lib/Cli/commands/_shared.js.map +0 -1
  1363. package/lib/Cli/commands/login.d.ts +0 -14
  1364. package/lib/Cli/commands/login.d.ts.map +0 -1
  1365. package/lib/Cli/commands/login.js +0 -115
  1366. package/lib/Cli/commands/login.js.map +0 -1
  1367. package/lib/Cli/commands/profile.d.ts +0 -25
  1368. package/lib/Cli/commands/profile.d.ts.map +0 -1
  1369. package/lib/Cli/commands/profile.js +0 -83
  1370. package/lib/Cli/commands/profile.js.map +0 -1
  1371. package/lib/Cli/commands/sync.d.ts +0 -22
  1372. package/lib/Cli/commands/sync.d.ts.map +0 -1
  1373. package/lib/Cli/commands/sync.js +0 -64
  1374. package/lib/Cli/commands/sync.js.map +0 -1
  1375. package/lib/Cli/commands/tail.d.ts +0 -9
  1376. package/lib/Cli/commands/tail.d.ts.map +0 -1
  1377. package/lib/Cli/commands/tail.js +0 -97
  1378. package/lib/Cli/commands/tail.js.map +0 -1
  1379. package/lib/Cli/tui/InkCLI.d.ts +0 -4
  1380. package/lib/Cli/tui/InkCLI.d.ts.map +0 -1
  1381. package/lib/Cli/tui/InkCLI.js +0 -53
  1382. package/lib/Cli/tui/InkCLI.js.map +0 -1
  1383. package/lib/Cli/tui/components/ApprovePlan.d.ts +0 -9
  1384. package/lib/Cli/tui/components/ApprovePlan.d.ts.map +0 -1
  1385. package/lib/Cli/tui/components/ApprovePlan.js +0 -21
  1386. package/lib/Cli/tui/components/ApprovePlan.js.map +0 -1
  1387. package/lib/Cli/tui/components/Nuke.d.ts +0 -36
  1388. package/lib/Cli/tui/components/Nuke.d.ts.map +0 -1
  1389. package/lib/Cli/tui/components/Nuke.js +0 -132
  1390. package/lib/Cli/tui/components/Nuke.js.map +0 -1
  1391. package/lib/Cli/tui/components/Plan.d.ts +0 -8
  1392. package/lib/Cli/tui/components/Plan.d.ts.map +0 -1
  1393. package/lib/Cli/tui/components/Plan.js +0 -87
  1394. package/lib/Cli/tui/components/Plan.js.map +0 -1
  1395. package/lib/Cli/tui/components/PlanProgress.d.ts +0 -55
  1396. package/lib/Cli/tui/components/PlanProgress.d.ts.map +0 -1
  1397. package/lib/Cli/tui/components/PlanProgress.js +0 -292
  1398. package/lib/Cli/tui/components/PlanProgress.js.map +0 -1
  1399. package/lib/Sync.d.ts +0 -109
  1400. package/lib/Sync.d.ts.map +0 -1
  1401. package/lib/Sync.js.map +0 -1
  1402. package/lib/Util/Clank.d.ts +0 -45
  1403. package/lib/Util/Clank.d.ts.map +0 -1
  1404. package/lib/Util/Clank.js +0 -79
  1405. package/lib/Util/Clank.js.map +0 -1
  1406. package/src/Cli/Cli.ts +0 -23
  1407. package/src/Cli/Event.ts +0 -51
  1408. package/src/Cli/commands/_shared.ts +0 -498
  1409. package/src/Cli/commands/login.ts +0 -169
  1410. package/src/Cli/commands/profile.ts +0 -132
  1411. package/src/Cli/commands/sync.ts +0 -123
  1412. package/src/Cli/commands/tail.ts +0 -155
  1413. package/src/Cli/tui/InkCLI.tsx +0 -69
  1414. package/src/Cli/tui/components/ApprovePlan.tsx +0 -44
  1415. package/src/Cli/tui/components/Nuke.tsx +0 -273
  1416. package/src/Cli/tui/components/Plan.tsx +0 -211
  1417. package/src/Cli/tui/components/PlanProgress.tsx +0 -455
  1418. package/src/Util/Clank.ts +0 -103
package/src/Plan.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  /** @effect-diagnostics anyUnknownInErrorContext:off */
2
2
  /** @effect-diagnostics missingEffectError:off */
3
+ import * as Cause from "effect/Cause";
3
4
  import * as Config from "effect/Config";
4
5
  import * as Data from "effect/Data";
5
6
  import * as Effect from "effect/Effect";
7
+ import * as Exit from "effect/Exit";
6
8
  import * as Option from "effect/Option";
9
+ import * as Ref from "effect/Ref";
10
+ import { cachedInScope } from "./Util/Memoize.ts";
7
11
  import { asEffect } from ".//Util/types.ts";
8
12
  import { isAction, type ActionLike } from "./Action.ts";
9
13
  import {
@@ -13,6 +17,7 @@ import {
13
17
  Unowned,
14
18
  } from "./AdoptPolicy.ts";
15
19
  import { AlchemyContext } from "./AlchemyContext.ts";
20
+ import { demandRemoteCredentials } from "./Auth/Demand.ts";
16
21
  import {
17
22
  Artifacts,
18
23
  ArtifactStore,
@@ -45,6 +50,12 @@ import {
45
50
  stampedMode,
46
51
  type ProviderMode,
47
52
  } from "./ProviderMode.ts";
53
+ import {
54
+ Progress,
55
+ type PlannedAction,
56
+ type PlannedBinding,
57
+ type PlannedResource,
58
+ } from "./Report.ts";
48
59
  import {
49
60
  isResource,
50
61
  missingImplementation,
@@ -71,17 +82,6 @@ import { hashInput } from "./Util/sha256.ts";
71
82
 
72
83
  export type PlanError = never;
73
84
 
74
- export const isCRUD = (node: any): node is CRUD => {
75
- return (
76
- node &&
77
- typeof node === "object" &&
78
- (node.action === "create" ||
79
- node.action === "update" ||
80
- node.action === "replace" ||
81
- node.action === "noop")
82
- );
83
- };
84
-
85
85
  /**
86
86
  * A node in the plan that represents a resource CRUD operation.
87
87
  */
@@ -132,6 +132,12 @@ export interface BaseNode<
132
132
  export interface ApplyNodeBase<
133
133
  R extends ResourceLike<string> = ResourceLike<string>,
134
134
  > extends BaseNode<R> {
135
+ /** Cloud attribute drift attached to synthetic drift-repair plans. */
136
+ drift?: {
137
+ readonly expected: unknown;
138
+ readonly actual: unknown;
139
+ readonly missing?: boolean;
140
+ };
135
141
  /**
136
142
  * Set when this resource's persisted row was found under former FQNs
137
143
  * (`renamedFrom(...)`) — the migration source (no row at the current FQN
@@ -155,7 +161,7 @@ export interface Create<
155
161
  export interface Update<
156
162
  R extends ResourceLike = ResourceLike,
157
163
  > extends ApplyNodeBase<R> {
158
- action: "update";
164
+ action: "update" | "adopted";
159
165
  /** True while this is the first reconcile after a cold adoption. */
160
166
  adopting?: boolean;
161
167
  props: R["Props"];
@@ -171,7 +177,7 @@ export interface Update<
171
177
  export interface Delete<
172
178
  R extends ResourceLike = ResourceLike,
173
179
  > extends BaseNode<R> {
174
- action: "delete";
180
+ action: "delete" | "orphaned";
175
181
  // a resource can be deleted no matter what state it's in
176
182
  state: ResourceState;
177
183
  }
@@ -285,6 +291,63 @@ export type Plan<Output = any> = {
285
291
  destroy?: boolean;
286
292
  };
287
293
 
294
+ const describeBinding = (binding: BindingNode): PlannedBinding => ({
295
+ sid: binding.sid,
296
+ action: binding.action,
297
+ });
298
+
299
+ /** The serializable row view of one resource node (see {@link describePlan}). */
300
+ export const describeResource = (node: CRUD): PlannedResource => ({
301
+ fqn: node.resource.FQN,
302
+ logicalId: node.resource.LogicalId,
303
+ resourceType: node.resource.Type,
304
+ action: node.action,
305
+ bindings: node.bindings.map(describeBinding),
306
+ providerMode: node.mode,
307
+ fromProviderMode:
308
+ node.action === "replace" &&
309
+ node.mode !== undefined &&
310
+ node.state.providerMode !== undefined &&
311
+ node.state.providerMode !== node.mode
312
+ ? node.state.providerMode
313
+ : undefined,
314
+ });
315
+
316
+ /** The serializable row view of one stack-action node. */
317
+ export const describeAction = (
318
+ node: ActionApply | ActionDelete,
319
+ ): PlannedAction => ({
320
+ fqn: node.def.FQN,
321
+ logicalId: node.def.LogicalId,
322
+ actionType: node.def.Type,
323
+ action: node.action,
324
+ });
325
+
326
+ /**
327
+ * Serializable per-row views of a plan — everything a renderer or remote
328
+ * consumer needs without holding the native plan: resource rows with their
329
+ * bindings and provider modes, orphan deletions, and stack actions.
330
+ */
331
+ export const describePlan = (
332
+ plan: Plan,
333
+ ): {
334
+ readonly resources: ReadonlyArray<PlannedResource>;
335
+ readonly actions: ReadonlyArray<PlannedAction>;
336
+ } => ({
337
+ resources: [
338
+ ...Object.values(plan.resources),
339
+ ...Object.values(plan.deletions).filter(
340
+ (node): node is Delete => node !== undefined,
341
+ ),
342
+ ].map(describeResource),
343
+ actions: [
344
+ ...Object.values(plan.actions ?? {}),
345
+ ...Object.values(plan.actionDeletions ?? {}),
346
+ ]
347
+ .filter((node): node is ActionApply | ActionDelete => node !== undefined)
348
+ .map(describeAction),
349
+ });
350
+
288
351
  export interface MakePlanOptions {
289
352
  force?: boolean;
290
353
  }
@@ -295,6 +358,14 @@ export const make = <A>(
295
358
  ): Effect.Effect<Plan<A>, never, State> =>
296
359
  // @ts-expect-error
297
360
  Effect.gen(function* () {
361
+ // Per-resource plan progress and phase markers are reported through
362
+ // the ambient Progress reporter as the work happens, so a renderer can show
363
+ // plan computation while it runs. The default reporter is a no-op.
364
+ const reportPlanned = yield* Progress;
365
+
366
+ // Resolving the state service may bootstrap a remote store, and the
367
+ // persisted-row snapshot below reads from it — both are "loading state".
368
+ yield* reportPlanned({ _tag: "plan.phase", phase: "loading-state" });
298
369
  const state = yield* yield* State;
299
370
 
300
371
  const resources = Object.values(stack.resources);
@@ -363,6 +434,20 @@ export const make = <A>(
363
434
  return { provider, mode };
364
435
  });
365
436
 
437
+ // Credential-free dev: the adoption probe below runs each new row's
438
+ // `read` — for `Alchemy.remote()` rows that is a real cloud call, and
439
+ // it happens before apply's demand gate. Demand those credentials up
440
+ // front so a dev plan with nothing configured fails with the typed
441
+ // CredentialsRequired rather than the first read's raw auth error.
442
+ if (runDefaultMode === "local") {
443
+ const remote: Array<{ Type: string; FQN: string }> = [];
444
+ for (const resource of resources) {
445
+ const { mode } = yield* resolveProviderAndMode(resource);
446
+ if (mode === "live") remote.push(resource);
447
+ }
448
+ if (remote.length > 0) yield* demandRemoteCredentials(remote);
449
+ }
450
+
366
451
  /**
367
452
  * Has this resource switched provider modes since it was last
368
453
  * reconciled? Rows without a persisted mode were written by a
@@ -401,6 +486,8 @@ export const make = <A>(
401
486
  resourceFqns.map((fqn, i) => [fqn, oldResources[i]]),
402
487
  );
403
488
 
489
+ yield* reportPlanned({ _tag: "plan.phase", phase: "computing-plan" });
490
+
404
491
  // ── FQN renames ──────────────────────────────────────────────────────
405
492
  // Map every former FQN claimed via `renamedFrom(...)` to its claimant's
406
493
  // current FQN. Two resources claiming the same former FQN is ambiguous
@@ -596,6 +683,10 @@ export const make = <A>(
596
683
  return { row, renamedFrom: undefined, renameMoved: false };
597
684
  });
598
685
 
686
+ // Shared resolutions run in fibers of the plan's own scope (see
687
+ // `cachedInScope`): a diff that fails or is cancelled must not take the
688
+ // resolution every other diff is waiting on down with it.
689
+ const memoScope = yield* Effect.scope;
599
690
  const resolvedResources: Record<string, Effect.Effect<any>> = {};
600
691
 
601
692
  const resolveResource = (
@@ -610,7 +701,7 @@ export const make = <A>(
610
701
  }
611
702
  // @ts-expect-error
612
703
  return yield* (resolvedResources[resourceExpr.src.FQN] ??=
613
- yield* Effect.cached(
704
+ yield* cachedInScope(memoScope)(
614
705
  Effect.gen(function* () {
615
706
  const resource = resourceExpr.src;
616
707
 
@@ -1074,590 +1165,653 @@ export const make = <A>(
1074
1165
  ),
1075
1166
  ]);
1076
1167
 
1077
- const resourceGraph = Object.fromEntries(
1078
- (yield* Effect.all(
1079
- resources.map(
1080
- Effect.fn("plan.diff.resource")(function* (resource) {
1081
- const { provider, mode } = yield* resolveProviderAndMode(resource);
1082
- const id = resource.LogicalId;
1083
- const fqn = resource.FQN;
1084
- // Apply-facing props (stored on the plan node): whole-resource
1085
- // references to updating upstreams stay evaluable `ResourceExpr`s.
1086
- // Apply runs `Output.evaluate(node.props, outputs)` right before
1087
- // `reconcile`, so these references resolve to the upstream's
1088
- // fresh post-reconcile attributes.
1089
- const applyProps = yield* resolveInput(resource.Props);
1090
- // Diff-facing view of the same resolution: stable attributes
1091
- // materialized so their known values flow into `diff` /
1092
- // `havePropsChanged`.
1093
- const news = materializeStableRefs(applyProps);
1094
- const downstream = newDownstreamDependencies[fqn] ?? [];
1095
-
1096
- // Apply-facing binding rows, mirroring `applyProps`: payloads
1097
- // whose data embeds a whole-resource reference to an updating
1098
- // upstream keep it as an evaluable `ResourceExpr`. Apply runs
1099
- // `Output.evaluate(node.bindings, outputs)` right before
1100
- // `reconcile`, so the host receives the upstream's fresh
1101
- // post-reconcile attributes. Collapse duplicates by sid so the
1102
- // binding set handed to `diff` matches what `reconcile` receives
1103
- // (see `dedupeBindings`).
1104
- const applyBindings: ResourceBinding[] = dedupeBindings(
1105
- yield* resolveInput(stack.bindings[fqn] ?? []),
1168
+ const plannedCount = yield* Ref.make(0);
1169
+ const resourcePlanned = (node: CRUD) =>
1170
+ Ref.updateAndGet(plannedCount, (count) => count + 1).pipe(
1171
+ Effect.flatMap((completed) =>
1172
+ reportPlanned({
1173
+ _tag: "plan.resource.completed",
1174
+ ...describeResource(node),
1175
+ completed,
1176
+ total: resources.length,
1177
+ }),
1178
+ ),
1179
+ );
1180
+
1181
+ const diffResource = Effect.fn("plan.diff.resource")(function* (
1182
+ resource: ResourceLike,
1183
+ ) {
1184
+ const { provider, mode } = yield* resolveProviderAndMode(resource);
1185
+ const id = resource.LogicalId;
1186
+ const fqn = resource.FQN;
1187
+ // Paired with the resource-planned completion below so renderers can
1188
+ // show what is actually in flight (diffs may read the cloud and run
1189
+ // concurrently — completions alone hide the slow tail).
1190
+ yield* reportPlanned({
1191
+ _tag: "plan.resource.started",
1192
+ fqn,
1193
+ logicalId: id,
1194
+ resourceType: resource.Type,
1195
+ total: resources.length,
1196
+ });
1197
+ // Apply-facing props (stored on the plan node): whole-resource
1198
+ // references to updating upstreams stay evaluable `ResourceExpr`s.
1199
+ // Apply runs `Output.evaluate(node.props, outputs)` right before
1200
+ // `reconcile`, so these references resolve to the upstream's
1201
+ // fresh post-reconcile attributes.
1202
+ const applyProps = yield* resolveInput(resource.Props);
1203
+ // Diff-facing view of the same resolution: stable attributes
1204
+ // materialized so their known values flow into `diff` /
1205
+ // `havePropsChanged`.
1206
+ const news = materializeStableRefs(applyProps);
1207
+ const downstream = newDownstreamDependencies[fqn] ?? [];
1208
+
1209
+ // Apply-facing binding rows, mirroring `applyProps`: payloads
1210
+ // whose data embeds a whole-resource reference to an updating
1211
+ // upstream keep it as an evaluable `ResourceExpr`. Apply runs
1212
+ // `Output.evaluate(node.bindings, outputs)` right before
1213
+ // `reconcile`, so the host receives the upstream's fresh
1214
+ // post-reconcile attributes. Collapse duplicates by sid so the
1215
+ // binding set handed to `diff` matches what `reconcile` receives
1216
+ // (see `dedupeBindings`).
1217
+ const applyBindings: ResourceBinding[] = dedupeBindings(
1218
+ yield* resolveInput(stack.bindings[fqn] ?? []),
1219
+ );
1220
+ // Diff-facing view of the same rows: stable attributes
1221
+ // materialized so `diffBindings` / `provider.diff` compare known
1222
+ // values. Terminal commits still persist the payload the provider
1223
+ // actually reconciled with (#874) — Apply commits the evaluated
1224
+ // `bindingOutputs`, not these plan-time shapes.
1225
+ const newBindings: ResourceBinding[] =
1226
+ materializeStableRefs(applyBindings);
1227
+ // The row is looked up at the resource's FQN with a fallback to
1228
+ // its former FQNs (`renamedFrom`); a row found under a former
1229
+ // FQN arrives here already remapped to the new identity, and
1230
+ // `renamedFrom` rides onto the plan node so apply persists the
1231
+ // move. (A Task previously holding this FQN is treated as no
1232
+ // prior state — its row is reaped by `actionDeletions` below.)
1233
+ const {
1234
+ row: persistedRow,
1235
+ renamedFrom,
1236
+ renameMoved,
1237
+ } = yield* getPersistedRow(resource);
1238
+ let oldState: ResourceState | undefined = persistedRow;
1239
+
1240
+ // Engine-level adoption. When there is no prior state, always
1241
+ // consult `provider.read` (if implemented) so the engine — not
1242
+ // each lifecycle method — owns the existence/ownership decision.
1243
+ //
1244
+ // The provider returns one of:
1245
+ // - `undefined` → resource doesn't exist; create it
1246
+ // - plain attrs → exists and is owned by us; silent adopt
1247
+ // - `Unowned(attrs)` → exists but is *not* ours
1248
+ //
1249
+ // Routing:
1250
+ // - owned → adopt the `created` state
1251
+ // from attrs and continue
1252
+ // through the normal diff
1253
+ // path (so subsequent props
1254
+ // drift produces an update).
1255
+ // - unowned + adopt enabled → take over: adopt the
1256
+ // `created` state and let the
1257
+ // next update overwrite tags.
1258
+ // - unowned + adopt disabled → fail with
1259
+ // `OwnedBySomeoneElse`.
1260
+ //
1261
+ // Plan construction is side-effect-free: the adopted `created`
1262
+ // state is only held in-memory here (to drive the diff) and rides
1263
+ // onto the plan node as `node.state`. Persisting it to the state
1264
+ // store happens exclusively during APPLY of that node (the update
1265
+ // lifecycle commits `updating` / `updated` carrying this state).
1266
+ // If planning persisted here, a mere `alchemy plan` / `--dry-run`
1267
+ // would claim ownership of an unowned cloud resource, arming a
1268
+ // later unrelated deploy to orphan-delete it. See
1269
+ // https://github.com/alchemy-run/alchemy/issues/793.
1270
+ //
1271
+ // After a cold-start adoption (engine just discovered an
1272
+ // existing cloud resource via `read`), force the engine's
1273
+ // normal `update` path so the provider can re-sync ownership
1274
+ // tags, configuration, etc. against the desired props.
1275
+ // Adoption carries state with `props: news`, so the default
1276
+ // diff sees no drift and would noop — which would leave any
1277
+ // foreign-owned tags / divergent config in place. Forcing
1278
+ // update keeps the deploy idempotent: if cloud state already
1279
+ // matches news, the provider's update is a no-op write.
1280
+ //
1281
+ // Skip the adoption probe entirely when `news` still contains
1282
+ // unresolved upstream Outputs (e.g. a `streamArn` referencing
1283
+ // a stream being created in the same plan). Calling `read` with
1284
+ // an unresolved value would surface as `ParseError` from the
1285
+ // SDK protocol layer. Resources whose props depend on
1286
+ // not-yet-created upstreams cannot themselves be pre-existing
1287
+ // — there's nothing to adopt.
1288
+ // A resource declared at a former FQN whose row just migrated
1289
+ // away is genuinely NEW by declaration — skip the probe. Its
1290
+ // predecessor's physical resource still carries tags branded
1291
+ // with THIS logical id (the migrated row's reconcile hasn't
1292
+ // re-branded them yet), so a tag-based `read` would find it
1293
+ // and silently adopt the very resource that was renamed away.
1294
+ const reusesMigratedFqn = migratedRowFqns.has(fqn);
1295
+ let forceUpdateAfterAdoption = false;
1296
+ if (
1297
+ oldState === undefined &&
1298
+ provider.read &&
1299
+ isResolved(news) &&
1300
+ !reusesMigratedFqn
1301
+ ) {
1302
+ const adoptInstanceId = yield* generateInstanceId();
1303
+ const readResult = yield* provider
1304
+ .read({
1305
+ id,
1306
+ fqn,
1307
+ instanceId: adoptInstanceId,
1308
+ olds: news,
1309
+ output: undefined,
1310
+ })
1311
+ .pipe(providePlanScope(fqn, adoptInstanceId));
1312
+ if (readResult !== undefined) {
1313
+ const isUnowned = Unowned.is(readResult);
1314
+ // A resource-scoped `adopt(...)` (captured on the resource at
1315
+ // registration) overrides the stack/CLI default.
1316
+ const adoptThis = resource.Adopt ?? (yield* shouldAdopt);
1317
+ if (isUnowned && !adoptThis) {
1318
+ return yield* new OwnedBySomeoneElse({
1319
+ message:
1320
+ `Cannot adopt resource '${fqn}' (${resource.Type}): ` +
1321
+ "it exists in the cloud but is not owned by this " +
1322
+ "stack/stage/logical-id. Re-run with `--adopt` (or " +
1323
+ "wrap the effect in `adopt(true)`) to take it over.",
1324
+ resourceType: resource.Type,
1325
+ logicalId: id,
1326
+ });
1327
+ }
1328
+ const adoptedState = {
1329
+ status: "created" as const,
1330
+ fqn,
1331
+ logicalId: id,
1332
+ instanceId: adoptInstanceId,
1333
+ namespace: resource.Namespace,
1334
+ resourceType: resource.Type,
1335
+ props: news,
1336
+ attr: stripUnowned(readResult),
1337
+ providerVersion: provider.version ?? 0,
1338
+ bindings: [],
1339
+ downstream,
1340
+ removalPolicy: resource.RemovalPolicy,
1341
+ providerMode: mode,
1342
+ } satisfies CreatedResourceState;
1343
+ // In-memory only — do NOT persist here. Plan.make runs for
1344
+ // `alchemy plan` / `deploy --dry-run` too, so a `state.set`
1345
+ // would mutate persistent state during a read-only preview.
1346
+ // The adopted state rides onto the plan node via `oldState`
1347
+ // (→ `node.state`) and is persisted at APPLY time by the
1348
+ // update lifecycle's `updating` / `updated` commits. See
1349
+ // https://github.com/alchemy-run/alchemy/issues/793.
1350
+ oldState = adoptedState;
1351
+ forceUpdateAfterAdoption = true;
1352
+ }
1353
+ }
1354
+
1355
+ // Sid-sorted like `newBindings` (see the resolveResource note).
1356
+ const oldBindings = dedupeBindings(oldState?.bindings ?? []);
1357
+ // Actions come from the materialized comparison (`newBindings`);
1358
+ // the payloads the node carries into Apply come from the
1359
+ // apply-faithful rows, joined by sid — both are views of the same
1360
+ // deduped `stack.bindings[fqn]` rows, so action and payload can
1361
+ // never drift. `delete` rows keep the persisted old data.
1362
+ const applyBindingData = new Map(
1363
+ applyBindings.map((b) => [b.sid, b.data]),
1364
+ );
1365
+ const bindingDiffs = diffBindings(oldBindings, newBindings).map((b) =>
1366
+ b.action === "delete" || !applyBindingData.has(b.sid)
1367
+ ? b
1368
+ : { ...b, data: applyBindingData.get(b.sid) },
1369
+ );
1370
+
1371
+ // Local ⇄ live switch: the persisted row was reconciled by a
1372
+ // different provider mode than the one resolved for this run.
1373
+ // The two runtimes host distinct physical instances, so this is
1374
+ // always a replacement — the new instance is created with the
1375
+ // new mode's provider, and Apply deletes the old generation
1376
+ // with the provider of the mode that created it (see
1377
+ // `deleteOldGenerations` / `collectGarbage`).
1378
+ const modeSwitched = hasModeSwitched(mode, oldState);
1379
+
1380
+ const Node = <T extends Apply>(
1381
+ node: Omit<
1382
+ T,
1383
+ "provider" | "resource" | "bindings" | "downstream" | "mode"
1384
+ >,
1385
+ ) =>
1386
+ ({
1387
+ ...node,
1388
+ provider,
1389
+ resource,
1390
+ bindings: bindingDiffs,
1391
+ downstream,
1392
+ mode,
1393
+ renamedFrom,
1394
+ }) as any as T;
1395
+
1396
+ // Plan against the persisted state we have, not the ideal final state we
1397
+ // hoped to reach last time. Recovery is expressed by mapping each
1398
+ // intermediate state back onto a fresh CRUD action.
1399
+ if (oldState === undefined) {
1400
+ return Node<Create>({
1401
+ action: "create",
1402
+ props: applyProps,
1403
+ state: oldState,
1404
+ });
1405
+ } else if (
1406
+ !modeSwitched &&
1407
+ oldState.status === "creating" &&
1408
+ oldState.attr === undefined
1409
+ ) {
1410
+ // A create may have succeeded before state persistence failed. If the
1411
+ // provider can recover an attribute snapshot, keep driving the same
1412
+ // create instead of starting over blindly.
1413
+ //
1414
+ // `creating` state persists the RAW plan-time props, which may
1415
+ // still contain unresolved Output expressions (e.g. a name
1416
+ // referencing an upstream created in the same failed deploy).
1417
+ // `read` implementations derive identity from `olds` when
1418
+ // `output` is undefined (as it is here), so handing them
1419
+ // unresolved exprs crashes. Skip the probe — same behavior as
1420
+ // a read that found nothing — and re-drive the create.
1421
+ if (provider.read && isResolved(oldState.props)) {
1422
+ const attr = yield* provider
1423
+ .read({
1424
+ id,
1425
+ fqn,
1426
+ instanceId: oldState.instanceId,
1427
+ olds: oldState.props,
1428
+ output: oldState.attr,
1429
+ })
1430
+ .pipe(
1431
+ providePlanScope(fqn, oldState.instanceId),
1432
+ // `creating` props pass `isResolved` yet can still carry
1433
+ // holes where unresolved Outputs were stripped at commit
1434
+ // time (see stripUnresolved) — e.g. a parent reference
1435
+ // persisted as `{}`. A provider that dereferences one
1436
+ // crashes deep inside its SDK client (a SchemaError
1437
+ // defect), which would brick every subsequent plan on
1438
+ // the stage. Recovery is best-effort: degrade the defect
1439
+ // to "nothing recovered" and re-drive the create (#995).
1440
+ Effect.catchDefect((defect) =>
1441
+ Effect.logWarning(
1442
+ `Recovery read for '${fqn}' crashed; treating the ` +
1443
+ "interrupted create as not recoverable and " +
1444
+ "re-driving it.",
1445
+ defect,
1446
+ ).pipe(Effect.as(undefined)),
1447
+ ),
1106
1448
  );
1107
- // Diff-facing view of the same rows: stable attributes
1108
- // materialized so `diffBindings` / `provider.diff` compare known
1109
- // values. Terminal commits still persist the payload the provider
1110
- // actually reconciled with (#874) — Apply commits the evaluated
1111
- // `bindingOutputs`, not these plan-time shapes.
1112
- const newBindings: ResourceBinding[] =
1113
- materializeStableRefs(applyBindings);
1114
- // The row is looked up at the resource's FQN with a fallback to
1115
- // its former FQNs (`renamedFrom`); a row found under a former
1116
- // FQN arrives here already remapped to the new identity, and
1117
- // `renamedFrom` rides onto the plan node so apply persists the
1118
- // move. (A Task previously holding this FQN is treated as no
1119
- // prior state — its row is reaped by `actionDeletions` below.)
1120
- const {
1121
- row: persistedRow,
1122
- renamedFrom,
1123
- renameMoved,
1124
- } = yield* getPersistedRow(resource);
1125
- let oldState: ResourceState | undefined = persistedRow;
1126
-
1127
- // Engine-level adoption. When there is no prior state, always
1128
- // consult `provider.read` (if implemented) so the engine — not
1129
- // each lifecycle method — owns the existence/ownership decision.
1130
- //
1131
- // The provider returns one of:
1132
- // - `undefined` → resource doesn't exist; create it
1133
- // - plain attrs → exists and is owned by us; silent adopt
1134
- // - `Unowned(attrs)` → exists but is *not* ours
1135
- //
1136
- // Routing:
1137
- // - owned → adopt the `created` state
1138
- // from attrs and continue
1139
- // through the normal diff
1140
- // path (so subsequent props
1141
- // drift produces an update).
1142
- // - unowned + adopt enabled → take over: adopt the
1143
- // `created` state and let the
1144
- // next update overwrite tags.
1145
- // - unowned + adopt disabled → fail with
1146
- // `OwnedBySomeoneElse`.
1147
- //
1148
- // Plan construction is side-effect-free: the adopted `created`
1149
- // state is only held in-memory here (to drive the diff) and rides
1150
- // onto the plan node as `node.state`. Persisting it to the state
1151
- // store happens exclusively during APPLY of that node (the update
1152
- // lifecycle commits `updating` / `updated` carrying this state).
1153
- // If planning persisted here, a mere `alchemy plan` / `--dry-run`
1154
- // would claim ownership of an unowned cloud resource, arming a
1155
- // later unrelated deploy to orphan-delete it. See
1156
- // https://github.com/alchemy-run/alchemy/issues/793.
1157
- //
1158
- // After a cold-start adoption (engine just discovered an
1159
- // existing cloud resource via `read`), force the engine's
1160
- // normal `update` path so the provider can re-sync ownership
1161
- // tags, configuration, etc. against the desired props.
1162
- // Adoption carries state with `props: news`, so the default
1163
- // diff sees no drift and would noop — which would leave any
1164
- // foreign-owned tags / divergent config in place. Forcing
1165
- // update keeps the deploy idempotent: if cloud state already
1166
- // matches news, the provider's update is a no-op write.
1167
- //
1168
- // Skip the adoption probe entirely when `news` still contains
1169
- // unresolved upstream Outputs (e.g. a `streamArn` referencing
1170
- // a stream being created in the same plan). Calling `read` with
1171
- // an unresolved value would surface as `ParseError` from the
1172
- // SDK protocol layer. Resources whose props depend on
1173
- // not-yet-created upstreams cannot themselves be pre-existing
1174
- // — there's nothing to adopt.
1175
- // A resource declared at a former FQN whose row just migrated
1176
- // away is genuinely NEW by declaration — skip the probe. Its
1177
- // predecessor's physical resource still carries tags branded
1178
- // with THIS logical id (the migrated row's reconcile hasn't
1179
- // re-branded them yet), so a tag-based `read` would find it
1180
- // and silently adopt the very resource that was renamed away.
1181
- const reusesMigratedFqn = migratedRowFqns.has(fqn);
1182
- let forceUpdateAfterAdoption = false;
1183
- if (
1184
- oldState === undefined &&
1185
- provider.read &&
1186
- isResolved(news) &&
1187
- !reusesMigratedFqn
1188
- ) {
1189
- const adoptInstanceId = yield* generateInstanceId();
1190
- const readResult = yield* provider
1191
- .read({
1192
- id,
1193
- fqn,
1194
- instanceId: adoptInstanceId,
1195
- olds: news,
1196
- output: undefined,
1197
- })
1198
- .pipe(providePlanScope(fqn, adoptInstanceId));
1199
- if (readResult !== undefined) {
1200
- const isUnowned = Unowned.is(readResult);
1201
- // A resource-scoped `adopt(...)` (captured on the resource at
1202
- // registration) overrides the stack/CLI default.
1203
- const adoptThis = resource.Adopt ?? (yield* shouldAdopt);
1204
- if (isUnowned && !adoptThis) {
1205
- return yield* new OwnedBySomeoneElse({
1206
- message:
1207
- `Cannot adopt resource '${fqn}' (${resource.Type}): ` +
1208
- "it exists in the cloud but is not owned by this " +
1209
- "stack/stage/logical-id. Re-run with `--adopt` (or " +
1210
- "wrap the effect in `adopt(true)`) to take it over.",
1211
- resourceType: resource.Type,
1212
- logicalId: id,
1213
- });
1214
- }
1215
- const adoptedState = {
1216
- status: "created" as const,
1217
- fqn,
1218
- logicalId: id,
1219
- instanceId: adoptInstanceId,
1220
- namespace: resource.Namespace,
1449
+ if (attr !== undefined) {
1450
+ // The recovered resource may be foreign: our interrupted
1451
+ // create could have lost a name race, or died before
1452
+ // stamping ownership. Route `Unowned` through the same
1453
+ // adoption table as the cold-start probe above — never
1454
+ // silently take over (and later mutate/delete) a resource
1455
+ // we cannot prove we created.
1456
+ if (Unowned.is(attr)) {
1457
+ const adoptThis = resource.Adopt ?? (yield* shouldAdopt);
1458
+ if (!adoptThis) {
1459
+ return yield* new OwnedBySomeoneElse({
1460
+ message:
1461
+ `Cannot resume creating resource '${fqn}' ` +
1462
+ `(${resource.Type}): a resource with its physical ` +
1463
+ "identity exists in the cloud but is not owned by " +
1464
+ "this stack/stage/logical-id. Re-run with `--adopt` " +
1465
+ "(or wrap the effect in `adopt(true)`) to take it " +
1466
+ "over.",
1221
1467
  resourceType: resource.Type,
1222
- props: news,
1223
- attr: stripUnowned(readResult),
1224
- providerVersion: provider.version ?? 0,
1225
- bindings: [],
1226
- downstream,
1227
- removalPolicy: resource.RemovalPolicy,
1228
- providerMode: mode,
1229
- } satisfies CreatedResourceState;
1230
- // In-memory only — do NOT persist here. Plan.make runs for
1231
- // `alchemy plan` / `deploy --dry-run` too, so a `state.set`
1232
- // would mutate persistent state during a read-only preview.
1233
- // The adopted state rides onto the plan node via `oldState`
1234
- // (→ `node.state`) and is persisted at APPLY time by the
1235
- // update lifecycle's `updating` / `updated` commits. See
1236
- // https://github.com/alchemy-run/alchemy/issues/793.
1237
- oldState = adoptedState;
1238
- forceUpdateAfterAdoption = true;
1468
+ logicalId: id,
1469
+ });
1239
1470
  }
1240
1471
  }
1472
+ // Continue through the normal diff below with the recovered
1473
+ // live snapshot. Desired props may have changed while the
1474
+ // previous create was interrupted; bypassing diff here can
1475
+ // drive an immutable change through reconcile and falsely
1476
+ // persist the old physical resource as converged.
1477
+ oldState = { ...oldState, attr: stripUnowned(attr) };
1478
+ }
1479
+ }
1480
+ }
1241
1481
 
1242
- // Sid-sorted like `newBindings` (see the resolveResource note).
1243
- const oldBindings = dedupeBindings(oldState?.bindings ?? []);
1244
- // Actions come from the materialized comparison (`newBindings`);
1245
- // the payloads the node carries into Apply come from the
1246
- // apply-faithful rows, joined by sid — both are views of the same
1247
- // deduped `stack.bindings[fqn]` rows, so action and payload can
1248
- // never drift. `delete` rows keep the persisted old data.
1249
- const applyBindingData = new Map(
1250
- applyBindings.map((b) => [b.sid, b.data]),
1251
- );
1252
- const bindingDiffs = diffBindings(oldBindings, newBindings).map(
1253
- (b) =>
1254
- b.action === "delete" || !applyBindingData.has(b.sid)
1255
- ? b
1256
- : { ...b, data: applyBindingData.get(b.sid) },
1257
- );
1482
+ // Diff against whatever props represent the best-known current attempt.
1483
+ // For replacement recovery that means the top-level replacement props,
1484
+ // not the older generations stored under `old`.
1485
+ const oldProps = oldState.props;
1486
+
1487
+ // On a mode switch the provider diff is skipped entirely:
1488
+ // comparing props across runtimes is meaningless (and the new
1489
+ // mode's provider has never seen the old mode's state). The
1490
+ // action is a replacement by definition.
1491
+ const diff = modeSwitched
1492
+ ? ({
1493
+ action: "replace",
1494
+ deleteFirst: false,
1495
+ } satisfies ReplaceDiff)
1496
+ : yield* asEffect(
1497
+ provider
1498
+ ?.diff?.({
1499
+ id,
1500
+ fqn,
1501
+ olds: oldProps,
1502
+ instanceId: oldState.instanceId,
1503
+ output: oldState.attr,
1504
+ news,
1505
+ oldBindings,
1506
+ newBindings,
1507
+ })
1508
+ .pipe(providePlanScope(fqn, oldState.instanceId)),
1509
+ ).pipe(
1510
+ Effect.map(
1511
+ (diff) =>
1512
+ diff ??
1513
+ ({
1514
+ action:
1515
+ havePropsChanged(oldProps, news) ||
1516
+ bindingDiffs.some((b) => b.action !== "noop")
1517
+ ? "update"
1518
+ : "noop",
1519
+ } as UpdateDiff | NoopDiff),
1520
+ ),
1521
+ Effect.map((diff) =>
1522
+ options.force && diff.action === "noop"
1523
+ ? ({
1524
+ action: "update",
1525
+ } satisfies UpdateDiff)
1526
+ : diff,
1527
+ ),
1528
+ // After a cold-start adoption (silent or takeover), force at
1529
+ // least an update so the provider re-syncs ownership tags /
1530
+ // config against the desired props (otherwise the engine
1531
+ // would noop and any drift between the existing cloud
1532
+ // resource and `news` — including foreign-owned tags after a
1533
+ // takeover — would persist).
1534
+ //
1535
+ // A row that just migrated from a former FQN (`renameMoved`)
1536
+ // gets the same treatment: its cloud resource is still
1537
+ // branded with the OLD logical id's tags, and if the old id
1538
+ // is being reused by a new resource, leaving them stale
1539
+ // would let the reuser's future adoption probes match the
1540
+ // wrong physical resource.
1541
+ Effect.map((diff) =>
1542
+ (forceUpdateAfterAdoption || renameMoved) &&
1543
+ diff.action === "noop"
1544
+ ? ({ action: "update" } satisfies UpdateDiff)
1545
+ : diff,
1546
+ ),
1547
+ );
1258
1548
 
1259
- // Local ⇄ live switch: the persisted row was reconciled by a
1260
- // different provider mode than the one resolved for this run.
1261
- // The two runtimes host distinct physical instances, so this is
1262
- // always a replacement — the new instance is created with the
1263
- // new mode's provider, and Apply deletes the old generation
1264
- // with the provider of the mode that created it (see
1265
- // `deleteOldGenerations` / `collectGarbage`).
1266
- const modeSwitched = hasModeSwitched(mode, oldState);
1267
-
1268
- const Node = <T extends Apply>(
1269
- node: Omit<
1270
- T,
1271
- "provider" | "resource" | "bindings" | "downstream" | "mode"
1272
- >,
1273
- ) =>
1274
- ({
1275
- ...node,
1276
- provider,
1277
- resource,
1278
- bindings: bindingDiffs,
1279
- downstream,
1280
- mode,
1281
- renamedFrom,
1282
- }) as any as T;
1283
-
1284
- // Plan against the persisted state we have, not the ideal final state we
1285
- // hoped to reach last time. Recovery is expressed by mapping each
1286
- // intermediate state back onto a fresh CRUD action.
1287
- if (oldState === undefined) {
1288
- return Node<Create>({
1289
- action: "create",
1290
- props: applyProps,
1291
- state: oldState,
1292
- });
1293
- } else if (
1294
- !modeSwitched &&
1295
- oldState.status === "creating" &&
1296
- oldState.attr === undefined
1297
- ) {
1298
- // A create may have succeeded before state persistence failed. If the
1299
- // provider can recover an attribute snapshot, keep driving the same
1300
- // create instead of starting over blindly.
1301
- //
1302
- // `creating` state persists the RAW plan-time props, which may
1303
- // still contain unresolved Output expressions (e.g. a name
1304
- // referencing an upstream created in the same failed deploy).
1305
- // `read` implementations derive identity from `olds` when
1306
- // `output` is undefined (as it is here), so handing them
1307
- // unresolved exprs crashes. Skip the probe — same behavior as
1308
- // a read that found nothing — and re-drive the create.
1309
- if (provider.read && isResolved(oldState.props)) {
1310
- const attr = yield* provider
1311
- .read({
1312
- id,
1313
- fqn,
1314
- instanceId: oldState.instanceId,
1315
- olds: oldState.props,
1316
- output: oldState.attr,
1317
- })
1318
- .pipe(
1319
- providePlanScope(fqn, oldState.instanceId),
1320
- // `creating` props pass `isResolved` yet can still carry
1321
- // holes where unresolved Outputs were stripped at commit
1322
- // time (see stripUnresolved) — e.g. a parent reference
1323
- // persisted as `{}`. A provider that dereferences one
1324
- // crashes deep inside its SDK client (a SchemaError
1325
- // defect), which would brick every subsequent plan on
1326
- // the stage. Recovery is best-effort: degrade the defect
1327
- // to "nothing recovered" and re-drive the create (#995).
1328
- Effect.catchDefect((defect) =>
1329
- Effect.logWarning(
1330
- `Recovery read for '${fqn}' crashed; treating the ` +
1331
- "interrupted create as not recoverable and " +
1332
- "re-driving it.",
1333
- defect,
1334
- ).pipe(Effect.as(undefined)),
1335
- ),
1336
- );
1337
- if (attr !== undefined) {
1338
- // The recovered resource may be foreign: our interrupted
1339
- // create could have lost a name race, or died before
1340
- // stamping ownership. Route `Unowned` through the same
1341
- // adoption table as the cold-start probe above — never
1342
- // silently take over (and later mutate/delete) a resource
1343
- // we cannot prove we created.
1344
- if (Unowned.is(attr)) {
1345
- const adoptThis = resource.Adopt ?? (yield* shouldAdopt);
1346
- if (!adoptThis) {
1347
- return yield* new OwnedBySomeoneElse({
1348
- message:
1349
- `Cannot resume creating resource '${fqn}' ` +
1350
- `(${resource.Type}): a resource with its physical ` +
1351
- "identity exists in the cloud but is not owned by " +
1352
- "this stack/stage/logical-id. Re-run with `--adopt` " +
1353
- "(or wrap the effect in `adopt(true)`) to take it " +
1354
- "over.",
1355
- resourceType: resource.Type,
1356
- logicalId: id,
1357
- });
1358
- }
1359
- }
1360
- // Continue through the normal diff below with the recovered
1361
- // live snapshot. Desired props may have changed while the
1362
- // previous create was interrupted; bypassing diff here can
1363
- // drive an immutable change through reconcile and falsely
1364
- // persist the old physical resource as converged.
1365
- oldState = { ...oldState, attr: stripUnowned(attr) };
1366
- }
1367
- }
1368
- }
1549
+ if (oldState.status === "creating") {
1550
+ if (diff.action === "noop") {
1551
+ // we're in the creating state and props are un-changed
1552
+ // let's just continue where we left off
1553
+ return Node<Create>({
1554
+ action: "create",
1555
+ props: applyProps,
1556
+ state: oldState,
1557
+ });
1558
+ } else if (diff.action === "update") {
1559
+ // props have changed in a way that is updatable
1560
+ // again, just continue with the create
1561
+ // TODO(sam): should we maybe try an update instead?
1562
+ return Node<Create>({
1563
+ action: "create",
1564
+ props: applyProps,
1565
+ state: oldState,
1566
+ });
1567
+ } else {
1568
+ // props have changed in an incompatible way
1569
+ // because it's possible that an un-updatable resource has already been created
1570
+ // we must use a replace step to create a new one and delete the potential old one
1571
+ return Node<Replace>({
1572
+ action: "replace",
1573
+ props: applyProps,
1574
+ deleteFirst: diff.deleteFirst ?? false,
1575
+ state: oldState,
1576
+ });
1577
+ }
1578
+ } else if (oldState.status === "updating") {
1579
+ // Updating already targets the live resource, so noop/update both mean
1580
+ // "finish the interrupted update". Only a replace diff escalates it
1581
+ // into a fresh replacement.
1582
+ if (diff.action === "update" || diff.action === "noop") {
1583
+ // we can continue where we left off
1584
+ return Node<Update>({
1585
+ action: "update",
1586
+ props: applyProps,
1587
+ state: oldState,
1588
+ });
1589
+ } else {
1590
+ // we started to update a resource but now believe we should replace it
1591
+ return Node<Replace>({
1592
+ action: "replace",
1593
+ deleteFirst: diff.deleteFirst ?? false,
1594
+ props: applyProps,
1595
+ // TODO(sam): can Apply handle replacements when the oldState is UpdatingResourceState?
1596
+ // -> or should we do a provider.read to try and reconcile back to UpdatedResourceState?
1597
+ state: oldState,
1598
+ });
1599
+ }
1600
+ } else if (oldState.status === "replacing") {
1601
+ // The replacement candidate is still being created. Noop/update keep
1602
+ // driving the same generation; replace means that candidate itself is
1603
+ // now obsolete and must be wrapped in a new outer generation.
1604
+ if (diff.action === "noop") {
1605
+ // this is the stable case - noop means just continue with the replacement
1606
+ return Node<Replace>({
1607
+ action: "replace",
1608
+ deleteFirst: oldState.deleteFirst,
1609
+ props: applyProps,
1610
+ state: oldState,
1611
+ });
1612
+ } else if (diff.action === "update") {
1613
+ // potential problem here - the props have changed since we tried to replace,
1614
+ // but not enough to trigger another replacement. the resource provider should
1615
+ // be designed as idempotent to converge to the right state when creating the new resource
1616
+ // the newly generated instanceId is intended to assist with this
1617
+ return Node<Replace>({
1618
+ action: "replace",
1619
+ deleteFirst: oldState.deleteFirst,
1620
+ props: applyProps,
1621
+ state: oldState,
1622
+ });
1623
+ } else {
1624
+ // The in-flight replacement candidate itself now needs replacement.
1625
+ // Mark this as a restart so Apply creates a fresh generation instead
1626
+ // of resuming the old replacement instance.
1627
+ return Node<Replace>({
1628
+ restart: true,
1629
+ action: "replace",
1630
+ deleteFirst: diff.deleteFirst ?? oldState.deleteFirst,
1631
+ props: applyProps,
1632
+ state: oldState,
1633
+ });
1634
+ }
1635
+ } else if (oldState.status === "replaced") {
1636
+ // The new resource already exists. Noop means "just let GC finish",
1637
+ // update means "mutate the current replacement before GC finishes",
1638
+ // and replace means "the current replacement also became obsolete".
1639
+ if (diff.action === "noop") {
1640
+ // this is the stable case - noop means just continue cleaning up the replacement
1641
+ return Node<Replace>({
1642
+ action: "replace",
1643
+ deleteFirst: oldState.deleteFirst,
1644
+ props: applyProps,
1645
+ state: oldState,
1646
+ });
1647
+ } else if (diff.action === "update") {
1648
+ // the replacement has been created but now also needs to be updated
1649
+ // the resource provider should:
1650
+ // 1. Update the newly created replacement resource
1651
+ // 2. Then proceed as normal to delete the replaced resources (after all downstream references are updated)
1652
+ return Node<Update>({
1653
+ action: "update",
1654
+ props: applyProps,
1655
+ state: oldState,
1656
+ });
1657
+ } else {
1658
+ // Cleanup is still pending, but the current "new" resource has already
1659
+ // become obsolete. Start another replacement generation and preserve
1660
+ // the existing replaced node as part of the recursive old chain.
1661
+ return Node<Replace>({
1662
+ restart: true,
1663
+ action: "replace",
1664
+ deleteFirst: diff.deleteFirst ?? oldState.deleteFirst,
1665
+ props: applyProps,
1666
+ state: oldState,
1667
+ });
1668
+ }
1669
+ } else if (oldState.status === "deleting") {
1670
+ // we're in a partially deleted state, it is unclear whether it was or was not deleted
1671
+ // so continue by re-creating it with the same instanceId and desired props
1672
+ return Node<Create>({
1673
+ action: "create",
1674
+ props: applyProps,
1675
+ state: {
1676
+ ...oldState,
1677
+ status: "creating",
1678
+ props: news,
1679
+ },
1680
+ });
1681
+ } else if (diff.action === "update") {
1682
+ // Stable created/updated resources follow the normal CRUD mapping.
1683
+ return Node<Update>({
1684
+ action: forceUpdateAfterAdoption ? "adopted" : "update",
1685
+ adopting: forceUpdateAfterAdoption,
1686
+ props: applyProps,
1687
+ state: oldState,
1688
+ });
1689
+ } else if (diff.action === "replace") {
1690
+ return Node<Replace>({
1691
+ action: "replace",
1692
+ props: applyProps,
1693
+ state: oldState,
1694
+ deleteFirst: diff?.deleteFirst ?? false,
1695
+ });
1696
+ } else {
1697
+ return Node<NoopUpdate>({
1698
+ action: "noop",
1699
+ state: oldState,
1700
+ });
1701
+ }
1702
+ });
1369
1703
 
1370
- // Diff against whatever props represent the best-known current attempt.
1371
- // For replacement recovery that means the top-level replacement props,
1372
- // not the older generations stored under `old`.
1373
- const oldProps = oldState.props;
1374
-
1375
- // On a mode switch the provider diff is skipped entirely:
1376
- // comparing props across runtimes is meaningless (and the new
1377
- // mode's provider has never seen the old mode's state). The
1378
- // action is a replacement by definition.
1379
- const diff = modeSwitched
1380
- ? ({
1381
- action: "replace",
1382
- deleteFirst: false,
1383
- } satisfies ReplaceDiff)
1384
- : yield* asEffect(
1385
- provider
1386
- ?.diff?.({
1387
- id,
1388
- fqn,
1389
- olds: oldProps,
1390
- instanceId: oldState.instanceId,
1391
- output: oldState.attr,
1392
- news,
1393
- oldBindings,
1394
- newBindings,
1395
- })
1396
- .pipe(providePlanScope(fqn, oldState.instanceId)),
1397
- ).pipe(
1398
- Effect.map(
1399
- (diff) =>
1400
- diff ??
1401
- ({
1402
- action:
1403
- havePropsChanged(oldProps, news) ||
1404
- bindingDiffs.some((b) => b.action !== "noop")
1405
- ? "update"
1406
- : "noop",
1407
- } as UpdateDiff | NoopDiff),
1408
- ),
1409
- Effect.map((diff) =>
1410
- options.force && diff.action === "noop"
1411
- ? ({
1412
- action: "update",
1413
- } satisfies UpdateDiff)
1414
- : diff,
1415
- ),
1416
- // After a cold-start adoption (silent or takeover), force at
1417
- // least an update so the provider re-syncs ownership tags /
1418
- // config against the desired props (otherwise the engine
1419
- // would noop and any drift between the existing cloud
1420
- // resource and `news` — including foreign-owned tags after a
1421
- // takeover — would persist).
1422
- //
1423
- // A row that just migrated from a former FQN (`renameMoved`)
1424
- // gets the same treatment: its cloud resource is still
1425
- // branded with the OLD logical id's tags, and if the old id
1426
- // is being reused by a new resource, leaving them stale
1427
- // would let the reuser's future adoption probes match the
1428
- // wrong physical resource.
1429
- Effect.map((diff) =>
1430
- (forceUpdateAfterAdoption || renameMoved) &&
1431
- diff.action === "noop"
1432
- ? ({ action: "update" } satisfies UpdateDiff)
1433
- : diff,
1434
- ),
1435
- );
1436
-
1437
- if (oldState.status === "creating") {
1438
- if (diff.action === "noop") {
1439
- // we're in the creating state and props are un-changed
1440
- // let's just continue where we left off
1441
- return Node<Create>({
1442
- action: "create",
1443
- props: applyProps,
1444
- state: oldState,
1445
- });
1446
- } else if (diff.action === "update") {
1447
- // props have changed in a way that is updatable
1448
- // again, just continue with the create
1449
- // TODO(sam): should we maybe try an update instead?
1450
- return Node<Create>({
1451
- action: "create",
1452
- props: applyProps,
1453
- state: oldState,
1454
- });
1455
- } else {
1456
- // props have changed in an incompatible way
1457
- // because it's possible that an un-updatable resource has already been created
1458
- // we must use a replace step to create a new one and delete the potential old one
1459
- return Node<Replace>({
1460
- action: "replace",
1461
- props: applyProps,
1462
- deleteFirst: diff.deleteFirst ?? false,
1463
- state: oldState,
1464
- });
1465
- }
1466
- } else if (oldState.status === "updating") {
1467
- // Updating already targets the live resource, so noop/update both mean
1468
- // "finish the interrupted update". Only a replace diff escalates it
1469
- // into a fresh replacement.
1470
- if (diff.action === "update" || diff.action === "noop") {
1471
- // we can continue where we left off
1472
- return Node<Update>({
1473
- action: "update",
1474
- props: applyProps,
1475
- state: oldState,
1476
- });
1477
- } else {
1478
- // we started to update a resource but now believe we should replace it
1479
- return Node<Replace>({
1480
- action: "replace",
1481
- deleteFirst: diff.deleteFirst ?? false,
1482
- props: applyProps,
1483
- // TODO(sam): can Apply handle replacements when the oldState is UpdatingResourceState?
1484
- // -> or should we do a provider.read to try and reconcile back to UpdatedResourceState?
1485
- state: oldState,
1486
- });
1487
- }
1488
- } else if (oldState.status === "replacing") {
1489
- // The replacement candidate is still being created. Noop/update keep
1490
- // driving the same generation; replace means that candidate itself is
1491
- // now obsolete and must be wrapped in a new outer generation.
1492
- if (diff.action === "noop") {
1493
- // this is the stable case - noop means just continue with the replacement
1494
- return Node<Replace>({
1495
- action: "replace",
1496
- deleteFirst: oldState.deleteFirst,
1497
- props: applyProps,
1498
- state: oldState,
1499
- });
1500
- } else if (diff.action === "update") {
1501
- // potential problem here - the props have changed since we tried to replace,
1502
- // but not enough to trigger another replacement. the resource provider should
1503
- // be designed as idempotent to converge to the right state when creating the new resource
1504
- // the newly generated instanceId is intended to assist with this
1505
- return Node<Replace>({
1506
- action: "replace",
1507
- deleteFirst: oldState.deleteFirst,
1508
- props: applyProps,
1509
- state: oldState,
1510
- });
1511
- } else {
1512
- // The in-flight replacement candidate itself now needs replacement.
1513
- // Mark this as a restart so Apply creates a fresh generation instead
1514
- // of resuming the old replacement instance.
1515
- return Node<Replace>({
1516
- restart: true,
1517
- action: "replace",
1518
- deleteFirst: diff.deleteFirst ?? oldState.deleteFirst,
1519
- props: applyProps,
1520
- state: oldState,
1521
- });
1522
- }
1523
- } else if (oldState.status === "replaced") {
1524
- // The new resource already exists. Noop means "just let GC finish",
1525
- // update means "mutate the current replacement before GC finishes",
1526
- // and replace means "the current replacement also became obsolete".
1527
- if (diff.action === "noop") {
1528
- // this is the stable case - noop means just continue cleaning up the replacement
1529
- return Node<Replace>({
1530
- action: "replace",
1531
- deleteFirst: oldState.deleteFirst,
1532
- props: applyProps,
1533
- state: oldState,
1534
- });
1535
- } else if (diff.action === "update") {
1536
- // the replacement has been created but now also needs to be updated
1537
- // the resource provider should:
1538
- // 1. Update the newly created replacement resource
1539
- // 2. Then proceed as normal to delete the replaced resources (after all downstream references are updated)
1540
- return Node<Update>({
1541
- action: "update",
1542
- props: applyProps,
1543
- state: oldState,
1544
- });
1545
- } else {
1546
- // Cleanup is still pending, but the current "new" resource has already
1547
- // become obsolete. Start another replacement generation and preserve
1548
- // the existing replaced node as part of the recursive old chain.
1549
- return Node<Replace>({
1550
- restart: true,
1551
- action: "replace",
1552
- deleteFirst: diff.deleteFirst ?? oldState.deleteFirst,
1553
- props: applyProps,
1554
- state: oldState,
1555
- });
1556
- }
1557
- } else if (oldState.status === "deleting") {
1558
- // we're in a partially deleted state, it is unclear whether it was or was not deleted
1559
- // so continue by re-creating it with the same instanceId and desired props
1560
- return Node<Create>({
1561
- action: "create",
1562
- props: applyProps,
1563
- state: {
1564
- ...oldState,
1565
- status: "creating",
1566
- props: news,
1567
- },
1568
- });
1569
- } else if (diff.action === "update") {
1570
- // Stable created/updated resources follow the normal CRUD mapping.
1571
- return Node<Update>({
1572
- action: "update",
1573
- adopting: forceUpdateAfterAdoption,
1574
- props: applyProps,
1575
- state: oldState,
1576
- });
1577
- } else if (diff.action === "replace") {
1578
- return Node<Replace>({
1579
- action: "replace",
1580
- props: applyProps,
1581
- state: oldState,
1582
- deleteFirst: diff?.deleteFirst ?? false,
1583
- });
1584
- } else {
1585
- return Node<NoopUpdate>({
1586
- action: "noop",
1587
- state: oldState,
1588
- });
1589
- }
1590
- }),
1591
- ),
1592
- { concurrency: "unbounded" },
1593
- )).map((update) => [update.resource.FQN, update]),
1704
+ // Every diff runs to completion and every failure is reported. With
1705
+ // fail-fast `Effect.all`, the first exit to arrive wins the aggregate
1706
+ // cause — and when a diff is cancelled by a sibling's failure (or ends
1707
+ // interrupt-only for any other reason) that can be a bare interruption,
1708
+ // hiding the InvalidReferenceError or provider error that actually
1709
+ // broke the plan.
1710
+ const diffExits = yield* Effect.all(
1711
+ resources.map((resource) =>
1712
+ Effect.exit(Effect.tap(diffResource(resource), resourcePlanned)),
1713
+ ),
1714
+ { concurrency: "unbounded" },
1715
+ );
1716
+ const diffFailures = diffExits.filter(Exit.isFailure);
1717
+ if (diffFailures.length > 0) {
1718
+ const reasons = diffFailures.flatMap((exit) => exit.cause.reasons);
1719
+ const failures = reasons.filter(
1720
+ (reason) => !Cause.isInterruptReason(reason),
1721
+ );
1722
+ return yield* Effect.failCause(
1723
+ Cause.fromReasons(failures.length > 0 ? failures : reasons),
1724
+ );
1725
+ }
1726
+ const resourceGraph = Object.fromEntries(
1727
+ diffExits
1728
+ .filter(Exit.isSuccess)
1729
+ .map((exit) => [exit.value.resource.FQN, exit.value]),
1594
1730
  ) as Plan["resources"];
1595
1731
 
1596
1732
  // ── Action plan nodes ────────────────────────────────────────────────
1597
- const actionGraph = Object.fromEntries(
1598
- (yield* Effect.all(
1599
- actions.map(
1600
- Effect.fn("plan.diff.action")(function* (action) {
1601
- const fqn = action.FQN;
1602
- const downstream = newDownstreamDependencies[fqn] ?? [];
1603
- // The node carries the RAW input expression (evaluated at apply);
1604
- // the drift hash uses the diff-facing view so stable upstream
1605
- // attributes hash as their known values.
1606
- const resolvedInput = materializeStableRefs(
1607
- yield* resolveInput(action.Input),
1608
- );
1609
- const inputHash = yield* hashInput(resolvedInput);
1610
- const oldState = yield* state.get({
1611
- stack: stackName,
1612
- stage,
1613
- fqn,
1614
- });
1733
+ // Per-action plan progress, mirroring the resource pass.
1734
+ const actionCount = yield* Ref.make(0);
1735
+ const actionPlanned = (entry: readonly [string, ActionApply]) =>
1736
+ Ref.updateAndGet(actionCount, (count) => count + 1).pipe(
1737
+ Effect.flatMap((completed) =>
1738
+ reportPlanned({
1739
+ _tag: "plan.action.completed",
1740
+ ...describeAction(entry[1]),
1741
+ completed,
1742
+ total: actions.length,
1743
+ }),
1744
+ ),
1745
+ );
1615
1746
 
1616
- if (oldState && !isActionState(oldState)) {
1617
- // FQN collision with a resource — surface as a fatal error so
1618
- // the user resolves it before we touch anything.
1619
- return [
1620
- fqn,
1621
- {
1622
- kind: "action",
1623
- action: "run",
1624
- def: action,
1625
- input: action.Input,
1626
- state: undefined,
1627
- downstream,
1628
- forced: false,
1629
- } satisfies ActionRun,
1630
- ] as const;
1631
- }
1747
+ const diffAction = Effect.fn("plan.diff.action")(function* (
1748
+ action: ActionLike,
1749
+ ) {
1750
+ const fqn = action.FQN;
1751
+ const downstream = newDownstreamDependencies[fqn] ?? [];
1752
+ // The node carries the RAW input expression (evaluated at apply);
1753
+ // the drift hash uses the diff-facing view so stable upstream
1754
+ // attributes hash as their known values.
1755
+ const resolvedInput = materializeStableRefs(
1756
+ yield* resolveInput(action.Input),
1757
+ );
1758
+ const inputHash = yield* hashInput(resolvedInput);
1759
+ const oldState = yield* state.get({
1760
+ stack: stackName,
1761
+ stage,
1762
+ fqn,
1763
+ });
1632
1764
 
1633
- const prior = oldState as ActionState | undefined;
1634
- const sameInput =
1635
- prior?.status === "ran" && prior.inputHash === inputHash;
1636
- if (sameInput && !options.force) {
1637
- return [
1638
- fqn,
1639
- {
1640
- kind: "action",
1641
- action: "noop",
1642
- def: action,
1643
- state: prior as RanActionState,
1644
- downstream,
1645
- } satisfies ActionNoop,
1646
- ] as const;
1647
- }
1648
- return [
1649
- fqn,
1650
- {
1651
- kind: "action",
1652
- action: "run",
1653
- def: action,
1654
- input: action.Input,
1655
- state: prior,
1656
- downstream,
1657
- forced: !!options.force,
1658
- } satisfies ActionRun,
1659
- ] as const;
1660
- }),
1765
+ if (oldState && !isActionState(oldState)) {
1766
+ // FQN collision with a resource — surface as a fatal error so
1767
+ // the user resolves it before we touch anything.
1768
+ return [
1769
+ fqn,
1770
+ {
1771
+ kind: "action",
1772
+ action: "run",
1773
+ def: action,
1774
+ input: action.Input,
1775
+ state: undefined,
1776
+ downstream,
1777
+ forced: false,
1778
+ } satisfies ActionRun,
1779
+ ] as const;
1780
+ }
1781
+
1782
+ const prior = oldState as ActionState | undefined;
1783
+ const sameInput =
1784
+ prior?.status === "ran" && prior.inputHash === inputHash;
1785
+ if (sameInput && !options.force) {
1786
+ return [
1787
+ fqn,
1788
+ {
1789
+ kind: "action",
1790
+ action: "noop",
1791
+ def: action,
1792
+ state: prior as RanActionState,
1793
+ downstream,
1794
+ } satisfies ActionNoop,
1795
+ ] as const;
1796
+ }
1797
+ return [
1798
+ fqn,
1799
+ {
1800
+ kind: "action",
1801
+ action: "run",
1802
+ def: action,
1803
+ input: action.Input,
1804
+ state: prior,
1805
+ downstream,
1806
+ forced: !!options.force,
1807
+ } satisfies ActionRun,
1808
+ ] as const;
1809
+ });
1810
+
1811
+ const actionGraph = Object.fromEntries(
1812
+ (yield* Effect.all(
1813
+ actions.map((action) =>
1814
+ diffAction(action).pipe(Effect.tap(actionPlanned)),
1661
1815
  ),
1662
1816
  { concurrency: "unbounded" },
1663
1817
  )) as ReadonlyArray<readonly [string, ActionApply]>,
@@ -1680,8 +1834,7 @@ export const make = <A>(
1680
1834
  const createReplaceNodes = new Set(
1681
1835
  Object.entries(resourceGraph)
1682
1836
  .filter(
1683
- ([_, node]) =>
1684
- node.action === "create" || node.action === "replace",
1837
+ ([, node]) => node.action === "create" || node.action === "replace",
1685
1838
  )
1686
1839
  .map(([fqn]) => fqn),
1687
1840
  );
@@ -1730,138 +1883,191 @@ export const make = <A>(
1730
1883
  }
1731
1884
  }
1732
1885
 
1886
+ // Both orphan passes (task rows below, resource rows further down)
1887
+ // examine every persisted row of this stack instance.
1888
+ const persistedFqns = yield* state.list({ stack: stackName, stage });
1889
+
1890
+ // Orphan progress mirrors the diff passes: every persisted row is
1891
+ // examined, but only rows that actually become deletion nodes are
1892
+ // reported — `completed` tracks examination so progress stays monotonic.
1893
+ const actionExaminedCount = yield* Ref.make(0);
1894
+ const actionDeletionPlanned = (
1895
+ entry: readonly [string, ActionDelete] | undefined,
1896
+ ) =>
1897
+ Ref.updateAndGet(actionExaminedCount, (count) => count + 1).pipe(
1898
+ Effect.flatMap((completed) =>
1899
+ entry === undefined
1900
+ ? Effect.void
1901
+ : reportPlanned({
1902
+ _tag: "plan.action.completed",
1903
+ ...describeAction(entry[1]),
1904
+ completed,
1905
+ total: persistedFqns.length,
1906
+ }),
1907
+ ),
1908
+ );
1909
+
1733
1910
  // Task deletions: state rows previously written by tasks that no
1734
1911
  // longer appear in the stack. The body is NOT invoked — we just drop
1735
1912
  // the row.
1913
+ const diffActionDeletion = Effect.fn("plan.diff.actionDeletion")(function* (
1914
+ fqn: string,
1915
+ ) {
1916
+ if (newActionFqns.has(fqn) || newResourceFqns.has(fqn)) return;
1917
+ const persisted = yield* state.get({
1918
+ stack: stackName,
1919
+ stage,
1920
+ fqn,
1921
+ });
1922
+ if (!isActionState(persisted)) return;
1923
+ const { logicalId } = parseFqn(fqn);
1924
+ return [
1925
+ fqn,
1926
+ {
1927
+ kind: "action",
1928
+ action: "delete",
1929
+ state: persisted,
1930
+ downstream: persisted.downstream ?? [],
1931
+ def: {
1932
+ Kind: "action",
1933
+ Namespace: persisted.namespace,
1934
+ FQN: fqn,
1935
+ LogicalId: logicalId,
1936
+ Type: persisted.actionType,
1937
+ Input: persisted.input,
1938
+ Captures: {},
1939
+ Run: () => undefined as any,
1940
+ Output: undefined as any,
1941
+ } satisfies ActionLike,
1942
+ } satisfies ActionDelete,
1943
+ ] as const;
1944
+ });
1945
+
1736
1946
  const actionDeletions: Plan["actionDeletions"] = Object.fromEntries(
1737
1947
  (yield* Effect.all(
1738
- (yield* state.list({ stack: stackName, stage })).map(
1739
- Effect.fn("plan.diff.actionDeletion")(function* (fqn) {
1740
- if (newActionFqns.has(fqn) || newResourceFqns.has(fqn)) return;
1741
- const persisted = yield* state.get({
1742
- stack: stackName,
1743
- stage,
1744
- fqn,
1745
- });
1746
- if (!isActionState(persisted)) return;
1747
- const { logicalId } = parseFqn(fqn);
1748
- return [
1749
- fqn,
1750
- {
1751
- kind: "action",
1752
- action: "delete",
1753
- state: persisted,
1754
- downstream: persisted.downstream ?? [],
1755
- def: {
1756
- Kind: "action",
1757
- Namespace: persisted.namespace,
1758
- FQN: fqn,
1759
- LogicalId: logicalId,
1760
- Type: persisted.actionType,
1761
- Input: persisted.input,
1762
- Captures: {},
1763
- Run: () => undefined as any,
1764
- Output: undefined as any,
1765
- } satisfies ActionLike,
1766
- } satisfies ActionDelete,
1767
- ] as const;
1768
- }),
1948
+ persistedFqns.map((fqn) =>
1949
+ diffActionDeletion(fqn).pipe(
1950
+ Effect.tap((entry) => actionDeletionPlanned(entry ?? undefined)),
1951
+ ),
1769
1952
  ),
1770
1953
  { concurrency: "unbounded" },
1771
1954
  )).filter((v): v is NonNullable<typeof v> => !!v),
1772
1955
  );
1773
1956
 
1957
+ // Deletion progress mirrors the resource pass: every persisted row is
1958
+ // examined, but only rows that actually become deletion nodes are
1959
+ // reported — `completed` tracks examination so progress stays monotonic.
1960
+ const deletionCandidates = persistedFqns;
1961
+ const examinedCount = yield* Ref.make(0);
1962
+ const deletionPlanned = (entry: readonly [string, Delete] | undefined) =>
1963
+ Ref.updateAndGet(examinedCount, (count) => count + 1).pipe(
1964
+ Effect.flatMap((completed) =>
1965
+ entry === undefined
1966
+ ? Effect.void
1967
+ : reportPlanned({
1968
+ _tag: "plan.resource.completed",
1969
+ ...describeResource(entry[1]),
1970
+ completed,
1971
+ total: deletionCandidates.length,
1972
+ }),
1973
+ ),
1974
+ );
1975
+
1976
+ const diffDeletion = Effect.fn("plan.diff.deletion")(function* (
1977
+ fqn: string,
1978
+ ) {
1979
+ if (newResourceFqns.has(fqn) || newActionFqns.has(fqn)) {
1980
+ return;
1981
+ }
1982
+ const persisted = yield* state.get({
1983
+ stack: stackName,
1984
+ stage: stage,
1985
+ fqn,
1986
+ });
1987
+ // Tasks are routed through `actionDeletions` above.
1988
+ if (isActionState(persisted)) return;
1989
+ const oldState = persisted as ResourceState | undefined;
1990
+ if (oldState) {
1991
+ // A row being migrated by a rename (`renameMigrations`) is
1992
+ // moving, not orphaned — apply drops it state-only after
1993
+ // committing the migrated row at its new FQN. Rows at former
1994
+ // FQNs that did NOT migrate (foreign type, different
1995
+ // instanceId, unclaimed) are absent from this set and fall
1996
+ // through to normal orphan deletion.
1997
+ if (migratedRowFqns.has(fqn)) {
1998
+ return;
1999
+ }
2000
+ const { logicalId } = parseFqn(fqn);
2001
+ const resourceType = oldState.resourceType;
2002
+ // A "zombie" row references a type with no registered provider
2003
+ // (removed from the program, or renamed without an alias).
2004
+ // That is fatal: the program and state disagree, and without
2005
+ // the provider the row's physical resource cannot be deleted
2006
+ // anyway. Die at plan time with a typed error naming the row
2007
+ // and the remediation instead of limping into a partial apply.
2008
+ //
2009
+ // Orphan deletes resolve the provider variant for the mode
2010
+ // that created the row (`providerMode`, or the `dev:` marker
2011
+ // inference for legacy unstamped rows), so e.g. a local dev
2012
+ // worker's row is deleted by the local provider even during a
2013
+ // live deploy — and vice versa. Unstamped rows are physically
2014
+ // live unless their attrs carry the marker (see stampedMode),
2015
+ // never the run default.
2016
+ const rowMode = stampedMode(oldState);
2017
+ const providerOption = yield* tryFindProviderByType(
2018
+ resourceType,
2019
+ rowMode,
2020
+ );
2021
+ if (Option.isNone(providerOption)) {
2022
+ return yield* Effect.die(missingProviderError(resourceType, fqn));
2023
+ }
2024
+ const provider = providerOption.value;
2025
+ // NOTE: an attr-less row (interrupted create) is NOT recovered
2026
+ // here. Apply's `deleteResource` performs the authoritative
2027
+ // read-then-delete recovery — it also covers replaced-chain
2028
+ // old generations that never pass through plan, and routes
2029
+ // `Unowned` results away from `provider.delete`.
2030
+ return [
2031
+ fqn,
2032
+ {
2033
+ action: oldState.removalPolicy === "retain" ? "orphaned" : "delete",
2034
+ state: oldState,
2035
+ provider: provider,
2036
+ mode: oldState.providerMode,
2037
+ resource: {
2038
+ Namespace: oldState.namespace,
2039
+ FQN: fqn,
2040
+ LogicalId: logicalId,
2041
+ Type: oldState.resourceType,
2042
+ Attributes: oldState.attr,
2043
+ Props: oldState.props,
2044
+ Binding: undefined!,
2045
+ Provider: Provider(resourceType),
2046
+ RemovalPolicy: oldState.removalPolicy,
2047
+ Adopt: undefined,
2048
+ RequiresImplementation: undefined,
2049
+ Mode: oldState.providerMode,
2050
+ FormerFqns: undefined,
2051
+ RuntimeContext: undefined!,
2052
+ Providers: undefined,
2053
+ } as ResourceLike,
2054
+ downstream: oldDownstreamDependencies[fqn] ?? [],
2055
+ bindings: oldState.bindings.map((binding) => ({
2056
+ sid: binding.sid,
2057
+ action: "delete" as const,
2058
+ data: binding.data,
2059
+ })),
2060
+ } satisfies Delete,
2061
+ ] as const;
2062
+ }
2063
+ });
2064
+
1774
2065
  const deletions = Object.fromEntries(
1775
2066
  (yield* Effect.all(
1776
- (yield* state.list({ stack: stackName, stage: stage })).map(
1777
- Effect.fn("plan.diff.deletion")(function* (fqn) {
1778
- if (newResourceFqns.has(fqn) || newActionFqns.has(fqn)) {
1779
- return;
1780
- }
1781
- const persisted = yield* state.get({
1782
- stack: stackName,
1783
- stage: stage,
1784
- fqn,
1785
- });
1786
- // Tasks are routed through `actionDeletions` above.
1787
- if (isActionState(persisted)) return;
1788
- const oldState = persisted as ResourceState | undefined;
1789
- if (oldState) {
1790
- // A row being migrated by a rename (`renameMigrations`) is
1791
- // moving, not orphaned — apply drops it state-only after
1792
- // committing the migrated row at its new FQN. Rows at former
1793
- // FQNs that did NOT migrate (foreign type, different
1794
- // instanceId, unclaimed) are absent from this set and fall
1795
- // through to normal orphan deletion.
1796
- if (migratedRowFqns.has(fqn)) {
1797
- return;
1798
- }
1799
- const { logicalId } = parseFqn(fqn);
1800
- const resourceType = oldState.resourceType;
1801
- // A "zombie" row references a type with no registered provider
1802
- // (removed from the program, or renamed without an alias).
1803
- // That is fatal: the program and state disagree, and without
1804
- // the provider the row's physical resource cannot be deleted
1805
- // anyway. Die at plan time with a typed error naming the row
1806
- // and the remediation instead of limping into a partial apply.
1807
- //
1808
- // Orphan deletes resolve the provider variant for the mode
1809
- // that created the row (`providerMode`, or the `dev:` marker
1810
- // inference for legacy unstamped rows), so e.g. a local dev
1811
- // worker's row is deleted by the local provider even during a
1812
- // live deploy — and vice versa. Unstamped rows are physically
1813
- // live unless their attrs carry the marker (see stampedMode),
1814
- // never the run default.
1815
- const rowMode = stampedMode(oldState);
1816
- const providerOption = yield* tryFindProviderByType(
1817
- resourceType,
1818
- rowMode,
1819
- );
1820
- if (Option.isNone(providerOption)) {
1821
- return yield* Effect.die(
1822
- missingProviderError(resourceType, fqn),
1823
- );
1824
- }
1825
- const provider = providerOption.value;
1826
- // NOTE: an attr-less row (interrupted create) is NOT recovered
1827
- // here. Apply's `deleteResource` performs the authoritative
1828
- // read-then-delete recovery — it also covers replaced-chain
1829
- // old generations that never pass through plan, and routes
1830
- // `Unowned` results away from `provider.delete`.
1831
- return [
1832
- fqn,
1833
- {
1834
- action: "delete",
1835
- state: oldState,
1836
- provider: provider,
1837
- mode: oldState.providerMode,
1838
- resource: {
1839
- Namespace: oldState.namespace,
1840
- FQN: fqn,
1841
- LogicalId: logicalId,
1842
- Type: oldState.resourceType,
1843
- Attributes: oldState.attr,
1844
- Props: oldState.props,
1845
- Binding: undefined!,
1846
- Provider: Provider(resourceType),
1847
- RemovalPolicy: oldState.removalPolicy,
1848
- Adopt: undefined,
1849
- RequiresImplementation: undefined,
1850
- Mode: oldState.providerMode,
1851
- FormerFqns: undefined,
1852
- RuntimeContext: undefined!,
1853
- Providers: undefined,
1854
- } as ResourceLike,
1855
- downstream: oldDownstreamDependencies[fqn] ?? [],
1856
- bindings: oldState.bindings.map((binding) => ({
1857
- sid: binding.sid,
1858
- action: "delete" as const,
1859
- data: binding.data,
1860
- })),
1861
- } satisfies Delete,
1862
- ] as const;
1863
- }
1864
- }),
2067
+ deletionCandidates.map((fqn) =>
2068
+ diffDeletion(fqn).pipe(
2069
+ Effect.tap((entry) => deletionPlanned(entry ?? undefined)),
2070
+ ),
1865
2071
  ),
1866
2072
  { concurrency: "unbounded" },
1867
2073
  )).filter((v) => !!v),
@@ -1893,6 +2099,8 @@ export const make = <A>(
1893
2099
  defaultMode: runDefaultMode,
1894
2100
  } satisfies Plan<A> as Plan<A>;
1895
2101
  }).pipe(
2102
+ // Owns the memoized resolutions' fibers for the plan's duration.
2103
+ Effect.scoped,
1896
2104
  ensureArtifactStore,
1897
2105
  Effect.withSpan("plan.make", {
1898
2106
  attributes: {
@@ -1991,8 +2199,12 @@ export const printPlan = (plan: Plan): string => {
1991
2199
  return "+";
1992
2200
  case "update":
1993
2201
  return "~";
2202
+ case "adopted":
2203
+ return "(+)";
1994
2204
  case "delete":
1995
2205
  return "-";
2206
+ case "orphaned":
2207
+ return "(-)";
1996
2208
  case "replace":
1997
2209
  return "±";
1998
2210
  case "noop":