@spacefast/common 0.0.23 → 0.0.26

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 (224) hide show
  1. package/brand-assets/LICENSE-Haskoy.txt +93 -0
  2. package/brand-assets/haskoy-latin-variable.woff2 +0 -0
  3. package/brand-assets/spacefast-favicon.svg +4 -4
  4. package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
  5. package/brand-assets/spacefast-wordmark.svg +2 -4
  6. package/dist/agents/connect-targets.js +1 -1
  7. package/dist/agents/private-key-oauth.d.ts +0 -1
  8. package/dist/agents/private-key-oauth.js +46 -63
  9. package/dist/brand-assets-build.js +4 -6
  10. package/dist/brand-assets.d.ts +5 -15
  11. package/dist/brand-assets.js +15 -14
  12. package/dist/config/domains.d.ts +47 -7
  13. package/dist/config/domains.js +66 -10
  14. package/dist/config/index.d.ts +0 -1
  15. package/dist/config/index.js +0 -1
  16. package/dist/contracts/abuse.d.ts +2 -0
  17. package/dist/contracts/abuse.js +12 -0
  18. package/dist/contracts/access.d.ts +124 -12
  19. package/dist/contracts/access.js +73 -9
  20. package/dist/contracts/activity.d.ts +1 -1
  21. package/dist/contracts/activity.js +5 -12
  22. package/dist/contracts/api-keys.d.ts +21 -21
  23. package/dist/contracts/api-keys.js +2 -2
  24. package/dist/contracts/beta.js +1 -1
  25. package/dist/contracts/billing.d.ts +3 -35
  26. package/dist/contracts/billing.js +33 -52
  27. package/dist/contracts/builds.d.ts +30 -18
  28. package/dist/contracts/builds.js +28 -9
  29. package/dist/contracts/channels.js +1 -1
  30. package/dist/contracts/cli.d.ts +10 -0
  31. package/dist/contracts/cli.js +10 -0
  32. package/dist/contracts/collab-public.d.ts +63 -0
  33. package/dist/contracts/collab-public.js +46 -0
  34. package/dist/contracts/comments.d.ts +282 -53
  35. package/dist/contracts/comments.js +173 -52
  36. package/dist/contracts/common.d.ts +3 -3
  37. package/dist/contracts/common.js +5 -5
  38. package/dist/contracts/crons.d.ts +35 -0
  39. package/dist/contracts/crons.js +42 -0
  40. package/dist/contracts/device-auth.d.ts +6 -6
  41. package/dist/contracts/device-auth.js +2 -2
  42. package/dist/contracts/docs.js +2 -2
  43. package/dist/contracts/domains.d.ts +38 -27
  44. package/dist/contracts/domains.js +29 -2
  45. package/dist/contracts/enums.d.ts +34 -30
  46. package/dist/contracts/enums.js +62 -48
  47. package/dist/contracts/error-code-meta.d.ts +50 -125
  48. package/dist/contracts/error-code-meta.js +29 -41
  49. package/dist/contracts/error-codes.d.ts +1 -1
  50. package/dist/contracts/error-codes.js +14 -33
  51. package/dist/contracts/execution.d.ts +47 -66
  52. package/dist/contracts/execution.js +53 -49
  53. package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
  54. package/dist/contracts/feature-lifecycle-core.js +2 -31
  55. package/dist/contracts/feature-lifecycle.d.ts +12 -52
  56. package/dist/contracts/feature-lifecycle.js +16 -59
  57. package/dist/contracts/features.d.ts +48 -60
  58. package/dist/contracts/features.js +59 -51
  59. package/dist/contracts/functions.d.ts +266 -72
  60. package/dist/contracts/functions.js +260 -37
  61. package/dist/contracts/git.d.ts +28 -34
  62. package/dist/contracts/git.js +10 -11
  63. package/dist/contracts/grants.d.ts +9 -5
  64. package/dist/contracts/grants.js +18 -9
  65. package/dist/contracts/ids.js +2 -2
  66. package/dist/contracts/internal.d.ts +8 -6
  67. package/dist/contracts/internal.js +12 -12
  68. package/dist/contracts/mcp.d.ts +11 -0
  69. package/dist/contracts/mcp.js +5 -0
  70. package/dist/contracts/me.js +1 -1
  71. package/dist/contracts/oauth-resources.d.ts +4 -3
  72. package/dist/contracts/oauth-resources.js +12 -3
  73. package/dist/contracts/operations.d.ts +90 -5
  74. package/dist/contracts/operations.js +77 -3
  75. package/dist/contracts/pages.d.ts +12 -7
  76. package/dist/contracts/pages.js +24 -1
  77. package/dist/contracts/plan-policy.d.ts +0 -2
  78. package/dist/contracts/plan-policy.js +2 -3
  79. package/dist/contracts/platform.d.ts +61 -148
  80. package/dist/contracts/platform.js +70 -126
  81. package/dist/contracts/publish-archive.d.ts +508 -0
  82. package/dist/contracts/publish-archive.js +32 -0
  83. package/dist/contracts/push-new.d.ts +4 -4
  84. package/dist/contracts/quotas.js +2 -2
  85. package/dist/contracts/repository-connections.d.ts +43 -30
  86. package/dist/contracts/repository-connections.js +11 -3
  87. package/dist/contracts/resources.d.ts +12 -24
  88. package/dist/contracts/resources.js +36 -16
  89. package/dist/contracts/runtime-api.d.ts +433 -192
  90. package/dist/contracts/runtime-api.js +421 -356
  91. package/dist/contracts/runtime-app.d.ts +127 -120
  92. package/dist/contracts/runtime-app.js +19 -10
  93. package/dist/contracts/runtime-db.d.ts +5 -5
  94. package/dist/contracts/runtime-db.js +2 -2
  95. package/dist/contracts/runtime-purge.d.ts +8 -0
  96. package/dist/contracts/runtime-purge.js +7 -0
  97. package/dist/contracts/runtime-services.d.ts +219 -0
  98. package/dist/contracts/runtime-services.js +437 -0
  99. package/dist/contracts/runtime-storage.d.ts +46 -32
  100. package/dist/contracts/runtime-storage.js +31 -8
  101. package/dist/contracts/sf-config-v1.d.ts +48 -10
  102. package/dist/contracts/space-config.d.ts +69 -18
  103. package/dist/contracts/space-config.js +226 -27
  104. package/dist/contracts/spaces.d.ts +236 -450
  105. package/dist/contracts/spaces.js +131 -151
  106. package/dist/contracts/superadmin-activity.d.ts +57 -4
  107. package/dist/contracts/superadmin-activity.js +48 -2
  108. package/dist/contracts/superadmin-search.d.ts +126 -0
  109. package/dist/contracts/superadmin-search.js +61 -0
  110. package/dist/contracts/superadmin-spaces.d.ts +361 -92
  111. package/dist/contracts/superadmin-spaces.js +97 -24
  112. package/dist/contracts/superadmin-teams.d.ts +28 -10
  113. package/dist/contracts/superadmin-teams.js +5 -8
  114. package/dist/contracts/superadmin-tenants.d.ts +0 -6
  115. package/dist/contracts/superadmin-tenants.js +1 -7
  116. package/dist/contracts/superadmin.d.ts +135 -54
  117. package/dist/contracts/superadmin.js +46 -23
  118. package/dist/contracts/tags.d.ts +12 -12
  119. package/dist/contracts/tags.js +3 -3
  120. package/dist/contracts/teams.d.ts +49 -14
  121. package/dist/contracts/teams.js +40 -22
  122. package/dist/contracts/transfers.d.ts +0 -49
  123. package/dist/contracts/transfers.js +4 -8
  124. package/dist/contracts/usage.d.ts +61 -0
  125. package/dist/contracts/usage.js +64 -0
  126. package/dist/contracts/variables.d.ts +2 -7
  127. package/dist/contracts/variables.js +9 -8
  128. package/dist/contracts/webhooks.d.ts +2 -2
  129. package/dist/contracts/zero.d.ts +102 -73
  130. package/dist/contracts/zero.js +94 -32
  131. package/dist/dashboard-paths/index.d.ts +1 -1
  132. package/dist/dashboard-paths/index.js +1 -0
  133. package/dist/docs/agent-prose.d.ts +2 -2
  134. package/dist/docs/agent-prose.js +63 -70
  135. package/dist/docs/agent-setup.js +45 -15
  136. package/dist/docs/catalog.d.ts +24 -24
  137. package/dist/docs/catalog.js +35 -24
  138. package/dist/docs/error-docs.js +194 -270
  139. package/dist/docs/skills.d.ts +12 -12
  140. package/dist/docs/skills.js +4 -4
  141. package/dist/test-helpers/fetch-stub.d.ts +16 -0
  142. package/dist/test-helpers/fetch-stub.js +25 -0
  143. package/dist/utils/build-settings.d.ts +5 -1
  144. package/dist/utils/build-settings.js +91 -13
  145. package/dist/utils/canonical-json.d.ts +10 -0
  146. package/dist/utils/canonical-json.js +22 -0
  147. package/dist/utils/cast-transport.d.ts +28 -0
  148. package/dist/utils/cast-transport.js +52 -0
  149. package/dist/utils/claim-token.d.ts +0 -8
  150. package/dist/utils/claim-token.js +3 -15
  151. package/dist/utils/concurrency.js +1 -0
  152. package/dist/utils/credential-policy.d.ts +1 -1
  153. package/dist/utils/credential-policy.js +4 -3
  154. package/dist/utils/dns-instructions.js +9 -9
  155. package/dist/utils/env-file.d.ts +17 -0
  156. package/dist/utils/env-file.js +96 -0
  157. package/dist/utils/error-code.d.ts +2 -0
  158. package/dist/utils/error-code.js +8 -0
  159. package/dist/utils/generate-space-name.d.ts +8 -10
  160. package/dist/utils/generate-space-name.js +206 -21
  161. package/dist/utils/grant-decision.fixtures.json +2938 -0
  162. package/dist/utils/grants.d.ts +2 -0
  163. package/dist/utils/grants.js +26 -1
  164. package/dist/utils/gravatar.d.ts +9 -0
  165. package/dist/utils/gravatar.js +31 -0
  166. package/dist/utils/idempotency.d.ts +6 -0
  167. package/dist/utils/idempotency.js +28 -0
  168. package/dist/utils/local-space-state.d.ts +9 -16
  169. package/dist/utils/local-space-state.js +20 -50
  170. package/dist/utils/one-shot-replay.d.ts +4 -1
  171. package/dist/utils/page-colors.d.ts +14 -12
  172. package/dist/utils/page-colors.js +15 -13
  173. package/dist/utils/page-fonts.d.ts +2 -2
  174. package/dist/utils/page-fonts.js +15 -4
  175. package/dist/utils/pages.d.ts +21 -3
  176. package/dist/utils/pages.js +42 -13
  177. package/dist/utils/publish-form-data.d.ts +12 -0
  178. package/dist/utils/publish-form-data.js +10 -0
  179. package/dist/utils/publish-policy.d.ts +27 -0
  180. package/dist/utils/publish-policy.fixtures.json +403 -0
  181. package/dist/utils/publish-policy.js +45 -20
  182. package/dist/utils/push-new.d.ts +7 -0
  183. package/dist/utils/push-new.js +7 -0
  184. package/dist/utils/query-keys.d.ts +4 -5
  185. package/dist/utils/query-keys.js +2 -3
  186. package/dist/utils/runtime-paths.d.ts +5 -0
  187. package/dist/utils/runtime-paths.js +5 -0
  188. package/dist/utils/runtime-upload-batch.d.ts +0 -5
  189. package/dist/utils/runtime-upload-batch.js +1 -27
  190. package/dist/utils/runtime-upload.d.ts +6 -11
  191. package/dist/utils/runtime-upload.js +10 -13
  192. package/dist/utils/secure-local-file.js +5 -16
  193. package/dist/utils/space-config.d.ts +1 -34
  194. package/dist/utils/space-config.js +8 -326
  195. package/dist/utils/static-runtime-policy.d.ts +9 -3
  196. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  197. package/dist/utils/static-runtime-policy.js +22 -56
  198. package/dist/utils/storage-policy.d.ts +1 -1
  199. package/dist/utils/storage-policy.js +3 -1
  200. package/dist/utils/structured-error.d.ts +14 -0
  201. package/dist/utils/structured-error.js +22 -0
  202. package/dist/utils/upload-session.d.ts +4 -1
  203. package/dist/utils/upload-session.js +33 -5
  204. package/dist/utils/version-path.js +13 -4
  205. package/dist/vocabulary.d.ts +13 -11
  206. package/dist/vocabulary.js +42 -28
  207. package/package.json +7 -17
  208. package/dist/config/postgres-budget.d.ts +0 -129
  209. package/dist/config/postgres-budget.js +0 -140
  210. package/dist/config/postgres-budget.json +0 -51
  211. package/dist/contracts/archives.d.ts +0 -331
  212. package/dist/contracts/archives.js +0 -120
  213. package/dist/contracts/deployments.d.ts +0 -574
  214. package/dist/contracts/deployments.js +0 -97
  215. package/dist/contracts/sites.d.ts +0 -416
  216. package/dist/contracts/sites.js +0 -168
  217. package/dist/contracts/superadmin-queues.d.ts +0 -414
  218. package/dist/contracts/superadmin-queues.js +0 -202
  219. package/dist/contracts/superadmin-runtime.d.ts +0 -27
  220. package/dist/contracts/superadmin-runtime.js +0 -38
  221. package/dist/index.d.ts +0 -1
  222. package/dist/index.js +0 -1
  223. package/dist/utils/api.d.ts +0 -4
  224. package/dist/utils/api.js +0 -13
