@fabrika/provider-zerops 0.9.0-dev.4 → 0.9.0-dev.5

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 (81) hide show
  1. package/package.json +10 -9
  2. package/src/api/client.ts +12 -0
  3. package/src/api/readers.ts +29 -0
  4. package/src/api/types.ts +52 -0
  5. package/src/api.ts +2 -0
  6. package/src/cli.ts +11 -0
  7. package/src/collaborators.ts +0 -14
  8. package/src/compile.ts +1 -1
  9. package/src/control.ts +9 -57
  10. package/src/execution.ts +63 -185
  11. package/src/index.ts +2 -0
  12. package/src/installation/admin.ts +1 -1
  13. package/src/installation/deploy-options.ts +1 -2
  14. package/src/installation/deploy.ts +225 -80
  15. package/src/installation/generated/platform-console-schema.ts +3 -0
  16. package/src/installation/generated/platform-proxy-manifest.ts +1 -1
  17. package/src/installation/guide.md +48 -18
  18. package/src/installation/hosts.ts +1 -7
  19. package/src/installation/index.ts +13 -16
  20. package/src/installation/init-options.ts +2 -1
  21. package/src/installation/install-environment.ts +47 -108
  22. package/src/installation/install-options.ts +3 -1
  23. package/src/installation/install-secrets.ts +24 -68
  24. package/src/installation/install.ts +9 -4
  25. package/src/installation/sidecar.ts +5 -26
  26. package/src/installation/topology/setups.ts +15 -4
  27. package/src/installation/topology/topology.ts +31 -21
  28. package/src/installation/upgrade-options.ts +2 -2
  29. package/src/managed-env.ts +1 -174
  30. package/src/manifest.ts +2 -9
  31. package/src/namespace/claims.ts +56 -1
  32. package/src/namespace/errors.ts +1 -1
  33. package/src/namespace/manifest.ts +6 -19
  34. package/src/namespace/provisioning.ts +20 -2
  35. package/src/namespace/proxy-attempt.ts +14 -2
  36. package/src/namespace/proxy-reads.ts +12 -22
  37. package/src/namespace/types.ts +2 -0
  38. package/src/namespace-cli.ts +152 -0
  39. package/src/plan.ts +1 -6
  40. package/src/provider.ts +39 -93
  41. package/src/proxy-manifest-carrier.ts +18 -0
  42. package/src/types.ts +0 -2
  43. package/types/src/api/readers.d.ts +148 -10
  44. package/types/src/api/types.d.ts +49 -0
  45. package/types/src/api.d.ts +1 -1
  46. package/types/src/cli.d.ts +3 -0
  47. package/types/src/collaborators.d.ts +0 -2
  48. package/types/src/compile.d.ts +1 -1
  49. package/types/src/control.d.ts +3 -4
  50. package/types/src/execution.d.ts +5 -17
  51. package/types/src/index.d.ts +1 -1
  52. package/types/src/installation/deploy-options.d.ts +1 -1
  53. package/types/src/installation/deploy.d.ts +40 -0
  54. package/types/src/installation/generated/platform-proxy-manifest.d.ts +1 -1
  55. package/types/src/installation/hosts.d.ts +1 -5
  56. package/types/src/installation/index.d.ts +0 -2
  57. package/types/src/installation/install-environment.d.ts +11 -18
  58. package/types/src/installation/install-secrets.d.ts +3 -16
  59. package/types/src/installation/sidecar.d.ts +0 -2
  60. package/types/src/installation/topology/installation-schemas.d.ts +84 -84
  61. package/types/src/installation/topology/setups.d.ts +2 -1
  62. package/types/src/installation/topology/topology.d.ts +15 -10
  63. package/types/src/managed-env.d.ts +0 -33
  64. package/types/src/manifest.d.ts +0 -2
  65. package/types/src/namespace/claims.d.ts +14 -1
  66. package/types/src/namespace/codec.d.ts +4 -4
  67. package/types/src/namespace/errors.d.ts +1 -1
  68. package/types/src/namespace/proxy-attempt.d.ts +3 -0
  69. package/types/src/namespace/proxy-reads.d.ts +4 -15
  70. package/types/src/namespace/types.d.ts +2 -0
  71. package/types/src/namespace-cli.d.ts +2 -0
  72. package/types/src/plan.d.ts +2 -3
  73. package/types/src/provider.d.ts +0 -2
  74. package/types/src/proxy-manifest-carrier.d.ts +8 -0
  75. package/types/src/types.d.ts +0 -2
  76. package/src/installation/mcp.ts +0 -102
  77. package/src/installation/proxy-manifest.ts +0 -214
  78. package/src/installation/secrets.ts +0 -78
  79. package/types/src/installation/mcp.d.ts +0 -18
  80. package/types/src/installation/proxy-manifest.d.ts +0 -105
  81. package/types/src/installation/secrets.d.ts +0 -17
@@ -422,17 +422,6 @@ export declare const setupSchema: z.ZodObject<{
422
422
  }>>;
