@vibesdotdev/infra-core 0.0.1 → 1.0.0-rc.4

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 (320) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +33 -63
  3. package/dist/bootstrap/seed.descriptor.d.ts +1 -1
  4. package/dist/bootstrap/seed.descriptor.d.ts.map +1 -1
  5. package/dist/bootstrap/seed.descriptor.js +1 -1
  6. package/dist/bootstrap/seed.descriptor.js.map +1 -1
  7. package/dist/bootstrap/seed.impl-shape.d.ts +1 -1
  8. package/dist/bootstrap/seed.impl-shape.d.ts.map +1 -1
  9. package/dist/bootstrap/seed.kind.d.ts +1 -3
  10. package/dist/bootstrap/seed.kind.d.ts.map +1 -1
  11. package/dist/bootstrap/seed.kind.js +17 -4
  12. package/dist/bootstrap/seed.kind.js.map +1 -1
  13. package/dist/bootstrap/seed.runner.d.ts +9 -2
  14. package/dist/bootstrap/seed.runner.d.ts.map +1 -1
  15. package/dist/bootstrap/seed.runner.js +37 -18
  16. package/dist/bootstrap/seed.runner.js.map +1 -1
  17. package/dist/capped-id.d.ts +19 -0
  18. package/dist/capped-id.d.ts.map +1 -0
  19. package/dist/capped-id.js +64 -0
  20. package/dist/capped-id.js.map +1 -0
  21. package/dist/cli/generate/artifact/artifact.cli-command.descriptor.d.ts +23 -0
  22. package/dist/cli/generate/artifact/artifact.cli-command.descriptor.d.ts.map +1 -0
  23. package/dist/cli/generate/artifact/artifact.cli-command.descriptor.js +33 -0
  24. package/dist/cli/generate/artifact/artifact.cli-command.descriptor.js.map +1 -0
  25. package/dist/cli/generate/artifact/artifact.cli-command.impl.d.ts +24 -0
  26. package/dist/cli/generate/artifact/artifact.cli-command.impl.d.ts.map +1 -0
  27. package/dist/cli/generate/artifact/artifact.cli-command.impl.js +73 -0
  28. package/dist/cli/generate/artifact/artifact.cli-command.impl.js.map +1 -0
  29. package/dist/cli/generate/context.d.ts +17 -0
  30. package/dist/cli/generate/context.d.ts.map +1 -0
  31. package/dist/cli/generate/context.js +24 -0
  32. package/dist/cli/generate/context.js.map +1 -0
  33. package/dist/cli/generate/generate/generate.cli-command.descriptor.d.ts +30 -0
  34. package/dist/cli/generate/generate/generate.cli-command.descriptor.d.ts.map +1 -0
  35. package/dist/cli/generate/generate/generate.cli-command.descriptor.js +25 -0
  36. package/dist/cli/generate/generate/generate.cli-command.descriptor.js.map +1 -0
  37. package/dist/cli/generate/generate/generate.cli-command.impl.d.ts +25 -0
  38. package/dist/cli/generate/generate/generate.cli-command.impl.d.ts.map +1 -0
  39. package/dist/cli/generate/generate/generate.cli-command.impl.js +64 -0
  40. package/dist/cli/generate/generate/generate.cli-command.impl.js.map +1 -0
  41. package/dist/cli/generate/generate-core.d.ts +51 -0
  42. package/dist/cli/generate/generate-core.d.ts.map +1 -0
  43. package/dist/cli/generate/generate-core.js +172 -0
  44. package/dist/cli/generate/generate-core.js.map +1 -0
  45. package/dist/cli/generate/index.d.ts +5 -0
  46. package/dist/cli/generate/index.d.ts.map +1 -0
  47. package/dist/cli/generate/index.js +5 -0
  48. package/dist/cli/generate/index.js.map +1 -0
  49. package/dist/credentials/resolve.d.ts +82 -22
  50. package/dist/credentials/resolve.d.ts.map +1 -1
  51. package/dist/credentials/resolve.js +251 -77
  52. package/dist/credentials/resolve.js.map +1 -1
  53. package/dist/deployment-environment.d.ts +30 -0
  54. package/dist/deployment-environment.d.ts.map +1 -0
  55. package/dist/deployment-environment.js +53 -0
  56. package/dist/deployment-environment.js.map +1 -0
  57. package/dist/deployment.d.ts +8 -4
  58. package/dist/deployment.d.ts.map +1 -1
  59. package/dist/deployment.js +30 -0
  60. package/dist/deployment.js.map +1 -1
  61. package/dist/doks/cloud/base.d.ts +49 -0
  62. package/dist/doks/cloud/base.d.ts.map +1 -0
  63. package/dist/doks/cloud/base.js +138 -0
  64. package/dist/doks/cloud/base.js.map +1 -0
  65. package/dist/doks/cloud/factory.d.ts +18 -0
  66. package/dist/doks/cloud/factory.d.ts.map +1 -0
  67. package/dist/doks/cloud/factory.js +22 -0
  68. package/dist/doks/cloud/factory.js.map +1 -0
  69. package/dist/doks/cloud/index.d.ts +5 -0
  70. package/dist/doks/cloud/index.d.ts.map +1 -0
  71. package/dist/doks/cloud/index.js +4 -0
  72. package/dist/doks/cloud/index.js.map +1 -0
  73. package/dist/doks/types.d.ts +95 -0
  74. package/dist/doks/types.d.ts.map +1 -0
  75. package/dist/doks/types.js +14 -0
  76. package/dist/doks/types.js.map +1 -0
  77. package/dist/generate/index.d.ts +29 -0
  78. package/dist/generate/index.d.ts.map +1 -0
  79. package/dist/generate/index.js +28 -0
  80. package/dist/generate/index.js.map +1 -0
  81. package/dist/generate/infra-generate.plugin.d.ts +3 -0
  82. package/dist/generate/infra-generate.plugin.d.ts.map +1 -0
  83. package/dist/generate/infra-generate.plugin.js +23 -0
  84. package/dist/generate/infra-generate.plugin.js.map +1 -0
  85. package/dist/generate/plugin.d.ts +2 -0
  86. package/dist/generate/plugin.d.ts.map +1 -0
  87. package/dist/generate/plugin.js +2 -0
  88. package/dist/generate/plugin.js.map +1 -0
  89. package/dist/heartbeat/cron-heartbeat.d.ts +97 -0
  90. package/dist/heartbeat/cron-heartbeat.d.ts.map +1 -0
  91. package/dist/heartbeat/cron-heartbeat.js +200 -0
  92. package/dist/heartbeat/cron-heartbeat.js.map +1 -0
  93. package/dist/index.d.ts +34 -20
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +28 -14
  96. package/dist/index.js.map +1 -1
  97. package/dist/infra.plugin.d.ts +1 -1
  98. package/dist/infra.plugin.d.ts.map +1 -1
  99. package/dist/infra.plugin.js +62 -12
  100. package/dist/infra.plugin.js.map +1 -1
  101. package/dist/kinds/alerts.kind.d.ts +64 -25
  102. package/dist/kinds/alerts.kind.d.ts.map +1 -1
  103. package/dist/kinds/alerts.kind.js +43 -16
  104. package/dist/kinds/alerts.kind.js.map +1 -1
  105. package/dist/kinds/artifact.kind.d.ts +58 -10
  106. package/dist/kinds/artifact.kind.d.ts.map +1 -1
  107. package/dist/kinds/artifact.kind.js +26 -9
  108. package/dist/kinds/artifact.kind.js.map +1 -1
  109. package/dist/kinds/billing.kind.d.ts +88 -0
  110. package/dist/kinds/billing.kind.d.ts.map +1 -0
  111. package/dist/kinds/billing.kind.js +48 -0
  112. package/dist/kinds/billing.kind.js.map +1 -0
  113. package/dist/kinds/build-job.kind.d.ts +381 -0
  114. package/dist/kinds/build-job.kind.d.ts.map +1 -0
  115. package/dist/kinds/build-job.kind.js +216 -0
  116. package/dist/kinds/build-job.kind.js.map +1 -0
  117. package/dist/kinds/cache.kind.d.ts +39 -92
  118. package/dist/kinds/cache.kind.d.ts.map +1 -1
  119. package/dist/kinds/cache.kind.js +26 -51
  120. package/dist/kinds/cache.kind.js.map +1 -1
  121. package/dist/kinds/cluster.kind.d.ts +154 -0
  122. package/dist/kinds/cluster.kind.d.ts.map +1 -0
  123. package/dist/kinds/cluster.kind.js +99 -0
  124. package/dist/kinds/cluster.kind.js.map +1 -0
  125. package/dist/kinds/compute-source.kind.d.ts +138 -0
  126. package/dist/kinds/compute-source.kind.d.ts.map +1 -0
  127. package/dist/kinds/compute-source.kind.js +145 -0
  128. package/dist/kinds/compute-source.kind.js.map +1 -0
  129. package/dist/kinds/compute-sources.descriptors.d.ts +45 -0
  130. package/dist/kinds/compute-sources.descriptors.d.ts.map +1 -0
  131. package/dist/kinds/compute-sources.descriptors.js +93 -0
  132. package/dist/kinds/compute-sources.descriptors.js.map +1 -0
  133. package/dist/kinds/container-registry.kind.d.ts +62 -0
  134. package/dist/kinds/container-registry.kind.d.ts.map +1 -0
  135. package/dist/kinds/container-registry.kind.js +47 -0
  136. package/dist/kinds/container-registry.kind.js.map +1 -0
  137. package/dist/kinds/database-migrator.kind.d.ts +6 -0
  138. package/dist/kinds/database-migrator.kind.d.ts.map +1 -0
  139. package/dist/kinds/database-migrator.kind.js +28 -0
  140. package/dist/kinds/database-migrator.kind.js.map +1 -0
  141. package/dist/kinds/database.kind.d.ts +114 -93
  142. package/dist/kinds/database.kind.d.ts.map +1 -1
  143. package/dist/kinds/database.kind.js +93 -54
  144. package/dist/kinds/database.kind.js.map +1 -1
  145. package/dist/kinds/deployment-provider.kind.d.ts +5 -0
  146. package/dist/kinds/deployment-provider.kind.d.ts.map +1 -0
  147. package/dist/kinds/deployment-provider.kind.js +11 -0
  148. package/dist/kinds/deployment-provider.kind.js.map +1 -0
  149. package/dist/kinds/discovery.d.ts +5 -12
  150. package/dist/kinds/discovery.d.ts.map +1 -1
  151. package/dist/kinds/discovery.js +5 -17
  152. package/dist/kinds/discovery.js.map +1 -1
  153. package/dist/kinds/dns.kind.d.ts +162 -0
  154. package/dist/kinds/dns.kind.d.ts.map +1 -0
  155. package/dist/kinds/dns.kind.js +54 -0
  156. package/dist/kinds/dns.kind.js.map +1 -0
  157. package/dist/kinds/drift.kind.d.ts +115 -0
  158. package/dist/kinds/drift.kind.d.ts.map +1 -0
  159. package/dist/kinds/drift.kind.js +60 -0
  160. package/dist/kinds/drift.kind.js.map +1 -0
  161. package/dist/kinds/edge-tls.kind.d.ts +194 -0
  162. package/dist/kinds/edge-tls.kind.d.ts.map +1 -0
  163. package/dist/kinds/edge-tls.kind.js +58 -0
  164. package/dist/kinds/edge-tls.kind.js.map +1 -0
  165. package/dist/kinds/firewall.kind.d.ts +92 -0
  166. package/dist/kinds/firewall.kind.d.ts.map +1 -0
  167. package/dist/kinds/firewall.kind.js +59 -0
  168. package/dist/kinds/firewall.kind.js.map +1 -0
  169. package/dist/kinds/git-hosting.kind.d.ts +36 -38
  170. package/dist/kinds/git-hosting.kind.d.ts.map +1 -1
  171. package/dist/kinds/git-hosting.kind.js +23 -34
  172. package/dist/kinds/git-hosting.kind.js.map +1 -1
  173. package/dist/kinds/index.d.ts +40 -15
  174. package/dist/kinds/index.d.ts.map +1 -1
  175. package/dist/kinds/index.js +39 -14
  176. package/dist/kinds/index.js.map +1 -1
  177. package/dist/kinds/inventory.kind.d.ts +326 -0
  178. package/dist/kinds/inventory.kind.d.ts.map +1 -0
  179. package/dist/kinds/inventory.kind.js +188 -0
  180. package/dist/kinds/inventory.kind.js.map +1 -0
  181. package/dist/kinds/load-balancer.kind.d.ts +135 -0
  182. package/dist/kinds/load-balancer.kind.d.ts.map +1 -0
  183. package/dist/kinds/load-balancer.kind.js +71 -0
  184. package/dist/kinds/load-balancer.kind.js.map +1 -0
  185. package/dist/kinds/logs.kind.d.ts +74 -3
  186. package/dist/kinds/logs.kind.d.ts.map +1 -1
  187. package/dist/kinds/logs.kind.js +26 -17
  188. package/dist/kinds/logs.kind.js.map +1 -1
  189. package/dist/kinds/nfs.kind.d.ts +67 -0
  190. package/dist/kinds/nfs.kind.d.ts.map +1 -0
  191. package/dist/kinds/nfs.kind.js +45 -0
  192. package/dist/kinds/nfs.kind.js.map +1 -0
  193. package/dist/kinds/node-pool.kind.d.ts +134 -0
  194. package/dist/kinds/node-pool.kind.d.ts.map +1 -0
  195. package/dist/kinds/node-pool.kind.js +88 -0
  196. package/dist/kinds/node-pool.kind.js.map +1 -0
  197. package/dist/kinds/object-storage.kind.d.ts +50 -24
  198. package/dist/kinds/object-storage.kind.d.ts.map +1 -1
  199. package/dist/kinds/object-storage.kind.js +40 -23
  200. package/dist/kinds/object-storage.kind.js.map +1 -1
  201. package/dist/kinds/observability.kind.d.ts +104 -6
  202. package/dist/kinds/observability.kind.d.ts.map +1 -1
  203. package/dist/kinds/observability.kind.js +67 -9
  204. package/dist/kinds/observability.kind.js.map +1 -1
  205. package/dist/kinds/package-registry.kind.d.ts +27 -31
  206. package/dist/kinds/package-registry.kind.d.ts.map +1 -1
  207. package/dist/kinds/package-registry.kind.js +13 -26
  208. package/dist/kinds/package-registry.kind.js.map +1 -1
  209. package/dist/kinds/queue.kind.d.ts +67 -63
  210. package/dist/kinds/queue.kind.d.ts.map +1 -1
  211. package/dist/kinds/queue.kind.js +55 -33
  212. package/dist/kinds/queue.kind.js.map +1 -1
  213. package/dist/kinds/read-descriptor.d.ts +15 -0
  214. package/dist/kinds/read-descriptor.d.ts.map +1 -0
  215. package/dist/kinds/read-descriptor.js +11 -0
  216. package/dist/kinds/read-descriptor.js.map +1 -0
  217. package/dist/kinds/rum.kind.d.ts +36 -6
  218. package/dist/kinds/rum.kind.d.ts.map +1 -1
  219. package/dist/kinds/rum.kind.js +6 -7
  220. package/dist/kinds/rum.kind.js.map +1 -1
  221. package/dist/kinds/sandbox.kind.d.ts +136 -36
  222. package/dist/kinds/sandbox.kind.d.ts.map +1 -1
  223. package/dist/kinds/sandbox.kind.js +80 -34
  224. package/dist/kinds/sandbox.kind.js.map +1 -1
  225. package/dist/kinds/select-compute-source.d.ts +72 -0
  226. package/dist/kinds/select-compute-source.d.ts.map +1 -0
  227. package/dist/kinds/select-compute-source.js +170 -0
  228. package/dist/kinds/select-compute-source.js.map +1 -0
  229. package/dist/kinds/service-release.kind.d.ts +771 -0
  230. package/dist/kinds/service-release.kind.d.ts.map +1 -0
  231. package/dist/kinds/service-release.kind.js +676 -0
  232. package/dist/kinds/service-release.kind.js.map +1 -0
  233. package/dist/kinds/spend-guard.kind.d.ts +40 -0
  234. package/dist/kinds/spend-guard.kind.d.ts.map +1 -0
  235. package/dist/kinds/spend-guard.kind.js +133 -0
  236. package/dist/kinds/spend-guard.kind.js.map +1 -0
  237. package/dist/kinds/utilization.kind.d.ts +88 -0
  238. package/dist/kinds/utilization.kind.d.ts.map +1 -0
  239. package/dist/kinds/utilization.kind.js +62 -0
  240. package/dist/kinds/utilization.kind.js.map +1 -0
  241. package/dist/kinds/volume.kind.d.ts +54 -0
  242. package/dist/kinds/volume.kind.d.ts.map +1 -0
  243. package/dist/kinds/volume.kind.js +39 -0
  244. package/dist/kinds/volume.kind.js.map +1 -0
  245. package/dist/kinds/vpc.kind.d.ts +61 -0
  246. package/dist/kinds/vpc.kind.d.ts.map +1 -0
  247. package/dist/kinds/vpc.kind.js +51 -0
  248. package/dist/kinds/vpc.kind.js.map +1 -0
  249. package/dist/kinds/web-app.kind.d.ts +115 -45
  250. package/dist/kinds/web-app.kind.d.ts.map +1 -1
  251. package/dist/kinds/web-app.kind.js +69 -42
  252. package/dist/kinds/web-app.kind.js.map +1 -1
  253. package/dist/kinds/worker.kind.d.ts +291 -188
  254. package/dist/kinds/worker.kind.d.ts.map +1 -1
  255. package/dist/kinds/worker.kind.js +45 -123
  256. package/dist/kinds/worker.kind.js.map +1 -1
  257. package/dist/schemas/database-migration.d.ts +173 -0
  258. package/dist/schemas/database-migration.d.ts.map +1 -0
  259. package/dist/schemas/database-migration.js +88 -0
  260. package/dist/schemas/database-migration.js.map +1 -0
  261. package/dist/schemas/deployment-environment.d.ts +11 -0
  262. package/dist/schemas/deployment-environment.d.ts.map +1 -0
  263. package/dist/schemas/deployment-environment.js +9 -0
  264. package/dist/schemas/deployment-environment.js.map +1 -0
  265. package/dist/schemas/deployment-provider.d.ts +336 -0
  266. package/dist/schemas/deployment-provider.d.ts.map +1 -0
  267. package/dist/schemas/deployment-provider.js +198 -0
  268. package/dist/schemas/deployment-provider.js.map +1 -0
  269. package/dist/schemas/log-stream.d.ts +27 -0
  270. package/dist/schemas/log-stream.d.ts.map +1 -0
  271. package/dist/schemas/log-stream.js +31 -0
  272. package/dist/schemas/log-stream.js.map +1 -0
  273. package/dist/schemas/spend-guard.d.ts +155 -0
  274. package/dist/schemas/spend-guard.d.ts.map +1 -0
  275. package/dist/schemas/spend-guard.js +61 -0
  276. package/dist/schemas/spend-guard.js.map +1 -0
  277. package/dist/schemas.d.ts +190 -20
  278. package/dist/schemas.d.ts.map +1 -1
  279. package/dist/schemas.js +137 -31
  280. package/dist/schemas.js.map +1 -1
  281. package/dist/service.d.ts +87 -0
  282. package/dist/service.d.ts.map +1 -0
  283. package/dist/service.js +199 -0
  284. package/dist/service.js.map +1 -0
  285. package/dist/settle-work.d.ts +20 -0
  286. package/dist/settle-work.d.ts.map +1 -0
  287. package/dist/settle-work.js +22 -0
  288. package/dist/settle-work.js.map +1 -0
  289. package/dist/web-app-projection.d.ts +132 -0
  290. package/dist/web-app-projection.d.ts.map +1 -0
  291. package/dist/web-app-projection.js +93 -0
  292. package/dist/web-app-projection.js.map +1 -0
  293. package/package.json +89 -39
  294. package/SPEC.md +0 -169
  295. package/src/bootstrap/index.ts +0 -15
  296. package/src/bootstrap/seed.descriptor.ts +0 -24
  297. package/src/bootstrap/seed.impl-shape.ts +0 -5
  298. package/src/bootstrap/seed.kind.ts +0 -26
  299. package/src/bootstrap/seed.runner.ts +0 -87
  300. package/src/credentials/resolve.ts +0 -205
  301. package/src/deployment.ts +0 -57
  302. package/src/index.ts +0 -149
  303. package/src/infra.plugin.ts +0 -54
  304. package/src/kinds/alerts.kind.ts +0 -164
  305. package/src/kinds/artifact.kind.ts +0 -96
  306. package/src/kinds/cache.kind.ts +0 -104
  307. package/src/kinds/database.kind.ts +0 -120
  308. package/src/kinds/discovery.ts +0 -26
  309. package/src/kinds/git-hosting.kind.ts +0 -100
  310. package/src/kinds/index.ts +0 -139
  311. package/src/kinds/logs.kind.ts +0 -104
  312. package/src/kinds/object-storage.kind.ts +0 -101
  313. package/src/kinds/observability.kind.ts +0 -178
  314. package/src/kinds/package-registry.kind.ts +0 -95
  315. package/src/kinds/queue.kind.ts +0 -102
  316. package/src/kinds/rum.kind.ts +0 -135
  317. package/src/kinds/sandbox.kind.ts +0 -115
  318. package/src/kinds/web-app.kind.ts +0 -103
  319. package/src/kinds/worker.kind.ts +0 -203
  320. package/src/schemas.ts +0 -127
