@spacefast/common 0.0.12 → 0.0.13

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 (113) hide show
  1. package/dist/contracts/access.d.ts +386 -1201
  2. package/dist/contracts/access.js +240 -1057
  3. package/dist/contracts/activity.d.ts +1 -1
  4. package/dist/contracts/activity.js +6 -14
  5. package/dist/contracts/api-keys.d.ts +16 -0
  6. package/dist/contracts/api-keys.js +2 -0
  7. package/dist/contracts/archives.d.ts +1 -2
  8. package/dist/contracts/archives.js +4 -6
  9. package/dist/contracts/comments.d.ts +58 -85
  10. package/dist/contracts/comments.js +86 -67
  11. package/dist/contracts/countries.js +2 -7
  12. package/dist/contracts/data-source-routes.d.ts +20 -0
  13. package/dist/contracts/data-source-routes.js +15 -0
  14. package/dist/contracts/device-auth.d.ts +7 -3
  15. package/dist/contracts/enums.d.ts +2 -4
  16. package/dist/contracts/enums.js +3 -8
  17. package/dist/contracts/error-code-meta.d.ts +17 -20
  18. package/dist/contracts/error-code-meta.js +8 -5
  19. package/dist/contracts/error-codes.d.ts +1 -1
  20. package/dist/contracts/error-codes.js +4 -5
  21. package/dist/contracts/events.d.ts +13 -13
  22. package/dist/contracts/execution.d.ts +212 -0
  23. package/dist/contracts/execution.js +288 -0
  24. package/dist/contracts/feature-lifecycle.d.ts +21 -167
  25. package/dist/contracts/feature-lifecycle.js +27 -173
  26. package/dist/contracts/features.d.ts +13 -115
  27. package/dist/contracts/features.js +1 -31
  28. package/dist/contracts/functions.d.ts +729 -0
  29. package/dist/contracts/functions.js +485 -0
  30. package/dist/contracts/git.d.ts +1 -1
  31. package/dist/contracts/grants.d.ts +1158 -0
  32. package/dist/contracts/grants.js +696 -0
  33. package/dist/contracts/ids.d.ts +5 -3
  34. package/dist/contracts/ids.js +5 -3
  35. package/dist/contracts/mcp.d.ts +6 -6
  36. package/dist/contracts/oauth-resources.d.ts +5 -5
  37. package/dist/contracts/oauth-resources.js +1 -0
  38. package/dist/contracts/operations.d.ts +2 -2
  39. package/dist/contracts/pages.d.ts +6 -14
  40. package/dist/contracts/pages.js +6 -23
  41. package/dist/contracts/plan-policy.d.ts +1 -8
  42. package/dist/contracts/plan-policy.js +1 -4
  43. package/dist/contracts/platform.d.ts +78 -30
  44. package/dist/contracts/platform.js +59 -12
  45. package/dist/contracts/push-new.d.ts +26 -2
  46. package/dist/contracts/push-new.js +8 -0
  47. package/dist/contracts/quotas.d.ts +0 -1
  48. package/dist/contracts/quotas.js +0 -5
  49. package/dist/contracts/repository-connections.d.ts +1 -1
  50. package/dist/contracts/resources.d.ts +10 -66
  51. package/dist/contracts/resources.js +4 -10
  52. package/dist/contracts/runtime-api.d.ts +558 -265
  53. package/dist/contracts/runtime-api.js +178 -91
  54. package/dist/contracts/runtime-app.d.ts +138 -0
  55. package/dist/contracts/runtime-app.js +21 -0
  56. package/dist/contracts/sf-config-v1.d.ts +5 -0
  57. package/dist/contracts/sites.d.ts +5 -0
  58. package/dist/contracts/sites.js +12 -1
  59. package/dist/contracts/space-config.d.ts +46 -116
  60. package/dist/contracts/space-config.js +320 -24
  61. package/dist/contracts/spaces.d.ts +253 -158
  62. package/dist/contracts/spaces.js +68 -54
  63. package/dist/contracts/superadmin-emails.d.ts +2 -2
  64. package/dist/contracts/superadmin-spaces.d.ts +15 -130
  65. package/dist/contracts/superadmin-spaces.js +7 -0
  66. package/dist/contracts/tags.d.ts +23 -23
  67. package/dist/contracts/teams.d.ts +9 -9
  68. package/dist/contracts/transfers.d.ts +0 -1
  69. package/dist/contracts/zero.d.ts +195 -273
  70. package/dist/contracts/zero.js +78 -206
  71. package/dist/dashboard-paths/index.d.ts +2 -2
  72. package/dist/dashboard-paths/index.js +1 -0
  73. package/dist/docs/agent-prose.js +10 -8
  74. package/dist/docs/agent-setup.d.ts +2 -2
  75. package/dist/docs/agent-setup.js +11 -9
  76. package/dist/docs/agent-solutions.js +1 -1
  77. package/dist/docs/catalog.d.ts +28 -28
  78. package/dist/docs/catalog.js +29 -29
  79. package/dist/docs/error-docs.js +23 -27
  80. package/dist/utils/asset-fingerprint.d.ts +11 -0
  81. package/dist/utils/asset-fingerprint.js +46 -0
  82. package/dist/utils/auth-redirect.d.ts +1 -3
  83. package/dist/utils/auth-redirect.js +1 -21
  84. package/dist/utils/build-settings.d.ts +2 -0
  85. package/dist/utils/build-settings.js +61 -9
  86. package/dist/utils/credential-policy.d.ts +1 -1
  87. package/dist/utils/credential-policy.js +4 -0
  88. package/dist/utils/egress-policy.fixtures.json +1 -1
  89. package/dist/utils/grants.d.ts +53 -0
  90. package/dist/utils/grants.js +160 -0
  91. package/dist/utils/local-space-state.js +1 -0
  92. package/dist/utils/pages.d.ts +11 -5
  93. package/dist/utils/pages.js +19 -32
  94. package/dist/utils/publish-policy.d.ts +34 -4
  95. package/dist/utils/publish-policy.js +132 -61
  96. package/dist/utils/query-keys.d.ts +1 -6
  97. package/dist/utils/query-keys.js +1 -6
  98. package/dist/utils/space-config.d.ts +5 -1
  99. package/dist/utils/space-config.js +35 -0
  100. package/dist/utils/static-runtime-policy.d.ts +5 -0
  101. package/dist/utils/static-runtime-policy.js +54 -10
  102. package/dist/utils/upload-session.d.ts +3 -0
  103. package/dist/utils/upload-session.js +31 -0
  104. package/package.json +2 -1
  105. package/dist/utils/access-grant.d.ts +0 -14
  106. package/dist/utils/access-grant.js +0 -88
  107. package/dist/utils/access-match.d.ts +0 -46
  108. package/dist/utils/access-match.fixtures.json +0 -513
  109. package/dist/utils/access-match.js +0 -312
  110. package/dist/utils/access-verdict.fixtures.json +0 -421
  111. package/dist/utils/sf-config-v1.d.ts +0 -2
  112. package/dist/utils/sf-config-v1.fixtures.json +0 -9
  113. package/dist/utils/sf-config-v1.js +0 -551
