@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,326 @@
1
+ /**
2
+ * Kind: infra/inventory
3
+ *
4
+ * Generic read-only inventory descriptor. Implementations enumerate provider
5
+ * resources without mutating them. Used by `vibes infra inventory` and
6
+ * provider-specific list/status commands.
7
+ */
8
+ import * as z from 'zod/v4';
9
+ import { CapabilityError, type ValueFreeFailure } from '@vibesdotdev/kernel';
10
+ import type { RuntimeDescriptor } from '@vibesdotdev/kernel/schemas/descriptor';
11
+ import type { KindContext } from '@vibesdotdev/kernel/schemas/kind';
12
+ export declare const InventoryResourceSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ kind: z.ZodString;
15
+ name: z.ZodOptional<z.ZodString>;
16
+ region: z.ZodOptional<z.ZodString>;
17
+ status: z.ZodOptional<z.ZodString>;
18
+ managedBy: z.ZodOptional<z.ZodString>;
19
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ createdAt: z.ZodOptional<z.ZodString>;
21
+ raw: z.ZodOptional<z.ZodUnknown>;
22
+ }, z.core.$strip>;
23
+ export type InventoryResource = z.infer<typeof InventoryResourceSchema>;
24
+ export declare const InfraProviderFailureSchema: z.ZodObject<{
25
+ code: z.ZodString;
26
+ message: z.ZodString;
27
+ retryable: z.ZodOptional<z.ZodBoolean>;
28
+ }, z.core.$strip>;
29
+ export type InfraProviderFailure = z.infer<typeof InfraProviderFailureSchema>;
30
+ /**
31
+ * Provider-sanitized failure evidence as a typed `UNAVAILABLE
32
+ * infra-provider-failure`. The provider's own code stays on `failure.code`
33
+ * (and in details); the message is the provider's sanitized message.
34
+ */
35
+ export declare class SanitizedInfraProviderError extends CapabilityError {
36
+ readonly failure: InfraProviderFailure;
37
+ constructor(failure: InfraProviderFailure, cause?: ValueFreeFailure);
38
+ }
39
+ export declare function createSanitizedInfraProviderError(failure: InfraProviderFailure, cause?: ValueFreeFailure): SanitizedInfraProviderError;
40
+ export declare const InfraAuthorityFingerprintSchema: z.ZodObject<{
41
+ provider: z.ZodString;
42
+ requestedEnvironment: z.ZodString;
43
+ resolvedEnvironment: z.ZodString;
44
+ source: z.ZodString;
45
+ account: z.ZodString;
46
+ accountIdentity: z.ZodOptional<z.ZodString>;
47
+ capabilities: z.ZodArray<z.ZodString>;
48
+ }, z.core.$strip>;
49
+ export type InfraAuthorityFingerprint = z.infer<typeof InfraAuthorityFingerprintSchema>;
50
+ /** Stable, provider-neutral text form for operator-facing inventory and audit output. */
51
+ export declare function formatInfraAuthorityFingerprint(authority: InfraAuthorityFingerprint): string;
52
+ /**
53
+ * Reconcile authority evidence emitted by several provider surfaces. Identity
54
+ * must be identical; capabilities are the honest union of operations actually
55
+ * requested by those surfaces.
56
+ */
57
+ export declare function mergeInfraAuthorityFingerprints(authorities: readonly InfraAuthorityFingerprint[]): InfraAuthorityFingerprint | undefined;
58
+ /**
59
+ * Convert arbitrary backend exceptions into bounded operator-safe evidence: a
60
+ * `SanitizedInfraProviderError` keeps its evidence; anything else is the fixed
61
+ * unreadable evidence (what it says is never repeated).
62
+ */
63
+ export declare function sanitizeInfraProviderFailure<Caught>(error: Caught): InfraProviderFailure;
64
+ export declare const InventoryDeclaredResourceSchema: z.ZodObject<{
65
+ kind: z.ZodString;
66
+ id: z.ZodString;
67
+ name: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>;
69
+ export type InventoryDeclaredResource = z.infer<typeof InventoryDeclaredResourceSchema>;
70
+ export declare const InventorySnapshotSchema: z.ZodObject<{
71
+ provider: z.ZodString;
72
+ collectedAt: z.ZodString;
73
+ resources: z.ZodArray<z.ZodObject<{
74
+ id: z.ZodString;
75
+ kind: z.ZodString;
76
+ name: z.ZodOptional<z.ZodString>;
77
+ region: z.ZodOptional<z.ZodString>;
78
+ status: z.ZodOptional<z.ZodString>;
79
+ managedBy: z.ZodOptional<z.ZodString>;
80
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
81
+ createdAt: z.ZodOptional<z.ZodString>;
82
+ raw: z.ZodOptional<z.ZodUnknown>;
83
+ }, z.core.$strip>>;
84
+ declarations: z.ZodOptional<z.ZodArray<z.ZodObject<{
85
+ kind: z.ZodString;
86
+ id: z.ZodString;
87
+ name: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strip>>>;
89
+ authority: z.ZodOptional<z.ZodObject<{
90
+ provider: z.ZodString;
91
+ requestedEnvironment: z.ZodString;
92
+ resolvedEnvironment: z.ZodString;
93
+ source: z.ZodString;
94
+ account: z.ZodString;
95
+ accountIdentity: z.ZodOptional<z.ZodString>;
96
+ capabilities: z.ZodArray<z.ZodString>;
97
+ }, z.core.$strip>>;
98
+ credentialPath: z.ZodOptional<z.ZodString>;
99
+ }, z.core.$strip>;
100
+ export type InventorySnapshot = z.infer<typeof InventorySnapshotSchema>;
101
+ export declare const InventoryWorkspaceSourcesSchema: z.ZodObject<{
102
+ deploymentProviders: z.ZodDefault<z.ZodArray<z.ZodString>>;
103
+ workerAdapters: z.ZodDefault<z.ZodArray<z.ZodString>>;
104
+ }, z.core.$strip>;
105
+ export type InventoryWorkspaceSources = z.infer<typeof InventoryWorkspaceSourcesSchema>;
106
+ export declare const InventoryWorkspaceSchema: z.ZodObject<{
107
+ deployments: z.ZodDefault<z.ZodArray<z.ZodObject<{
108
+ provider: z.ZodString;
109
+ unitName: z.ZodNullable<z.ZodString>;
110
+ }, z.core.$strip>>>;
111
+ workers: z.ZodDefault<z.ZodArray<z.ZodObject<{
112
+ id: z.ZodString;
113
+ name: z.ZodOptional<z.ZodString>;
114
+ description: z.ZodOptional<z.ZodString>;
115
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
116
+ hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ enabled: z.ZodOptional<z.ZodBoolean>;
118
+ priority: z.ZodOptional<z.ZodNumber>;
119
+ capabilityId: z.ZodOptional<z.ZodString>;
120
+ requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
+ optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
+ retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
123
+ maxAgeDays: z.ZodOptional<z.ZodNumber>;
124
+ maxEntries: z.ZodOptional<z.ZodNumber>;
125
+ maxBytes: z.ZodOptional<z.ZodNumber>;
126
+ cascadeFrom: z.ZodOptional<z.ZodString>;
127
+ ageField: z.ZodOptional<z.ZodString>;
128
+ reason: z.ZodString;
129
+ enforcedBy: z.ZodOptional<z.ZodString>;
130
+ }, z.core.$strip>]>>;
131
+ kind: z.ZodLiteral<"infra/worker">;
132
+ entrypoint: z.ZodOptional<z.ZodString>;
133
+ queues: z.ZodOptional<z.ZodArray<z.ZodString>>;
134
+ concurrency: z.ZodOptional<z.ZodNumber>;
135
+ scaling: z.ZodOptional<z.ZodObject<{
136
+ min: z.ZodDefault<z.ZodNumber>;
137
+ max: z.ZodDefault<z.ZodNumber>;
138
+ cpu: z.ZodOptional<z.ZodString>;
139
+ memory: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$strip>>;
141
+ runtime: z.ZodOptional<z.ZodObject<{
142
+ scope: z.ZodObject<{
143
+ surface: z.ZodEnum<{
144
+ agent: "agent";
145
+ browser: "browser";
146
+ ssr: "ssr";
147
+ cli: "cli";
148
+ tui: "tui";
149
+ worker: "worker";
150
+ mcp: "mcp";
151
+ bridge: "bridge";
152
+ }>;
153
+ hardware: z.ZodEnum<{
154
+ consumer: "consumer";
155
+ cloud: "cloud";
156
+ }>;
157
+ purpose: z.ZodEnum<{
158
+ agent: "agent";
159
+ worker: "worker";
160
+ mcp: "mcp";
161
+ direct: "direct";
162
+ projection: "projection";
163
+ }>;
164
+ lifecycle: z.ZodEnum<{
165
+ finite: "finite";
166
+ persistent: "persistent";
167
+ }>;
168
+ hosting: z.ZodObject<{
169
+ mode: z.ZodUnion<readonly [z.ZodEnum<{
170
+ local: "local";
171
+ hosted: "hosted";
172
+ "managed-cloud": "managed-cloud";
173
+ }>, z.ZodString]>;
174
+ owner: z.ZodUnion<readonly [z.ZodEnum<{
175
+ consumer: "consumer";
176
+ customer: "customer";
177
+ vibes: "vibes";
178
+ }>, z.ZodString]>;
179
+ venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
180
+ "user-device": "user-device";
181
+ "ipc-worker": "ipc-worker";
182
+ doks: "doks";
183
+ "cloudflare-workers": "cloudflare-workers";
184
+ "digitalocean-functions": "digitalocean-functions";
185
+ }>, z.ZodString]>>;
186
+ provider: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strip>;
188
+ qualifiers: z.ZodObject<{
189
+ dev: z.ZodBoolean;
190
+ building: z.ZodOptional<z.ZodBoolean>;
191
+ environmentTier: z.ZodOptional<z.ZodEnum<{
192
+ local: "local";
193
+ dev: "dev";
194
+ staging: "staging";
195
+ production: "production";
196
+ }>>;
197
+ profile: z.ZodOptional<z.ZodString>;
198
+ os: z.ZodOptional<z.ZodString>;
199
+ cef: z.ZodOptional<z.ZodBoolean>;
200
+ trustedOrigin: z.ZodOptional<z.ZodString>;
201
+ rendererGeneration: z.ZodOptional<z.ZodNumber>;
202
+ filesystem: z.ZodOptional<z.ZodString>;
203
+ browserBackend: z.ZodOptional<z.ZodString>;
204
+ workspaceSessionId: z.ZodOptional<z.ZodString>;
205
+ workspaceTarget: z.ZodOptional<z.ZodString>;
206
+ repositoryId: z.ZodOptional<z.ZodString>;
207
+ remoteHostId: z.ZodOptional<z.ZodString>;
208
+ connectionMode: z.ZodOptional<z.ZodString>;
209
+ outreachExportsDir: z.ZodOptional<z.ZodString>;
210
+ serve: z.ZodOptional<z.ZodString>;
211
+ hotReload: z.ZodOptional<z.ZodEnum<{
212
+ on: "on";
213
+ off: "off";
214
+ }>>;
215
+ loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
216
+ }, z.core.$strict>;
217
+ capabilities: z.ZodOptional<z.ZodObject<{
218
+ requestPrincipals: z.ZodOptional<z.ZodBoolean>;
219
+ interactiveSession: z.ZodOptional<z.ZodBoolean>;
220
+ hostCredentials: z.ZodOptional<z.ZodBoolean>;
221
+ sharedHost: z.ZodOptional<z.ZodBoolean>;
222
+ }, z.core.$strict>>;
223
+ workspace: z.ZodOptional<z.ZodObject<{
224
+ root: z.ZodOptional<z.ZodString>;
225
+ access: z.ZodOptional<z.ZodEnum<{
226
+ read: "read";
227
+ write: "write";
228
+ }>>;
229
+ }, z.core.$strict>>;
230
+ tenancy: z.ZodOptional<z.ZodObject<{
231
+ ownerType: z.ZodEnum<{
232
+ user: "user";
233
+ organization: "organization";
234
+ team: "team";
235
+ system: "system";
236
+ }>;
237
+ ownerId: z.ZodString;
238
+ teamId: z.ZodOptional<z.ZodString>;
239
+ }, z.core.$strip>>;
240
+ actor: z.ZodOptional<z.ZodObject<{
241
+ agentId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
242
+ harness: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
243
+ agentSystemId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
244
+ harnessSessionId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
245
+ userId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
246
+ orgId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
247
+ projectId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
248
+ teamId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
249
+ home: z.ZodOptional<z.ZodEnum<{
250
+ user: "user";
251
+ organization: "organization";
252
+ team: "team";
253
+ }>>;
254
+ projectIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>>>;
255
+ participantId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
256
+ sessionId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
257
+ }, z.core.$strip>>;
258
+ }, z.core.$strip>;
259
+ adapter: z.ZodOptional<z.ZodString>;
260
+ }, z.core.$strip>>;
261
+ env: z.ZodOptional<z.ZodArray<z.ZodObject<{
262
+ name: z.ZodString;
263
+ public: z.ZodOptional<z.ZodBoolean>;
264
+ required: z.ZodOptional<z.ZodBoolean>;
265
+ value: z.ZodOptional<z.ZodString>;
266
+ secret: z.ZodOptional<z.ZodBoolean>;
267
+ description: z.ZodOptional<z.ZodString>;
268
+ storeKey: z.ZodOptional<z.ZodString>;
269
+ storeBinding: z.ZodOptional<z.ZodBoolean>;
270
+ }, z.core.$strip>>>;
271
+ config: z.ZodOptional<z.ZodObject<{
272
+ adapter: z.ZodString;
273
+ }, z.core.$loose>>;
274
+ }, z.core.$strip>>>;
275
+ }, z.core.$strip>;
276
+ export type InventoryWorkspace = z.infer<typeof InventoryWorkspaceSchema>;
277
+ export declare const InventoryDescriptorSchema: z.ZodObject<{
278
+ id: z.ZodString;
279
+ name: z.ZodOptional<z.ZodString>;
280
+ description: z.ZodOptional<z.ZodString>;
281
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
282
+ hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
283
+ enabled: z.ZodOptional<z.ZodBoolean>;
284
+ priority: z.ZodOptional<z.ZodNumber>;
285
+ capabilityId: z.ZodOptional<z.ZodString>;
286
+ requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
287
+ optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
288
+ config: z.ZodOptional<z.ZodUnknown>;
289
+ retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
290
+ maxAgeDays: z.ZodOptional<z.ZodNumber>;
291
+ maxEntries: z.ZodOptional<z.ZodNumber>;
292
+ maxBytes: z.ZodOptional<z.ZodNumber>;
293
+ cascadeFrom: z.ZodOptional<z.ZodString>;
294
+ ageField: z.ZodOptional<z.ZodString>;
295
+ reason: z.ZodString;
296
+ enforcedBy: z.ZodOptional<z.ZodString>;
297
+ }, z.core.$strip>]>>;
298
+ kind: z.ZodLiteral<"infra/inventory">;
299
+ provider: z.ZodOptional<z.ZodString>;
300
+ providerAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
301
+ resourceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
302
+ workspaceSources: z.ZodOptional<z.ZodObject<{
303
+ deploymentProviders: z.ZodDefault<z.ZodArray<z.ZodString>>;
304
+ workerAdapters: z.ZodDefault<z.ZodArray<z.ZodString>>;
305
+ }, z.core.$strip>>;
306
+ }, z.core.$strip>;
307
+ export type InventoryDescriptor = z.infer<typeof InventoryDescriptorSchema>;
308
+ export interface InventoryImplementation {
309
+ /** Enumerate resources for one or all configured resource kinds. */
310
+ collect(opts?: {
311
+ kinds?: string[];
312
+ workspace?: InventoryWorkspace;
313
+ }): Promise<InventorySnapshot>;
314
+ /** Optional owner-provided audit advice for a sanitized failure message. */
315
+ auditDiagnostic?(message: string): string;
316
+ }
317
+ declare class DefaultInventoryImplementation {
318
+ readonly descriptor: RuntimeDescriptor;
319
+ readonly context: KindContext;
320
+ /** The descriptor as this kind's schema reads it. */
321
+ readonly config: InventoryDescriptor;
322
+ constructor(descriptor: RuntimeDescriptor, context: KindContext);
323
+ }
324
+ export declare const inventoryKind: import("@vibesdotdev/kernel").RuntimeKindDescriptorRecord<DefaultInventoryImplementation>;
325
+ export {};
326
+ //# sourceMappingURL=inventory.kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inventory.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/inventory.kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,eAAe,EAGf,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAKpE,eAAO,MAAM,uBAAuB;;;;;;;;;;iBAUlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CA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+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAU1E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsB,CAAC;AAC7D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACvC,oEAAoE;IACpE,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,kBAAkB,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACjG,4EAA4E;IAC5E,eAAe,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1C;AAED,cAAM,8BAA8B;aAIlB,UAAU,EAAE,iBAAiB;aAC7B,OAAO,EAAE,WAAW;IAJrC,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;gBAEpB,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,WAAW;CAKrC;AAED,eAAO,MAAM,aAAa,2FAOzB,CAAC"}
@@ -0,0 +1,188 @@
1
+ /**
2
+ * Kind: infra/inventory
3
+ *
4
+ * Generic read-only inventory descriptor. Implementations enumerate provider
5
+ * resources without mutating them. Used by `vibes infra inventory` and
6
+ * provider-specific list/status commands.
7
+ */
8
+ import * as z from 'zod/v4';
9
+ import { settleUntrusted } from '@vibesdotdev/config/manifest/read-untrusted';
10
+ import { CapabilityError, CaughtFailureSchema } from '@vibesdotdev/kernel';
11
+ import { createRuntimeKind } from '@vibesdotdev/kernel/factory/kind';
12
+ import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel/schemas/descriptor';
13
+ import { readKindDescriptor } from "./read-descriptor.js";
14
+ import { INFRA_DISCOVERY_PATTERNS } from "./discovery.js";
15
+ import { WorkerDescriptorSchema } from "./worker.kind.js";
16
+ export const InventoryResourceSchema = z.object({
17
+ id: z.string(),
18
+ kind: z.string(),
19
+ name: z.string().optional(),
20
+ region: z.string().optional(),
21
+ status: z.string().optional(),
22
+ managedBy: z.string().optional(),
23
+ tags: z.array(z.string()).optional(),
24
+ createdAt: z.string().optional(),
25
+ raw: z.unknown().optional()
26
+ });
27
+ export const InfraProviderFailureSchema = z.object({
28
+ code: z.string(),
29
+ message: z.string(),
30
+ retryable: z.boolean().optional()
31
+ });
32
+ const FAILURE_UNREADABLE = {
33
+ code: 'INVALID_INPUT',
34
+ reason: 'infra-provider-failure-unreadable',
35
+ message: () => 'Provider failure evidence does not read.'
36
+ };
37
+ /** The evidence a failure that does not read as `InfraProviderFailure` is carried as. */
38
+ const UNREADABLE_FAILURE = {
39
+ code: 'PROVIDER_UNAVAILABLE',
40
+ message: 'Provider operation failed; inspect the provider-specific sanitized diagnostics.'
41
+ };
42
+ /** `failure` as the schema reads it; one that does not read (or throws when read) is the fixed unreadable evidence. */
43
+ function readFailure(failure) {
44
+ const read = settleUntrusted(InfraProviderFailureSchema, () => failure, FAILURE_UNREADABLE);
45
+ return read.ok ? read.data : UNREADABLE_FAILURE;
46
+ }
47
+ /**
48
+ * Provider-sanitized failure evidence as a typed `UNAVAILABLE
49
+ * infra-provider-failure`. The provider's own code stays on `failure.code`
50
+ * (and in details); the message is the provider's sanitized message.
51
+ */
52
+ export class SanitizedInfraProviderError extends CapabilityError {
53
+ failure;
54
+ constructor(failure, cause) {
55
+ const parsed = readFailure(failure);
56
+ const options = {
57
+ reason: 'infra-provider-failure',
58
+ retryable: parsed.retryable,
59
+ details: { providerCode: parsed.code }
60
+ };
61
+ if (cause !== undefined)
62
+ options.cause = cause;
63
+ super(parsed.message, 'UNAVAILABLE', options);
64
+ this.name = 'SanitizedInfraProviderError';
65
+ this.failure = parsed;
66
+ }
67
+ }
68
+ export function createSanitizedInfraProviderError(failure, cause) {
69
+ return new SanitizedInfraProviderError(failure, cause);
70
+ }
71
+ export const InfraAuthorityFingerprintSchema = z.object({
72
+ provider: z.string().min(1),
73
+ requestedEnvironment: z.string().min(1),
74
+ resolvedEnvironment: z.string().min(1),
75
+ source: z.string().min(1),
76
+ account: z.string().min(1),
77
+ /** Stable, non-display digest used to compare identities hidden by redaction. */
78
+ accountIdentity: z.string().regex(/^sha256:[a-f0-9]{64}$/).optional(),
79
+ capabilities: z.array(z.string().min(1))
80
+ });
81
+ /** Stable, provider-neutral text form for operator-facing inventory and audit output. */
82
+ export function formatInfraAuthorityFingerprint(authority) {
83
+ const parsed = InfraAuthorityFingerprintSchema.parse(authority);
84
+ return [
85
+ `provider=${parsed.provider}`,
86
+ `requested=${parsed.requestedEnvironment}`,
87
+ `resolved=${parsed.resolvedEnvironment}`,
88
+ `source=${parsed.source}`,
89
+ `account=${parsed.account}`,
90
+ `capabilities=${[...parsed.capabilities].sort().join(',')}`
91
+ ].join(' ');
92
+ }
93
+ /**
94
+ * Reconcile authority evidence emitted by several provider surfaces. Identity
95
+ * must be identical; capabilities are the honest union of operations actually
96
+ * requested by those surfaces.
97
+ */
98
+ export function mergeInfraAuthorityFingerprints(authorities) {
99
+ if (authorities.length === 0)
100
+ return undefined;
101
+ const parsed = authorities.map((authority) => InfraAuthorityFingerprintSchema.parse(authority));
102
+ const [first, ...rest] = parsed;
103
+ if (parsed.length > 1 && parsed.some((authority) => !authority.accountIdentity)) {
104
+ throw createSanitizedInfraProviderError({
105
+ code: 'INFRA_AUTHORITY_DIVERGENCE',
106
+ message: 'Infrastructure provider surfaces resolved different operator authorities.',
107
+ retryable: false
108
+ });
109
+ }
110
+ for (const authority of rest) {
111
+ if (authority.provider !== first.provider ||
112
+ authority.requestedEnvironment !== first.requestedEnvironment ||
113
+ authority.resolvedEnvironment !== first.resolvedEnvironment ||
114
+ authority.source !== first.source ||
115
+ authority.account !== first.account ||
116
+ authority.accountIdentity !== first.accountIdentity) {
117
+ throw createSanitizedInfraProviderError({
118
+ code: 'INFRA_AUTHORITY_DIVERGENCE',
119
+ message: 'Infrastructure provider surfaces resolved different operator authorities.',
120
+ retryable: false
121
+ });
122
+ }
123
+ }
124
+ return InfraAuthorityFingerprintSchema.parse({
125
+ ...first,
126
+ capabilities: [...new Set(parsed.flatMap((authority) => authority.capabilities))].sort()
127
+ });
128
+ }
129
+ /**
130
+ * Convert arbitrary backend exceptions into bounded operator-safe evidence: a
131
+ * `SanitizedInfraProviderError` keeps its evidence; anything else is the fixed
132
+ * unreadable evidence (what it says is never repeated).
133
+ */
134
+ export function sanitizeInfraProviderFailure(error) {
135
+ const caught = CaughtFailureSchema.parse(error);
136
+ return caught instanceof SanitizedInfraProviderError ? caught.failure : UNREADABLE_FAILURE;
137
+ }
138
+ export const InventoryDeclaredResourceSchema = z.object({
139
+ kind: z.string().min(1),
140
+ id: z.string().min(1),
141
+ name: z.string().min(1).optional()
142
+ });
143
+ export const InventorySnapshotSchema = z.object({
144
+ provider: z.string(),
145
+ collectedAt: z.string(),
146
+ resources: z.array(InventoryResourceSchema),
147
+ declarations: z.array(InventoryDeclaredResourceSchema).optional(),
148
+ authority: InfraAuthorityFingerprintSchema.optional(),
149
+ /** Credential-route evidence only; never includes a credential value or key material. */
150
+ credentialPath: z.string().min(1).optional()
151
+ });
152
+ export const InventoryWorkspaceSourcesSchema = z.object({
153
+ deploymentProviders: z.array(z.string().min(1)).default([]),
154
+ workerAdapters: z.array(z.string().min(1)).default([])
155
+ });
156
+ export const InventoryWorkspaceSchema = z.object({
157
+ deployments: z.array(z.object({
158
+ provider: z.string().min(1),
159
+ unitName: z.string().nullable()
160
+ })).default([]),
161
+ workers: z.array(WorkerDescriptorSchema).default([])
162
+ });
163
+ const InventoryBaseSchema = RuntimeDescriptorSchema.extend({
164
+ kind: z.literal('infra/inventory'),
165
+ provider: z.string().min(1).optional(),
166
+ providerAliases: z.array(z.string().min(1)).optional(),
167
+ resourceKinds: z.array(z.string()).optional(),
168
+ workspaceSources: InventoryWorkspaceSourcesSchema.optional()
169
+ });
170
+ export const InventoryDescriptorSchema = InventoryBaseSchema;
171
+ class DefaultInventoryImplementation {
172
+ descriptor;
173
+ context;
174
+ /** The descriptor as this kind's schema reads it. */
175
+ config;
176
+ constructor(descriptor, context) {
177
+ this.descriptor = descriptor;
178
+ this.context = context;
179
+ this.config = readKindDescriptor(InventoryDescriptorSchema, descriptor);
180
+ }
181
+ }
182
+ export const inventoryKind = createRuntimeKind({
183
+ id: 'infra/inventory',
184
+ descriptorSchema: InventoryDescriptorSchema,
185
+ defaultImplementation: DefaultInventoryImplementation,
186
+ discoveryPatterns: INFRA_DISCOVERY_PATTERNS
187
+ });
188
+ //# sourceMappingURL=inventory.kind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inventory.kind.js","sourceRoot":"","sources":["../../src/kinds/inventory.kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAA6B,MAAM,6CAA6C,CAAC;AACzG,OAAO,EACL,eAAe,EACf,mBAAmB,EAGpB,MAAM,qBAAqB,CAAC;AAC7B,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;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,C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config` is an open, adapter-keyed shape (DigitalOcean's load balancer
7
+ * config lives in `@vibesdotdev/integrations-digitalocean`); this kind
8
+ * names no provider, so a config for any adapter parses here and the
9
+ * adapter validates its own grammar.
10
+ */
11
+ import * as z from 'zod/v4';
12
+ import type { RuntimeDescriptor } from '@vibesdotdev/kernel/schemas/descriptor';
13
+ import type { KindContext } from '@vibesdotdev/kernel/schemas/kind';
14
+ export declare const LoadBalancerForwardingRuleSchema: z.ZodObject<{
15
+ entryProtocol: z.ZodEnum<{
16
+ tcp: "tcp";
17
+ http: "http";
18
+ udp: "udp";
19
+ https: "https";
20
+ http2: "http2";
21
+ http3: "http3";
22
+ }>;
23
+ entryPort: z.ZodNumber;
24
+ targetProtocol: z.ZodEnum<{
25
+ tcp: "tcp";
26
+ http: "http";
27
+ udp: "udp";
28
+ https: "https";
29
+ http2: "http2";
30
+ }>;
31
+ targetPort: z.ZodNumber;
32
+ certificateId: z.ZodOptional<z.ZodString>;
33
+ tlsPassthrough: z.ZodOptional<z.ZodBoolean>;
34
+ }, z.core.$strip>;
35
+ export type LoadBalancerForwardingRule = z.infer<typeof LoadBalancerForwardingRuleSchema>;
36
+ export declare const LoadBalancerHealthCheckSchema: z.ZodObject<{
37
+ protocol: z.ZodEnum<{
38
+ tcp: "tcp";
39
+ http: "http";
40
+ https: "https";
41
+ }>;
42
+ port: z.ZodOptional<z.ZodNumber>;
43
+ path: z.ZodOptional<z.ZodString>;
44
+ checkIntervalSeconds: z.ZodOptional<z.ZodNumber>;
45
+ responseTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
46
+ unhealthyThreshold: z.ZodOptional<z.ZodNumber>;
47
+ healthyThreshold: z.ZodOptional<z.ZodNumber>;
48
+ }, z.core.$strip>;
49
+ export type LoadBalancerHealthCheck = z.infer<typeof LoadBalancerHealthCheckSchema>;
50
+ /**
51
+ * Adapter-specific configuration: the adapter id plus its own fields. Each
52
+ * adapter package defines and parses its own config schema; this kind names
53
+ * no provider, so a config for any adapter — including one contributed by a
54
+ * user plugin — parses here, and the adapter validates its own grammar.
55
+ */
56
+ export declare const LoadBalancerConfigSchema: z.ZodObject<{
57
+ adapter: z.ZodString;
58
+ }, z.core.$loose>;
59
+ export type LoadBalancerConfig = z.infer<typeof LoadBalancerConfigSchema>;
60
+ export declare const LoadBalancerDescriptorSchema: z.ZodObject<{
61
+ id: z.ZodString;
62
+ name: z.ZodOptional<z.ZodString>;
63
+ description: z.ZodOptional<z.ZodString>;
64
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
65
+ hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
+ enabled: z.ZodOptional<z.ZodBoolean>;
67
+ priority: z.ZodOptional<z.ZodNumber>;
68
+ capabilityId: z.ZodOptional<z.ZodString>;
69
+ requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
+ optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
+ retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
72
+ maxAgeDays: z.ZodOptional<z.ZodNumber>;
73
+ maxEntries: z.ZodOptional<z.ZodNumber>;
74
+ maxBytes: z.ZodOptional<z.ZodNumber>;
75
+ cascadeFrom: z.ZodOptional<z.ZodString>;
76
+ ageField: z.ZodOptional<z.ZodString>;
77
+ reason: z.ZodString;
78
+ enforcedBy: z.ZodOptional<z.ZodString>;
79
+ }, z.core.$strip>]>>;
80
+ kind: z.ZodLiteral<"infra/load-balancer">;
81
+ region: z.ZodOptional<z.ZodString>;
82
+ forwardingRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
83
+ entryProtocol: z.ZodEnum<{
84
+ tcp: "tcp";
85
+ http: "http";
86
+ udp: "udp";
87
+ https: "https";
88
+ http2: "http2";
89
+ http3: "http3";
90
+ }>;
91
+ entryPort: z.ZodNumber;
92
+ targetProtocol: z.ZodEnum<{
93
+ tcp: "tcp";
94
+ http: "http";
95
+ udp: "udp";
96
+ https: "https";
97
+ http2: "http2";
98
+ }>;
99
+ targetPort: z.ZodNumber;
100
+ certificateId: z.ZodOptional<z.ZodString>;
101
+ tlsPassthrough: z.ZodOptional<z.ZodBoolean>;
102
+ }, z.core.$strip>>>;
103
+ healthCheck: z.ZodOptional<z.ZodObject<{
104
+ protocol: z.ZodEnum<{
105
+ tcp: "tcp";
106
+ http: "http";
107
+ https: "https";
108
+ }>;
109
+ port: z.ZodOptional<z.ZodNumber>;
110
+ path: z.ZodOptional<z.ZodString>;
111
+ checkIntervalSeconds: z.ZodOptional<z.ZodNumber>;
112
+ responseTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
113
+ unhealthyThreshold: z.ZodOptional<z.ZodNumber>;
114
+ healthyThreshold: z.ZodOptional<z.ZodNumber>;
115
+ }, z.core.$strip>>;
116
+ algorithm: z.ZodOptional<z.ZodEnum<{
117
+ round_robin: "round_robin";
118
+ least_connections: "least_connections";
119
+ }>>;
120
+ redirectHttpToHttps: z.ZodOptional<z.ZodBoolean>;
121
+ config: z.ZodOptional<z.ZodObject<{
122
+ adapter: z.ZodString;
123
+ }, z.core.$loose>>;
124
+ }, z.core.$strip>;
125
+ export type LoadBalancerDescriptor = z.infer<typeof LoadBalancerDescriptorSchema>;
126
+ declare class DefaultLoadBalancerImplementation {
127
+ readonly descriptor: RuntimeDescriptor;
128
+ readonly context: KindContext;
129
+ /** The descriptor as this kind's schema reads it. */
130
+ readonly config: LoadBalancerDescriptor;
131
+ constructor(descriptor: RuntimeDescriptor, context: KindContext);
132
+ }
133
+ export declare const loadBalancerKind: import("@vibesdotdev/kernel").RuntimeKindDescriptorRecord<DefaultLoadBalancerImplementation>;
134
+ export {};
135
+ //# sourceMappingURL=load-balancer.kind.d.ts.map