@vcp-dev/contracts 0.4.8 → 0.6.0

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.
@@ -77,6 +77,7 @@ export declare const InputSourceSchema: z.ZodObject<{
77
77
  original_ref: z.ZodString;
78
78
  source_metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
79
79
  error_code: z.ZodOptional<z.ZodString>;
80
+ submitted: z.ZodOptional<z.ZodBoolean>;
80
81
  }, z.core.$strip>;
81
82
  export type InputSource = z.infer<typeof InputSourceSchema>;
82
83
  export declare const InputConflictSchema: z.ZodObject<{
@@ -211,6 +212,7 @@ export declare const InputContextBundleSchema: z.ZodObject<{
211
212
  original_ref: z.ZodString;
212
213
  source_metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
213
214
  error_code: z.ZodOptional<z.ZodString>;
215
+ submitted: z.ZodOptional<z.ZodBoolean>;
214
216
  }, z.core.$strip>>;
215
217
  facts: z.ZodArray<z.ZodObject<{
216
218
  fact: z.ZodString;
@@ -18,12 +18,21 @@
18
18
  * silently skipped. Routing both ends through this one function removes the
19
19
  * divergence at the root.
20
20
  *
21
- * Both functions are pure & total: any input (including non-string) yields a
22
- * canonical result and never throws. Path traversal is neutralized (the `..`
23
- * segment collapses to empty and is dropped) rather than rejected, so a
24
- * misbehaving slug degrades to a safe route instead of failing finalization
25
- * and blocking the user journey.
21
+ * Model-output repair is intentionally kept out of this module. These helpers
22
+ * define the fail-closed route identity consumed after Sitemap hydration: an
23
+ * unsafe/non-ASCII value has no canonical route and must be rejected instead
24
+ * of silently materializing a second public path.
26
25
  */
26
+ export declare const PAGE_SLUG_SEGMENT_PATTERN_SOURCE = "[a-z0-9]+(?:-[a-z0-9]+)*";
27
+ export declare const PAGE_SLUG_PATTERN: RegExp;
28
+ export declare function isCanonicalPageSlug(value: unknown): value is string;
29
+ /**
30
+ * Best-effort canonicalization for ASCII-only semantic input. Returns `null`
31
+ * when accepting the value would require transliteration, traversal cleanup,
32
+ * or non-string coercion. Page-index/id fallbacks belong to Sitemap hydration,
33
+ * where uniqueness and home-page position are available.
34
+ */
35
+ export declare function tryCanonicalizeAsciiPageSlug(value: unknown): string | null;
27
36
  /**
28
37
  * Canonicalize a sitemap page slug into the form
29
38
  * `deriveSitemapRouteIdentity` emits in its `slug` field once the route file
@@ -31,13 +40,13 @@
31
40
  * stay consistent.
32
41
  *
33
42
  * Examples:
34
- * - `/` / `""` / non-string → `/`
43
+ * - `/` / `""` → `/`
35
44
  * - `Products` → `/products`
36
45
  * - `index` / `home` → `/` (top-level only; `blog/index` → `/blog/index`)
37
46
  * - `about_us` → `/about-us`
38
47
  * - `Our Services` → `/our-services`
39
- * - `产品` `/产品`
40
- * - `/../admin` `/admin`
48
+ * Unsafe, non-ASCII, traversal, and runtime non-string inputs throw. Model-facing
49
+ * repair must run before this authority is called.
41
50
  */
42
51
  export declare function canonicalizePageSlug(slug: string): string;
43
52
  /**
@@ -49,6 +58,6 @@ export declare function canonicalizePageSlug(slug: string): string;
49
58
  * - `/` / `index` / `home` → `app/page.tsx`
50
59
  * - `Products` → `app/products/page.tsx`
51
60
  * - `services/Repair` → `app/services/repair/page.tsx`
52
- * - `产品` `app/产品/page.tsx`
61
+ * Unsafe/non-ASCII input throws before a snapshot path is constructed.
53
62
  */
54
63
  export declare function pageSlugToRouteFilePath(slug: string): string;
@@ -0,0 +1,54 @@
1
+ import { z } from "zod";
2
+ export declare const PublishPlanFeatureSnapshotSchema: z.ZodObject<{
3
+ maxSites: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4
+ maxStorageMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5
+ customDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6
+ }, z.core.$loose>;
7
+ export type PublishPlanFeatureSnapshot = z.infer<typeof PublishPlanFeatureSnapshotSchema>;
8
+ export declare const PublishPlanSchema: z.ZodObject<{
9
+ subscriptionId: z.ZodString;
10
+ planId: z.ZodString;
11
+ locale: z.ZodUnion<[z.ZodEnum<{
12
+ en: "en";
13
+ zh_CN: "zh_CN";
14
+ }>, z.ZodString]>;
15
+ currentPeriodEnd: z.ZodNullable<z.ZodString>;
16
+ servicePeriodEnd: z.ZodNullable<z.ZodString>;
17
+ featureSnapshot: z.ZodNullable<z.ZodObject<{
18
+ maxSites: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19
+ maxStorageMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20
+ customDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
21
+ }, z.core.$loose>>;
22
+ code: z.ZodNullable<z.ZodString>;
23
+ level: z.ZodNullable<z.ZodNumber>;
24
+ name: z.ZodNullable<z.ZodString>;
25
+ }, z.core.$strict>;
26
+ export type PublishPlan = z.infer<typeof PublishPlanSchema>;
27
+ export declare const PublishEntitlementSchema: z.ZodObject<{
28
+ hasActiveSubscription: z.ZodBoolean;
29
+ }, z.core.$strict>;
30
+ export type PublishEntitlement = z.infer<typeof PublishEntitlementSchema>;
31
+ export declare const GetSitePlanDataSchema: z.ZodObject<{
32
+ plan: z.ZodNullable<z.ZodObject<{
33
+ subscriptionId: z.ZodString;
34
+ planId: z.ZodString;
35
+ locale: z.ZodUnion<[z.ZodEnum<{
36
+ en: "en";
37
+ zh_CN: "zh_CN";
38
+ }>, z.ZodString]>;
39
+ currentPeriodEnd: z.ZodNullable<z.ZodString>;
40
+ servicePeriodEnd: z.ZodNullable<z.ZodString>;
41
+ featureSnapshot: z.ZodNullable<z.ZodObject<{
42
+ maxSites: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
43
+ maxStorageMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
44
+ customDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
45
+ }, z.core.$loose>>;
46
+ code: z.ZodNullable<z.ZodString>;
47
+ level: z.ZodNullable<z.ZodNumber>;
48
+ name: z.ZodNullable<z.ZodString>;
49
+ }, z.core.$strict>>;
50
+ entitlement: z.ZodObject<{
51
+ hasActiveSubscription: z.ZodBoolean;
52
+ }, z.core.$strict>;
53
+ }, z.core.$strict>;
54
+ export type GetSitePlanData = z.infer<typeof GetSitePlanDataSchema>;
@@ -3,10 +3,6 @@ import { type SiteEditCommandSuccess } from "./site-edit-command-result.js";
3
3
  export declare const SiteEditClassNameSourceRangeSchema: z.ZodObject<{
4
4
  start: z.ZodNumber;
5
5
  end: z.ZodNumber;
6
- startLine: z.ZodOptional<z.ZodNumber>;
7
- startColumn: z.ZodOptional<z.ZodNumber>;
8
- endLine: z.ZodOptional<z.ZodNumber>;
9
- endColumn: z.ZodOptional<z.ZodNumber>;
10
6
  }, z.core.$strip>;
11
7
  export type SiteEditClassNameSourceRange = z.infer<typeof SiteEditClassNameSourceRangeSchema>;
12
8
  export declare const SiteEditClassNameSourceDiagnosticSchema: z.ZodObject<{
@@ -39,7 +35,6 @@ export declare const SiteEditClassNameSourceStyleContextSchema: z.ZodObject<{
39
35
  content: z.ZodString;
40
36
  hash: z.ZodOptional<z.ZodString>;
41
37
  }, z.core.$strip>>>;
42
- computedStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
43
38
  }, z.core.$strip>;
44
39
  export type SiteEditClassNameSourceStyleContext = z.infer<typeof SiteEditClassNameSourceStyleContextSchema>;
45
40
  export declare const SiteEditClassNameSourceSchema: z.ZodObject<{
@@ -57,31 +52,14 @@ export declare const SiteEditClassNameSourceSchema: z.ZodObject<{
57
52
  attrRange: z.ZodNullable<z.ZodObject<{
58
53
  start: z.ZodNumber;
59
54
  end: z.ZodNumber;
60
- startLine: z.ZodOptional<z.ZodNumber>;
61
- startColumn: z.ZodOptional<z.ZodNumber>;
62
- endLine: z.ZodOptional<z.ZodNumber>;
63
- endColumn: z.ZodOptional<z.ZodNumber>;
64
- }, z.core.$strip>>;
65
- valueRange: z.ZodNullable<z.ZodObject<{
66
- start: z.ZodNumber;
67
- end: z.ZodNumber;
68
- startLine: z.ZodOptional<z.ZodNumber>;
69
- startColumn: z.ZodOptional<z.ZodNumber>;
70
- endLine: z.ZodOptional<z.ZodNumber>;
71
- endColumn: z.ZodOptional<z.ZodNumber>;
72
55
  }, z.core.$strip>>;
73
56
  openingElementRange: z.ZodObject<{
74
57
  start: z.ZodNumber;
75
58
  end: z.ZodNumber;
76
- startLine: z.ZodOptional<z.ZodNumber>;
77
- startColumn: z.ZodOptional<z.ZodNumber>;
78
- endLine: z.ZodOptional<z.ZodNumber>;
79
- endColumn: z.ZodOptional<z.ZodNumber>;
80
59
  }, z.core.$strip>;
81
60
  version: z.ZodObject<{
82
61
  documentVersion: z.ZodNumber;
83
62
  contentHash: z.ZodString;
84
- parserVersion: z.ZodString;
85
63
  }, z.core.$strip>;
86
64
  diagnostics: z.ZodArray<z.ZodObject<{
87
65
  code: z.ZodEnum<{
@@ -94,20 +72,7 @@ export declare const SiteEditClassNameSourceSchema: z.ZodObject<{
94
72
  }>;
95
73
  message: z.ZodString;
96
74
  }, z.core.$strip>>;
97
- styleContext: z.ZodOptional<z.ZodObject<{
98
- revision: z.ZodString;
99
- entryCss: z.ZodObject<{
100
- path: z.ZodString;
101
- content: z.ZodString;
102
- hash: z.ZodOptional<z.ZodString>;
103
- }, z.core.$strip>;
104
- stylesheets: z.ZodDefault<z.ZodArray<z.ZodObject<{
105
- path: z.ZodString;
106
- content: z.ZodString;
107
- hash: z.ZodOptional<z.ZodString>;
108
- }, z.core.$strip>>>;
109
- computedStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
110
- }, z.core.$strip>>;
75
+ computedStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
111
76
  }, z.core.$strip>;
112
77
  export type SiteEditClassNameSource = z.infer<typeof SiteEditClassNameSourceSchema>;
113
78
  export declare const SiteEditGetClassNameSourceResultSchema: z.ZodObject<{
@@ -125,31 +90,14 @@ export declare const SiteEditGetClassNameSourceResultSchema: z.ZodObject<{
125
90
  attrRange: z.ZodNullable<z.ZodObject<{
126
91
  start: z.ZodNumber;
127
92
  end: z.ZodNumber;
128
- startLine: z.ZodOptional<z.ZodNumber>;
129
- startColumn: z.ZodOptional<z.ZodNumber>;
130
- endLine: z.ZodOptional<z.ZodNumber>;
131
- endColumn: z.ZodOptional<z.ZodNumber>;
132
- }, z.core.$strip>>;
133
- valueRange: z.ZodNullable<z.ZodObject<{
134
- start: z.ZodNumber;
135
- end: z.ZodNumber;
136
- startLine: z.ZodOptional<z.ZodNumber>;
137
- startColumn: z.ZodOptional<z.ZodNumber>;
138
- endLine: z.ZodOptional<z.ZodNumber>;
139
- endColumn: z.ZodOptional<z.ZodNumber>;
140
93
  }, z.core.$strip>>;
141
94
  openingElementRange: z.ZodObject<{
142
95
  start: z.ZodNumber;
143
96
  end: z.ZodNumber;
144
- startLine: z.ZodOptional<z.ZodNumber>;
145
- startColumn: z.ZodOptional<z.ZodNumber>;
146
- endLine: z.ZodOptional<z.ZodNumber>;
147
- endColumn: z.ZodOptional<z.ZodNumber>;
148
97
  }, z.core.$strip>;
149
98
  version: z.ZodObject<{
150
99
  documentVersion: z.ZodNumber;
151
100
  contentHash: z.ZodString;
152
- parserVersion: z.ZodString;
153
101
  }, z.core.$strip>;
154
102
  diagnostics: z.ZodArray<z.ZodObject<{
155
103
  code: z.ZodEnum<{
@@ -162,20 +110,7 @@ export declare const SiteEditGetClassNameSourceResultSchema: z.ZodObject<{
162
110
  }>;
163
111
  message: z.ZodString;
164
112
  }, z.core.$strip>>;
165
- styleContext: z.ZodOptional<z.ZodObject<{
166
- revision: z.ZodString;
167
- entryCss: z.ZodObject<{
168
- path: z.ZodString;
169
- content: z.ZodString;
170
- hash: z.ZodOptional<z.ZodString>;
171
- }, z.core.$strip>;
172
- stylesheets: z.ZodDefault<z.ZodArray<z.ZodObject<{
173
- path: z.ZodString;
174
- content: z.ZodString;
175
- hash: z.ZodOptional<z.ZodString>;
176
- }, z.core.$strip>>>;
177
- computedStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
178
- }, z.core.$strip>>;
113
+ computedStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
179
114
  }, z.core.$strip>;
180
115
  export type SiteEditGetClassNameSourceResult = z.infer<typeof SiteEditGetClassNameSourceResultSchema>;
181
116
  export declare const SiteEditGetClassNameSourceCommandResultSchema: z.ZodObject<{
@@ -195,31 +130,14 @@ export declare const SiteEditGetClassNameSourceCommandResultSchema: z.ZodObject<
195
130
  attrRange: z.ZodNullable<z.ZodObject<{
196
131
  start: z.ZodNumber;
197
132
  end: z.ZodNumber;
198
- startLine: z.ZodOptional<z.ZodNumber>;
199
- startColumn: z.ZodOptional<z.ZodNumber>;
200
- endLine: z.ZodOptional<z.ZodNumber>;
201
- endColumn: z.ZodOptional<z.ZodNumber>;
202
- }, z.core.$strip>>;
203
- valueRange: z.ZodNullable<z.ZodObject<{
204
- start: z.ZodNumber;
205
- end: z.ZodNumber;
206
- startLine: z.ZodOptional<z.ZodNumber>;
207
- startColumn: z.ZodOptional<z.ZodNumber>;
208
- endLine: z.ZodOptional<z.ZodNumber>;
209
- endColumn: z.ZodOptional<z.ZodNumber>;
210
133
  }, z.core.$strip>>;
211
134
  openingElementRange: z.ZodObject<{
212
135
  start: z.ZodNumber;
213
136
  end: z.ZodNumber;
214
- startLine: z.ZodOptional<z.ZodNumber>;
215
- startColumn: z.ZodOptional<z.ZodNumber>;
216
- endLine: z.ZodOptional<z.ZodNumber>;
217
- endColumn: z.ZodOptional<z.ZodNumber>;
218
137
  }, z.core.$strip>;
219
138
  version: z.ZodObject<{
220
139
  documentVersion: z.ZodNumber;
221
140
  contentHash: z.ZodString;
222
- parserVersion: z.ZodString;
223
141
  }, z.core.$strip>;
224
142
  diagnostics: z.ZodArray<z.ZodObject<{
225
143
  code: z.ZodEnum<{
@@ -232,20 +150,7 @@ export declare const SiteEditGetClassNameSourceCommandResultSchema: z.ZodObject<
232
150
  }>;
233
151
  message: z.ZodString;
234
152
  }, z.core.$strip>>;
235
- styleContext: z.ZodOptional<z.ZodObject<{
236
- revision: z.ZodString;
237
- entryCss: z.ZodObject<{
238
- path: z.ZodString;
239
- content: z.ZodString;
240
- hash: z.ZodOptional<z.ZodString>;
241
- }, z.core.$strip>;
242
- stylesheets: z.ZodDefault<z.ZodArray<z.ZodObject<{
243
- path: z.ZodString;
244
- content: z.ZodString;
245
- hash: z.ZodOptional<z.ZodString>;
246
- }, z.core.$strip>>>;
247
- computedStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
248
- }, z.core.$strip>>;
153
+ computedStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
249
154
  }, z.core.$strip>;
250
155
  }, z.core.$strip>;
251
156
  export type SiteEditGetClassNameSourceCommandResult = SiteEditCommandSuccess<SiteEditClassNameSource>;
@@ -19,10 +19,10 @@ export declare const SiteEditEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
19
19
  result: z.ZodObject<{
20
20
  requestId: z.ZodString;
21
21
  kind: z.ZodEnum<{
22
+ "insert-child": "insert-child";
22
23
  "update-text": "update-text";
23
24
  "update-array-item": "update-array-item";
24
25
  "remove-node": "remove-node";
25
- "insert-child": "insert-child";
26
26
  "move-node": "move-node";
27
27
  "set-class-name-source": "set-class-name-source";
28
28
  "set-props": "set-props";
@@ -33,6 +33,10 @@ export declare const SiteEditEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
33
33
  kind: z.ZodLiteral<"node">;
34
34
  key: z.ZodString;
35
35
  }, z.core.$strip>, z.ZodObject<{
36
+ kind: z.ZodLiteral<"page-unit">;
37
+ routeId: z.ZodString;
38
+ placementUnitKey: z.ZodString;
39
+ }, z.core.$strict>, z.ZodObject<{
36
40
  kind: z.ZodLiteral<"route">;
37
41
  routeId: z.ZodString;
38
42
  }, z.core.$strip>, z.ZodObject<{
@@ -57,13 +61,21 @@ export declare const SiteEditEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
61
  requestId: z.ZodString;
58
62
  error: z.ZodObject<{
59
63
  code: z.ZodEnum<{
64
+ VERSION_STALE: "VERSION_STALE";
65
+ RECOVERY_REQUIRED: "RECOVERY_REQUIRED";
60
66
  NODE_NOT_FOUND: "NODE_NOT_FOUND";
61
67
  ROUTE_NOT_FOUND: "ROUTE_NOT_FOUND";
62
68
  CAPABILITY_REJECTED: "CAPABILITY_REJECTED";
63
69
  CONSTRAINT_VIOLATED: "CONSTRAINT_VIOLATED";
64
70
  INVALID_PARAMS: "INVALID_PARAMS";
65
71
  PLAN_FAILED: "PLAN_FAILED";
66
- VERSION_STALE: "VERSION_STALE";
72
+ TRANSACTION_PREFLIGHT_FAILED: "TRANSACTION_PREFLIGHT_FAILED";
73
+ ROUTE_REBUILD_FAILED: "ROUTE_REBUILD_FAILED";
74
+ HISTORY_COMMIT_FAILED: "HISTORY_COMMIT_FAILED";
75
+ MATERIALIZATION_CONFLICT: "MATERIALIZATION_CONFLICT";
76
+ MATERIALIZATION_REJECTED: "MATERIALIZATION_REJECTED";
77
+ MUTATION_ASSERTION_REQUIRED: "MUTATION_ASSERTION_REQUIRED";
78
+ MUTATION_ASSERTION_INVALID: "MUTATION_ASSERTION_INVALID";
67
79
  AST_PARSE_ERROR: "AST_PARSE_ERROR";
68
80
  UNSUPPORTED_OPERATION: "UNSUPPORTED_OPERATION";
69
81
  LOCATOR_FAILED: "LOCATOR_FAILED";
@@ -71,6 +83,12 @@ export declare const SiteEditEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
71
83
  WRITE_IO_ERROR: "WRITE_IO_ERROR";
72
84
  CONCURRENT_MODIFIED: "CONCURRENT_MODIFIED";
73
85
  ROLLBACK_FAILED: "ROLLBACK_FAILED";
86
+ RECOVERY_PERSIST_FAILED: "RECOVERY_PERSIST_FAILED";
87
+ MUTATION_SESSION_REQUIRED: "MUTATION_SESSION_REQUIRED";
88
+ LEASE_ASSERTION_INVALID: "LEASE_ASSERTION_INVALID";
89
+ LEASE_ASSERTION_EXPIRED: "LEASE_ASSERTION_EXPIRED";
90
+ LEASE_ASSERTION_SCOPE_MISMATCH: "LEASE_ASSERTION_SCOPE_MISMATCH";
91
+ CROSS_PAGE_MOVE_UNSUPPORTED: "CROSS_PAGE_MOVE_UNSUPPORTED";
74
92
  INTERNAL_ERROR: "INTERNAL_ERROR";
75
93
  }>;
76
94
  message: z.ZodString;
@@ -0,0 +1,120 @@
1
+ import { z } from "zod";
2
+ export declare const SITE_EDIT_DURABLE_HISTORY_CAPABILITY: "durable-history-v1";
3
+ export declare const SiteEditHistoryStatusModeSchema: z.ZodEnum<{
4
+ writable: "writable";
5
+ "read-only-recovery": "read-only-recovery";
6
+ unavailable: "unavailable";
7
+ }>;
8
+ export type SiteEditHistoryStatusMode = z.infer<typeof SiteEditHistoryStatusModeSchema>;
9
+ export declare const SiteEditHistoryRecoveryCodeSchema: z.ZodEnum<{
10
+ INDEX_CORRUPT: "INDEX_CORRUPT";
11
+ ENTRY_MISSING: "ENTRY_MISSING";
12
+ BLOB_MISSING: "BLOB_MISSING";
13
+ FILESYSTEM_UNAVAILABLE: "FILESYSTEM_UNAVAILABLE";
14
+ ROLLBACK_INCOMPLETE: "ROLLBACK_INCOMPLETE";
15
+ UNKNOWN: "UNKNOWN";
16
+ }>;
17
+ export type SiteEditHistoryRecoveryCode = z.infer<typeof SiteEditHistoryRecoveryCodeSchema>;
18
+ export declare const SiteEditHistoryRecoveryDiagnosticSchema: z.ZodObject<{
19
+ code: z.ZodEnum<{
20
+ INDEX_CORRUPT: "INDEX_CORRUPT";
21
+ ENTRY_MISSING: "ENTRY_MISSING";
22
+ BLOB_MISSING: "BLOB_MISSING";
23
+ FILESYSTEM_UNAVAILABLE: "FILESYSTEM_UNAVAILABLE";
24
+ ROLLBACK_INCOMPLETE: "ROLLBACK_INCOMPLETE";
25
+ UNKNOWN: "UNKNOWN";
26
+ }>;
27
+ message: z.ZodString;
28
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
29
+ }, z.core.$strict>;
30
+ export type SiteEditHistoryRecoveryDiagnostic = z.infer<typeof SiteEditHistoryRecoveryDiagnosticSchema>;
31
+ export declare const SiteEditHistoryUnavailableReasonSchema: z.ZodEnum<{
32
+ FILESYSTEM_UNAVAILABLE: "FILESYSTEM_UNAVAILABLE";
33
+ NOT_INITIALIZED: "NOT_INITIALIZED";
34
+ UNSUPPORTED_RUNTIME: "UNSUPPORTED_RUNTIME";
35
+ }>;
36
+ export type SiteEditHistoryUnavailableReason = z.infer<typeof SiteEditHistoryUnavailableReasonSchema>;
37
+ export declare const SiteEditHistoryWritableStatusSchema: z.ZodObject<{
38
+ canUndo: z.ZodBoolean;
39
+ canRedo: z.ZodBoolean;
40
+ revision: z.ZodNumber;
41
+ undoDepth: z.ZodNumber;
42
+ redoDepth: z.ZodNumber;
43
+ mode: z.ZodLiteral<"writable">;
44
+ }, z.core.$strict>;
45
+ export type SiteEditHistoryWritableStatus = z.infer<typeof SiteEditHistoryWritableStatusSchema>;
46
+ export declare const SiteEditHistoryReadOnlyRecoveryStatusSchema: z.ZodObject<{
47
+ canUndo: z.ZodLiteral<false>;
48
+ canRedo: z.ZodLiteral<false>;
49
+ recoveryDiagnostic: z.ZodObject<{
50
+ code: z.ZodEnum<{
51
+ INDEX_CORRUPT: "INDEX_CORRUPT";
52
+ ENTRY_MISSING: "ENTRY_MISSING";
53
+ BLOB_MISSING: "BLOB_MISSING";
54
+ FILESYSTEM_UNAVAILABLE: "FILESYSTEM_UNAVAILABLE";
55
+ ROLLBACK_INCOMPLETE: "ROLLBACK_INCOMPLETE";
56
+ UNKNOWN: "UNKNOWN";
57
+ }>;
58
+ message: z.ZodString;
59
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
60
+ }, z.core.$strict>;
61
+ revision: z.ZodNumber;
62
+ undoDepth: z.ZodNumber;
63
+ redoDepth: z.ZodNumber;
64
+ mode: z.ZodLiteral<"read-only-recovery">;
65
+ }, z.core.$strict>;
66
+ export type SiteEditHistoryReadOnlyRecoveryStatus = z.infer<typeof SiteEditHistoryReadOnlyRecoveryStatusSchema>;
67
+ export declare const SiteEditHistoryUnavailableStatusSchema: z.ZodObject<{
68
+ mode: z.ZodLiteral<"unavailable">;
69
+ revision: z.ZodLiteral<0>;
70
+ undoDepth: z.ZodLiteral<0>;
71
+ redoDepth: z.ZodLiteral<0>;
72
+ canUndo: z.ZodLiteral<false>;
73
+ canRedo: z.ZodLiteral<false>;
74
+ reason: z.ZodEnum<{
75
+ FILESYSTEM_UNAVAILABLE: "FILESYSTEM_UNAVAILABLE";
76
+ NOT_INITIALIZED: "NOT_INITIALIZED";
77
+ UNSUPPORTED_RUNTIME: "UNSUPPORTED_RUNTIME";
78
+ }>;
79
+ }, z.core.$strict>;
80
+ export type SiteEditHistoryUnavailableStatus = z.infer<typeof SiteEditHistoryUnavailableStatusSchema>;
81
+ export declare const SiteEditHistoryStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
82
+ canUndo: z.ZodBoolean;
83
+ canRedo: z.ZodBoolean;
84
+ revision: z.ZodNumber;
85
+ undoDepth: z.ZodNumber;
86
+ redoDepth: z.ZodNumber;
87
+ mode: z.ZodLiteral<"writable">;
88
+ }, z.core.$strict>, z.ZodObject<{
89
+ canUndo: z.ZodLiteral<false>;
90
+ canRedo: z.ZodLiteral<false>;
91
+ recoveryDiagnostic: z.ZodObject<{
92
+ code: z.ZodEnum<{
93
+ INDEX_CORRUPT: "INDEX_CORRUPT";
94
+ ENTRY_MISSING: "ENTRY_MISSING";
95
+ BLOB_MISSING: "BLOB_MISSING";
96
+ FILESYSTEM_UNAVAILABLE: "FILESYSTEM_UNAVAILABLE";
97
+ ROLLBACK_INCOMPLETE: "ROLLBACK_INCOMPLETE";
98
+ UNKNOWN: "UNKNOWN";
99
+ }>;
100
+ message: z.ZodString;
101
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
102
+ }, z.core.$strict>;
103
+ revision: z.ZodNumber;
104
+ undoDepth: z.ZodNumber;
105
+ redoDepth: z.ZodNumber;
106
+ mode: z.ZodLiteral<"read-only-recovery">;
107
+ }, z.core.$strict>, z.ZodObject<{
108
+ mode: z.ZodLiteral<"unavailable">;
109
+ revision: z.ZodLiteral<0>;
110
+ undoDepth: z.ZodLiteral<0>;
111
+ redoDepth: z.ZodLiteral<0>;
112
+ canUndo: z.ZodLiteral<false>;
113
+ canRedo: z.ZodLiteral<false>;
114
+ reason: z.ZodEnum<{
115
+ FILESYSTEM_UNAVAILABLE: "FILESYSTEM_UNAVAILABLE";
116
+ NOT_INITIALIZED: "NOT_INITIALIZED";
117
+ UNSUPPORTED_RUNTIME: "UNSUPPORTED_RUNTIME";
118
+ }>;
119
+ }, z.core.$strict>], "mode">;
120
+ export type SiteEditHistoryStatus = z.infer<typeof SiteEditHistoryStatusSchema>;
@@ -0,0 +1,49 @@
1
+ import { z } from "zod";
2
+ export declare const SITE_EDIT_MATERIALIZATION_MAX_FILE_COUNT = 64;
3
+ export declare const SITE_EDIT_MATERIALIZATION_MAX_FILE_CONTENT_BYTES: number;
4
+ export declare const SITE_EDIT_MATERIALIZATION_MAX_TOTAL_CONTENT_BYTES: number;
5
+ export declare function isSiteEditMaterializationPathTemplate(value: string): boolean;
6
+ export declare const SiteEditMaterializationPathTemplateSchema: z.ZodString;
7
+ export declare const SiteEditMaterializationFileSchema: z.ZodObject<{
8
+ pathTemplate: z.ZodString;
9
+ content: z.ZodString;
10
+ role: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strict>;
12
+ export type SiteEditMaterializationFile = z.infer<typeof SiteEditMaterializationFileSchema>;
13
+ export declare const SiteEditMaterializationExportSchema: z.ZodUnion<readonly [z.ZodObject<{
14
+ kind: z.ZodLiteral<"default">;
15
+ }, z.core.$strict>, z.ZodObject<{
16
+ kind: z.ZodLiteral<"named">;
17
+ name: z.ZodString;
18
+ }, z.core.$strict>]>;
19
+ export type SiteEditMaterializationExport = z.infer<typeof SiteEditMaterializationExportSchema>;
20
+ export declare const SiteEditMaterializationEntrySchema: z.ZodObject<{
21
+ pathTemplate: z.ZodString;
22
+ export: z.ZodUnion<readonly [z.ZodObject<{
23
+ kind: z.ZodLiteral<"default">;
24
+ }, z.core.$strict>, z.ZodObject<{
25
+ kind: z.ZodLiteral<"named">;
26
+ name: z.ZodString;
27
+ }, z.core.$strict>]>;
28
+ }, z.core.$strict>;
29
+ export type SiteEditMaterializationEntry = z.infer<typeof SiteEditMaterializationEntrySchema>;
30
+ export declare const SiteEditMaterializationDataRequirementsSchema: z.ZodOptional<z.ZodArray<z.ZodNever>>;
31
+ export declare const SiteEditMaterializationSchema: z.ZodObject<{
32
+ instanceBaseName: z.ZodString;
33
+ files: z.ZodArray<z.ZodObject<{
34
+ pathTemplate: z.ZodString;
35
+ content: z.ZodString;
36
+ role: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strict>>;
38
+ entry: z.ZodObject<{
39
+ pathTemplate: z.ZodString;
40
+ export: z.ZodUnion<readonly [z.ZodObject<{
41
+ kind: z.ZodLiteral<"default">;
42
+ }, z.core.$strict>, z.ZodObject<{
43
+ kind: z.ZodLiteral<"named">;
44
+ name: z.ZodString;
45
+ }, z.core.$strict>]>;
46
+ }, z.core.$strict>;
47
+ dataRequirements: z.ZodOptional<z.ZodArray<z.ZodNever>>;
48
+ }, z.core.$strict>;
49
+ export type SiteEditMaterialization = z.infer<typeof SiteEditMaterializationSchema>;
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const SiteEditMutationContextSchema: z.ZodObject<{
3
+ editingSessionId: z.ZodString;
4
+ lockId: z.ZodString;
5
+ ownerId: z.ZodString;
6
+ leaseAssertion: z.ZodString;
7
+ }, z.core.$strict>;
8
+ export type SiteEditMutationContext = z.infer<typeof SiteEditMutationContextSchema>;
9
+ export declare const SITE_EDIT_SIGNED_MUTATION_CAPABILITY: "signed-designer-mutations-v1";
10
+ export declare const SiteEditRequiredMutationContextEnvelopeSchema: z.ZodObject<{
11
+ mutationContext: z.ZodObject<{
12
+ editingSessionId: z.ZodString;
13
+ lockId: z.ZodString;
14
+ ownerId: z.ZodString;
15
+ leaseAssertion: z.ZodString;
16
+ }, z.core.$strict>;
17
+ }, z.core.$strict>;
18
+ export type SiteEditRequiredMutationContextEnvelope = z.infer<typeof SiteEditRequiredMutationContextEnvelopeSchema>;