@@ -0,0 +1,93 @@
1
+ /** When these quotes were read from the providers. */
2
+ const QUOTED_AT = '2026-09-08T00:00:00.000Z';
3
+ /**
4
+ * The Forge job contract caps a whole job at 7 days
5
+ * (`MAX_FORGE_ACTIONS_JOB_TIMEOUT_MINUTES`), and neither source imposes a
6
+ * shorter limit of its own that we have measured. This is that contract
7
+ * ceiling, not a provider limit — if a provider turns out to cap a lease
8
+ * sooner, the real number belongs here and selection will start refusing jobs
9
+ * that ask for longer, which is the correct outcome.
10
+ */
11
+ const FORGE_JOB_CONTRACT_CEILING_SECONDS = 7 * 24 * 60 * 60;
12
+ /**
13
+ * Cloudflare Containers `standard-4` — what `forge-ci-worker` runs on today
14
+ * (`wrangler.jsonc`, `instance_type: "standard-4"`): 4 vCPU, 12 GiB memory,
15
+ * 20 GB disk.
16
+ *
17
+ * Cloudflare bills memory and disk on PROVISIONED resources and CPU on ACTIVE
18
+ * usage only (a November 2025 pricing change), so the two rates are split.
19
+ * A CI job is CPU-bound almost by definition, so its real cost sits near
20
+ * `usdPerSecond + usdPerSecondCpuActive`; an idle container costs the floor.
21
+ */
22
+ export const cfContainerStandard4 = {
23
+ kind: 'infra/compute-source',
24
+ id: 'cf-container-standard-4',
25
+ name: 'Cloudflare Containers standard-4',
26
+ description: '4 vCPU / 12 GiB / 20 GB Cloudflare container, the current Forge CI executor',
27
+ provides: { os: ['linux'], arch: ['x64'], labels: [] },
28
+ ephemeral: true,
29
+ cost: {
30
+ // Provisioned floor: memory + disk bill for the whole lease.
31
+ // 12 GiB × $0.0000025/GiB-s + 20 GB × $0.00000007/GB-s
32
+ usdPerSecond: 12 * 0.0000025 + 20 * 0.00000007,
33
+ // Charged on top, only while the vCPUs are busy.
34
+ // 4 vCPU × $0.000020/vCPU-s
35
+ usdPerSecondCpuActive: 4 * 0.00002,
36
+ source: 'published',
37
+ confidence: 'high',
38
+ effectiveAt: QUOTED_AT,
39
+ note: 'developers.cloudflare.com/containers/pricing, read 2026-09-08. Excludes the $5/mo Workers Paid plan and the included monthly allotment (25 GiB-hours memory, 375 vCPU-minutes, 200 GB-hours disk), which are account-level and not attributable to one lease.'
40
+ },
41
+ ownerScope: 'vibes',
42
+ // Conservative: a Durable Object container sleeps on inactivity rather than
43
+ // holding reserved warm capacity we can hand to the next job.
44
+ warmPool: false,
45
+ maxLeaseSeconds: FORGE_JOB_CONTRACT_CEILING_SECONDS,
46
+ // Left false pending someone verifying an in-flight container can actually
47
+ // be torn down mid-job. False under-sells the source; a wrong true would
48
+ // have the allocator promise a cancellation it cannot perform.
49
+ supportsCancellation: false
50
+ };
51
+ /**
52
+ * DigitalOcean droplet `s-2vcpu-4gb`: 2 vCPU, 4 GiB memory, 80 GB disk.
53
+ *
54
+ * Billed per second with a floor of 60 seconds or $0.01, whichever is higher.
55
+ * At this size 60 seconds is $0.000595, so $0.01 is always the binding floor —
56
+ * which means a 10-second lease and a 16-minute lease cost the same.
57
+ */
58
+ export const doDropletS2vcpu4gb = {
59
+ kind: 'infra/compute-source',
60
+ id: 'do-droplet-s-2vcpu-4gb',
61
+ name: 'DigitalOcean droplet s-2vcpu-4gb',
62
+ description: '2 vCPU / 4 GiB / 80 GB DigitalOcean droplet',
63
+ // No arm64: the account's own /v2/sizes listing returns no arm slugs at all,
64
+ // so claiming arm64 here would be a capability we cannot provision.
65
+ provides: { os: ['linux'], arch: ['x64'], labels: [] },
66
+ // A fleet host outlives the job it was leased for, which is precisely why
67
+ // it must not be handed unreviewed code.
68
+ ephemeral: false,
69
+ cost: {
70
+ // DigitalOcean's own published hourly rate for this slug, per second.
71
+ // Read live from GET /v2/sizes rather than divided out of the monthly price.
72
+ usdPerSecond: 0.03571 / 3600,
73
+ // "billed per second with a minimum charge of 60 seconds or $0.01,
74
+ // whichever is higher" — a floor on the lease, never added to it.
75
+ minimumUsd: 0.01,
76
+ source: 'published',
77
+ confidence: 'high',
78
+ effectiveAt: QUOTED_AT,
79
+ note: 'DigitalOcean GET /v2/sizes price_hourly=0.03571 for s-2vcpu-4gb, read 2026-09-08; minimum charge from docs.digitalocean.com/products/droplets/details/pricing. Bundled-plan usage is capped at 672h/month, which caps a long-lived host but not a single lease.'
80
+ },
81
+ ownerScope: 'vibes',
82
+ // A persistent host is reusable capacity by construction.
83
+ warmPool: true,
84
+ maxLeaseSeconds: FORGE_JOB_CONTRACT_CEILING_SECONDS,
85
+ // `vibes fleet destroy` exists and does this.
86
+ supportsCancellation: true
87
+ };
88
+ /** Every compute source we own, cheapest-first ordering left to the selector. */
89
+ export const vibesComputeSources = [
90
+ cfContainerStandard4,
91
+ doDropletS2vcpu4gb
92
+ ];
93
+ //# sourceMappingURL=compute-sources.descriptors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute-sources.descriptors.js","sourceRoot":"","sources":["../../src/kinds/compute-sources.descriptors.ts"],"names":[],"mappings":"AAwBA,sDAAsD;AACtD,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,kCAAkC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE5D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA4B;IAC5D,IAAI,EAAE,sBAAsB;IAC5B,EAAE,EAAE,yBAAyB;IAC7B,IAAI,EAAE,kCAAkC;IACxC,WAAW,EAAE,6EAA6E;IAC1F,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IACtD,SAAS,EAAE,IAAI;IACf,IAAI,EAAE;QACL,6DAA6D;QAC7D,2DAA2D;QAC3D,YAAY,EAAE,EAAE,GAAG,SAAS,GAAG,EAAE,GAAG,UAAU;QAC9C,iDAAiD;QACjD,8BAA8B;QAC9B,qBAAqB,EAAE,CAAC,GAAG,OAAO;QAClC,MAAM,EAAE,WAAW;QACnB,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,+PAA+P;KACrQ;IACD,UAAU,EAAE,OAAO;IACnB,4EAA4E;IAC5E,8DAA8D;IAC9D,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,kCAAkC;IACnD,2EAA2E;IAC3E,yEAAyE;IACzE,+DAA+D;IAC/D,oBAAoB,EAAE,KAAK;CAC3B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA4B;IAC1D,IAAI,EAAE,sBAAsB;IAC5B,EAAE,EAAE,wBAAwB;IAC5B,IAAI,EAAE,kCAAkC;IACxC,WAAW,EAAE,6CAA6C;IAC1D,6EAA6E;IAC7E,oEAAoE;IACpE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IACtD,0EAA0E;IAC1E,yCAAyC;IACzC,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE;QACL,sEAAsE;QACtE,6EAA6E;QAC7E,YAAY,EAAE,OAAO,GAAG,IAAI;QAC5B,mEAAmE;QACnE,kEAAkE;QAClE,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,WAAW;QACnB,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,iQAAiQ;KACvQ;IACD,UAAU,EAAE,OAAO;IACnB,0DAA0D;IAC1D,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE,kCAAkC;IACnD,8CAA8C;IAC9C,oBAAoB,EAAE,IAAI;CAC1B,CAAC;AAEF,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAuC;IACtE,oBAAoB;IACpB,kBAAkB;CAClB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Kind: infra/container-registry
3
+ *
4
+ * Provider-neutral container image registry descriptor.
5
+ */
6
+ import * as z from 'zod/v4';
7
+ import type { RuntimeDescriptor } from '@vibesdotdev/kernel/schemas/descriptor';
8
+ import type { KindContext } from '@vibesdotdev/kernel/schemas/kind';
9
+ /**
10
+ * Adapter-specific configuration: the adapter id plus its own fields. Each
11
+ * adapter package defines and parses its own config schema (DigitalOcean's
12
+ * container registry config lives in
13
+ * `@vibesdotdev/integrations-digitalocean`); this kind names no provider,
14
+ * so a config for any adapter — including one contributed by a user
15
+ * plugin — parses here, and the adapter validates its own grammar.
16
+ */
17
+ export declare const ContainerRegistryConfigSchema: z.ZodObject<{
18
+ adapter: z.ZodString;
19
+ }, z.core.$loose>;
20
+ export type ContainerRegistryConfig = z.infer<typeof ContainerRegistryConfigSchema>;
21
+ export declare const ContainerRegistryDescriptorSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ name: z.ZodOptional<z.ZodString>;
24
+ description: z.ZodOptional<z.ZodString>;
25
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ enabled: z.ZodOptional<z.ZodBoolean>;
28
+ priority: z.ZodOptional<z.ZodNumber>;
29
+ capabilityId: z.ZodOptional<z.ZodString>;
30
+ requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
32
+ retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
33
+ maxAgeDays: z.ZodOptional<z.ZodNumber>;
34
+ maxEntries: z.ZodOptional<z.ZodNumber>;
35
+ maxBytes: z.ZodOptional<z.ZodNumber>;
36
+ cascadeFrom: z.ZodOptional<z.ZodString>;
37
+ ageField: z.ZodOptional<z.ZodString>;
38
+ reason: z.ZodString;
39
+ enforcedBy: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>]>>;
41
+ kind: z.ZodLiteral<"infra/container-registry">;
42
+ region: z.ZodOptional<z.ZodString>;
43
+ tier: z.ZodOptional<z.ZodEnum<{
44
+ starter: "starter";
45
+ basic: "basic";
46
+ professional: "professional";
47
+ }>>;
48
+ config: z.ZodOptional<z.ZodObject<{
49
+ adapter: z.ZodString;
50
+ }, z.core.$loose>>;
51
+ }, z.core.$strip>;
52
+ export type ContainerRegistryDescriptor = z.infer<typeof ContainerRegistryDescriptorSchema>;
53
+ declare class DefaultContainerRegistryImplementation {
54
+ readonly descriptor: RuntimeDescriptor;
55
+ readonly context: KindContext;
56
+ /** The descriptor as this kind's schema reads it. */
57
+ readonly config: ContainerRegistryDescriptor;
58
+ constructor(descriptor: RuntimeDescriptor, context: KindContext);
59
+ }
60
+ export declare const containerRegistryKind: import("@vibesdotdev/kernel").RuntimeKindDescriptorRecord<DefaultContainerRegistryImplementation>;
61
+ export {};
62
+ //# sourceMappingURL=container-registry.kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-registry.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/container-registry.kind.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAUpE;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,cAAM,sCAAsC;aAI1B,UAAU,EAAE,iBAAiB;aAC7B,OAAO,EAAE,WAAW;IAJrC,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC;gBAE5B,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,WAAW;CAKrC;AAED,eAAO,MAAM,qBAAqB,mGAQhC,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Kind: infra/container-registry
3
+ *
4
+ * Provider-neutral container image registry descriptor.
5
+ */
6
+ import * as z from 'zod/v4';
7
+ import { createRuntimeKind } from '@vibesdotdev/kernel/factory/kind';
8
+ import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel/schemas/descriptor';
9
+ import { readKindDescriptor } from "./read-descriptor.js";
10
+ import { INFRA_DISCOVERY_PATTERNS } from "./discovery.js";
11
+ const ContainerRegistryBaseSchema = RuntimeDescriptorSchema.extend({
12
+ kind: z.literal('infra/container-registry'),
13
+ region: z.string().min(1).optional(),
14
+ tier: z.enum(['starter', 'basic', 'professional']).optional()
15
+ });
16
+ /**
17
+ * Adapter-specific configuration: the adapter id plus its own fields. Each
18
+ * adapter package defines and parses its own config schema (DigitalOcean's
19
+ * container registry config lives in
20
+ * `@vibesdotdev/integrations-digitalocean`); this kind names no provider,
21
+ * so a config for any adapter — including one contributed by a user
22
+ * plugin — parses here, and the adapter validates its own grammar.
23
+ */
24
+ export const ContainerRegistryConfigSchema = z.looseObject({
25
+ adapter: z.string().min(1)
26
+ });
27
+ export const ContainerRegistryDescriptorSchema = ContainerRegistryBaseSchema.extend({
28
+ config: ContainerRegistryConfigSchema.optional()
29
+ });
30
+ class DefaultContainerRegistryImplementation {
31
+ descriptor;
32
+ context;
33
+ /** The descriptor as this kind's schema reads it. */
34
+ config;
35
+ constructor(descriptor, context) {
36
+ this.descriptor = descriptor;
37
+ this.context = context;
38
+ this.config = readKindDescriptor(ContainerRegistryDescriptorSchema, descriptor);
39
+ }
40
+ }
41
+ export const containerRegistryKind = createRuntimeKind({
42
+ id: 'infra/container-registry',
43
+ descriptorSchema: ContainerRegistryDescriptorSchema,
44
+ defaultImplementation: DefaultContainerRegistryImplementation,
45
+ discoveryPatterns: INFRA_DISCOVERY_PATTERNS
46
+ });
47
+ //# sourceMappingURL=container-registry.kind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-registry.kind.js","sourceRoot":"","sources":["../../src/kinds/container-registry.kind.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC;IAClE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7D,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CAAC;IAC1D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAAC,MAAM,CAAC;IACnF,MAAM,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAIH,MAAM,sCAAsC;IAI1B;IACA;IAJjB,qDAAqD;IAC5C,MAAM,CAA8B;IAC7C,YACiB,UAA6B,EAC7B,OAAoB;QADpB,eAAU,GAAV,UAAU,CAAmB;QAC7B,YAAO,GAAP,OAAO,CAAa;QAEpC,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC,iCAAiC,EAAE,UAAU,CAAC,CAAC;IACjF,CAAC;CAED;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAGpD;IACD,EAAE,EAAE,0BAA0B;IAC9B,gBAAgB,EAAE,iCAAiC;IACnD,qBAAqB,EAAE,sCAAsC;IAC7D,iBAAiB,EAAE,wBAAwB;CAC3C,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type DatabaseMigratorImplementation } from '../schemas/database-migration.ts';
2
+ export declare const DATABASE_MIGRATOR_KIND = "infra/database-migrator";
3
+ /** Schema-only: every engine registers its own implementation. */
4
+ /** Engines are constructed with the resolving runtime itself: they reach its secrets, execution and filesystem. */
5
+ export declare const databaseMigratorKind: import("@vibesdotdev/kernel").RuntimeKindDescriptorRecord<DatabaseMigratorImplementation>;
6
+ //# sourceMappingURL=database-migrator.kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-migrator.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/database-migrator.kind.ts"],"names":[],"mappings":"AAoBA,OAAO,EAGN,KAAK,8BAA8B,EACnC,MAAM,kCAAkC,CAAC;AAE1C,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAEhE,kEAAkE;AAClE,mHAAmH;AACnH,eAAO,MAAM,oBAAoB,2FAI/B,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Kind: infra/database-migrator
3
+ *
4
+ * Applies an app's schema migrations to the databases it declares. One
5
+ * implementation per database engine and provider (Cloudflare D1 through
6
+ * wrangler, Postgres, Turso, ...) registers against this kind; the deploy
7
+ * driver resolves every registered migrator at call time and asks each which
8
+ * of the app's databases it serves. Nothing here names a provider.
9
+ *
10
+ * The migration files come from a migration format (`storage/migration-format`,
11
+ * e.g. a drizzle journal), named by id on each target. The driver owns the
12
+ * ledger semantics every engine shares: pending = journal minus ledger, apply
13
+ * one file then record it, never record a failure, adopt exact receipts from an
14
+ * older ledger by intersection with the current journal. The engine owns how
15
+ * statements run and how its ledger is spelled. Contracts: `../schemas/database-migration.ts`.
16
+ */
17
+ import { createRuntimeKind } from '@vibesdotdev/kernel/factory/kind';
18
+ import { INFRA_DISCOVERY_PATTERNS } from "./discovery.js";
19
+ import { DatabaseMigratorDescriptorSchema } from "../schemas/database-migration.js";
20
+ export const DATABASE_MIGRATOR_KIND = 'infra/database-migrator';
21
+ /** Schema-only: every engine registers its own implementation. */
22
+ /** Engines are constructed with the resolving runtime itself: they reach its secrets, execution and filesystem. */
23
+ export const databaseMigratorKind = createRuntimeKind({
24
+ id: DATABASE_MIGRATOR_KIND,
25
+ descriptorSchema: DatabaseMigratorDescriptorSchema,
26
+ discoveryPatterns: INFRA_DISCOVERY_PATTERNS
27
+ });
28
+ //# sourceMappingURL=database-migrator.kind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-migrator.kind.js","sourceRoot":"","sources":["../../src/kinds/database-migrator.kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACN,gCAAgC,EAGhC,MAAM,kCAAkC,CAAC;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AAEhE,kEAAkE;AAClE,mHAAmH;AACnH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAwF;IAC5I,EAAE,EAAE,sBAAsB;IAC1B,gBAAgB,EAAE,gCAAgC;IAClD,iBAAiB,EAAE,wBAAwB;CAC3C,CAAC,CAAC"}
@@ -3,82 +3,119 @@
3
3
  *