@@ -4,10 +4,31 @@ export declare const SF_CONFIG_V1_FILES: readonly ["sf.jsonc", "spacefast.jsonc"
4
4
  /** Published JSON Schema URL for the strict `sf.jsonc` v1 contract. */
5
5
  export declare const SF_CONFIG_V1_SCHEMA_URL: `${string}/schemas/sf.v1.json`;
6
6
  /**
7
- * How a redirect answers. Omitting it means 302. There is no 200: a rule that
8
- * serves other content under the requested URL is a `rewrites` entry.
7
+ * How a redirect answers. Omitting it means 302. There is no 200 and no 404:
8
+ * a rule that serves other content under the requested URL is a `rewrites`
9
+ * entry — with `notFound: true` when it should answer 404.
9
10
  */
10
11
  export type SfConfigV1RedirectStatus = 301 | 302 | 303 | 307 | 308;
12
+ /**
13
+ * Query parameters a redirect or rewrite requires, as parameter name to
14
+ * capture name — `{ id: "id" }` is the `id=:id` token of a `_redirects` line,
15
+ * spelled the way the compiled rule (and the runtime matcher) carry it.
16
+ */
17
+ export type SfConfigV1QueryMatch = Record<string, string>;
18
+ /**
19
+ * One header operation: `{ key, value }` sets, `{ key, remove: true }` is the
20
+ * `!Name` line of a `_headers` block. The shape is what tells the two apart,
21
+ * so a remove entry carries no value.
22
+ */
23
+ export type SfConfigV1HeaderEntry = {
24
+ key: string;
25
+ value: string;
26
+ remove?: never;
27
+ } | {
28
+ key: string;
29
+ remove: true;
30
+ value?: never;
31
+ };
11
32
  export type SfConfigV1 = {
12
33
  $schema?: typeof SF_CONFIG_V1_SCHEMA_URL;
13
34
  version: 1;
@@ -32,29 +53,36 @@ export type SfConfigV1 = {
32
53
  source: string;
33
54
  destination: string;
34
55
  status?: SfConfigV1RedirectStatus;
56
+ /** Answer even when the request path resolves to a committed file — the `!` of a `_redirects` rule. */
57
+ force?: boolean;
58
+ query?: SfConfigV1QueryMatch;
35
59
  }[];
36
60
  /**
37
61
  * Rewrite and proxy rules: the URL stays, the content comes from the
38
62
  * destination. A path destination rewrites, an absolute URL proxies — the
39
63
  * same 200 rules `_redirects` writes as `/from /to 200`, which is why they
40
- * carry no status of their own.
64
+ * carry no status of their own. `notFound: true` answers 404 instead — the
65
+ * `/gone /404.html 404` rule, which is a rewrite in every way except the
66
+ * status; its destination must be a path.
41
67
  */
42
68
  rewrites?: {
43
69
  source: string;
44
70
  destination: string;
45
71
  /** Let shared caches store the proxy response. Absolute-URL destinations only. */
46
72
  cache?: "shared";
73
+ /** Rewrite even when the request path resolves to a committed file — the `!` of a `200!` / `404!` file rule. */
74
+ force?: boolean;
75
+ query?: SfConfigV1QueryMatch;
76
+ notFound?: boolean;
47
77
  }[];
48
78
  /**
49
- * Response headers to set on matching requests. Headers are a list, not a
50
- * map, so repeated names (Set-Cookie) survive.
79
+ * Response headers to set — or remove — on matching requests. Headers are a
80
+ * list, not a map, so repeated names (Set-Cookie) survive and operations
81
+ * keep their order.
51
82
  */
52
83
  headers?: {
53
84
  source: string;
54
- headers: {
55
- key: string;
56
- value: string;
57
- }[];
85
+ headers: SfConfigV1HeaderEntry[];
58
86
  }[];
59
87
  metadata?: {
60
88
  title?: string;
@@ -67,6 +95,15 @@ export type SfConfigV1 = {
67
95
  access?: {
68
96
  public: string[];
69
97
  };
98
+ /**
99
+ * Scheduled requests against this space's own paths. Declarations pass
100
+ * through verbatim — the compiled `__spacefast/crons.json` derives each
101
+ * entry's key from its path, and the schedule is never normalized here.
102
+ */
103
+ crons?: {
104
+ path: string;
105
+ schedule: string;
106
+ }[];
70
107
  };
71
108
  export type EffectiveConfigV1 = {
72
109
  version: 1;
@@ -88,6 +125,7 @@ export type EffectiveConfigV1 = {
88
125
  headers?: SfConfigV1["headers"];
89
126
  metadata?: SfConfigV1["metadata"];
90
127
  substitute?: SfConfigV1["substitute"];
128
+ crons?: SfConfigV1["crons"];
91
129
  grants?: Grant[];
92
130
  };
93
131
  /**
@@ -96,7 +134,7 @@ export type EffectiveConfigV1 = {
96
134
  * it is the same grammar and the same compiler.
97
135
  */
98
136
  export type SfConfigV1Issue = {
99
- code: "config_alias" | "config_conflict" | "config_identity_moved" | "config_invalid" | "config_key_removed" | "config_unknown_key" | "header_basic_auth_unsupported" | "header_cache_control_platform_managed" | "header_cdn_cache_unsupported" | "header_name_invalid" | "header_name_unsupported" | "header_path_invalid" | "header_pattern_invalid" | "header_port_unsupported" | "header_value_invalid" | "redirect_cache_directive_invalid" | "redirect_cache_not_proxy" | "redirect_destination_invalid" | "redirect_destination_missing" | "redirect_host_invalid" | "redirect_loop_invalid" | "redirect_pattern_invalid" | "redirect_rewrite_destination_invalid" | "redirect_source_invalid" | "redirect_status_unsupported" | "redirect_status_use_rewrites" | "serve_index_required" | "template_syntax_retired";
137
+ code: "config_alias" | "config_conflict" | "config_cron_duplicate_path" | "config_cron_invalid_path" | "config_cron_invalid_schedule" | "config_cron_too_many" | "config_identity_moved" | "config_invalid" | "config_key_removed" | "config_unknown_key" | "header_basic_auth_unsupported" | "header_cache_control_platform_managed" | "header_cdn_cache_unsupported" | "header_name_invalid" | "header_name_unsupported" | "header_path_invalid" | "header_pattern_invalid" | "header_port_unsupported" | "header_value_invalid" | "redirect_cache_directive_invalid" | "redirect_cache_not_proxy" | "redirect_destination_invalid" | "redirect_destination_missing" | "redirect_host_invalid" | "redirect_loop_invalid" | "redirect_pattern_invalid" | "redirect_query_match_invalid" | "redirect_rewrite_destination_invalid" | "redirect_source_invalid" | "redirect_status_unsupported" | "redirect_status_use_rewrites" | "serve_index_required" | "template_syntax_retired";
100
138
  severity: "error" | "warning";
101
139
  path: string;
102
140
  line: number;
@@ -2,6 +2,13 @@ import { z } from "zod";
2
2
  export declare const SPACE_CONFIG_CANONICAL_FILE = "sf.jsonc";
3
3
  export declare const SPACE_CONFIG_ALIAS_FILES: readonly ["spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
4
4
  export declare const SPACE_CONFIG_ACCEPTED_FILES: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
5
+ /**
6
+ * Accepted config filenames in read precedence order, highest first. Kept in
7
+ * step with the finalizer's `CONFIG_ACCEPTED_FILES` (crates/stattic-runtime-core
8
+ * protocol.rs) — the runtime compile is the selection authority, and a local
9
+ * read choosing a different file than the publish serves is a split brain.
10
+ */
11
+ export declare const SPACE_CONFIG_PRECEDENCE: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
5
12
  export declare const SPACE_CONFIG_PRIVATE_FILES: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
6
13
  export declare const SPACE_CONFIG_CAPS: {
7
14
  /** Max raw `sf.jsonc` size in bytes. */
@@ -12,6 +19,7 @@ export declare const SPACE_CONFIG_CAPS: {
12
19
  readonly templates: 100;
13
20
  readonly metaTitleChars: 300;
14
21
  readonly metaDescriptionChars: 1000;
22
+ /** Max OG image or favicon path/URL length; enough for signed URLs while staying request-safe. */
15
23
  readonly metaImageChars: 2000;
16
24
  /** Max bytes per `inject` snippet. */
17
25
  readonly injectSnippetBytes: number;
@@ -27,6 +35,10 @@ export declare const SPACE_CONFIG_CAPS: {
27
35
  readonly themeNameChars: 120;
28
36
  /** Max top-level `name` (space display name) length. Matches the stored column. */
29
37
  readonly nameChars: 255;
38
+ /** Max `crons` entries. One provider crontab slot each, so the cap is small and hard. */
39
+ readonly crons: 8;
40
+ /** Max `crons[].path` length. */
41
+ readonly cronPathChars: 512;
30
42
  };
31
43
  /** Published JSON Schema URL for `sf.jsonc` ($schema autocomplete). */
32
44
  export declare const SPACE_CONFIG_SCHEMA_URL: string;
@@ -53,15 +65,7 @@ export declare const spaceBuildSettingsSchema: z.ZodObject<{
53
65
  timeoutSeconds: z.ZodOptional<z.ZodNumber>;
54
66
  }, z.core.$strict>;
55
67
  export type SpaceBuildSettings = z.infer<typeof spaceBuildSettingsSchema>;
56
- export declare const spacePlacementModeSchema: z.ZodEnum<{
57
- shared: "shared";
58
- dedicated: "dedicated";
59
- }>;
60
68
  export declare const spacePlacementConfigSchema: z.ZodObject<{
61
- mode: z.ZodOptional<z.ZodEnum<{
62
- shared: "shared";
63
- dedicated: "dedicated";
64
- }>>;
65
69
  burstable: z.ZodOptional<z.ZodBoolean>;
66
70
  }, z.core.$strict>;
67
71
  export type SpacePlacementConfig = z.infer<typeof spacePlacementConfigSchema>;
@@ -71,7 +75,6 @@ export declare const wordpressDataSourceSchema: z.ZodObject<{
71
75
  kind: z.ZodLiteral<"wordpress">;
72
76
  url: z.ZodString;
73
77
  }, z.core.$strict>;
74
- export type WordPressDataSource = z.infer<typeof wordpressDataSourceSchema>;
75
78
  export declare const spaceDataSourcesSchema: z.ZodPipe<z.ZodUnknown, z.ZodRecord<z.ZodString, z.ZodObject<{
76
79
  kind: z.ZodLiteral<"wordpress">;
77
80
  url: z.ZodString;
@@ -88,6 +91,7 @@ export declare const spaceConfigSchema: z.ZodObject<{
88
91
  title: z.ZodOptional<z.ZodString>;
89
92
  description: z.ZodOptional<z.ZodString>;
90
93
  image: z.ZodOptional<z.ZodString>;
94
+ favicon: z.ZodOptional<z.ZodString>;
91
95
  }, z.core.$strip>>;
92
96
  superpowers: z.ZodOptional<z.ZodObject<{
93
97
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -140,10 +144,6 @@ export declare const spaceConfigSchema: z.ZodObject<{
140
144
  timeoutSeconds: z.ZodOptional<z.ZodNumber>;
141
145
  }, z.core.$strict>>;
142
146
  placement: z.ZodOptional<z.ZodObject<{
143
- mode: z.ZodOptional<z.ZodEnum<{
144
- shared: "shared";
145
- dedicated: "dedicated";
146
- }>>;
147
147
  burstable: z.ZodOptional<z.ZodBoolean>;
148
148
  }, z.core.$strict>>;
149
149
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
@@ -169,7 +169,6 @@ export declare const spaceConfigFileAccessSchema: z.ZodUnion<readonly [z.ZodPipe
169
169
  }, "public">>, z.ZodObject<{
170
170
  public: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
171
171
  }, z.core.$strict>]>;
172
- export type SpaceConfigFileAccess = z.infer<typeof spaceConfigFileAccessSchema>;
173
172
  /**
174
173
  * Zero: a transactional app with its own database.
175
174
  *
@@ -196,6 +195,7 @@ export declare const spaceRuntimeFunctionsSchema: z.ZodObject<{
196
195
  kind: z.ZodLiteral<"functions">;
197
196
  entry: z.ZodOptional<z.ZodString>;
198
197
  database: z.ZodDefault<z.ZodBoolean>;
198
+ fetch: z.ZodOptional<z.ZodBoolean>;
199
199
  compatibilityDate: z.ZodOptional<z.ZodString>;
200
200
  }, z.core.$strip>;
201
201
  /**
@@ -214,11 +214,60 @@ export declare const spaceRuntimeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
214
214
  kind: z.ZodLiteral<"functions">;
215
215
  entry: z.ZodOptional<z.ZodString>;
216
216
  database: z.ZodDefault<z.ZodBoolean>;
217
+ fetch: z.ZodOptional<z.ZodBoolean>;
217
218
  compatibilityDate: z.ZodOptional<z.ZodString>;
218
219
  }, z.core.$strip>], "kind">;
219
220
  export type SpaceRuntimeZeroConfig = z.infer<typeof spaceRuntimeZeroSchema>;
220
221
  export type SpaceRuntimeFunctionsConfig = z.infer<typeof spaceRuntimeFunctionsSchema>;
221
222
  export type SpaceRuntimeConfig = z.infer<typeof spaceRuntimeSchema>;
223
+ /**
224
+ * Scheduled requests: the provider crontab asks this space for these paths on
225
+ * these schedules.
226
+ *
227
+ * File-only for the same reason `runtime` is: what runs on a schedule is a fact
228
+ * about the content of a version, so it rolls forward and back with the version
229
+ * instead of being set through the API config overlay.
230
+ *
231
+ * The Rust config compiler is the selection authority for both fields; this
232
+ * schema exists so an editor and an agent get the same answer before publish.
233
+ */
234
+ export declare const SPACE_CRON_NAMED_SCHEDULES: readonly ["hourly", "daily", "twicedaily", "weekly"];
235
+ /**
236
+ * The wp.cloud schedule grammar: a named interval, an `Nh`/`Nd`/`Nw` count, or
237
+ * a five-field crontab expression. No `@daily` macros and no month/day names —
238
+ * the provider does not accept them either.
239
+ */
240
+ export declare function isSpaceCronSchedule(schedule: string): boolean;
241
+ /**
242
+ * The artifact key for a cron path: lowercase, leading `/` stripped, every run
243
+ * of non-alphanumerics collapsed to one `-`, trimmed. Two paths that produce
244
+ * one key are rejected, so a key names exactly one schedule.
245
+ */
246
+ export declare function spaceCronKey(path: string): string;
247
+ /** Generated runtime file the serving engine reads, written only when a version declares a cron. */
248
+ export declare const SPACE_CRONS_ARTIFACT_PATH = "__spacefast/crons.json";
249
+ export declare const SPACE_CRONS_ARTIFACT_VERSION = 1;
250
+ /** One compiled cron, as the artifact carries it. */
251
+ export type SpaceCronEntry = {
252
+ /** Slug of `path`; unique within a version. */
253
+ key: string;
254
+ path: string;
255
+ /** Verbatim as declared — never normalized or expanded. */
256
+ schedule: string;
257
+ };
258
+ export type SpaceCronsArtifact = {
259
+ version: typeof SPACE_CRONS_ARTIFACT_VERSION;
260
+ crons: SpaceCronEntry[];
261
+ };
262
+ export declare const spaceCronSchema: z.ZodObject<{
263
+ path: z.ZodString;
264
+ schedule: z.ZodString;
265
+ }, z.core.$strip>;
266
+ export declare const spaceCronsSchema: z.ZodArray<z.ZodObject<{
267
+ path: z.ZodString;
268
+ schedule: z.ZodString;
269
+ }, z.core.$strip>>;
270
+ export type SpaceCronConfig = z.infer<typeof spaceCronSchema>;
222
271
  export declare const spaceConfigFileSchema: z.ZodObject<{
223
272
  index: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
224
273
  fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -231,6 +280,7 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
231
280
  title: z.ZodOptional<z.ZodString>;
232
281
  description: z.ZodOptional<z.ZodString>;
233
282
  image: z.ZodOptional<z.ZodString>;
283
+ favicon: z.ZodOptional<z.ZodString>;
234
284
  }, z.core.$strip>>;
235
285
  superpowers: z.ZodOptional<z.ZodObject<{
236
286
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -283,10 +333,6 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
283
333
  timeoutSeconds: z.ZodOptional<z.ZodNumber>;
284
334
  }, z.core.$strict>>;
285
335
  placement: z.ZodOptional<z.ZodObject<{
286
- mode: z.ZodOptional<z.ZodEnum<{
287
- shared: "shared";
288
- dedicated: "dedicated";
289
- }>>;
290
336
  burstable: z.ZodOptional<z.ZodBoolean>;
291
337
  }, z.core.$strict>>;
292
338
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
@@ -313,8 +359,13 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
313
359
  kind: z.ZodLiteral<"functions">;
314
360
  entry: z.ZodOptional<z.ZodString>;
315
361
  database: z.ZodDefault<z.ZodBoolean>;
362
+ fetch: z.ZodOptional<z.ZodBoolean>;
316
363
  compatibilityDate: z.ZodOptional<z.ZodString>;
317
364
  }, z.core.$strip>], "kind">>;
365
+ crons: z.ZodOptional<z.ZodArray<z.ZodObject<{
366
+ path: z.ZodString;
367
+ schedule: z.ZodString;
368
+ }, z.core.$strip>>>;
318
369
  }, z.core.$strip>;
319
370
  export type SpaceConfigFile = z.infer<typeof spaceConfigFileSchema>;
320
371
  /**