@spacefast/common 0.0.5 → 0.0.7

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 (183) hide show
  1. package/brand-assets/spacefast-favicon.svg +16 -0
  2. package/brand-assets/spacefast-sf-full-bleed.svg +13 -0
  3. package/brand-assets/spacefast-wordmark.svg +5 -0
  4. package/dist/agents/connect-targets.d.ts +138 -0
  5. package/dist/agents/connect-targets.js +243 -0
  6. package/dist/brand-assets-build.d.ts +26 -0
  7. package/dist/brand-assets-build.js +81 -0
  8. package/dist/brand-assets.d.ts +42 -0
  9. package/dist/brand-assets.js +30 -0
  10. package/dist/brand.d.ts +1 -0
  11. package/dist/brand.js +5 -0
  12. package/dist/config/domains.d.ts +12 -6
  13. package/dist/config/domains.js +30 -38
  14. package/dist/contracts/access.d.ts +967 -124
  15. package/dist/contracts/access.js +804 -148
  16. package/dist/contracts/activity.d.ts +1 -1
  17. package/dist/contracts/activity.js +28 -2
  18. package/dist/contracts/annotations.d.ts +2 -4
  19. package/dist/contracts/api-keys.d.ts +126 -4
  20. package/dist/contracts/api-keys.js +74 -6
  21. package/dist/contracts/archives.d.ts +8 -2
  22. package/dist/contracts/archives.js +11 -4
  23. package/dist/contracts/billing.d.ts +0 -9
  24. package/dist/contracts/builds.d.ts +65 -21
  25. package/dist/contracts/builds.js +29 -0
  26. package/dist/contracts/common.d.ts +2 -0
  27. package/dist/contracts/common.js +4 -0
  28. package/dist/contracts/continuation.d.ts +0 -3
  29. package/dist/contracts/countries.d.ts +2 -0
  30. package/dist/contracts/countries.js +261 -0
  31. package/dist/contracts/deployments.d.ts +34 -34
  32. package/dist/contracts/device-auth.d.ts +4 -11
  33. package/dist/contracts/device-auth.js +4 -0
  34. package/dist/contracts/docs.d.ts +119 -0
  35. package/dist/contracts/docs.js +51 -0
  36. package/dist/contracts/domains.d.ts +96 -54
  37. package/dist/contracts/domains.js +26 -4
  38. package/dist/contracts/enums.d.ts +15 -16
  39. package/dist/contracts/enums.js +26 -14
  40. package/dist/contracts/error-code-meta.d.ts +184 -0
  41. package/dist/contracts/error-code-meta.js +124 -10
  42. package/dist/contracts/error-codes.d.ts +1 -1
  43. package/dist/contracts/error-codes.js +42 -0
  44. package/dist/contracts/events.d.ts +1 -1
  45. package/dist/contracts/feature-lifecycle-core.d.ts +36 -0
  46. package/dist/contracts/feature-lifecycle-core.js +220 -0
  47. package/dist/contracts/feature-lifecycle.d.ts +7 -0
  48. package/dist/contracts/feature-lifecycle.js +31 -0
  49. package/dist/contracts/features.d.ts +76 -6
  50. package/dist/contracts/features.js +178 -13
  51. package/dist/contracts/generated-feature-launch-entries.d.ts +2 -0
  52. package/dist/contracts/generated-feature-launch-entries.js +518 -0
  53. package/dist/contracts/git.d.ts +2 -8
  54. package/dist/contracts/ids.d.ts +9 -0
  55. package/dist/contracts/ids.js +13 -0
  56. package/dist/contracts/mcp.d.ts +8 -10
  57. package/dist/contracts/me.js +1 -1
  58. package/dist/contracts/oauth-resources.d.ts +19 -8
  59. package/dist/contracts/oauth-resources.js +44 -13
  60. package/dist/contracts/operations.d.ts +161 -1
  61. package/dist/contracts/operations.js +49 -1
  62. package/dist/contracts/platform.d.ts +6 -102
  63. package/dist/contracts/platform.js +6 -50
  64. package/dist/contracts/publishes.d.ts +130 -0
  65. package/dist/contracts/publishes.js +145 -0
  66. package/dist/contracts/push-new.d.ts +4 -4
  67. package/dist/contracts/quotas.d.ts +2 -0
  68. package/dist/contracts/quotas.js +8 -0
  69. package/dist/contracts/repository-connections.d.ts +9 -8
  70. package/dist/contracts/repository-connections.js +13 -0
  71. package/dist/contracts/resources.d.ts +99 -13
  72. package/dist/contracts/resources.js +36 -4
  73. package/dist/contracts/routes.d.ts +0 -2
  74. package/dist/contracts/runtime-api.d.ts +363 -39
  75. package/dist/contracts/runtime-api.js +276 -6
  76. package/dist/contracts/sf-config-v1.d.ts +75 -0
  77. package/dist/contracts/sf-config-v1.js +6 -0
  78. package/dist/contracts/sites.d.ts +19 -2
  79. package/dist/contracts/sites.js +21 -0
  80. package/dist/contracts/space-config.d.ts +201 -2
  81. package/dist/contracts/space-config.js +135 -5
  82. package/dist/contracts/spaces.d.ts +376 -196
  83. package/dist/contracts/spaces.js +62 -10
  84. package/dist/contracts/superadmin-emails.d.ts +4 -2
  85. package/dist/contracts/superadmin-emails.js +8 -0
  86. package/dist/contracts/superadmin-queues.d.ts +26 -26
  87. package/dist/contracts/superadmin-spaces.d.ts +172 -42
  88. package/dist/contracts/superadmin-tenants.d.ts +6 -6
  89. package/dist/contracts/superadmin-tenants.js +6 -11
  90. package/dist/contracts/superadmin.d.ts +6 -93
  91. package/dist/contracts/superadmin.js +6 -14
  92. package/dist/contracts/tags.d.ts +10 -9
  93. package/dist/contracts/tags.js +2 -1
  94. package/dist/contracts/teams.d.ts +26 -30
  95. package/dist/contracts/teams.js +11 -17
  96. package/dist/contracts/theme-json.d.ts +30 -0
  97. package/dist/contracts/theme-json.js +48 -0
  98. package/dist/contracts/variables.d.ts +0 -2
  99. package/dist/contracts/variables.js +0 -5
  100. package/dist/contracts/webhooks.d.ts +2 -0
  101. package/dist/contracts/webhooks.js +1 -1
  102. package/dist/contracts/zero.d.ts +5 -10
  103. package/dist/docs/agent-prose.d.ts +43 -3
  104. package/dist/docs/agent-prose.js +146 -7
  105. package/dist/docs/agent-setup.d.ts +51 -0
  106. package/dist/docs/agent-setup.js +211 -14
  107. package/dist/docs/agent-solutions.d.ts +5 -5
  108. package/dist/docs/agent-solutions.js +2 -2
  109. package/dist/docs/catalog.d.ts +650 -0
  110. package/dist/docs/catalog.js +758 -0
  111. package/dist/docs/error-docs.d.ts +0 -2
  112. package/dist/docs/error-docs.js +189 -35
  113. package/dist/docs/index-build.d.ts +17 -0
  114. package/dist/docs/index-build.js +24 -0
  115. package/dist/docs/search.d.ts +54 -0
  116. package/dist/docs/search.js +96 -0
  117. package/dist/docs/skill-distribution.d.ts +5 -3
  118. package/dist/docs/skill-distribution.js +8 -8
  119. package/dist/slug-policy/blocklist.d.ts +4 -0
  120. package/dist/slug-policy/blocklist.js +122 -0
  121. package/dist/slug-policy/index.d.ts +17 -0
  122. package/dist/slug-policy/index.js +86 -0
  123. package/dist/utils/access-match.d.ts +39 -0
  124. package/dist/utils/access-match.js +296 -0
  125. package/dist/utils/auth-redirect.d.ts +3 -1
  126. package/dist/utils/auth-redirect.js +21 -1
  127. package/dist/utils/build-settings.d.ts +6 -0
  128. package/dist/utils/build-settings.js +429 -46
  129. package/dist/utils/claim-token.d.ts +8 -0
  130. package/dist/utils/claim-token.js +23 -2
  131. package/dist/utils/concurrency.d.ts +1 -0
  132. package/dist/utils/concurrency.js +22 -0
  133. package/dist/utils/content-type.d.ts +1 -0
  134. package/dist/utils/content-type.js +1 -1
  135. package/dist/utils/credential-policy.d.ts +54 -0
  136. package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
  137. package/dist/utils/email.d.ts +1 -0
  138. package/dist/utils/email.js +3 -0
  139. package/dist/utils/gate-theme.d.ts +61 -0
  140. package/dist/utils/gate-theme.js +217 -0
  141. package/dist/utils/git-repository.d.ts +0 -1
  142. package/dist/utils/git-repository.js +0 -3
  143. package/dist/utils/id-hints.d.ts +8 -0
  144. package/dist/utils/id-hints.js +61 -0
  145. package/dist/utils/local-space-state.d.ts +91 -0
  146. package/dist/utils/local-space-state.js +251 -0
  147. package/dist/utils/oauth-signed-query.d.ts +8 -0
  148. package/dist/utils/oauth-signed-query.js +26 -0
  149. package/dist/utils/publish-detection.d.ts +0 -8
  150. package/dist/utils/publish-detection.js +0 -93
  151. package/dist/utils/publish-policy.d.ts +6 -5
  152. package/dist/utils/publish-policy.js +71 -7
  153. package/dist/utils/query-keys.d.ts +16 -4
  154. package/dist/utils/query-keys.js +31 -4
  155. package/dist/utils/runtime-paths.d.ts +0 -1
  156. package/dist/utils/runtime-paths.js +0 -1
  157. package/dist/utils/runtime-upload-batch.d.ts +18 -0
  158. package/dist/utils/runtime-upload-batch.js +90 -0
  159. package/dist/utils/runtime-upload.d.ts +2 -0
  160. package/dist/utils/runtime-upload.js +5 -0
  161. package/dist/utils/sf-config-v1.d.ts +2 -0
  162. package/dist/utils/sf-config-v1.js +542 -0
  163. package/dist/utils/space-config.d.ts +4 -0
  164. package/dist/utils/space-config.js +10 -1
  165. package/dist/utils/space-theme.d.ts +2 -0
  166. package/dist/utils/space-theme.js +9 -0
  167. package/dist/utils/static-runtime-policy.d.ts +0 -21
  168. package/dist/utils/static-runtime-policy.js +19 -103
  169. package/dist/utils/upload-session.d.ts +1 -1
  170. package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
  171. package/dist/utils/wpcom-auth-redirects.js +26 -10
  172. package/dist/vocabulary.d.ts +130 -30
  173. package/dist/vocabulary.js +77 -36
  174. package/package.json +35 -1
  175. package/dist/contracts/account.d.ts +0 -28
  176. package/dist/contracts/account.js +0 -54
  177. package/dist/contracts/intercom.d.ts +0 -6
  178. package/dist/contracts/intercom.js +0 -5
  179. package/dist/contracts/telemetry.d.ts +0 -2
  180. package/dist/contracts/telemetry.js +0 -1
  181. package/dist/utils/access-policy.d.ts +0 -39
  182. package/dist/utils/error-display.d.ts +0 -7
  183. package/dist/utils/error-display.js +0 -42