4
4
  * Describes a database instance.
5
5
  *
6
- * Schema shape: strict common base + `config` discriminated union.
6
+ * Schema shape: strict common base + an open, adapter-keyed `config`.
7
7
  *
8
8
  * - The base defines fields universal across adapters: id/kind/name +
9
9
  * the database shape (engine, size, replicas, backups).
10
10
  * - Adapter-specific fields (namespace, storageSize, version, region, …)
11
- * live under `config`. Each adapter package defines its own concrete schema.
11
+ * live under an open `config` keyed by `adapter`. Each adapter package
12
+ * defines and parses its own concrete schema.
12
13
  */
13
14
  import * as z from 'zod/v4';
14
- import type { RuntimeKindDescriptorRecord } from '@vibesdotdev/runtime/schemas/kind';
15
- import type { RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/descriptor';
15
+ import type { RuntimeDescriptor } from '@vibesdotdev/kernel/schemas/descriptor';
16
+ import type { KindContext } from '@vibesdotdev/kernel/schemas/kind';
16
17
  export declare const DatabaseBackupSchema: z.ZodObject<{
17
18
  enabled: z.ZodDefault<z.ZodBoolean>;
18
19
  schedule: z.ZodOptional<z.ZodString>;
19
20
  retention: z.ZodOptional<z.ZodString>;
20
21
  }, z.core.$strip>;
21
22
  export type DatabaseBackup = z.infer<typeof DatabaseBackupSchema>;
22
- export declare const DoksDatabaseConfigSchema: z.ZodObject<{
23
- namespace: z.ZodDefault<z.ZodString>;
24
- storageSize: z.ZodDefault<z.ZodString>;
25
- resources: z.ZodOptional<z.ZodObject<{
26
- requests: z.ZodOptional<z.ZodObject<{
27
- cpu: z.ZodString;
28
- memory: z.ZodString;
29
- }, z.core.$strip>>;
30
- limits: z.ZodOptional<z.ZodObject<{
31
- cpu: z.ZodString;
32
- memory: z.ZodString;
33
- }, z.core.$strip>>;
34
- }, z.core.$strip>>;
35
- version: z.ZodDefault<z.ZodString>;
23
+ /** Range of source IPs/UUIDs that may reach the cluster. */
24
+ export declare const TrustedSourceSchema: z.ZodObject<{
25
+ type: z.ZodEnum<{
26
+ tag: "tag";
27
+ droplet: "droplet";
28
+ k8s: "k8s";
29
+ ip_addr: "ip_addr";
30
+ app: "app";
31
+ }>;
32
+ value: z.ZodString;
36
33
  }, z.core.$strip>;
37
- export declare const DOManagedPostgresConfigSchema: z.ZodObject<{
38
- size: z.ZodDefault<z.ZodString>;
39
- region: z.ZodDefault<z.ZodString>;
40
- version: z.ZodDefault<z.ZodString>;
34
+ export type TrustedSource = z.infer<typeof TrustedSourceSchema>;
35
+ /** Storage autoscaling configuration. */
36
+ export declare const StorageAutoscalingSchema: z.ZodObject<{
37
+ enabled: z.ZodDefault<z.ZodBoolean>;
38
+ thresholdPercent: z.ZodDefault<z.ZodNumber>;
39
+ maxSizeGib: z.ZodDefault<z.ZodNumber>;
40
+ incrementPercent: z.ZodDefault<z.ZodNumber>;
41
41
  }, z.core.$strip>;
42
- export declare const TursoDatabaseConfigSchema: z.ZodObject<{
43
- database: z.ZodOptional<z.ZodString>;
44
- region: z.ZodDefault<z.ZodString>;
42
+ /** PgBouncer / direct pool configuration. */
43
+ export declare const ConnectionPoolSchema: z.ZodObject<{
44
+ name: z.ZodString;
45
+ mode: z.ZodDefault<z.ZodEnum<{
46
+ session: "session";
47
+ transaction: "transaction";
48
+ statement: "statement";
49
+ }>>;
50
+ size: z.ZodNumber;
51
+ db: z.ZodString;
52
+ user: z.ZodOptional<z.ZodString>;
45
53
  }, z.core.$strip>;
46
- export declare const CloudflareD1ConfigSchema: z.ZodObject<{
47
- adapter: z.ZodLiteral<"cloudflare-d1">;
48
- binding: z.ZodDefault<z.ZodString>;
49
- databaseName: z.ZodString;
50
- consumerAppId: z.ZodString;
54
+ /** Maintenance window — UTC day-of-week + HH:MM:SS. */
55
+ export declare const MaintenanceWindowSchema: z.ZodObject<{
56
+ day: z.ZodEnum<{
57
+ monday: "monday";
58
+ tuesday: "tuesday";
59
+ wednesday: "wednesday";
60
+ thursday: "thursday";
61
+ friday: "friday";
62
+ saturday: "saturday";
63
+ sunday: "sunday";
64
+ }>;
65
+ hour: z.ZodString;
51
66
  }, z.core.$strip>;
52
- export declare const DatabaseConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
53
- namespace: z.ZodDefault<z.ZodString>;
54
- storageSize: z.ZodDefault<z.ZodString>;
55
- resources: z.ZodOptional<z.ZodObject<{
56
- requests: z.ZodOptional<z.ZodObject<{
57
- cpu: z.ZodString;
58
- memory: z.ZodString;
59
- }, z.core.$strip>>;
60
- limits: z.ZodOptional<z.ZodObject<{
61
- cpu: z.ZodString;
62
- memory: z.ZodString;
63
- }, z.core.$strip>>;
67
+ /** Cluster-level metrics alert policy. */
68
+ export declare const MetricsAlertSchema: z.ZodObject<{
69
+ type: z.ZodEnum<{
70
+ cpu: "cpu";
71
+ memory: "memory";
72
+ disk: "disk";
73
+ load_15: "load_15";
74
+ load_5: "load_5";
75
+ load_1: "load_1";
76
+ replication_lag: "replication_lag";
77
+ kafka_disk: "kafka_disk";
78
+ open_connections: "open_connections";
79
+ }>;
80
+ threshold: z.ZodNumber;
81
+ compare: z.ZodDefault<z.ZodEnum<{
82
+ GreaterThan: "GreaterThan";
83
+ LessThan: "LessThan";
84
+ }>>;
85
+ window: z.ZodDefault<z.ZodEnum<{
86
+ "5m": "5m";
87
+ "10m": "10m";
88
+ "30m": "30m";
89
+ "1h": "1h";
90
+ }>>;
91
+ notify: z.ZodOptional<z.ZodObject<{
92
+ email: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ slackWebhook: z.ZodOptional<z.ZodString>;
94
+ pagerdutyServiceId: z.ZodOptional<z.ZodString>;
64
95
  }, z.core.$strip>>;
65
- version: z.ZodDefault<z.ZodString>;
66
- adapter: z.ZodLiteral<"doks-statefulset">;
67
- }, z.core.$strip>, z.ZodObject<{
68
- size: z.ZodDefault<z.ZodString>;
69
- region: z.ZodDefault<z.ZodString>;
70
- version: z.ZodDefault<z.ZodString>;
71
- adapter: z.ZodLiteral<"do-managed-postgres">;
72
- }, z.core.$strip>, z.ZodObject<{
73
- database: z.ZodOptional<z.ZodString>;
74
- region: z.ZodDefault<z.ZodString>;
75
- adapter: z.ZodLiteral<"turso">;
76
- }, z.core.$strip>, z.ZodObject<{
77
- adapter: z.ZodLiteral<"cloudflare-d1">;
78
- binding: z.ZodDefault<z.ZodString>;
79
- databaseName: z.ZodString;
80
- consumerAppId: z.ZodString;
81
- }, z.core.$strip>]>;
96
+ }, z.core.$strip>;
97
+ /** Postgres extension to enable on the cluster (e.g., pgvector, postgis). */
98
+ export declare const PostgresExtensionSchema: z.ZodObject<{
99
+ name: z.ZodString;
100
+ version: z.ZodOptional<z.ZodString>;
101
+ schema: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>;
103
+ /** Behavior when the cluster's major Postgres version reaches EOL. */
104
+ export declare const MajorVersionUpgradePolicySchema: z.ZodEnum<{
105
+ auto: "auto";
106
+ manual: "manual";
107
+ }>;
108
+ /**
109
+ * Adapter-specific configuration: the adapter id plus its own fields. Each
110
+ * adapter package defines and parses its own config schema (Cloudflare D1's is
111
+ * `CloudflareD1DatabaseConfigSchema` in `@vibesdotdev/integrations-cloudflare`;
112
+ * DigitalOcean's DOKS/managed-postgres configs live in
113
+ * `@vibesdotdev/integrations-digitalocean`; a Turso adapter owns its config
114
+ * in its own integrations package); this kind names no provider.
115
+ */
116
+ export declare const DatabaseConfigSchema: z.ZodObject<{
117
+ adapter: z.ZodString;
118
+ }, z.core.$loose>;
82
119
  export declare const DatabaseDescriptorSchema: z.ZodObject<{
83
120
  id: z.ZodString;
84
121
  name: z.ZodOptional<z.ZodString>;
@@ -87,8 +124,18 @@ export declare const DatabaseDescriptorSchema: z.ZodObject<{
87
124
  hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
125
  enabled: z.ZodOptional<z.ZodBoolean>;
89
126
  priority: z.ZodOptional<z.ZodNumber>;
127
+ capabilityId: z.ZodOptional<z.ZodString>;
90
128
  requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
129
  optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
130
+ retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
131
+ maxAgeDays: z.ZodOptional<z.ZodNumber>;
132
+ maxEntries: z.ZodOptional<z.ZodNumber>;
133
+ maxBytes: z.ZodOptional<z.ZodNumber>;
134
+ cascadeFrom: z.ZodOptional<z.ZodString>;
135
+ ageField: z.ZodOptional<z.ZodString>;
136
+ reason: z.ZodString;
137
+ enforcedBy: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>]>>;
92
139
  kind: z.ZodLiteral<"infra/database">;
93
140
  engine: z.ZodOptional<z.ZodString>;
94
141
  size: z.ZodOptional<z.ZodString>;
@@ -98,44 +145,18 @@ export declare const DatabaseDescriptorSchema: z.ZodObject<{
98
145
  schedule: z.ZodOptional<z.ZodString>;
99
146
  retention: z.ZodOptional<z.ZodString>;
100
147
  }, z.core.$strip>>;
101
- config: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
102
- namespace: z.ZodDefault<z.ZodString>;
103
- storageSize: z.ZodDefault<z.ZodString>;
104
- resources: z.ZodOptional<z.ZodObject<{
105
- requests: z.ZodOptional<z.ZodObject<{
106
- cpu: z.ZodString;
107
- memory: z.ZodString;
108
- }, z.core.$strip>>;
109
- limits: z.ZodOptional<z.ZodObject<{
110
- cpu: z.ZodString;
111
- memory: z.ZodString;
112
- }, z.core.$strip>>;
113
- }, z.core.$strip>>;
114
- version: z.ZodDefault<z.ZodString>;
115
- adapter: z.ZodLiteral<"doks-statefulset">;
116
- }, z.core.$strip>, z.ZodObject<{
117
- size: z.ZodDefault<z.ZodString>;
118
- region: z.ZodDefault<z.ZodString>;
119
- version: z.ZodDefault<z.ZodString>;
120
- adapter: z.ZodLiteral<"do-managed-postgres">;
121
- }, z.core.$strip>, z.ZodObject<{
122
- database: z.ZodOptional<z.ZodString>;
123
- region: z.ZodDefault<z.ZodString>;
124
- adapter: z.ZodLiteral<"turso">;
125
- }, z.core.$strip>, z.ZodObject<{
126
- adapter: z.ZodLiteral<"cloudflare-d1">;
127
- binding: z.ZodDefault<z.ZodString>;
128
- databaseName: z.ZodString;
129
- consumerAppId: z.ZodString;
130
- }, z.core.$strip>]>>;
148
+ config: z.ZodOptional<z.ZodObject<{
149
+ adapter: z.ZodString;
150
+ }, z.core.$loose>>;
131
151
  }, z.core.$strip>;
132
152
  export type DatabaseDescriptor = z.infer<typeof DatabaseDescriptorSchema>;
133
153
  declare class DefaultDatabaseImplementation {
134
154
  readonly descriptor: RuntimeDescriptor;
135
- readonly context: unknown;
136
- constructor(descriptor: RuntimeDescriptor, context: unknown);
137
- get config(): DatabaseDescriptor;
155
+ readonly context: KindContext;
156
+ /** The descriptor as this kind's schema reads it. */
157
+ readonly config: DatabaseDescriptor;
158
+ constructor(descriptor: RuntimeDescriptor, context: KindContext);
138
159
  }
139
- export declare const databaseKind: RuntimeKindDescriptorRecord<DefaultDatabaseImplementation>;
160
+ export declare const databaseKind: import("@vibesdotdev/kernel").RuntimeKindDescriptorRecord<DefaultDatabaseImplementation>;
140
161
  export {};
141
162
  //# sourceMappingURL=database.kind.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/database.kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAErF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAkBlE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAcnC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;iBAOxC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;iBAKpC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;iBASnC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAK/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,cAAM,6BAA6B;aAEjB,UAAU,EAAE,iBAAiB;aAC7B,OAAO,EAAE,OAAO;gBADhB,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,OAAO;IAGjC,IAAI,MAAM,IAAI,kBAAkB,CAE/B;CACD;AAED,eAAO,MAAM,YAAY,4DAMvB,CAAC"}
1
+ {"version":3,"file":"database.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/database.kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAIpE,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAkBlE,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB;;;;;;;;;iBAK9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,yCAAyC;AACzC,eAAO,MAAM,wBAAwB;;;;;iBAQnC,CAAC;AAEH,6CAA6C;AAC7C,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAM/B,CAAC;AAEH,uDAAuD;AACvD,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAalC,CAAC;AAEH,0CAA0C;AAC1C,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyB7B,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,+BAA+B;;;EAA6B,CAAC;AAE1E;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,cAAM,6BAA6B;aAIjB,UAAU,EAAE,iBAAiB;aAC7B,OAAO,EAAE,WAAW;IAJrC,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;gBAEnB,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,WAAW;CAKrC;AAED,eAAO,MAAM,YAAY,0FAKvB,CAAC"}