@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
@@ -1,139 +0,0 @@
1
- export { webAppKind, WebAppDescriptorSchema, WebAppConfigSchema, CloudflareWorkersWebAppConfigSchema, DigitalOceanAppWebAppConfigSchema, type WebAppDescriptor, type WebAppDependency } from './web-app.kind';
2
- export {
3
- workerKind,
4
- WorkerDescriptorSchema,
5
- WorkerConfigSchema,
6
- DoksDeploymentWorkerConfigSchema,
7
- WorkerScalingSchema,
8
- type WorkerDescriptor,
9
- type WorkerScaling
10
- } from './worker.kind';
11
- export {
12
- databaseKind,
13
- DatabaseDescriptorSchema,
14
- DatabaseConfigSchema,
15
- DoksDatabaseConfigSchema,
16
- DOManagedPostgresConfigSchema,
17
- TursoDatabaseConfigSchema,
18
- CloudflareD1ConfigSchema,
19
- DatabaseBackupSchema,
20
- type DatabaseDescriptor,
21
- type DatabaseBackup
22
- } from './database.kind';
23
- export {
24
- queueKind,
25
- QueueDescriptorSchema,
26
- QueueConfigSchema,
27
- DoksQueueConfigSchema,
28
- QueueTopicSchema,
29
- type QueueDescriptor,
30
- type QueueTopic
31
- } from './queue.kind';
32
- export { cacheKind, CacheDescriptorSchema, CacheConfigSchema, DOManagedRedisConfigSchema, type CacheDescriptor } from './cache.kind';
33
- export {
34
- objectStorageKind,
35
- ObjectStorageDescriptorSchema,
36
- ObjectStorageConfigSchema,
37
- DOSpacesConfigSchema,
38
- CorsRuleSchema,
39
- LifecycleRuleSchema,
40
- type ObjectStorageDescriptor,
41
- type CorsRule,
42
- type LifecycleRule
43
- } from './object-storage.kind';
44
- export {
45
- sandboxKind,
46
- SandboxDescriptorSchema,
47
- SandboxConfigSchema,
48
- CloudflareSandboxConfigSchema,
49
- DockerSandboxConfigSchema,
50
- DigitalOceanDropletSandboxConfigSchema,
51
- SandboxOutboundProxySchema,
52
- SandboxResourceLimitsSchema,
53
- type SandboxDescriptor,
54
- type SandboxOutboundProxy,
55
- type SandboxResourceLimits
56
- } from './sandbox.kind';
57
- export {
58
- gitHostingKind,
59
- GitHostingDescriptorSchema,
60
- GitHostingConfigSchema,
61
- GiteaDoksGitHostingConfigSchema,
62
- GitHostingTypeSchema,
63
- GitHostingAuthMethodSchema,
64
- type GitHostingDescriptor,
65
- type GitHostingType,
66
- type GitHostingAuthMethod
67
- } from './git-hosting.kind';
68
- export {
69
- packageRegistryKind,
70
- PackageRegistryDescriptorSchema,
71
- PackageRegistryConfigSchema,
72
- VerdaccioDoksPackageRegistryConfigSchema,
73
- PackageRegistryTypeSchema,
74
- type PackageRegistryDescriptor,
75
- type PackageRegistryType
76
- } from './package-registry.kind';
77
- export {
78
- logsKind,
79
- InfraLogsDescriptorSchema,
80
- type InfraLogsDescriptor,
81
- type InfraLogsDescriptorInput,
82
- type InfraLogsKind,
83
- type InfraLogsKindInput,
84
- type LogsImplementation
85
- } from './logs.kind';
86
- export {
87
- artifactKind,
88
- ArtifactDescriptorSchema,
89
- type ArtifactDescriptor,
90
- type ArtifactGenerator,
91
- type ArtifactOutput
92
- } from './artifact.kind';
93
- export {
94
- alertsKind,
95
- InfraAlertsDescriptorSchema,
96
- AlertPolicySchema,
97
- AlertMechanismSchema,
98
- AlertTypeSchema,
99
- AlertWindowSchema,
100
- type InfraAlertsDescriptor,
101
- type InfraAlertsDescriptorInput,
102
- type InfraAlertsKind,
103
- type InfraAlertsKindInput,
104
- type AlertsImplementation,
105
- type AlertPolicy,
106
- type AlertMechanism,
107
- type AlertType
108
- } from './alerts.kind.ts';
109
- export {
110
- observabilityKind,
111
- InfraObservabilityDescriptorSchema,
112
- ObservabilityScopeSchema,
113
- ObservabilitySettingsSchema,
114
- type InfraObservabilityDescriptor,
115
- type InfraObservabilityDescriptorInput,
116
- type InfraObservabilityKind,
117
- type InfraObservabilityKindInput,
118
- type ObservabilityImplementation,
119
- type ObservabilityScope,
120
- type ObservabilitySettings,
121
- type ObservabilitySnapshot,
122
- type SetObservabilityInput,
123
- type SetObservabilityResult
124
- } from './observability.kind.ts';
125
- export {
126
- rumKind,
127
- InfraRumDescriptorSchema,
128
- RumPrivacySchema,
129
- RumInjectionSchema,
130
- type InfraRumDescriptor,
131
- type InfraRumDescriptorInput,
132
- type InfraRumKind,
133
- type InfraRumKindInput,
134
- type RumImplementation,
135
- type RumSiteSnapshot,
136
- type RumPrivacy,
137
- type RumInjection
138
- } from './rum.kind.ts';
139
- export { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
@@ -1,104 +0,0 @@
1
- /**
2
- * Infra Logs Kind
3
- *
4
- * Descriptor schema for log sources (Workers, Pages, D1, etc.)
5
- * Provides programmatic access to logs for tailing, queries, and analytics.
6
- */
7
-
8
- import * as z from 'zod/v4';
9
- import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
10
- import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
11
- import type { RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/descriptor';
12
- import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
13
-
14
- const LogsBaseSchema = RuntimeDescriptorSchema.extend({
15
- kind: z.literal('infra/logs'),
16
- /** Adapter type (e.g., 'cloudflare-logs', 'datadog', 'splunk') */
17
- adapter: z.string().min(1),
18
- /** Adapter-specific configuration */
19
- adapterConfig: z.record(z.string(), z.unknown()).optional(),
20
- /** Log sources to monitor */
21
- sources: z
22
- .array(
23
- z.object({
24
- /** Source type */
25
- type: z.enum(['worker', 'pages', 'd1', 'r2', 'kv']),
26
- /** Source name/identifier */
27
- name: z.string().min(1),
28
- /** Optional environment filter */
29
- environment: z.string().optional()
30
- })
31
- )
32
- .default([]),
33
- /** Default retention period */
34
- retention: z
35
- .object({
36
- /** Hot storage (immediately accessible) */
37
- hotDays: z.number().int().positive().default(7),
38
- /** Cold storage (requires retrieval) */
39
- coldDays: z.number().int().positive().default(30)
40
- })
41
- .optional(),
42
- /** Alerting configuration */
43
- alerts: z
44
- .array(
45
- z.object({
46
- /** Alert name */
47
- name: z.string().min(1),
48
- /** Alert condition */
49
- condition: z.enum(['errorRate', 'duration', 'invocationCount']),
50
- /** Threshold value */
51
- threshold: z.number(),
52
- /** Time window for evaluation */
53
- window: z.string(),
54
- /** Notification channels */
55
- channels: z.array(z.string()).default([])
56
- })
57
- )
58
- .default([])
59
- });
60
-
61
- export const InfraLogsDescriptorSchema = LogsBaseSchema;
62
- export type InfraLogsDescriptor = z.infer<typeof InfraLogsDescriptorSchema>;
63
- export type InfraLogsDescriptorInput = z.input<typeof InfraLogsDescriptorSchema>;
64
-
65
- export interface LogsImplementation {
66
- /** Stream logs in real-time (returns WebSocket URL) */
67
- tailLogs(sourceName: string, options?: { status?: 'ok' | 'error' | 'canceled'; limit?: number }): Promise<{ tailId: string; websocketUrl: string }>;
68
- /** Stop a log tail session */
69
- stopTail(sourceName: string, tailId: string): Promise<void>;
70
- /** List active tail sessions */
71
- listTails(sourceName: string): Promise<Array<{ id: string; createdAt: string }>>;
72
- /** Get analytics summary */
73
- getAnalytics(sourceName: string, timeRange?: { timeStart: string; timeEnd?: string }): Promise<{ totalInvocations: number; errorCount: number; errorRate: number; avgDurationMs: number; p99DurationMs: number; totalCpuTimeMs: number }>;
74
- /** Get error rate */
75
- getErrorRate(sourceName: string, timeRange?: { timeStart: string; timeEnd?: string }): Promise<number>;
76
- }
77
-
78
- export interface DefaultLogsImplementation {
79
- generateConfig: () => InfraLogsDescriptor;
80
- }
81
-
82
- class DefaultLogsImplementationClass implements DefaultLogsImplementation {
83
- generateConfig(): InfraLogsDescriptor {
84
- return {
85
- kind: 'infra/logs',
86
- id: 'default-logs',
87
- name: 'Default Logs',
88
- adapter: 'unknown',
89
- sources: [],
90
- alerts: []
91
- };
92
- }
93
- }
94
-
95
- export const logsKind = createRuntimeKind<InfraLogsDescriptor, DefaultLogsImplementation>({
96
- id: 'infra/logs',
97
- descriptorSchema: InfraLogsDescriptorSchema,
98
- defaultImplementation: DefaultLogsImplementationClass,
99
- discoveryPattern: INFRA_DISCOVERY_PATTERN,
100
- extractStem
101
- });
102
-
103
- export type InfraLogsKind = InfraLogsDescriptor;
104
- export type InfraLogsKindInput = InfraLogsDescriptorInput;
@@ -1,101 +0,0 @@
1
- /**
2
- * Kind: infra/object-storage
3
- *
4
- * Describes object/blob storage.
5
- *
6
- * Schema shape: strict common base + `config` discriminated union.
7
- *
8
- * - The base defines fields universal across adapters: id/kind/name +
9
- * the storage shape (bucket, cors, lifecycle, publicAccess).
10
- * - Adapter-specific fields (region, acl, …) live under `config`.
11
- * Each adapter package defines its own concrete schema.
12
- */
13
- import * as z from 'zod/v4';
14
- import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
15
- import type { RuntimeKindDescriptorRecord } from '@vibesdotdev/runtime/schemas/kind';
16
- import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
17
- import type { RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/descriptor';
18
- import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
19
-
20
- export const CorsRuleSchema = z.object({
21
- allowedOrigins: z.array(z.string()).default(['*']),
22
- allowedMethods: z.array(z.string()).default(['GET']),
23
- allowedHeaders: z.array(z.string()).optional(),
24
- maxAgeSeconds: z.number().int().nonnegative().optional()
25
- });
26
- export type CorsRule = z.infer<typeof CorsRuleSchema>;
27
-
28
- export const LifecycleRuleSchema = z.object({
29
- /** Prefix filter for matching objects */
30
- prefix: z.string().optional(),
31
- /** Days until expiration */
32
- expiration: z.number().int().positive().optional(),
33
- /** Storage class transition */
34
- transition: z
35
- .object({
36
- days: z.number().int().positive(),
37
- storageClass: z.string().min(1)
38
- })
39
- .optional()
40
- });
41
- export type LifecycleRule = z.infer<typeof LifecycleRuleSchema>;
42
-
43
- const ObjectStorageBaseSchema = RuntimeDescriptorSchema.extend({
44
- kind: z.literal('infra/object-storage'),
45
-
46
- /** Bucket name (defaults to descriptor id when omitted). */
47
- bucket: z.string().min(1).optional(),
48
-
49
- /** CORS rules. */
50
- cors: z.array(CorsRuleSchema).optional(),
51
-
52
- /** Lifecycle rules. */
53
- lifecycle: z.array(LifecycleRuleSchema).optional(),
54
-
55
- /** Whether the bucket is publicly readable. */
56
- publicAccess: z.boolean().optional()
57
- });
58
-
59
- export const DOSpacesConfigSchema = z.object({
60
- /** DO region (default: nyc3). */
61
- region: z.string().min(1).default('nyc3')
62
- });
63
-
64
- export const CloudflareR2ConfigSchema = z.object({});
65
-
66
- export const ObjectStorageConfigSchema = z.union([
67
- DOSpacesConfigSchema.extend({ adapter: z.literal('do-spaces') }),
68
- CloudflareR2ConfigSchema.extend({ adapter: z.literal('cloudflare-r2') })
69
- ]);
70
-
71
- export const ObjectStorageDescriptorSchema = ObjectStorageBaseSchema.extend({
72
- /**
73
- * Adapter-specific configuration. Discriminated union — each adapter
74
- * package defines its own config schema under its discriminator key.
75
- */
76
- config: ObjectStorageConfigSchema.optional()
77
- });
78
-
79
- export type ObjectStorageDescriptor = z.infer<typeof ObjectStorageDescriptorSchema>;
80
-
81
- class DefaultObjectStorageImplementation {
82
- constructor(
83
- public readonly descriptor: RuntimeDescriptor,
84
- public readonly context: unknown
85
- ) {}
86
-
87
- get config(): ObjectStorageDescriptor {
88
- return this.descriptor as ObjectStorageDescriptor;
89
- }
90
- }
91
-
92
- export const objectStorageKind = createRuntimeKind<
93
- ObjectStorageDescriptor,
94
- DefaultObjectStorageImplementation
95
- >({
96
- id: 'infra/object-storage',
97
- descriptorSchema: ObjectStorageDescriptorSchema,
98
- defaultImplementation: DefaultObjectStorageImplementation,
99
- discoveryPattern: INFRA_DISCOVERY_PATTERN,
100
- extractStem
101
- });
@@ -1,178 +0,0 @@
1
- /**
2
- * Infra Observability Kind
3
- *
4
- * Provider-agnostic per-Worker (or fleet-wide) observability config —
5
- * sampling rate, log/trace toggles, export destinations. Decouples
6
- * observability concerns from the `infra/web-app` descriptor so:
7
- *
8
- * 1. The CLI can introspect + write settings across the entire fleet
9
- * without going through deploy.
10
- * 2. Cross-cutting policies (e.g. "10% sampling on every customer-facing
11
- * Worker") have a single declarative shape.
12
- * 3. Provider impls map onto the native control plane (CF Workers
13
- * Observability, DO Monitoring, Datadog, etc.).
14
- *
15
- * CLI surface (`vibes infra observability …`):
16
- * status [--worker] read current settings
17
- * set [--worker] --sampling 0.1 write new settings
18
- * exports list|add|remove (Phase 2.5; not yet wired)
19
- *
20
- * Production Workers consume settings via their wrangler.jsonc; the CLI
21
- * writes directly to the provider API for immediate effect. To avoid
22
- * drift, `vibes infra deploy regenerate` is the canonical declarative
23
- * path — the CLI here is for ops-time tuning between deploys.
24
- */
25
-
26
- import * as z from 'zod/v4';
27
- import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
28
- import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
29
- import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
30
-
31
- const ObservabilityScopeSchema = z.discriminatedUnion('kind', [
32
- z.object({
33
- kind: z.literal('worker'),
34
- workerName: z.string().min(1)
35
- }),
36
- z.object({
37
- kind: z.literal('account-wide'),
38
- /** When set, restrict the fleet sweep to workers matching the glob. */
39
- filter: z.string().optional()
40
- })
41
- ]);
42
-
43
- export type ObservabilityScope = z.infer<typeof ObservabilityScopeSchema>;
44
-
45
- /**
46
- * Standard observability settings shape. Provider impls translate
47
- * these onto native fields (CF: `observability.head_sampling_rate`,
48
- * Datadog: `apm_sampling_rate`, etc.).
49
- */
50
- const ObservabilitySettingsSchema = z.object({
51
- logs: z
52
- .object({
53
- enabled: z.boolean(),
54
- /**
55
- * Head sampling rate, 0..1. Providers without head-sampling
56
- * (e.g. Logpush-only setups) treat this as a hint and may
57
- * implement tail-sampling at the destination instead.
58
- */
59
- headSamplingRate: z.number().min(0).max(1).optional(),
60
- structured: z.boolean().optional(),
61
- /** Persist logs for dashboard view (CF: observability.logs.persist). */
62
- persist: z.boolean().optional(),
63
- /** Capture per-request invocation envelopes (CF only). */
64
- invocationLogs: z.boolean().optional()
65
- })
66
- .optional(),
67
- traces: z
68
- .object({
69
- enabled: z.boolean(),
70
- headSamplingRate: z.number().min(0).max(1).optional(),
71
- persist: z.boolean().optional(),
72
- exporter: z
73
- .object({
74
- kind: z.enum(['otlp', 'datadog', 'jaeger']),
75
- endpoint: z.string().url(),
76
- tokenSecretKey: z.string().optional()
77
- })
78
- .optional()
79
- })
80
- .optional(),
81
- exports: z
82
- .array(
83
- z.discriminatedUnion('kind', [
84
- z.object({
85
- kind: z.literal('logflare'),
86
- tokenSecretKey: z.string()
87
- }),
88
- z.object({
89
- kind: z.literal('datadog'),
90
- apiKeySecretKey: z.string(),
91
- site: z.string()
92
- }),
93
- z.object({
94
- kind: z.literal('logpush'),
95
- destination: z.string(),
96
- dataset: z.string()
97
- })
98
- ])
99
- )
100
- .optional()
101
- });
102
-
103
- export type ObservabilitySettings = z.infer<typeof ObservabilitySettingsSchema>;
104
-
105
- const ObservabilityBaseSchema = RuntimeDescriptorSchema.extend({
106
- kind: z.literal('infra/observability'),
107
- adapter: z.string().min(1),
108
- adapterConfig: z.record(z.string(), z.unknown()).optional(),
109
- environment: z.string().default('local'),
110
- /**
111
- * Default scope when the descriptor is used standalone (e.g.
112
- * `vibes infra observability status` with no --worker flag). When
113
- * the CLI passes an explicit scope, this is ignored.
114
- */
115
- defaultScope: ObservabilityScopeSchema.default({ kind: 'account-wide' }),
116
- /**
117
- * Optional declared settings — used by `vibes infra observability
118
- * sync` (future) to drive a desired-state reconciliation. Today the
119
- * CLI imperatively sets values per call.
120
- */
121
- settings: ObservabilitySettingsSchema.optional()
122
- });
123
-
124
- export type InfraObservabilityDescriptor = z.infer<typeof ObservabilityBaseSchema>;
125
- export type InfraObservabilityDescriptorInput = z.input<typeof ObservabilityBaseSchema>;
126
-
127
- /**
128
- * Snapshot of the live settings for a single Worker (or other scope).
129
- * Returned by `getStatus`; consumed by the CLI for table-rendering.
130
- */
131
- export interface ObservabilitySnapshot {
132
- workerName: string;
133
- settings: ObservabilitySettings;
134
- /** Last-modified timestamp from the provider, when available. */
135
- modifiedAt?: string;
136
- }
137
-
138
- export interface SetObservabilityInput {
139
- scope: ObservabilityScope;
140
- settings: ObservabilitySettings;
141
- /** Skip Workers that already match desired state. Defaults to true. */
142
- skipUnchanged?: boolean;
143
- }
144
-
145
- export interface SetObservabilityResult {
146
- changed: Array<{ workerName: string; before: ObservabilitySettings; after: ObservabilitySettings }>;
147
- unchanged: string[];
148
- failed: Array<{ workerName: string; error: string }>;
149
- }
150
-
151
- /**
152
- * Implementation contract every provider implements.
153
- */
154
- export interface ObservabilityImplementation {
155
- /** Read current settings for a scope. account-wide → one snapshot per Worker. */
156
- getStatus(scope: ObservabilityScope): Promise<ObservabilitySnapshot[]>;
157
- /** Apply settings to a scope. Returns per-Worker outcome. */
158
- set(input: SetObservabilityInput): Promise<SetObservabilityResult>;
159
- }
160
-
161
- export const observabilityKind = createRuntimeKind<
162
- InfraObservabilityDescriptor,
163
- ObservabilityImplementation
164
- >({
165
- id: 'infra/observability',
166
- descriptorSchema: ObservabilityBaseSchema,
167
- discoveryPattern: INFRA_DISCOVERY_PATTERN,
168
- extractStem
169
- });
170
-
171
- export type InfraObservabilityKind = InfraObservabilityDescriptor;
172
- export type InfraObservabilityKindInput = InfraObservabilityDescriptorInput;
173
-
174
- export {
175
- ObservabilityBaseSchema as InfraObservabilityDescriptorSchema,
176
- ObservabilityScopeSchema,
177
- ObservabilitySettingsSchema
178
- };
@@ -1,95 +0,0 @@
1
- /**
2
- * Kind: infra/package-registry
3
- *
4
- * Describes a package registry instance (npm, Docker, Maven, Helm, etc.).
5
- *
6
- * Schema shape: strict common base + `config` discriminated union.
7
- *
8
- * - The base (this file) defines fields that are universal across every
9
- * adapter: id/kind/name + the registry shape every package host declares
10
- * (url, registryType, scope, upstreamUrl, authRequired, ssl, env).
11
- * - Adapter-specific fields (dockerImage, storageSize, domain, …)
12
- * live exclusively under `config`. Each adapter package defines its own
13
- * concrete schema under its discriminator key.
14
- */
15
- import * as z from 'zod/v4';
16
- import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
17
- import type { RuntimeKindDescriptorRecord } from '@vibesdotdev/runtime/schemas/kind';
18
- import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
19
- import type { RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/descriptor';
20
- import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
21
- import { deploymentEnvRequirementSchema } from '../schemas.ts';
22
-
23
- export const PackageRegistryTypeSchema = z.enum(['npm', 'docker', 'maven', 'helm']);
24
- export type PackageRegistryType = z.infer<typeof PackageRegistryTypeSchema>;
25
-
26
- const PackageRegistryBaseSchema = RuntimeDescriptorSchema.extend({
27
- kind: z.literal('infra/package-registry'),
28
-
29
- /** Primary access URL (e.g. 'https://packages.vibes.dev'). */
30
- url: z.string().url(),
31
-
32
- /** Package type this registry serves. */
33
- registryType: PackageRegistryTypeSchema.default('npm'),
34
-
35
- /** Npm scope this registry owns (e.g. '@vibesdotdev'). */
36
- scope: z.string().optional(),
37
-
38
- /** Upstream registry URL this registry proxies (optional). */
39
- upstreamUrl: z.string().url().optional(),
40
-
41
- /** Whether authentication is required to pull from this registry. */
42
- authRequired: z.boolean().default(true),
43
-
44
- /** Whether TLS is enabled. */
45
- ssl: z.boolean().default(true),
46
-
47
- /** Environment variable requirements. */
48
- env: z.array(deploymentEnvRequirementSchema).optional()
49
- });
50
-
51
- export const VerdaccioDoksPackageRegistryConfigSchema = z.object({
52
- /** Docker image for the Verdaccio container. */
53
- dockerImage: z.string().default('verdaccio/verdaccio:5'),
54
- /** Persistent storage size (e.g. '10Gi'). */
55
- storageSize: z.string().default('10Gi'),
56
- /** Primary domain for the registry. */
57
- domain: z.string().min(1),
58
- /** Upstream npm registry URL to proxy. */
59
- upstreamNpmUrl: z.string().url().default('https://registry.npmjs.org'),
60
- /** Whether built-in authentication is enabled. */
61
- authEnabled: z.boolean().default(true)
62
- });
63
-
64
- export const PackageRegistryConfigSchema = z.union([
65
- VerdaccioDoksPackageRegistryConfigSchema.extend({ adapter: z.literal('verdaccio-doks') })
66
- ]);
67
-
68
- export const PackageRegistryDescriptorSchema = PackageRegistryBaseSchema.extend({
69
- /**
70
- * Adapter-specific configuration. Discriminated union — each adapter
71
- * package defines its own config schema under its discriminator key.
72
- */
73
- config: PackageRegistryConfigSchema.optional()
74
- });
75
-
76
- export type PackageRegistryDescriptor = z.infer<typeof PackageRegistryDescriptorSchema>;
77
-
78
- class DefaultPackageRegistryImplementation {
79
- constructor(
80
- public readonly descriptor: RuntimeDescriptor,
81
- public readonly context: unknown
82
- ) {}
83
-
84
- get config(): PackageRegistryDescriptor {
85
- return this.descriptor as PackageRegistryDescriptor;
86
- }
87
- }
88
-
89
- export const packageRegistryKind = createRuntimeKind<PackageRegistryDescriptor, DefaultPackageRegistryImplementation>({
90
- id: 'infra/package-registry',
91
- descriptorSchema: PackageRegistryDescriptorSchema,
92
- defaultImplementation: DefaultPackageRegistryImplementation,
93
- discoveryPattern: INFRA_DISCOVERY_PATTERN,
94
- extractStem
95
- });