@@ -4,8 +4,11 @@ export const qk = {
4
4
  accountSessions: () => ["account", "sessions"],
5
5
  accountConnections: () => ["account", "connections"],
6
6
  accountInvitations: () => ["account", "invitations"],
7
- apiTokens: () => ["api-tokens"],
7
+ // Results are team-filtered, so the team lands in the key; calling with no
8
+ // teamId yields the bare prefix (personal scope, and invalidate-all sweeps).
9
+ apiTokens: (teamId) => teamId === undefined ? ["api-tokens"] : ["api-tokens", teamId],
8
10
  agentAccounts: () => ["agent-accounts"],
11
+ myShelf: () => ["my-shelf"],
9
12
  mcpDashboard: () => ["mcp", "dashboard"],
10
13
  mcpApproval: (id) => ["mcp", "approval", id],
11
14
  // The teams LIST gets its own leaf so invalidating it never cascades into
@@ -30,14 +33,29 @@ export const qk = {
30
33
  space: (id) => ["spaces", id],
31
34
  spaceByRef: (teamRef, spaceRef) => ["spaces", "by-ref", teamRef, spaceRef],
32
35
  spaceVersions: (id) => ["spaces", id, "versions"],
36
+ // The cursor-paginated history read (distinct cache shape from the plain,
37
+ // capped-at-50 `spaceVersions` list above) — nested under the same prefix so
38
+ // `invalidateQueries({ queryKey: qk.spaceVersions(id) })` still reaches it.
39
+ spaceVersionsHistory: (id) => [...qk.spaceVersions(id), "history"],
33
40
  spaceCollaboration: (id) => ["spaces", id, "collaboration"],
41
+ spaceCollaborationEmbedConfig: (id) => ["spaces", id, "collaboration", "embed-config"],
34
42
  spaceAnnotations: (id) => ["spaces", id, "annotations"],
35
43
  spaceActivity: (id, limit) => ["spaces", id, "activity", limit],
36
44
  spaceDeployments: (id) => ["spaces", id, "deployments"],
37
45
  spaceTags: (id) => ["spaces", id, "tags"],
38
- spaceTagVersion: (id, versionId) => ["spaces", id, "tags", "versions", versionId],
46
+ spaceTagVersion: (id, versionId) => ["spaces", id, "tags", versionId],
47
+ spaceTagDiff: (id, versionId) => ["spaces", id, "tags", versionId, "diff"],
48
+ spaceTagReleases: (id) => ["spaces", id, "tags", "releases"],
49
+ // The merged (system+team+space) read-only view; never a write base — see
50
+ // `fetchSpaceReleasedGraph` in apps/my/src/lib/space-queries.ts.
51
+ spaceTagsEffective: (id) => ["spaces", id, "tags", "effective"],
39
52
  build: (id) => ["builds", id],
40
- buildLogs: (id) => ["builds", id, "logs"],
53
+ // Observers with different limits must not share a cache entry; calling with
54
+ // no limit yields the bare prefix for invalidating every limit at once.
55
+ buildLogs: (id, limit) => limit === undefined
56
+ ? ["builds", id, "logs"]
57
+ : ["builds", id, "logs", limit],
58
+ spaceBuilds: (id) => ["spaces", id, "builds"],
41
59
  spaceRepositoryConnection: (id, connectionType = "connected") => ["spaces", id, "repository-connection", connectionType],
42
60
  repositoryInstallations: (spaceId) => ["repository-connections", "installations", spaceId],
43
61
  repositoryInstallationRepositories: (installationId) => ["repository-connections", "installations", installationId, "repositories"],
@@ -47,7 +65,11 @@ export const qk = {
47
65
  webhook: (webhookId) => ["webhooks", webhookId],
48
66
  webhookDeliveries: (webhookId) => ["webhooks", webhookId, "deliveries"],
49
67
  spaceVersion: (id, versionId) => ["spaces", id, "versions", versionId],
50
- spaceVersionAnnotations: (id, versionId, status = "open") => ["spaces", id, "versions", versionId, "annotations", status],
68
+ // Calling with no status yields the bare prefix, for invalidating every
69
+ // status-scoped annotations list at once.
70
+ spaceVersionAnnotations: (id, versionId, status) => status === undefined
71
+ ? ["spaces", id, "versions", versionId, "annotations"]
72
+ : ["spaces", id, "versions", versionId, "annotations", status],
51
73
  spaceVersionFiles: (id, versionId) => ["spaces", id, "versions", versionId, "files"],
52
74
  spaceVersionFile: (id, versionId, path) => ["spaces", id, "versions", versionId, "files", path],
53
75
  spaceVersionFileDirectUrl: (id, versionId, path) => ["spaces", id, "versions", versionId, "files", path, "direct-url"],
@@ -68,6 +90,11 @@ export const qk = {
68
90
  spaceCertificates: (id) => ["spaces", id, "runtime", "certificates"],
69
91
  spaceLogs: (id, kind) => ["spaces", id, "logs", kind],
70
92
  spaceAnalytics: (id, window) => ["spaces", id, "analytics", window],
93
+ spaceFirewall: (id) => ["spaces", id, "access", "firewall"],
94
+ spaceAccessViews: (id, since) => ["spaces", id, "access", "views", since ?? ""],
95
+ teamServiceTokens: (teamId) => ["teams", teamId, "access", "service-tokens"],
96
+ teamAccessDefaults: (teamId) => ["teams", teamId, "access", "defaults"],
97
+ teamAccessConnections: (teamId) => ["teams", teamId, "access", "connections"],
71
98
  domain: (teamId, ref) => ["teams", teamId, "domains", ref],
72
99
  domainDiagnostics: (teamId, domainId) => ["teams", teamId, "domains", domainId, "diagnostics"],
73
100
  domainDnsCapabilities: (domainId) => ["domains", domainId, "dns", "capabilities"],
@@ -2,6 +2,5 @@ export declare const SPACEFAST_RUNTIME_NAMESPACE: "/__spacefast";
2
2
  export declare const RUNTIME_MANAGEMENT_API_PATH: "/__spacefast/api.php";
3
3
  export declare const RUNTIME_UPLOAD_API_PATH: "/__spacefast/upload.php";
4
4
  export declare const RUNTIME_HEALTH_PATH: "/__spacefast/health.php";
5
- export declare const RUNTIME_ACCESS_CALLBACK_PATH: "/__spacefast/access-callback.php";
6
5
  export declare function runtimeManagementPath(suffix: string): string;
7
6
  export declare function runtimeUploadPath(params: URLSearchParams | Record<string, string>): string;
@@ -2,7 +2,6 @@ export const SPACEFAST_RUNTIME_NAMESPACE = "/__spacefast";
2
2
  export const RUNTIME_MANAGEMENT_API_PATH = `${SPACEFAST_RUNTIME_NAMESPACE}/api.php`;
3
3
  export const RUNTIME_UPLOAD_API_PATH = `${SPACEFAST_RUNTIME_NAMESPACE}/upload.php`;
4
4
  export const RUNTIME_HEALTH_PATH = `${SPACEFAST_RUNTIME_NAMESPACE}/health.php`;
5
- export const RUNTIME_ACCESS_CALLBACK_PATH = `${SPACEFAST_RUNTIME_NAMESPACE}/access-callback.php`;
6
5
  export function runtimeManagementPath(suffix) {
7
6
  const route = normalizeRuntimeRoute(suffix);
8
7
  if (route === "/") {
@@ -0,0 +1,18 @@
1
+ import { Buffer } from "node:buffer";
2
+ import { RUNTIME_UPLOAD_BATCH_MAX_BYTES, RUNTIME_UPLOAD_BATCH_MAX_FILES } from "./runtime-upload.js";
3
+ import { type UploadTarget } from "./upload-session.js";
4
+ export { RUNTIME_UPLOAD_BATCH_MAX_BYTES, RUNTIME_UPLOAD_BATCH_MAX_FILES };
5
+ export type RuntimeBatchArchiveEntry = {
6
+ path: string;
7
+ getBytes(): Buffer | Promise<Buffer>;
8
+ };
9
+ export declare function runtimeBatchUploadUnsupported(error: unknown): boolean;
10
+ export declare function batchTargetForUploadTarget(uploadId: string, target: UploadTarget): UploadTarget | null;
11
+ export declare function tarPathParts(filePath: string): {
12
+ name: string;
13
+ prefix: string;
14
+ } | null;
15
+ export declare function tarEndSize(): number;
16
+ export declare function tarEntrySize(path: string, size: number): number | null;
17
+ export declare function tarPadding(size: number): number;
18
+ export declare function tarArchive(entries: readonly RuntimeBatchArchiveEntry[], pathTooLongError: (path: string) => Error): Promise<Buffer<ArrayBuffer>>;
@@ -0,0 +1,90 @@
1
+ import { Buffer } from "node:buffer";
2
+ import { RUNTIME_UPLOAD_BATCH_MAX_BYTES, RUNTIME_UPLOAD_BATCH_MAX_FILES, } from "./runtime-upload.js";
3
+ import { UploadTargetError } from "./upload-session.js";
4
+ // Batch planning + tar-writing wire contract shared by the CLI and the control
5
+ // plane's inline publish path. This is the sender half of the runtime's tar
6
+ // batch parser (runtime/engine/admin/upload.php); any change here must stay in
7
+ // lockstep with that file.
8
+ export { RUNTIME_UPLOAD_BATCH_MAX_BYTES, RUNTIME_UPLOAD_BATCH_MAX_FILES };
9
+ export function runtimeBatchUploadUnsupported(error) {
10
+ return error instanceof UploadTargetError && (error.status === 404 || error.status === 405);
11
+ }
12
+ export function batchTargetForUploadTarget(uploadId, target) {
13
+ const url = new URL(target.url);
14
+ if (!url.pathname.endsWith("/upload.php")) {
15
+ return null;
16
+ }
17
+ url.search = new URLSearchParams({ op: "batch", upload_id: uploadId }).toString();
18
+ return {
19
+ ...target,
20
+ path: "__spacefast_batch.tar",
21
+ method: "POST",
22
+ url: url.toString(),
23
+ headers: {
24
+ ...target.headers,
25
+ "content-type": "application/x-tar",
26
+ },
27
+ };
28
+ }
29
+ export function tarPathParts(filePath) {
30
+ if (Buffer.byteLength(filePath) <= 100) {
31
+ return { name: filePath, prefix: "" };
32
+ }
33
+ const segments = filePath.split("/");
34
+ const name = segments.pop() ?? "";
35
+ const prefix = segments.join("/");
36
+ if (!name || Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) {
37
+ return null;
38
+ }
39
+ return { name, prefix };
40
+ }
41
+ export function tarEndSize() {
42
+ return 1024;
43
+ }
44
+ export function tarEntrySize(path, size) {
45
+ if (!tarPathParts(path)) {
46
+ return null;
47
+ }
48
+ return 512 + size + tarPadding(size);
49
+ }
50
+ export function tarPadding(size) {
51
+ return (512 - (size % 512)) % 512;
52
+ }
53
+ export async function tarArchive(entries, pathTooLongError) {
54
+ const chunks = [];
55
+ for (const entry of entries) {
56
+ const parts = tarPathParts(entry.path);
57
+ if (!parts) {
58
+ throw pathTooLongError(entry.path);
59
+ }
60
+ const body = Buffer.from(await entry.getBytes());
61
+ const header = Buffer.alloc(512);
62
+ header.write(parts.name, 0, Math.min(100, Buffer.byteLength(parts.name)), "utf8");
63
+ header.write("0000644\0", 100, 8, "ascii");
64
+ header.write("0000000\0", 108, 8, "ascii");
65
+ header.write("0000000\0", 116, 8, "ascii");
66
+ header.write(body.length.toString(8).padStart(11, "0") + "\0", 124, 12, "ascii");
67
+ header.write("00000000000\0", 136, 12, "ascii");
68
+ header.fill(0x20, 148, 156);
69
+ header[156] = "0".charCodeAt(0);
70
+ header.write("ustar", 257, 5, "ascii");
71
+ header.write("00", 263, 2, "ascii");
72
+ if (parts.prefix) {
73
+ header.write(parts.prefix, 345, Math.min(155, Buffer.byteLength(parts.prefix)), "utf8");
74
+ }
75
+ let checksum = 0;
76
+ for (const byte of header) {
77
+ checksum += byte;
78
+ }
79
+ header.write(checksum.toString(8).padStart(6, "0"), 148, 6, "ascii");
80
+ header[154] = 0;
81
+ header[155] = 0x20;
82
+ chunks.push(header, body);
83
+ const padding = tarPadding(body.length);
84
+ if (padding > 0) {
85
+ chunks.push(Buffer.alloc(padding));
86
+ }
87
+ }
88
+ chunks.push(Buffer.alloc(tarEndSize()));
89
+ return Buffer.concat(chunks);
90
+ }
@@ -1,4 +1,6 @@
1
1
  export declare const RUNTIME_UPLOAD_METHOD: "PUT";
2
+ export declare const RUNTIME_UPLOAD_BATCH_MAX_FILES = 500;
3
+ export declare const RUNTIME_UPLOAD_BATCH_MAX_BYTES: number;
2
4
  export declare function runtimeUploadCanonicalPath(path: string): string;
3
5
  export declare function runtimeUploadSessionBaseUrl(input: {
4
6
  baseUrl: string;
@@ -1,5 +1,10 @@
1
1
  import { runtimeUploadPath } from "./runtime-paths.js";
2
2
  export const RUNTIME_UPLOAD_METHOD = "PUT";
3
+ // Mirrors STATTIC_RUNTIME_UPLOAD_BATCH_MAX_FILES/_MAX_BYTES in
4
+ // runtime/engine/admin/upload.php (parity-guarded in
5
+ // apps/control-plane/src/runtime/php-policy-parity.test.ts).
6
+ export const RUNTIME_UPLOAD_BATCH_MAX_FILES = 500;
7
+ export const RUNTIME_UPLOAD_BATCH_MAX_BYTES = 8 * 1024 * 1024;
3
8
  export function runtimeUploadCanonicalPath(path) {
4
9
  // Canonical path form (spec "Upload Contract"): UTF-8, Unicode NFC,
5
10
  // percent-encoded once. The runtime rejects non-canonical encodings.
@@ -0,0 +1,2 @@
1
+ import { type CompileSfConfigV1Options, type SfConfigV1CompileResult } from "../contracts/sf-config-v1.js";
2
+ export declare function compileSfConfigV1(source: string, options?: CompileSfConfigV1Options): SfConfigV1CompileResult;