@@ -1,15 +1,15 @@
1
1
  import { z } from "zod";
2
2
  export declare const TEAM_ROLE_VALUES: readonly ["owner", "admin", "member"];
3
3
  export declare const teamMemberRole: z.ZodEnum<{
4
- admin: "admin";
5
4
  owner: "owner";
5
+ admin: "admin";
6
6
  member: "member";
7
7
  }>;
8
8
  export declare const teamInvitationCreateSchema: z.ZodObject<{
9
9
  email: z.ZodString;
10
10
  role: z.ZodDefault<z.ZodEnum<{
11
- admin: "admin";
12
11
  owner: "owner";
12
+ admin: "admin";
13
13
  member: "member";
14
14
  }>>;
15
15
  }, z.core.$strip>;
@@ -34,8 +34,8 @@ export declare const TeamInvitationSchema: z.ZodObject<{
34
34
  teamId: z.ZodString;
35
35
  email: z.ZodString;
36
36
  role: z.ZodEnum<{
37
- admin: "admin";
38
37
  owner: "owner";
38
+ admin: "admin";
39
39
  member: "member";
40
40
  }>;
41
41
  status: z.ZodString;
@@ -55,8 +55,8 @@ export declare const TeamSummarySchema: z.ZodObject<{
55
55
  name: z.ZodString;
56
56
  slug: z.ZodString;
57
57
  role: z.ZodEnum<{
58
- admin: "admin";
59
58
  owner: "owner";
59
+ admin: "admin";
60
60
  member: "member";
61
61
  }>;
62
62
  plan: z.ZodEnum<{
@@ -76,8 +76,8 @@ export declare const TeamDetailSchema: z.ZodObject<{
76
76
  name: z.ZodString;
77
77
  slug: z.ZodString;
78
78
  role: z.ZodEnum<{
79
- admin: "admin";
80
79
  owner: "owner";
80
+ admin: "admin";
81
81
  member: "member";
82
82
  }>;
83
83
  plan: z.ZodEnum<{
@@ -101,8 +101,8 @@ export declare const teamListResponseSchema: z.ZodObject<{
101
101
  name: z.ZodString;
102
102
  slug: z.ZodString;
103
103
  role: z.ZodEnum<{
104
- admin: "admin";
105
104
  owner: "owner";
105
+ admin: "admin";
106
106
  member: "member";
107
107
  }>;
108
108
  plan: z.ZodEnum<{
@@ -127,8 +127,8 @@ export declare const teamMemberListResponseSchema: z.ZodObject<{
127
127
  teamId: z.ZodString;
128
128
  userId: z.ZodString;
129
129
  role: z.ZodEnum<{
130
- admin: "admin";
131
130
  owner: "owner";
131
+ admin: "admin";
132
132
  member: "member";
133
133
  }>;
134
134
  createdAt: z.ZodString;
@@ -160,8 +160,8 @@ export declare const teamInvitationAcceptResponseSchema: z.ZodObject<{
160
160
  teamSlug: z.ZodString;
161
161
  userId: z.ZodString;
162
162
  role: z.ZodEnum<{
163
- admin: "admin";
164
163
  owner: "owner";
164
+ admin: "admin";
165
165
  member: "member";
166
166
  }>;
167
167
  }, z.core.$strip>;
@@ -172,8 +172,8 @@ export declare const teamInvitationListResponseSchema: z.ZodObject<{
172
172
  teamId: z.ZodString;
173
173
  email: z.ZodString;
174
174
  role: z.ZodEnum<{
175
- admin: "admin";
176
175
  owner: "owner";
176
+ admin: "admin";
177
177
  member: "member";
178
178
  }>;
179
179
  status: z.ZodString;
@@ -44,7 +44,6 @@ export declare const spaceTransferSchema: z.ZodObject<{
44
44
  tenantId: z.ZodString;
45
45
  }, z.core.$strip>;
46
46
  status: z.ZodEnum<{
47
- moving: "moving";
48
47
  pending_confirmation: "pending_confirmation";
49
48
  confirming_domains: "confirming_domains";
50
49
  completed: "completed";
@@ -1,4 +1,15 @@
1
1
  import { z } from "zod";
2
+ /**
3
+ * Spacefast Zero: capsules — schema, queries, mutations and endpoints that run
4
+ * together inside one parent-owned transaction — executed by the native runner
5
+ * on a dedicated wp.cloud site, against that site's own MySQL.
6
+ *
7
+ * The transaction is what makes this a separate product rather than a
8
+ * placement option for `./functions.js`. A capsule handler's semantics depend
9
+ * on the transaction wrapped around it, and an isolate reaching the database
10
+ * over a relay cannot offer one. See `endpointIsPortable` in `./execution.js`
11
+ * for the narrow surface both products can host.
12
+ */
2
13
  export declare const ZERO_SOURCE_METADATA_KEY = "statticZero";
3
14
  export declare const ZERO_RUNTIME_KIND = "zero";
4
15
  export declare const ZERO_PLATFORM_ROUTE_PREFIX = "/__spacefast/zero";
@@ -17,7 +28,7 @@ export declare const ZERO_RUNTIME_ROUTE_PATHS: {
17
28
  export declare const ZERO_RUNTIME_STORAGE_ROOT = "__spacefast/zero";
18
29
  export declare const ZERO_RUNTIME_ARTIFACT_PATH = "__spacefast/zero/artifact.json";
19
30
  export declare const ZERO_RUNTIME_CONFIG_PATH = "__spacefast/zero/config.json";
20
- export declare const ZERO_RUNTIME_BINARY_PATH = "__spacefast/zero/bin/stattic-zero-runner";
31
+ export declare const ZERO_RUNTIME_BINARY_PATH = "__spacefast/zero/bin/stattic-runtime";
21
32
  export declare const ZERO_RUNTIME_BINARY_COMPATIBILITY_TARGET = "wpcloud-linux-x86_64-gnu-v1";
22
33
  export declare const ZERO_RUNTIME_BUNDLE_ROOT = "__spacefast/zero/bundles";
23
34
  export declare const ZERO_RUNTIME_CLIENT_BUNDLE_PATH = "__spacefast/zero/bundles/client.js";
@@ -26,31 +37,14 @@ export declare const ZERO_SOURCE_ENV_FILE = ".env.zero.server";
26
37
  export declare const ZERO_CONFIG_FILE = "zero.json";
27
38
  export declare const ZERO_DEPLOY_FILE = ".zero/deploy.json";
28
39
  export declare const ZERO_RUNTIME_BUNDLE_MAX_BYTES = 786432;
29
- export declare const ZERO_ENV_MAX_KEYS = 64;
30
- export declare const ZERO_ENV_NAME_MAX_BYTES = 128;
31
- export declare const ZERO_ENV_VALUE_MAX_BYTES: number;
32
- export declare const ZERO_ENV_TOTAL_VALUE_MAX_BYTES: number;
33
- export declare const ZERO_ENV_RESERVED_PREFIXES: readonly ["SPACEFAST_", "ZERO_"];
34
40
  export declare const ZERO_MANAGED_TABLE_COLUMNS: readonly ["id", "createdAt", "updatedAt"];
35
- export declare const ZERO_RESERVED_APP_ROUTE_PATHS: readonly ["/", "/index.html", "/client.js", "/auth/callback", "/__spacefast", "/__span"];
36
- export declare const ZERO_RESERVED_APP_ROUTE_PREFIXES: readonly ["/auth/", "/__spacefast/", "/__span/"];
37
- export declare const zeroRuntimeKindSchema: z.ZodEnum<{
38
- zero: "zero";
39
- static: "static";
40
- php: "php";
41
- node: "node";
42
- workers: "workers";
43
- }>;
44
- export type ZeroRuntimeKind = z.infer<typeof zeroRuntimeKindSchema>;
45
- export declare const zeroHttpMethodSchema: z.ZodEnum<{
46
- POST: "POST";
47
- PUT: "PUT";
48
- GET: "GET";
49
- HEAD: "HEAD";
50
- PATCH: "PATCH";
51
- DELETE: "DELETE";
52
- OPTIONS: "OPTIONS";
53
- }>;
41
+ /**
42
+ * Paths the Zero app shell itself answers, on top of the platform-reserved set
43
+ * in `./execution.js`. A capsule cannot claim these because its own client
44
+ * router and auth flow already do.
45
+ */
46
+ export declare const ZERO_RESERVED_APP_ROUTE_PATHS: readonly ["/", "/index.html", "/client.js", "/auth/callback"];
47
+ export declare const ZERO_RESERVED_APP_ROUTE_PREFIXES: readonly ["/auth/"];
54
48
  export declare const zeroEndpointSchema: z.ZodObject<{
55
49
  method: z.ZodEnum<{
56
50
  POST: "POST";
@@ -107,6 +101,12 @@ export declare const zeroDatabaseSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
107
101
  }, z.core.$strict>>>;
108
102
  }, z.core.$strict>>;
109
103
  export type ZeroDatabase = z.infer<typeof zeroDatabaseSchema>;
104
+ /**
105
+ * Zero's bundles travel inline in the finalize payload — a capsule's compiled
106
+ * client and server fit comfortably under the ceiling, and inlining keeps the
107
+ * whole version one atomic write. Functions bundles do the opposite and land
108
+ * in the content store first; see `functionsBundleRefSchema`.
109
+ */
110
110
  export declare const zeroRuntimeBundleSchema: z.ZodObject<{
111
111
  path: z.ZodString;
112
112
  sha256: z.ZodString;
@@ -338,7 +338,7 @@ export declare const zeroRuntimeInstallProfileSchema: z.ZodObject<{
338
338
  artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
339
339
  configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
340
340
  binary: z.ZodObject<{
341
- path: z.ZodLiteral<"__spacefast/zero/bin/stattic-zero-runner">;
341
+ path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
342
342
  compatibilityTarget: z.ZodObject<{
343
343
  profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
344
344
  os: z.ZodLiteral<"linux">;
@@ -548,7 +548,7 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
548
548
  artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
549
549
  configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
550
550
  binary: z.ZodObject<{
551
- path: z.ZodLiteral<"__spacefast/zero/bin/stattic-zero-runner">;
551
+ path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
552
552
  compatibilityTarget: z.ZodObject<{
553
553
  profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
554
554
  os: z.ZodLiteral<"linux">;
@@ -845,10 +845,6 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
845
845
  signOutUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
846
846
  returnToParam: z.ZodDefault<z.ZodString>;
847
847
  }, z.core.$strict>>;
848
- variables: z.ZodObject<{
849
- source: z.ZodLiteral<"stattic-variables">;
850
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
851
- }, z.core.$strict>;
852
848
  realtime: z.ZodObject<{
853
849
  mode: z.ZodEnum<{
854
850
  "stattic-central": "stattic-central";
@@ -863,86 +859,9 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
863
859
  token: z.ZodString;
864
860
  }, z.core.$strict>>;
865
861
  }, z.core.$strict>;
866
- runtimeKind: z.ZodLiteral<"zero">;
867
- migrations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
868
- format: z.ZodLiteral<"stattic.zero.migrations.v1">;
869
- mode: z.ZodDefault<z.ZodEnum<{
870
- safe: "safe";
871
- drop: "drop";
872
- rename: "rename";
873
- }>>;
874
- schemaHash: z.ZodString;
875
- operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
876
- op: z.ZodLiteral<"create_table">;
877
- table: z.ZodString;
878
- }, z.core.$strict>, z.ZodObject<{
879
- op: z.ZodLiteral<"add_column">;
880
- table: z.ZodString;
881
- column: z.ZodObject<{
882
- name: z.ZodString;
883
- type: z.ZodEnum<{
884
- string: "string";
885
- number: "number";
886
- boolean: "boolean";
887
- json: "json";
888
- }>;
889
- nullable: z.ZodDefault<z.ZodBoolean>;
890
- default: z.ZodOptional<z.ZodUnknown>;
891
- }, z.core.$strict>;
892
- }, z.core.$strict>, z.ZodObject<{
893
- op: z.ZodLiteral<"add_index">;
894
- table: z.ZodString;
895
- columns: z.ZodArray<z.ZodString>;
896
- unique: z.ZodDefault<z.ZodBoolean>;
897
- }, z.core.$strict>, z.ZodObject<{
898
- op: z.ZodLiteral<"drop_table">;
899
- table: z.ZodString;
900
- explicit: z.ZodLiteral<"drop">;
901
- }, z.core.$strict>, z.ZodObject<{
902
- op: z.ZodLiteral<"drop_column">;
903
- table: z.ZodString;
904
- column: z.ZodString;
905
- explicit: z.ZodLiteral<"drop">;
906
- }, z.core.$strict>, z.ZodObject<{
907
- op: z.ZodLiteral<"rename_table">;
908
- from: z.ZodString;
909
- to: z.ZodString;
910
- explicit: z.ZodLiteral<"rename">;
911
- }, z.core.$strict>, z.ZodObject<{
912
- op: z.ZodLiteral<"rename_column">;
913
- table: z.ZodString;
914
- from: z.ZodString;
915
- to: z.ZodString;
916
- explicit: z.ZodLiteral<"rename">;
917
- }, z.core.$strict>], "op">>;
918
- }, z.core.$strict>>>;
919
- install: z.ZodObject<{
920
- runtimeKind: z.ZodLiteral<"zero">;
921
- engine: z.ZodLiteral<"quickjs-rust">;
922
- storageRoot: z.ZodLiteral<"__spacefast/zero">;
923
- artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
924
- configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
925
- binary: z.ZodObject<{
926
- path: z.ZodLiteral<"__spacefast/zero/bin/stattic-zero-runner">;
927
- compatibilityTarget: z.ZodObject<{
928
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
929
- os: z.ZodLiteral<"linux">;
930
- cpu: z.ZodLiteral<"x86_64">;
931
- libc: z.ZodLiteral<"glibc">;
932
- linking: z.ZodLiteral<"dynamic">;
933
- requireExecutableBit: z.ZodLiteral<true>;
934
- }, z.core.$strict>;
935
- sha256: z.ZodDefault<z.ZodNullable<z.ZodString>>;
936
- required: z.ZodLiteral<true>;
937
- }, z.core.$strict>;
938
- mysql: z.ZodObject<{
939
- migrateAtFinalize: z.ZodLiteral<true>;
940
- blockIncompatibleRollback: z.ZodLiteral<true>;
941
- }, z.core.$strict>;
942
- realtime: z.ZodObject<{
943
- production: z.ZodLiteral<"stattic-central">;
944
- local: z.ZodLiteral<"foreground-cli-ws">;
945
- }, z.core.$strict>;
862
+ variables: z.ZodObject<{
863
+ source: z.ZodLiteral<"stattic-variables">;
864
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
946
865
  }, z.core.$strict>;
947
866
  artifact: z.ZodObject<{
948
867
  format: z.ZodLiteral<"stattic.zero.capsule.v1">;
@@ -1074,12 +993,93 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
1074
993
  }, z.core.$strip>>;
1075
994
  }, z.core.$strict>;
1076
995
  }, z.core.$strict>;
996
+ runtimeKind: z.ZodLiteral<"zero">;
1077
997
  inspect: z.ZodDefault<z.ZodObject<{
1078
998
  policy: z.ZodDefault<z.ZodEnum<{
1079
999
  public: "public";
1080
1000
  private: "private";
1081
1001
  }>>;
1082
1002
  }, z.core.$strict>>;
1003
+ migrations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1004
+ format: z.ZodLiteral<"stattic.zero.migrations.v1">;
1005
+ mode: z.ZodDefault<z.ZodEnum<{
1006
+ safe: "safe";
1007
+ drop: "drop";
1008
+ rename: "rename";
1009
+ }>>;
1010
+ schemaHash: z.ZodString;
1011
+ operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1012
+ op: z.ZodLiteral<"create_table">;
1013
+ table: z.ZodString;
1014
+ }, z.core.$strict>, z.ZodObject<{
1015
+ op: z.ZodLiteral<"add_column">;
1016
+ table: z.ZodString;
1017
+ column: z.ZodObject<{
1018
+ name: z.ZodString;
1019
+ type: z.ZodEnum<{
1020
+ string: "string";
1021
+ number: "number";
1022
+ boolean: "boolean";
1023
+ json: "json";
1024
+ }>;
1025
+ nullable: z.ZodDefault<z.ZodBoolean>;
1026
+ default: z.ZodOptional<z.ZodUnknown>;
1027
+ }, z.core.$strict>;
1028
+ }, z.core.$strict>, z.ZodObject<{
1029
+ op: z.ZodLiteral<"add_index">;
1030
+ table: z.ZodString;
1031
+ columns: z.ZodArray<z.ZodString>;
1032
+ unique: z.ZodDefault<z.ZodBoolean>;
1033
+ }, z.core.$strict>, z.ZodObject<{
1034
+ op: z.ZodLiteral<"drop_table">;
1035
+ table: z.ZodString;
1036
+ explicit: z.ZodLiteral<"drop">;
1037
+ }, z.core.$strict>, z.ZodObject<{
1038
+ op: z.ZodLiteral<"drop_column">;
1039
+ table: z.ZodString;
1040
+ column: z.ZodString;
1041
+ explicit: z.ZodLiteral<"drop">;
1042
+ }, z.core.$strict>, z.ZodObject<{
1043
+ op: z.ZodLiteral<"rename_table">;
1044
+ from: z.ZodString;
1045
+ to: z.ZodString;
1046
+ explicit: z.ZodLiteral<"rename">;
1047
+ }, z.core.$strict>, z.ZodObject<{
1048
+ op: z.ZodLiteral<"rename_column">;
1049
+ table: z.ZodString;
1050
+ from: z.ZodString;
1051
+ to: z.ZodString;
1052
+ explicit: z.ZodLiteral<"rename">;
1053
+ }, z.core.$strict>], "op">>;
1054
+ }, z.core.$strict>>>;
1055
+ install: z.ZodObject<{
1056
+ runtimeKind: z.ZodLiteral<"zero">;
1057
+ engine: z.ZodLiteral<"quickjs-rust">;
1058
+ storageRoot: z.ZodLiteral<"__spacefast/zero">;
1059
+ artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
1060
+ configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
1061
+ binary: z.ZodObject<{
1062
+ path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
1063
+ compatibilityTarget: z.ZodObject<{
1064
+ profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1065
+ os: z.ZodLiteral<"linux">;
1066
+ cpu: z.ZodLiteral<"x86_64">;
1067
+ libc: z.ZodLiteral<"glibc">;
1068
+ linking: z.ZodLiteral<"dynamic">;
1069
+ requireExecutableBit: z.ZodLiteral<true>;
1070
+ }, z.core.$strict>;
1071
+ sha256: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1072
+ required: z.ZodLiteral<true>;
1073
+ }, z.core.$strict>;
1074
+ mysql: z.ZodObject<{
1075
+ migrateAtFinalize: z.ZodLiteral<true>;
1076
+ blockIncompatibleRollback: z.ZodLiteral<true>;
1077
+ }, z.core.$strict>;
1078
+ realtime: z.ZodObject<{
1079
+ production: z.ZodLiteral<"stattic-central">;
1080
+ local: z.ZodLiteral<"foreground-cli-ws">;
1081
+ }, z.core.$strict>;
1082
+ }, z.core.$strict>;
1083
1083
  variableValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1084
1084
  }, z.core.$strict>;
1085
1085
  export type ZeroRuntimeConfig = z.infer<typeof zeroRuntimeConfigSchema>;
@@ -1094,7 +1094,7 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
1094
1094
  artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
1095
1095
  configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
1096
1096
  binary: z.ZodObject<{
1097
- path: z.ZodLiteral<"__spacefast/zero/bin/stattic-zero-runner">;
1097
+ path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
1098
1098
  compatibilityTarget: z.ZodObject<{
1099
1099
  profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1100
1100
  os: z.ZodLiteral<"linux">;
@@ -1383,171 +1383,93 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
1383
1383
  }, z.core.$strict>;
1384
1384
  }, z.core.$strict>;
1385
1385
  export type ZeroDeployMetadata = z.infer<typeof zeroDeployMetadataSchema>;
1386
- export declare const zeroInspectResponseSchema: z.ZodObject<{
1387
- versionId: z.ZodNullable<z.ZodString>;
1388
- artifactId: z.ZodNullable<z.ZodString>;
1389
- data: z.ZodNullable<z.ZodObject<{
1386
+ /**
1387
+ * What a live Zero capsule is, as the `app` member of a space's runtime status.
1388
+ *
1389
+ * There is no `versionId` here: this only ever describes the version the status
1390
+ * response already names as live, and repeating it would invite the two to
1391
+ * disagree. `artifactId` stays because it identifies the built capsule rather
1392
+ * than the publish that carries it.
1393
+ */
1394
+ export declare const zeroAppSchema: z.ZodObject<{
1395
+ runtimeKind: z.ZodLiteral<"zero">;
1396
+ artifactId: z.ZodString;
1397
+ appName: z.ZodString;
1398
+ serverRuntime: z.ZodLiteral<"quickjs-rust">;
1399
+ inspect: z.ZodObject<{
1400
+ policy: z.ZodEnum<{
1401
+ public: "public";
1402
+ private: "private";
1403
+ }>;
1404
+ }, z.core.$strict>;
1405
+ install: z.ZodObject<{
1390
1406
  runtimeKind: z.ZodLiteral<"zero">;
1391
- appName: z.ZodString;
1392
- serverRuntime: z.ZodLiteral<"quickjs-rust">;
1393
- inspect: z.ZodObject<{
1394
- policy: z.ZodEnum<{
1395
- public: "public";
1396
- private: "private";
1397
- }>;
1398
- }, z.core.$strict>;
1399
- install: z.ZodObject<{
1400
- runtimeKind: z.ZodLiteral<"zero">;
1401
- engine: z.ZodLiteral<"quickjs-rust">;
1402
- storageRoot: z.ZodLiteral<"__spacefast/zero">;
1403
- artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
1404
- configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
1405
- binary: z.ZodObject<{
1406
- path: z.ZodLiteral<"__spacefast/zero/bin/stattic-zero-runner">;
1407
- compatibilityTarget: z.ZodObject<{
1408
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1409
- os: z.ZodLiteral<"linux">;
1410
- cpu: z.ZodLiteral<"x86_64">;
1411
- libc: z.ZodLiteral<"glibc">;
1412
- linking: z.ZodLiteral<"dynamic">;
1413
- requireExecutableBit: z.ZodLiteral<true>;
1414
- }, z.core.$strict>;
1415
- sha256: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1416
- required: z.ZodLiteral<true>;
1417
- }, z.core.$strict>;
1418
- mysql: z.ZodObject<{
1419
- migrateAtFinalize: z.ZodLiteral<true>;
1420
- blockIncompatibleRollback: z.ZodLiteral<true>;
1421
- }, z.core.$strict>;
1422
- realtime: z.ZodObject<{
1423
- production: z.ZodLiteral<"stattic-central">;
1424
- local: z.ZodLiteral<"foreground-cli-ws">;
1407
+ engine: z.ZodLiteral<"quickjs-rust">;
1408
+ storageRoot: z.ZodLiteral<"__spacefast/zero">;
1409
+ artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
1410
+ configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
1411
+ binary: z.ZodObject<{
1412
+ path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
1413
+ compatibilityTarget: z.ZodObject<{
1414
+ profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1415
+ os: z.ZodLiteral<"linux">;
1416
+ cpu: z.ZodLiteral<"x86_64">;
1417
+ libc: z.ZodLiteral<"glibc">;
1418
+ linking: z.ZodLiteral<"dynamic">;
1419
+ requireExecutableBit: z.ZodLiteral<true>;
1425
1420
  }, z.core.$strict>;
1421
+ sha256: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1422
+ required: z.ZodLiteral<true>;
1426
1423
  }, z.core.$strict>;
1427
- tables: z.ZodDefault<z.ZodArray<z.ZodString>>;
1428
- queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
1429
- mutations: z.ZodDefault<z.ZodArray<z.ZodString>>;
1430
- endpoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
1431
- method: z.ZodEnum<{
1432
- POST: "POST";
1433
- PUT: "PUT";
1434
- GET: "GET";
1435
- HEAD: "HEAD";
1436
- PATCH: "PATCH";
1437
- DELETE: "DELETE";
1438
- OPTIONS: "OPTIONS";
1439
- }>;
1440
- path: z.ZodString;
1441
- }, z.core.$strict>>>;
1442
- sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1443
- variables: z.ZodObject<{
1444
- source: z.ZodLiteral<"stattic-variables">;
1445
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
1424
+ mysql: z.ZodObject<{
1425
+ migrateAtFinalize: z.ZodLiteral<true>;
1426
+ blockIncompatibleRollback: z.ZodLiteral<true>;
1446
1427
  }, z.core.$strict>;
1447
1428
  realtime: z.ZodObject<{
1448
- mode: z.ZodEnum<{
1449
- "stattic-central": "stattic-central";
1450
- "spacefast-cast": "spacefast-cast";
1451
- "local-dev": "local-dev";
1452
- "local-websocket": "local-websocket";
1453
- }>;
1454
- centralUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1455
- path: z.ZodOptional<z.ZodString>;
1456
- replayPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1457
- replayUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1458
- runPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1459
- runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1460
- resourceKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1461
- socketPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1462
- spaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1463
- versionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1429
+ production: z.ZodLiteral<"stattic-central">;
1430
+ local: z.ZodLiteral<"foreground-cli-ws">;
1464
1431
  }, z.core.$strict>;
1465
- }, z.core.$strip>>;
1466
- }, z.core.$strict>;
1467
- export type ZeroInspectResponse = z.infer<typeof zeroInspectResponseSchema>;
1468
- export declare const zeroInspectPublicResponseSchema: z.ZodObject<{
1469
- data: z.ZodObject<{
1470
- versionId: z.ZodNullable<z.ZodString>;
1471
- artifactId: z.ZodNullable<z.ZodString>;
1472
- data: z.ZodNullable<z.ZodObject<{
1473
- runtimeKind: z.ZodLiteral<"zero">;
1474
- appName: z.ZodString;
1475
- serverRuntime: z.ZodLiteral<"quickjs-rust">;
1476
- inspect: z.ZodObject<{
1477
- policy: z.ZodEnum<{
1478
- public: "public";
1479
- private: "private";
1480
- }>;
1481
- }, z.core.$strict>;
1482
- install: z.ZodObject<{
1483
- runtimeKind: z.ZodLiteral<"zero">;
1484
- engine: z.ZodLiteral<"quickjs-rust">;
1485
- storageRoot: z.ZodLiteral<"__spacefast/zero">;
1486
- artifactPath: z.ZodLiteral<"__spacefast/zero/artifact.json">;
1487
- configPath: z.ZodLiteral<"__spacefast/zero/config.json">;
1488
- binary: z.ZodObject<{
1489
- path: z.ZodLiteral<"__spacefast/zero/bin/stattic-zero-runner">;
1490
- compatibilityTarget: z.ZodObject<{
1491
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1492
- os: z.ZodLiteral<"linux">;
1493
- cpu: z.ZodLiteral<"x86_64">;
1494
- libc: z.ZodLiteral<"glibc">;
1495
- linking: z.ZodLiteral<"dynamic">;
1496
- requireExecutableBit: z.ZodLiteral<true>;
1497
- }, z.core.$strict>;
1498
- sha256: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1499
- required: z.ZodLiteral<true>;
1500
- }, z.core.$strict>;
1501
- mysql: z.ZodObject<{
1502
- migrateAtFinalize: z.ZodLiteral<true>;
1503
- blockIncompatibleRollback: z.ZodLiteral<true>;
1504
- }, z.core.$strict>;
1505
- realtime: z.ZodObject<{
1506
- production: z.ZodLiteral<"stattic-central">;
1507
- local: z.ZodLiteral<"foreground-cli-ws">;
1508
- }, z.core.$strict>;
1509
- }, z.core.$strict>;
1510
- tables: z.ZodDefault<z.ZodArray<z.ZodString>>;
1511
- queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
1512
- mutations: z.ZodDefault<z.ZodArray<z.ZodString>>;
1513
- endpoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
1514
- method: z.ZodEnum<{
1515
- POST: "POST";
1516
- PUT: "PUT";
1517
- GET: "GET";
1518
- HEAD: "HEAD";
1519
- PATCH: "PATCH";
1520
- DELETE: "DELETE";
1521
- OPTIONS: "OPTIONS";
1522
- }>;
1523
- path: z.ZodString;
1524
- }, z.core.$strict>>>;
1525
- sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1526
- variables: z.ZodObject<{
1527
- source: z.ZodLiteral<"stattic-variables">;
1528
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
1529
- }, z.core.$strict>;
1530
- realtime: z.ZodObject<{
1531
- mode: z.ZodEnum<{
1532
- "stattic-central": "stattic-central";
1533
- "spacefast-cast": "spacefast-cast";
1534
- "local-dev": "local-dev";
1535
- "local-websocket": "local-websocket";
1536
- }>;
1537
- centralUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1538
- path: z.ZodOptional<z.ZodString>;
1539
- replayPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1540
- replayUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1541
- runPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1542
- runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1543
- resourceKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1544
- socketPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1545
- spaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1546
- versionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1547
- }, z.core.$strict>;
1548
- }, z.core.$strip>>;
1549
1432
  }, z.core.$strict>;
1550
- }, z.core.$strip>;
1433
+ tables: z.ZodDefault<z.ZodArray<z.ZodString>>;
1434
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
1435
+ mutations: z.ZodDefault<z.ZodArray<z.ZodString>>;
1436
+ endpoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
1437
+ method: z.ZodEnum<{
1438
+ POST: "POST";
1439
+ PUT: "PUT";
1440
+ GET: "GET";
1441
+ HEAD: "HEAD";
1442
+ PATCH: "PATCH";
1443
+ DELETE: "DELETE";
1444
+ OPTIONS: "OPTIONS";
1445
+ }>;
1446
+ path: z.ZodString;
1447
+ }, z.core.$strict>>>;
1448
+ sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1449
+ variables: z.ZodObject<{
1450
+ source: z.ZodLiteral<"stattic-variables">;
1451
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
1452
+ }, z.core.$strict>;
1453
+ realtime: z.ZodObject<{
1454
+ mode: z.ZodEnum<{
1455
+ "stattic-central": "stattic-central";
1456
+ "spacefast-cast": "spacefast-cast";
1457
+ "local-dev": "local-dev";
1458
+ "local-websocket": "local-websocket";
1459
+ }>;
1460
+ centralUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1461
+ path: z.ZodOptional<z.ZodString>;
1462
+ replayPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1463
+ replayUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1464
+ runPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1465
+ runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1466
+ resourceKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1467
+ socketPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1468
+ spaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1469
+ versionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1470
+ }, z.core.$strict>;
1471
+ }, z.core.$strict>;
1472
+ export type ZeroApp = z.infer<typeof zeroAppSchema>;
1551
1473
  export declare const zeroDbInspectResponseSchema: z.ZodObject<{
1552
1474
  versionId: z.ZodNullable<z.ZodString>;
1553
1475
  artifactId: z.ZodNullable<z.ZodString>;
@@ -1720,7 +1642,7 @@ export declare const zeroLogListQuerySchema: z.ZodObject<{
1720
1642
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1721
1643
  cursor: z.ZodOptional<z.ZodString>;
1722
1644
  requestId: z.ZodOptional<z.ZodString>;
1723
- mutationName: z.ZodOptional<z.ZodString>;
1645
+ handlerName: z.ZodOptional<z.ZodString>;
1724
1646
  }, z.core.$strict>;
1725
1647
  export type ZeroLogListQuery = z.infer<typeof zeroLogListQuerySchema>;
1726
1648
  export declare const zeroLogEntrySchema: z.ZodObject<{
@@ -1734,7 +1656,7 @@ export declare const zeroLogEntrySchema: z.ZodObject<{
1734
1656
  }>;
1735
1657
  requestId: z.ZodNullable<z.ZodString>;
1736
1658
  versionId: z.ZodNullable<z.ZodString>;
1737
- mutationName: z.ZodNullable<z.ZodString>;
1659
+ handlerName: z.ZodNullable<z.ZodString>;
1738
1660
  message: z.ZodString;
1739
1661
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1740
1662
  }, z.core.$strict>;
@@ -1750,7 +1672,7 @@ export declare const zeroLogListResponseSchema: z.ZodObject<{
1750
1672
  }>;
1751
1673
  requestId: z.ZodNullable<z.ZodString>;
1752
1674
  versionId: z.ZodNullable<z.ZodString>;
1753
- mutationName: z.ZodNullable<z.ZodString>;
1675
+ handlerName: z.ZodNullable<z.ZodString>;
1754
1676
  message: z.ZodString;
1755
1677
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1756
1678
  }, z.core.$strict>>;