423
423
  }, "strict", z.ZodTypeAny, {
424
424
  setup: string;
425
- build?: {
426
- deployFiles: string | string[];
427
- cache?: string | boolean | string[] | undefined;
428
- os?: "alpine" | "ubuntu" | undefined;
429
- envVariables?: Record<string, string | number | boolean> | undefined;
430
- deploy?: string | string[] | undefined;
431
- base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
432
- buildCommands?: string[] | undefined;
433
- prepareCommands?: string[] | undefined;
434
- addToRunPrepare?: string | string[] | undefined;
435
- } | undefined;
436
425
  run?: {
437
426
  os?: "alpine" | "ubuntu" | undefined;
438
427
  envVariables?: Record<string, string | number | boolean> | undefined;
@@ -494,6 +483,17 @@ export declare const setupSchema: z.ZodObject<{
494
483
  workingDir?: string | undefined;
495
484
  }[] | undefined;
496
485
  } | undefined;
486
+ build?: {
487
+ deployFiles: string | string[];
488
+ cache?: string | boolean | string[] | undefined;
489
+ os?: "alpine" | "ubuntu" | undefined;
490
+ envVariables?: Record<string, string | number | boolean> | undefined;
491
+ deploy?: string | string[] | undefined;
492
+ base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
493
+ buildCommands?: string[] | undefined;
494
+ prepareCommands?: string[] | undefined;
495
+ addToRunPrepare?: string | string[] | undefined;
496
+ } | undefined;
497
497
  extends?: string | string[] | undefined;
498
498
  deploy?: {
499
499
  readinessCheck?: {
@@ -513,17 +513,6 @@ export declare const setupSchema: z.ZodObject<{
513
513
  } | undefined;
514
514
  }, {
515
515
  setup: string;
516
- build?: {
517
- deployFiles: string | string[];
518
- cache?: string | boolean | string[] | undefined;
519
- os?: "alpine" | "ubuntu" | undefined;
520
- envVariables?: Record<string, string | number | boolean> | undefined;
521
- deploy?: string | string[] | undefined;
522
- base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
523
- buildCommands?: string[] | undefined;
524
- prepareCommands?: string[] | undefined;
525
- addToRunPrepare?: string | string[] | undefined;
526
- } | undefined;
527
516
  run?: {
528
517
  os?: "alpine" | "ubuntu" | undefined;
529
518
  envVariables?: Record<string, string | number | boolean> | undefined;
@@ -585,6 +574,17 @@ export declare const setupSchema: z.ZodObject<{
585
574
  workingDir?: string | undefined;
586
575
  }[] | undefined;
587
576
  } | undefined;
577
+ build?: {
578
+ deployFiles: string | string[];
579
+ cache?: string | boolean | string[] | undefined;
580
+ os?: "alpine" | "ubuntu" | undefined;
581
+ envVariables?: Record<string, string | number | boolean> | undefined;
582
+ deploy?: string | string[] | undefined;
583
+ base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
584
+ buildCommands?: string[] | undefined;
585
+ prepareCommands?: string[] | undefined;
586
+ addToRunPrepare?: string | string[] | undefined;
587
+ } | undefined;
588
588
  extends?: string | string[] | undefined;
589
589
  deploy?: {
590
590
  readinessCheck?: {
@@ -1027,17 +1027,6 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1027
1027
  }>>;
1028
1028
  }, "strict", z.ZodTypeAny, {
1029
1029
  setup: string;
1030
- build?: {
1031
- deployFiles: string | string[];
1032
- cache?: string | boolean | string[] | undefined;
1033
- os?: "alpine" | "ubuntu" | undefined;
1034
- envVariables?: Record<string, string | number | boolean> | undefined;
1035
- deploy?: string | string[] | undefined;
1036
- base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1037
- buildCommands?: string[] | undefined;
1038
- prepareCommands?: string[] | undefined;
1039
- addToRunPrepare?: string | string[] | undefined;
1040
- } | undefined;
1041
1030
  run?: {
1042
1031
  os?: "alpine" | "ubuntu" | undefined;
1043
1032
  envVariables?: Record<string, string | number | boolean> | undefined;
@@ -1099,6 +1088,17 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1099
1088
  workingDir?: string | undefined;
1100
1089
  }[] | undefined;
1101
1090
  } | undefined;
1091
+ build?: {
1092
+ deployFiles: string | string[];
1093
+ cache?: string | boolean | string[] | undefined;
1094
+ os?: "alpine" | "ubuntu" | undefined;
1095
+ envVariables?: Record<string, string | number | boolean> | undefined;
1096
+ deploy?: string | string[] | undefined;
1097
+ base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1098
+ buildCommands?: string[] | undefined;
1099
+ prepareCommands?: string[] | undefined;
1100
+ addToRunPrepare?: string | string[] | undefined;
1101
+ } | undefined;
1102
1102
  extends?: string | string[] | undefined;
1103
1103
  deploy?: {
1104
1104
  readinessCheck?: {
@@ -1118,17 +1118,6 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1118
1118
  } | undefined;
1119
1119
  }, {
1120
1120
  setup: string;
1121
- build?: {
1122
- deployFiles: string | string[];
1123
- cache?: string | boolean | string[] | undefined;
1124
- os?: "alpine" | "ubuntu" | undefined;
1125
- envVariables?: Record<string, string | number | boolean> | undefined;
1126
- deploy?: string | string[] | undefined;
1127
- base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1128
- buildCommands?: string[] | undefined;
1129
- prepareCommands?: string[] | undefined;
1130
- addToRunPrepare?: string | string[] | undefined;
1131
- } | undefined;
1132
1121
  run?: {
1133
1122
  os?: "alpine" | "ubuntu" | undefined;
1134
1123
  envVariables?: Record<string, string | number | boolean> | undefined;
@@ -1190,6 +1179,17 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1190
1179
  workingDir?: string | undefined;
1191
1180
  }[] | undefined;
1192
1181
  } | undefined;
1182
+ build?: {
1183
+ deployFiles: string | string[];
1184
+ cache?: string | boolean | string[] | undefined;
1185
+ os?: "alpine" | "ubuntu" | undefined;
1186
+ envVariables?: Record<string, string | number | boolean> | undefined;
1187
+ deploy?: string | string[] | undefined;
1188
+ base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1189
+ buildCommands?: string[] | undefined;
1190
+ prepareCommands?: string[] | undefined;
1191
+ addToRunPrepare?: string | string[] | undefined;
1192
+ } | undefined;
1193
1193
  extends?: string | string[] | undefined;
1194
1194
  deploy?: {
1195
1195
  readinessCheck?: {
@@ -1211,17 +1211,6 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1211
1211
  }, "strict", z.ZodTypeAny, {
1212
1212
  zerops: {
1213
1213
  setup: string;
1214
- build?: {
1215
- deployFiles: string | string[];
1216
- cache?: string | boolean | string[] | undefined;
1217
- os?: "alpine" | "ubuntu" | undefined;
1218
- envVariables?: Record<string, string | number | boolean> | undefined;
1219
- deploy?: string | string[] | undefined;
1220
- base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1221
- buildCommands?: string[] | undefined;
1222
- prepareCommands?: string[] | undefined;
1223
- addToRunPrepare?: string | string[] | undefined;
1224
- } | undefined;
1225
1214
  run?: {
1226
1215
  os?: "alpine" | "ubuntu" | undefined;
1227
1216
  envVariables?: Record<string, string | number | boolean> | undefined;
@@ -1283,6 +1272,17 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1283
1272
  workingDir?: string | undefined;
1284
1273
  }[] | undefined;
1285
1274
  } | undefined;
1275
+ build?: {
1276
+ deployFiles: string | string[];
1277
+ cache?: string | boolean | string[] | undefined;
1278
+ os?: "alpine" | "ubuntu" | undefined;
1279
+ envVariables?: Record<string, string | number | boolean> | undefined;
1280
+ deploy?: string | string[] | undefined;
1281
+ base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1282
+ buildCommands?: string[] | undefined;
1283
+ prepareCommands?: string[] | undefined;
1284
+ addToRunPrepare?: string | string[] | undefined;
1285
+ } | undefined;
1286
1286
  extends?: string | string[] | undefined;
1287
1287
  deploy?: {
1288
1288
  readinessCheck?: {
@@ -1304,17 +1304,6 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1304
1304
  }, {
1305
1305
  zerops: {
1306
1306
  setup: string;
1307
- build?: {
1308
- deployFiles: string | string[];
1309
- cache?: string | boolean | string[] | undefined;
1310
- os?: "alpine" | "ubuntu" | undefined;
1311
- envVariables?: Record<string, string | number | boolean> | undefined;
1312
- deploy?: string | string[] | undefined;
1313
- base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1314
- buildCommands?: string[] | undefined;
1315
- prepareCommands?: string[] | undefined;
1316
- addToRunPrepare?: string | string[] | undefined;
1317
- } | undefined;
1318
1307
  run?: {
1319
1308
  os?: "alpine" | "ubuntu" | undefined;
1320
1309
  envVariables?: Record<string, string | number | boolean> | undefined;
@@ -1376,6 +1365,17 @@ export declare const zeropsYamlSchema: z.ZodObject<{
1376
1365
  workingDir?: string | undefined;
1377
1366
  }[] | undefined;
1378
1367
  } | undefined;
1368
+ build?: {
1369
+ deployFiles: string | string[];
1370
+ cache?: string | boolean | string[] | undefined;
1371
+ os?: "alpine" | "ubuntu" | undefined;
1372
+ envVariables?: Record<string, string | number | boolean> | undefined;
1373
+ deploy?: string | string[] | undefined;
1374
+ base?: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3" | ("alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3")[] | undefined;
1375
+ buildCommands?: string[] | undefined;
1376
+ prepareCommands?: string[] | undefined;
1377
+ addToRunPrepare?: string | string[] | undefined;
1378
+ } | undefined;
1379
1379
  extends?: string | string[] | undefined;
1380
1380
  deploy?: {
1381
1381
  readinessCheck?: {
@@ -1408,20 +1408,20 @@ export declare const importSchema: z.ZodObject<{
1408
1408
  location: z.ZodOptional<z.ZodEnum<["eu-central", "us-east-1", "us-west-1"]>>;
1409
1409
  }, "strict", z.ZodTypeAny, {
1410
1410
  name: string;
1411
- description?: string | undefined;
1412
1411
  envIsolation?: string | undefined;
1413
1412
  sshIsolation?: string | undefined;
1414
1413
  envVariables?: Record<string, string> | undefined;
1414
+ description?: string | undefined;
1415
1415
  corePackage?: "LIGHT" | "SERIOUS" | undefined;
1416
1416
  tags?: string[] | undefined;
1417
1417
  sharedIpv4?: boolean | undefined;
1418
1418
  location?: "eu-central" | "us-east-1" | "us-west-1" | undefined;
1419
1419
  }, {
1420
1420
  name: string;
1421
- description?: string | undefined;
1422
1421
  envIsolation?: string | undefined;
1423
1422
  sshIsolation?: string | undefined;
1424
1423
  envVariables?: Record<string, string> | undefined;
1424
+ description?: string | undefined;
1425
1425
  corePackage?: "LIGHT" | "SERIOUS" | undefined;
1426
1426
  tags?: string[] | undefined;
1427
1427
  sharedIpv4?: boolean | undefined;
@@ -1513,11 +1513,11 @@ export declare const importSchema: z.ZodObject<{
1513
1513
  type: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3";
1514
1514
  hostname: string;
1515
1515
  mount?: string[] | undefined;
1516
+ mode?: string | undefined;
1516
1517
  envIsolation?: string | undefined;
1517
1518
  override?: boolean | undefined;
1518
1519
  envSecrets?: Record<string, string> | undefined;
1519
1520
  dotEnvSecrets?: string | undefined;
1520
- mode?: string | undefined;
1521
1521
  os?: string | undefined;
1522
1522
  nginxConfig?: string | undefined;
1523
1523
  objectStorageSize?: number | undefined;
@@ -1556,11 +1556,11 @@ export declare const importSchema: z.ZodObject<{
1556
1556
  type: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3";
1557
1557
  hostname: string;
1558
1558
  mount?: string[] | undefined;
1559
+ mode?: string | undefined;
1559
1560
  envIsolation?: string | undefined;
1560
1561
  override?: boolean | undefined;
1561
1562
  envSecrets?: Record<string, string> | undefined;
1562
1563
  dotEnvSecrets?: string | undefined;
1563
- mode?: string | undefined;
1564
1564
  os?: string | undefined;
1565
1565
  nginxConfig?: string | undefined;
1566
1566
  objectStorageSize?: number | undefined;
@@ -1682,11 +1682,11 @@ export declare const importSchema: z.ZodObject<{
1682
1682
  type: "postgresql:ha@14" | "postgresql:ha@16" | "postgresql:ha@17" | "postgresql:ha@18" | "postgresql:single@14" | "postgresql:single@16" | "postgresql:single@17" | "postgresql:single@18";
1683
1683
  hostname: string;
1684
1684
  mount?: string[] | undefined;
1685
+ mode?: string | undefined;
1685
1686
  envIsolation?: string | undefined;
1686
1687
  override?: boolean | undefined;
1687
1688
  envSecrets?: Record<string, string> | undefined;
1688
1689
  dotEnvSecrets?: string | undefined;
1689
- mode?: string | undefined;
1690
1690
  os?: string | undefined;
1691
1691
  nginxConfig?: string | undefined;
1692
1692
  objectStorageSize?: number | undefined;
@@ -1725,11 +1725,11 @@ export declare const importSchema: z.ZodObject<{
1725
1725
  type: "postgresql:ha@14" | "postgresql:ha@16" | "postgresql:ha@17" | "postgresql:ha@18" | "postgresql:single@14" | "postgresql:single@16" | "postgresql:single@17" | "postgresql:single@18";
1726
1726
  hostname: string;
1727
1727
  mount?: string[] | undefined;
1728
+ mode?: string | undefined;
1728
1729
  envIsolation?: string | undefined;
1729
1730
  override?: boolean | undefined;
1730
1731
  envSecrets?: Record<string, string> | undefined;
1731
1732
  dotEnvSecrets?: string | undefined;
1732
- mode?: string | undefined;
1733
1733
  os?: string | undefined;
1734
1734
  nginxConfig?: string | undefined;
1735
1735
  objectStorageSize?: number | undefined;
@@ -1768,11 +1768,11 @@ export declare const importSchema: z.ZodObject<{
1768
1768
  type: "postgresql:ha@14" | "postgresql:ha@16" | "postgresql:ha@17" | "postgresql:ha@18" | "postgresql:single@14" | "postgresql:single@16" | "postgresql:single@17" | "postgresql:single@18";
1769
1769
  hostname: string;
1770
1770
  mount?: string[] | undefined;
1771
+ mode?: string | undefined;
1771
1772
  envIsolation?: string | undefined;
1772
1773
  override?: boolean | undefined;
1773
1774
  envSecrets?: Record<string, string> | undefined;
1774
1775
  dotEnvSecrets?: string | undefined;
1775
- mode?: string | undefined;
1776
1776
  os?: string | undefined;
1777
1777
  nginxConfig?: string | undefined;
1778
1778
  objectStorageSize?: number | undefined;
@@ -1811,11 +1811,11 @@ export declare const importSchema: z.ZodObject<{
1811
1811
  type: "postgresql:ha@14" | "postgresql:ha@16" | "postgresql:ha@17" | "postgresql:ha@18" | "postgresql:single@14" | "postgresql:single@16" | "postgresql:single@17" | "postgresql:single@18";
1812
1812
  hostname: string;
1813
1813
  mount?: string[] | undefined;
1814
+ mode?: string | undefined;
1814
1815
  envIsolation?: string | undefined;
1815
1816
  override?: boolean | undefined;
1816
1817
  envSecrets?: Record<string, string> | undefined;
1817
1818
  dotEnvSecrets?: string | undefined;
1818
- mode?: string | undefined;
1819
1819
  os?: string | undefined;
1820
1820
  nginxConfig?: string | undefined;
1821
1821
  objectStorageSize?: number | undefined;
@@ -1916,11 +1916,11 @@ export declare const importSchema: z.ZodObject<{
1916
1916
  type: "object-storage" | "objectstorage";
1917
1917
  hostname: string;
1918
1918
  mount?: string[] | undefined;
1919
+ mode?: string | undefined;
1919
1920
  envIsolation?: string | undefined;
1920
1921
  override?: boolean | undefined;
1921
1922
  envSecrets?: Record<string, string> | undefined;
1922
1923
  dotEnvSecrets?: string | undefined;
1923
- mode?: string | undefined;
1924
1924
  os?: string | undefined;
1925
1925
  nginxConfig?: string | undefined;
1926
1926
  objectStorageSize?: number | undefined;
@@ -1948,11 +1948,11 @@ export declare const importSchema: z.ZodObject<{
1948
1948
  type: "object-storage" | "objectstorage";
1949
1949
  hostname: string;
1950
1950
  mount?: string[] | undefined;
1951
+ mode?: string | undefined;
1951
1952
  envIsolation?: string | undefined;
1952
1953
  override?: boolean | undefined;
1953
1954
  envSecrets?: Record<string, string> | undefined;
1954
1955
  dotEnvSecrets?: string | undefined;
1955
- mode?: string | undefined;
1956
1956
  os?: string | undefined;
1957
1957
  nginxConfig?: string | undefined;
1958
1958
  objectStorageSize?: number | undefined;
@@ -1980,10 +1980,10 @@ export declare const importSchema: z.ZodObject<{
1980
1980
  }, "strict", z.ZodTypeAny, {
1981
1981
  project?: {
1982
1982
  name: string;
1983
- description?: string | undefined;
1984
1983
  envIsolation?: string | undefined;
1985
1984
  sshIsolation?: string | undefined;
1986
1985
  envVariables?: Record<string, string> | undefined;
1986
+ description?: string | undefined;
1987
1987
  corePackage?: "LIGHT" | "SERIOUS" | undefined;
1988
1988
  tags?: string[] | undefined;
1989
1989
  sharedIpv4?: boolean | undefined;
@@ -1993,11 +1993,11 @@ export declare const importSchema: z.ZodObject<{
1993
1993
  type: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3";
1994
1994
  hostname: string;
1995
1995
  mount?: string[] | undefined;
1996
+ mode?: string | undefined;
1996
1997
  envIsolation?: string | undefined;
1997
1998
  override?: boolean | undefined;
1998
1999
  envSecrets?: Record<string, string> | undefined;
1999
2000
  dotEnvSecrets?: string | undefined;
2000
- mode?: string | undefined;
2001
2001
  os?: string | undefined;
2002
2002
  nginxConfig?: string | undefined;
2003
2003
  objectStorageSize?: number | undefined;
@@ -2036,11 +2036,11 @@ export declare const importSchema: z.ZodObject<{
2036
2036
  type: "postgresql:ha@14" | "postgresql:ha@16" | "postgresql:ha@17" | "postgresql:ha@18" | "postgresql:single@14" | "postgresql:single@16" | "postgresql:single@17" | "postgresql:single@18";
2037
2037
  hostname: string;
2038
2038
  mount?: string[] | undefined;
2039
+ mode?: string | undefined;
2039
2040
  envIsolation?: string | undefined;
2040
2041
  override?: boolean | undefined;
2041
2042
  envSecrets?: Record<string, string> | undefined;
2042
2043
  dotEnvSecrets?: string | undefined;
2043
- mode?: string | undefined;
2044
2044
  os?: string | undefined;
2045
2045
  nginxConfig?: string | undefined;
2046
2046
  objectStorageSize?: number | undefined;
@@ -2079,11 +2079,11 @@ export declare const importSchema: z.ZodObject<{
2079
2079
  type: "object-storage" | "objectstorage";
2080
2080
  hostname: string;
2081
2081
  mount?: string[] | undefined;
2082
+ mode?: string | undefined;
2082
2083
  envIsolation?: string | undefined;
2083
2084
  override?: boolean | undefined;
2084
2085
  envSecrets?: Record<string, string> | undefined;
2085
2086
  dotEnvSecrets?: string | undefined;
2086
- mode?: string | undefined;
2087
2087
  os?: string | undefined;
2088
2088
  nginxConfig?: string | undefined;
2089
2089
  objectStorageSize?: number | undefined;
@@ -2111,10 +2111,10 @@ export declare const importSchema: z.ZodObject<{
2111
2111
  }, {
2112
2112
  project?: {
2113
2113
  name: string;
2114
- description?: string | undefined;
2115
2114
  envIsolation?: string | undefined;
2116
2115
  sshIsolation?: string | undefined;
2117
2116
  envVariables?: Record<string, string> | undefined;
2117
+ description?: string | undefined;
2118
2118
  corePackage?: "LIGHT" | "SERIOUS" | undefined;
2119
2119
  tags?: string[] | undefined;
2120
2120
  sharedIpv4?: boolean | undefined;
@@ -2124,11 +2124,11 @@ export declare const importSchema: z.ZodObject<{
2124
2124
  type: "alpine/bun@1.3" | "alpine/go@latest" | "alpine/nodejs@22" | "alpine@3.21" | "ubuntu/bun@1.3";
2125
2125
  hostname: string;
2126
2126
  mount?: string[] | undefined;
2127
+ mode?: string | undefined;
2127
2128
  envIsolation?: string | undefined;
2128
2129
  override?: boolean | undefined;
2129
2130
  envSecrets?: Record<string, string> | undefined;
2130
2131
  dotEnvSecrets?: string | undefined;
2131
- mode?: string | undefined;
2132
2132
  os?: string | undefined;
2133
2133
  nginxConfig?: string | undefined;
2134
2134
  objectStorageSize?: number | undefined;
@@ -2167,11 +2167,11 @@ export declare const importSchema: z.ZodObject<{
2167
2167
  type: "postgresql:ha@14" | "postgresql:ha@16" | "postgresql:ha@17" | "postgresql:ha@18" | "postgresql:single@14" | "postgresql:single@16" | "postgresql:single@17" | "postgresql:single@18";
2168
2168
  hostname: string;
2169
2169
  mount?: string[] | undefined;
2170
+ mode?: string | undefined;
2170
2171
  envIsolation?: string | undefined;
2171
2172
  override?: boolean | undefined;
2172
2173
  envSecrets?: Record<string, string> | undefined;
2173
2174
  dotEnvSecrets?: string | undefined;
2174
- mode?: string | undefined;
2175
2175
  os?: string | undefined;
2176
2176
  nginxConfig?: string | undefined;
2177
2177
  objectStorageSize?: number | undefined;
@@ -2210,11 +2210,11 @@ export declare const importSchema: z.ZodObject<{
2210
2210
  type: "object-storage" | "objectstorage";
2211
2211
  hostname: string;
2212
2212
  mount?: string[] | undefined;
2213
+ mode?: string | undefined;
2213
2214
  envIsolation?: string | undefined;
2214
2215
  override?: boolean | undefined;
2215
2216
  envSecrets?: Record<string, string> | undefined;
2216
2217
  dotEnvSecrets?: string | undefined;
2217
- mode?: string | undefined;
2218
2218
  os?: string | undefined;
2219
2219
  nginxConfig?: string | undefined;
2220
2220
  objectStorageSize?: number | undefined;
@@ -9,7 +9,8 @@ import type { ZeropsYamlSpec } from '../../index';
9
9
  * IAM service's PUBLIC origin in an apps project, because there is no private network between projects
10
10
  * (ADR-0006). The manifest is not a variable; see below.
11
11
  *
12
- * Secret (`envSecrets`): `FABRIKA_IAM_KEY` — the value IAM knows as `FABRIKA_IAM_PROXY_KEY`.
12
+ * Secret (`envSecrets`): `FABRIKA_IAM_KEY` — the value IAM knows as `FABRIKA_IAM_PROXY_KEY`. In the platform project
13
+ * also `FABRIKA_INSTALLATION_PROXY_SECRET_IAM`, which Caddy sends on IAM's route and IAM holds too.
13
14
  *
14
15
  * ── How the manifest reaches the build ───────────────────────────────────────────────────────────
15
16
  *
@@ -24,22 +24,27 @@ export type PublicAccess = 'custom-domain' | 'zerops-subdomain';
24
24
  * `standard` is the production shape: HA Postgres, a separate database and bucket for Operations, and
25
25
  * enough containers that no single one is a point of failure.
26
26
  *
27
- * `light` is one project, one `postgresql:single@18` and one bucket shared by IAM, Operations, control
28
- * AND the apps deployed alongside them, at one container per service. This tier exists because the standard
27
+ * `light` is one project with two `postgresql:single@18` services — `db` for IAM and control, `operationsdb`
28
+ * for Operations — and one bucket, at one container per service. This tier exists because the standard
29
29
  * shape costs ~13 containers before a single application is deployed, which is more platform than a
30
- * small fleet — or an evaluation — can justify.
30
+ * small fleet — or an evaluation — can justify. Applications run in their own namespace projects
31
+ * (ADR-0034); a production namespace that must keep its data through a node loss asks for HA there.
31
32
  *
32
- * Sharing is safe rather than merely cheap, and that is a property of the code, not of this comment:
33
+ * Operations gets its own database, not a schema beside IAM's, because Zerops backs up a whole service on
34
+ * one schedule: identity and deploy state is worth an hourly dump, error history is not, and only two
35
+ * services can carry two schedules. It also keeps Operations' high-volume writes off the identity path.
33
36
  *
34
- * • The three services' table names do not intersect (IAM 10, Operations 24, control 16), and
35
- * ADR-0017 already gives each its own migration ledger and advisory lock, so one database holds
36
- * all three without coordination.
37
+ * Sharing the rest is safe rather than merely cheap, and that is a property of the code, not of this comment:
38
+ *
39
+ * • IAM's and control's table names do not intersect, and ADR-0017 gives each its own migration ledger
40
+ * and advisory lock, so one database holds both without coordination. A light installation created
41
+ * before Operations moved out still holds all three in `db`, which the same property covers.
37
42
  * • Their blob keys are prefix-disjoint — control writes `runs/`, Operations writes `events/`,
38
43
  * `dead/` and `source-maps/` — so one bucket cannot collide.
39
44
  *
40
- * What `light` genuinely gives up is FAILURE-DOMAIN isolation: Operations' high-volume error history
41
- * now shares capacity with the identity path, and losing the one database loses all three services.
42
- * That is the trade, and it is why `standard` remains the default rather than the special case.
45
+ * What `light` genuinely gives up is AVAILABILITY and DURABILITY: one container per service, and a
46
+ * single-node database loses everything since its last backup when its node fails (Zerops has no
47
+ * point-in-time recovery). That is the trade, and it is why `standard` remains the default rather than the special case.
43
48
  */
44
49
  export type PlatformTier = 'standard' | 'light';
45
50
  export interface TopologyOptions {
@@ -1,37 +1,4 @@
1
- import { type FrameworkVariableName } from '@fabrika/auth-core';
2
1
  import { type PreparedZeropsDescriptor } from './descriptor';
3
- /** The framework-only names Control hands every Zerops deploy; the rest of the list is the provider's own. */
4
- export type ManagedKey = Extract<FrameworkVariableName, 'FABRIKA_RELEASE' | 'FABRIKA_OPERATIONS_DSN' | 'FABRIKA_IAM_ISSUER' | 'FABRIKA_IAM_APP_ID' | 'FABRIKA_APP_ID' | 'FABRIKA_ENVIRONMENT' | 'FABRIKA_SERVICE_KEY' | 'FABRIKA_PROXY_SECRET' | 'FABRIKA_IAM_RPC_URL' | 'FABRIKA_IAM_RPC_KEY' | 'FABRIKA_APP_ORIGIN' | 'FABRIKA_TOKEN_KEYS'>;
5
- export declare const MANAGED_KEYS: readonly ManagedKey[];
6
- /** The managed keys written as service variables; `FABRIKA_RELEASE` travels only in the execution descriptor (ADR-0044). */
7
- export declare const SERVICE_MANAGED_KEYS: readonly Exclude<ManagedKey, 'FABRIKA_RELEASE'>[];
8
- /** The managed keys that carry a credential, written sensitive and therefore never compared. */
9
- export declare const SENSITIVE_MANAGED_KEYS: ReadonlySet<ManagedKey>;
10
- /**
11
- * A workload, connect or platform transport key and every mail transport variable are written sensitive; a connect or
12
- * platform transport URL is an origin.
13
- */
14
- export declare const isSensitiveFamilyVariable: (name: string) => boolean;
15
- export type ManagedValues = Record<ManagedKey, string | null>;
16
- export declare function parseManagedValues(value: unknown): ManagedValues;
17
- /**
18
- * What Control hands a deploy: the twelve managed keys, the key of each job and webhook of the approved contract, the
19
- * key and owner origin of each connector import, and the installation's mail transport when a job sends through it.
20
- */
21
- export interface ManagedEnvironment {
22
- readonly values: ManagedValues;
23
- /**
24
- * `FABRIKA_<KIND>_<NAME>_KEY` → the workload's `px_` key, `FABRIKA_CONNECT_<IMPORT>_KEY` / `_URL`, each
25
- * `FABRIKA_EMAIL_*` of the installation's mail transport, and `FABRIKA_PLATFORM_<RECEIVER>_URL` / `_KEY`.
26
- */
27
- readonly familyVariables: Readonly<Record<string, string>>;
28
- }
29
- export declare function parseManagedEnvironment(value: Readonly<Record<string, string | null>>): ManagedEnvironment;
30
- /**
31
- * A service variable only the platform writes per workload, import, platform receiver or the installation's mail
32
- * transport: a stale one is removed when the deploy no longer hands it.
33
- */
34
- export declare function isFrameworkFamilyVariable(name: string): boolean;
35
2
  /** Refuse every framework-only name (ADR-0043), not only the ones a deploy writes today. */
36
3
  export declare function assertAuthoredManagedName(name: string): void;
37
4
  type AuthoredDocumentValue = string | number | boolean | null | readonly AuthoredDocumentValue[] | {
@@ -191,8 +191,6 @@ export type ZeropsAccess = Pick<ProviderEnvironment, 'access'> & {
191
191
  * so a configuration cannot drop it. Without an approved contract nothing deploys outside a dry run.
192
192
  */
193
193
  export declare function lockedExecutionFor(manifest: FabrikaManifest, granted: ZeropsAccess, dryRun: boolean, artifactUpload?: ProviderDeployInput['artifactUpload']): ZeropsLockedExecution | null;
194
- /** The IAM schema a deploy, cancel or reconcile applies: the approved contract's. `undefined` reconciles nothing. */
195
- export declare function approvedSchemaOf(granted: ZeropsAccess): AppSchema | undefined;
196
194
  export declare const manifestServiceHostnames: (manifest: FabrikaManifest) => string[];
197
195
  export declare const renderFabrikaImportYaml: (manifest: FabrikaManifest) => string;
198
196
  /** Render the codeless import used before registration has a deploy-service id. */
@@ -1,3 +1,16 @@
1
- import type { ProviderDeploymentNamespace, ProviderRegistration } from '@fabrika/provider-contract';
1
+ import type { ProviderClaimedResource, ProviderClaimedResourcesInput, ProviderDeploymentNamespace, ProviderRegistration } from '@fabrika/provider-contract';
2
+ import { type ZeropsApi } from '../api';
2
3
  export declare const namespaceResourceClaims: (namespace: ProviderDeploymentNamespace) => string[];
3
4
  export declare const registrationResourceClaims: (registration: ProviderRegistration) => string[];
5
+ /**
6
+ * The platform's answer for a project that does not exist, a deleted one included. A project the token holds no grant
7
+ * on answers `403 insufficientPermissions` instead (zerops-platform.md), so this never reads an unreachable one as gone.
8
+ */
9
+ export declare const ZEROPS_PROJECT_NOT_FOUND = "projectNotFound";
10
+ /**
11
+ * Whether each claimed service still exists in the namespace's project. Gone means the project reads `projectNotFound`,
12
+ * or it exists and has no service under the claimed hostname. Any other answer, a key that names no service, or a
13
+ * namespace that never recorded its project throws: Control then releases nothing.
14
+ */
15
+ export declare const claimedResources: (api: Pick<ZeropsApi, "getProject" | "findService">, input: ProviderClaimedResourcesInput) => Promise<ProviderClaimedResource[]>;
16
+ export declare const projectExists: (api: Pick<ZeropsApi, "getProject">, projectId: string, signal: AbortSignal) => Promise<boolean>;
@@ -236,7 +236,7 @@ export declare const namespaceUpdatePayloadSchema: z.ZodObject<{
236
236
  } | undefined;
237
237
  projectId?: string | undefined;
238
238
  projectName?: string | undefined;
239
- proxySource?: {
239
+ proxySource?: "current" | {
240
240
  commitSha: string;
241
241
  repository: {
242
242
  name: string;
@@ -247,7 +247,7 @@ export declare const namespaceUpdatePayloadSchema: z.ZodObject<{
247
247
  path: "zerops.yaml";
248
248
  contents: string;
249
249
  };
250
- } | "current" | undefined;
250
+ } | undefined;
251
251
  proxyBuild?: {
252
252
  appVersionId: string;
253
253
  triggered: boolean;
@@ -286,7 +286,7 @@ export declare const namespaceUpdatePayloadSchema: z.ZodObject<{
286
286
  } | undefined;
287
287
  projectId?: string | undefined;
288
288
  projectName?: string | undefined;
289
- proxySource?: {
289
+ proxySource?: "current" | {
290
290
  commitSha: string;
291
291
  repository: {
292
292
  name: string;
@@ -297,7 +297,7 @@ export declare const namespaceUpdatePayloadSchema: z.ZodObject<{
297
297
  path: "zerops.yaml";
298
298
  contents: string;
299
299
  };
300
- } | "current" | undefined;
300
+ } | undefined;
301
301
  proxyBuild?: {
302
302
  appVersionId: string;
303
303
  triggered: boolean;
@@ -12,4 +12,4 @@ export declare const ZEROPS_SUBDOMAIN_NOT_PUBLISHED = "subdomainNotPublished";
12
12
  export declare const ZEROPS_SOURCE_RATE_LIMITED = "githubRateLimited";
13
13
  export declare const namespaceError: (code: string, message: string, retryable: boolean, detail?: string) => ProviderNamespaceError;
14
14
  /** Every namespace lifecycle failure leaves this provider as one typed, coded error. */
15
- export declare const asNamespaceError: (cause: unknown, mode: "provision" | "reconcile" | "update") => ProviderNamespaceError;
15
+ export declare const asNamespaceError: (cause: unknown, mode: "provision" | "reconcile" | "update" | "claim check") => ProviderNamespaceError;
@@ -1,3 +1,4 @@
1
+ import type { InstallationBrand } from '@fabrika/proxy-core/brand';
1
2
  import { type ProxyManifest } from '@fabrika/proxy-core/manifest';
2
3
  import { type ZeropsApi } from '../api';
3
4
  import type { Sleeper } from '../collaborators';
@@ -9,6 +10,8 @@ export interface ZeropsProxyRepublishInput {
9
10
  readonly namespaceId: string;
10
11
  readonly target: ZeropsNamespaceTarget;
11
12
  readonly manifest: ProxyManifest;
13
+ /** The installation's client logo (ADR-0066); added to the manifest only when the pinned proxy can parse it. */
14
+ readonly brand?: InstallationBrand | null;
12
15
  readonly source?: ZeropsSourcePort;
13
16
  readonly api: ZeropsProxyApi;
14
17
  readonly iamUrl: string;
@@ -1,23 +1,12 @@
1
1
  import type { ProviderApprovedAccess } from '@fabrika/provider-contract';
2
- import type { CspOrigins } from '@fabrika/proxy-core/headers';
3
- import { type ProxyEndpointRow } from '@fabrika/proxy-core/manifest';
2
+ import { type OlderProxyReaders } from '@fabrika/proxy-core/manifest';
4
3
  import type { ZeropsNamespaceProxySource } from './types';
5
- /**
6
- * What the namespace proxy of one older platform release parses of an application's manifest entry: a row, and the
7
- * entry's CSP directives, each by that release's own parser.
8
- */
9
- export interface OlderProxyReader {
10
- readonly row: (row: ProxyEndpointRow) => boolean;
11
- readonly csp: (csp: CspOrigins) => boolean;
12
- }
13
- /**
14
- * The namespace proxies of the older releases this platform serves (ADR-0062). Control holds their parsers, as it holds
15
- * their contract readers; a pin's release is not recorded, so what any of them reads is what the pin may read.
16
- */
17
- export type OlderProxyReaders = readonly [OlderProxyReader, ...OlderProxyReader[]];
4
+ export type { OlderProxyReader, OlderProxyReaders } from '@fabrika/proxy-core/manifest';
18
5
  /**
19
6
  * What of the approved contract's manifest entry no older release's proxy parses, as the namespace publishes it: each
20
7
  * such row by its id, and `csp` when no older proxy parses the entry's CSP (`workerSrc`, which only this release knows).
8
+ * A contract that declares a terminal adds `terminal` when no older proxy serves the sign-out its sessions end at
9
+ * (ADR-0067 §5).
21
10
  */
22
11
  export declare function entriesNeedingCurrentProxy(access: ProviderApprovedAccess, olderProxies: OlderProxyReaders): string[];
23
12
  /** This control plane's own proxy source, and the parsers of the older releases a pinned proxy may run. */