@vcp-dev/contracts 0.10.23 → 0.10.24

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.
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 详情页面包屑组件的确定性产出。
3
+ *
4
+ * 为什么单独成文件:路由文件只允许是纯组合(imports + 生成组件 + metadata),
5
+ * 访客 JSX 一律放在 `components/site/generated/*`,否则结构校验报
6
+ * `route-file.visitor-jsx`。
7
+ *
8
+ * 为什么不交给模型:详情页的导航层级是结构,不是创意。交给模型会时有时无,
9
+ * 缺了访客进到详情页就没有回列表的路径,SEO 也拿不到层级信号。
10
+ */
11
+ export interface DetailBreadcrumbOpts {
12
+ /** 集合 slug,决定组件文件名。 */
13
+ readonly slug: string;
14
+ /** 列表页地址,面包屑第二级指向它。 */
15
+ readonly detailPrefix: string;
16
+ /** 首页一级文案,跟站点语种。 */
17
+ readonly homeLabel: string;
18
+ /** 集合一级文案,跟站点语种。 */
19
+ readonly collectionLabel: string;
20
+ /**
21
+ * 本站 chrome 的 header 形态(DesignPlan `chromeDesign.header.shell`)。
22
+ *
23
+ * `floating` 的 header 是 `fixed`,不占布局空间,会盖住页面首元素——详情页的
24
+ * 首元素正是这个面包屑。header 形态在详情页确定性生成的同一轮里就已知,所以
25
+ * 让位写成编译期常量,不做客户端测量:SSR 首帧即最终值,没有水合跳动。
26
+ *
27
+ * 缺省(旧计划 / 未选形态)按 `solid` 处理,产出与引入本字段之前逐字节相同。
28
+ */
29
+ readonly headerShell?: {
30
+ readonly variant: "solid" | "floating";
31
+ readonly shape?: "bar" | "island";
32
+ };
33
+ }
34
+ export declare function breadcrumbClassName(shell: DetailBreadcrumbOpts["headerShell"]): string;
35
+ export declare function generateDetailBreadcrumb(o: DetailBreadcrumbOpts): string;
@@ -39,6 +39,8 @@ export interface MigrationProductsLocalizedCopy {
39
39
  readonly homeLabel: string;
40
40
  }
41
41
  export declare function migrationProductsCopyForLocale(locale: string | null | undefined): MigrationProductsLocalizedCopy;
42
+ /** 平台已知词条集合,用于确认规范产物;不将未知站点文案猜作平台 fallback。 */
43
+ export declare function migrationProductsKnownCopies(): readonly MigrationProductsLocalizedCopy[];
42
44
  /** 系统已知预置标题;仅这些标题允许随站点 locale 自动改写。 */
43
45
  export declare function isMigrationProductsPresetPageTitle(value: string): boolean;
44
46
  /** 系统已知预置区块名;用户自定义区块名不得被 locale 同步覆盖。 */
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ /** Bounded source diagnostics; never an error page, provider trace, or environment. */
3
+ export declare const NextPageCodeErrorSchema: z.ZodObject<{
4
+ code: z.ZodEnum<{
5
+ NEXT_PAGE_CODE_ERROR: "NEXT_PAGE_CODE_ERROR";
6
+ NEXT_CLIENT_COMPONENT_FUNCTION_PROP: "NEXT_CLIENT_COMPONENT_FUNCTION_PROP";
7
+ }>;
8
+ message: z.ZodString;
9
+ messages: z.ZodArray<z.ZodString>;
10
+ source_paths: z.ZodArray<z.ZodString>;
11
+ components: z.ZodArray<z.ZodString>;
12
+ stack: z.ZodArray<z.ZodObject<{
13
+ file: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
14
+ line: z.ZodNumber;
15
+ column: z.ZodNumber;
16
+ function: z.ZodString;
17
+ generated: z.ZodBoolean;
18
+ }, z.core.$strict>>;
19
+ }, z.core.$strict>;
20
+ export type NextPageCodeError = z.infer<typeof NextPageCodeErrorSchema>;
21
+ export declare function isNextPageCodeErrorCode(value: unknown): boolean;
@@ -212,6 +212,54 @@ export declare const SiteEditMoveTargetSchema: z.ZodUnion<readonly [z.ZodObject<
212
212
  }>;
213
213
  }, z.core.$strict>]>;
214
214
  export type SiteEditMoveTarget = z.infer<typeof SiteEditMoveTargetSchema>;
215
+ /** Move within a Fragment-backed component return whose parent is transparent
216
+ * in the render graph. This position is valid only for move-node. */
217
+ export declare const SiteEditSourceSiblingMoveTargetSchema: z.ZodObject<{
218
+ kind: z.ZodLiteral<"source-sibling">;
219
+ relation: z.ZodEnum<{
220
+ before: "before";
221
+ after: "after";
222
+ }>;
223
+ anchorKey: z.ZodString;
224
+ }, z.core.$strict>;
225
+ export type SiteEditSourceSiblingMoveTarget = z.infer<typeof SiteEditSourceSiblingMoveTargetSchema>;
226
+ export declare const SiteEditMoveNodeTargetSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
227
+ relation: z.ZodEnum<{
228
+ before: "before";
229
+ after: "after";
230
+ }>;
231
+ anchorKey: z.ZodString;
232
+ parentKey: z.ZodString;
233
+ }, z.core.$strip>, z.ZodObject<{
234
+ relation: z.ZodEnum<{
235
+ prepend: "prepend";
236
+ append: "append";
237
+ }>;
238
+ parentKey: z.ZodString;
239
+ }, z.core.$strip>, z.ZodObject<{
240
+ kind: z.ZodLiteral<"page-composition">;
241
+ placementKey: z.ZodString;
242
+ documentVersion: z.ZodNumber;
243
+ composition: z.ZodObject<{
244
+ routeId: z.ZodString;
245
+ templateId: z.ZodOptional<z.ZodString>;
246
+ }, z.core.$strict>;
247
+ placementUnitKey: z.ZodString;
248
+ relation: z.ZodEnum<{
249
+ before: "before";
250
+ after: "after";
251
+ prepend: "prepend";
252
+ append: "append";
253
+ }>;
254
+ }, z.core.$strict>]>, z.ZodObject<{
255
+ kind: z.ZodLiteral<"source-sibling">;
256
+ relation: z.ZodEnum<{
257
+ before: "before";
258
+ after: "after";
259
+ }>;
260
+ anchorKey: z.ZodString;
261
+ }, z.core.$strict>]>;
262
+ export type SiteEditMoveNodeTarget = z.infer<typeof SiteEditMoveNodeTargetSchema>;
215
263
  export declare const SiteEditMaterializedComponentNodeSpecSchema: z.ZodObject<{
216
264
  kind: z.ZodLiteral<"component-call">;
217
265
  component: z.ZodOptional<z.ZodNever>;
@@ -384,7 +432,7 @@ export declare const SiteEditOperationParamsSchema: z.ZodDiscriminatedUnion<[z.Z
384
432
  }, z.core.$strict>;
385
433
  }, z.core.$strip>, z.ZodObject<{
386
434
  kind: z.ZodLiteral<"move-node">;
387
- target: z.ZodUnion<readonly [z.ZodObject<{
435
+ target: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
388
436
  relation: z.ZodEnum<{
389
437
  before: "before";
390
438
  after: "after";
@@ -412,6 +460,13 @@ export declare const SiteEditOperationParamsSchema: z.ZodDiscriminatedUnion<[z.Z
412
460
  prepend: "prepend";
413
461
  append: "append";
414
462
  }>;
463
+ }, z.core.$strict>]>, z.ZodObject<{
464
+ kind: z.ZodLiteral<"source-sibling">;
465
+ relation: z.ZodEnum<{
466
+ before: "before";
467
+ after: "after";
468
+ }>;
469
+ anchorKey: z.ZodString;
415
470
  }, z.core.$strict>]>;
416
471
  preserveBindings: z.ZodOptional<z.ZodBoolean>;
417
472
  }, z.core.$strip>, z.ZodObject<{
@@ -829,7 +884,7 @@ export declare const SiteEditOperationRequestSchema: z.ZodObject<{
829
884
  }, z.core.$strict>;
830
885
  }, z.core.$strip>, z.ZodObject<{
831
886
  kind: z.ZodLiteral<"move-node">;
832
- target: z.ZodUnion<readonly [z.ZodObject<{
887
+ target: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
833
888
  relation: z.ZodEnum<{
834
889
  before: "before";
835
890
  after: "after";
@@ -857,6 +912,13 @@ export declare const SiteEditOperationRequestSchema: z.ZodObject<{
857
912
  prepend: "prepend";
858
913
  append: "append";
859
914
  }>;
915
+ }, z.core.$strict>]>, z.ZodObject<{
916
+ kind: z.ZodLiteral<"source-sibling">;
917
+ relation: z.ZodEnum<{
918
+ before: "before";
919
+ after: "after";
920
+ }>;
921
+ anchorKey: z.ZodString;
860
922
  }, z.core.$strict>]>;
861
923
  preserveBindings: z.ZodOptional<z.ZodBoolean>;
862
924
  }, z.core.$strip>, z.ZodObject<{
@@ -1204,7 +1266,7 @@ export declare const SiteEditSignedOperationRequestSchema: z.ZodObject<{
1204
1266
  }, z.core.$strict>;
1205
1267
  }, z.core.$strip>, z.ZodObject<{
1206
1268
  kind: z.ZodLiteral<"move-node">;
1207
- target: z.ZodUnion<readonly [z.ZodObject<{
1269
+ target: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
1208
1270
  relation: z.ZodEnum<{
1209
1271
  before: "before";
1210
1272
  after: "after";
@@ -1232,6 +1294,13 @@ export declare const SiteEditSignedOperationRequestSchema: z.ZodObject<{
1232
1294
  prepend: "prepend";
1233
1295
  append: "append";
1234
1296
  }>;
1297
+ }, z.core.$strict>]>, z.ZodObject<{
1298
+ kind: z.ZodLiteral<"source-sibling">;
1299
+ relation: z.ZodEnum<{
1300
+ before: "before";
1301
+ after: "after";
1302
+ }>;
1303
+ anchorKey: z.ZodString;
1235
1304
  }, z.core.$strict>]>;
1236
1305
  preserveBindings: z.ZodOptional<z.ZodBoolean>;
1237
1306
  }, z.core.$strip>, z.ZodObject<{
@@ -150,10 +150,29 @@ export declare const SiteEditDynamicDataSummarySchema: z.ZodObject<{
150
150
  primaryFieldPath: z.ZodOptional<z.ZodString>;
151
151
  }, z.core.$strip>;
152
152
  export type SiteEditDynamicDataSummary = z.infer<typeof SiteEditDynamicDataSummarySchema>;
153
+ /** Source actions exposed for a page-composition member. This is derived from
154
+ * the current source AST and is omitted by older engine responses. */
155
+ export declare const SiteEditPageCompositionActionScopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
156
+ kind: z.ZodLiteral<"route-unit">;
157
+ }, z.core.$strict>, z.ZodObject<{
158
+ kind: z.ZodLiteral<"source-siblings">;
159
+ siblingKeys: z.ZodArray<z.ZodString>;
160
+ }, z.core.$strict>, z.ZodObject<{
161
+ kind: z.ZodLiteral<"unavailable">;
162
+ }, z.core.$strict>], "kind">;
163
+ export type SiteEditPageCompositionActionScope = z.infer<typeof SiteEditPageCompositionActionScopeSchema>;
153
164
  export declare const SiteEditRenderEntrySchema: z.ZodObject<{
154
165
  key: z.ZodString;
155
166
  parentKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
167
  pageCompositionUnitKey: z.ZodOptional<z.ZodString>;
168
+ pageCompositionActionScope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
169
+ kind: z.ZodLiteral<"route-unit">;
170
+ }, z.core.$strict>, z.ZodObject<{
171
+ kind: z.ZodLiteral<"source-siblings">;
172
+ siblingKeys: z.ZodArray<z.ZodString>;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ kind: z.ZodLiteral<"unavailable">;
175
+ }, z.core.$strict>], "kind">>;
157
176
  operationSummary: z.ZodObject<{
158
177
  canUpdateText: z.ZodBoolean;
159
178
  canInsertChild: z.ZodBoolean;
@@ -210,6 +229,14 @@ export declare const SiteEditRenderDocumentSchema: z.ZodObject<{
210
229
  key: z.ZodString;
211
230
  parentKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
231
  pageCompositionUnitKey: z.ZodOptional<z.ZodString>;
232
+ pageCompositionActionScope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
233
+ kind: z.ZodLiteral<"route-unit">;
234
+ }, z.core.$strict>, z.ZodObject<{
235
+ kind: z.ZodLiteral<"source-siblings">;
236
+ siblingKeys: z.ZodArray<z.ZodString>;
237
+ }, z.core.$strict>, z.ZodObject<{
238
+ kind: z.ZodLiteral<"unavailable">;
239
+ }, z.core.$strict>], "kind">>;
213
240
  operationSummary: z.ZodObject<{
214
241
  canUpdateText: z.ZodBoolean;
215
242
  canInsertChild: z.ZodBoolean;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * 由 release-edit-engine-packages.ts 在 bump 版本时自动更新。
7
7
  */
8
- export declare const CURRENT_EDIT_ENGINE_VERSION = "0.10.23";
8
+ export declare const CURRENT_EDIT_ENGINE_VERSION = "0.10.24";
9
9
  export declare const EDIT_ENGINE_VERSION_HEADER = "x-vcp-edit-engine-version";
10
10
  export declare const EDIT_ENGINE_VERSION_SOURCE_HEADER = "x-vcp-edit-engine-version-source";
11
11
  export type EditEngineVersionSource = "explicit" | "fallback_current" | "system_current";
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * 决定性的机制是:**物化器重跑时整份覆写**。`materializeCanonicalFormRuntime` 读到
13
13
  * 快照里的 `FORM_RUNTIME_VERSION` 不高于平台当前版本,就把整份内容换成
14
- * `VCP_FORM_RUNTIME_SOURCE`;`buildMigrationProductFiles` 的五份产物走
14
+ * `VCP_FORM_RUNTIME_SOURCE`;`buildMigrationProductFiles` 的四份产物走
15
15
  * `apply_patch_batch` 的 `full_content` 整份写入;product-search 物化器逐份比对内容,
16
16
  * 不一致就覆写。也就是说,A2 往这些文件里写的译文会被**静默还原,且不报任何错**。
17
17
  * 翻译它们不只是越界,是做无用功且不可见。
@@ -35,6 +35,8 @@
35
35
  * - `components/site/generated/site-navigation.tsx` / `site-footer.tsx`:由 sitemap
36
36
  * 派生,装的是导航文字与页脚文案。
37
37
  * - 区块组件与静态路由页:由生成 Agent 按站点设计写。
38
+ * - 产品列表与详情 View:通常由专用 Worker 按站点设计生成;fallback 只是首次
39
+ * 无可用产出的安全网,不改变最终视图文案归站点的职责。
38
40
  *
39
41
  * ## 与模板受保护清单(`.donttouch_files.json`)的边界
40
42
  *
@@ -1121,4 +1121,4 @@ export declare const SitePublishWorkflowQualityResponseSchema: z.ZodObject<{
1121
1121
  export type SitePublishWorkflowQualityResponse = z.infer<typeof SitePublishWorkflowQualityResponseSchema>;
1122
1122
  export declare function getSitePublishRepairItems(qualityResult: VcpQualityResult): SitePublishRepairInputItem[];
1123
1123
  export declare function isSitePublishRepairResultSuccessful(expectedItems: readonly SitePublishRepairInputItem[], repairResult: SitePublishRepairResult): boolean;
1124
- export declare function buildFinalSitePublishQualityResult(qualityResult: VcpQualityResult, repairResult?: SitePublishRepairResult): VcpQualityResult | null;
1124
+ export declare function buildFinalSitePublishQualityResult(qualityResult: VcpQualityResult, _legacyRepairResult?: SitePublishRepairResult): VcpQualityResult | null;
@@ -232,8 +232,8 @@ export type Step5EvidenceReference = z.infer<typeof Step5EvidenceReferenceSchema
232
232
  * 上游保留了可用的部分。前端据此提供重新生成的出口。
233
233
  */
234
234
  export declare const Step5GenerationStatusSchema: z.ZodEnum<{
235
- degraded: "degraded";
236
235
  ok: "ok";
236
+ degraded: "degraded";
237
237
  }>;
238
238
  export type Step5GenerationStatus = z.infer<typeof Step5GenerationStatusSchema>;
239
239
  /**
@@ -492,8 +492,8 @@ export declare const Step5StrategyItemSchema: z.ZodObject<{
492
492
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
493
493
  }, z.core.$strict>>;
494
494
  generation_status: z.ZodOptional<z.ZodEnum<{
495
- degraded: "degraded";
496
495
  ok: "ok";
496
+ degraded: "degraded";
497
497
  }>>;
498
498
  }, z.core.$loose>;
499
499
  export type Step5StrategyItem = z.infer<typeof Step5StrategyItemSchema>;
@@ -906,8 +906,8 @@ export declare const Step5StrategyVersionSnapshotSchema: z.ZodObject<{
906
906
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
907
907
  }, z.core.$strict>>;
908
908
  generation_status: z.ZodOptional<z.ZodEnum<{
909
- degraded: "degraded";
910
909
  ok: "ok";
910
+ degraded: "degraded";
911
911
  }>>;
912
912
  }, z.core.$loose>>;
913
913
  decisions: z.ZodArray<z.ZodObject<{
@@ -1301,8 +1301,8 @@ export declare const Step5CommittedVersionSchema: z.ZodObject<{
1301
1301
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1302
1302
  }, z.core.$strict>>;
1303
1303
  generation_status: z.ZodOptional<z.ZodEnum<{
1304
- degraded: "degraded";
1305
1304
  ok: "ok";
1305
+ degraded: "degraded";
1306
1306
  }>>;
1307
1307
  }, z.core.$loose>>;
1308
1308
  decisions: z.ZodArray<z.ZodObject<{
@@ -1688,8 +1688,8 @@ export declare const Step5StrategyJobSchema: z.ZodObject<{
1688
1688
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1689
1689
  }, z.core.$strict>>;
1690
1690
  generation_status: z.ZodOptional<z.ZodEnum<{
1691
- degraded: "degraded";
1692
1691
  ok: "ok";
1692
+ degraded: "degraded";
1693
1693
  }>>;
1694
1694
  }, z.core.$loose>>;
1695
1695
  decisions: z.ZodArray<z.ZodObject<{
@@ -2084,8 +2084,8 @@ export declare const Step5StrategyJobSchema: z.ZodObject<{
2084
2084
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2085
2085
  }, z.core.$strict>>;
2086
2086
  generation_status: z.ZodOptional<z.ZodEnum<{
2087
- degraded: "degraded";
2088
2087
  ok: "ok";
2088
+ degraded: "degraded";
2089
2089
  }>>;
2090
2090
  }, z.core.$loose>>;
2091
2091
  decisions: z.ZodArray<z.ZodObject<{
@@ -2476,8 +2476,8 @@ export declare const Step5StartStrategyResponseSchema: z.ZodObject<{
2476
2476
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2477
2477
  }, z.core.$strict>>;
2478
2478
  generation_status: z.ZodOptional<z.ZodEnum<{
2479
- degraded: "degraded";
2480
2479
  ok: "ok";
2480
+ degraded: "degraded";
2481
2481
  }>>;
2482
2482
  }, z.core.$loose>>;
2483
2483
  decisions: z.ZodArray<z.ZodObject<{
@@ -2872,8 +2872,8 @@ export declare const Step5StartStrategyResponseSchema: z.ZodObject<{
2872
2872
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2873
2873
  }, z.core.$strict>>;
2874
2874
  generation_status: z.ZodOptional<z.ZodEnum<{
2875
- degraded: "degraded";
2876
2875
  ok: "ok";
2876
+ degraded: "degraded";
2877
2877
  }>>;
2878
2878
  }, z.core.$loose>>;
2879
2879
  decisions: z.ZodArray<z.ZodObject<{
@@ -3436,8 +3436,8 @@ export declare const Step5StrategySnapshotDataSchema: z.ZodObject<{
3436
3436
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3437
3437
  }, z.core.$strict>>;
3438
3438
  generation_status: z.ZodOptional<z.ZodEnum<{
3439
- degraded: "degraded";
3440
3439
  ok: "ok";
3440
+ degraded: "degraded";
3441
3441
  }>>;
3442
3442
  }, z.core.$loose>>;
3443
3443
  decisions: z.ZodArray<z.ZodObject<{
@@ -3832,8 +3832,8 @@ export declare const Step5StrategySnapshotDataSchema: z.ZodObject<{
3832
3832
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3833
3833
  }, z.core.$strict>>;
3834
3834
  generation_status: z.ZodOptional<z.ZodEnum<{
3835
- degraded: "degraded";
3836
3835
  ok: "ok";
3836
+ degraded: "degraded";
3837
3837
  }>>;
3838
3838
  }, z.core.$loose>>;
3839
3839
  decisions: z.ZodArray<z.ZodObject<{
@@ -4232,8 +4232,8 @@ export declare const Step5StrategySseFrameSchema: z.ZodDiscriminatedUnion<[z.Zod
4232
4232
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4233
4233
  }, z.core.$strict>>;
4234
4234
  generation_status: z.ZodOptional<z.ZodEnum<{
4235
- degraded: "degraded";
4236
4235
  ok: "ok";
4236
+ degraded: "degraded";
4237
4237
  }>>;
4238
4238
  }, z.core.$loose>>;
4239
4239
  decisions: z.ZodArray<z.ZodObject<{
@@ -4628,8 +4628,8 @@ export declare const Step5StrategySseFrameSchema: z.ZodDiscriminatedUnion<[z.Zod
4628
4628
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4629
4629
  }, z.core.$strict>>;
4630
4630
  generation_status: z.ZodOptional<z.ZodEnum<{
4631
- degraded: "degraded";
4632
4631
  ok: "ok";
4632
+ degraded: "degraded";
4633
4633
  }>>;
4634
4634
  }, z.core.$loose>>;
4635
4635
  decisions: z.ZodArray<z.ZodObject<{
@@ -5018,8 +5018,8 @@ export declare const Step5StrategySseFrameSchema: z.ZodDiscriminatedUnion<[z.Zod
5018
5018
  field_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5019
5019
  }, z.core.$strict>>;
5020
5020
  generation_status: z.ZodOptional<z.ZodEnum<{
5021
- degraded: "degraded";
5022
5021
  ok: "ok";
5022
+ degraded: "degraded";
5023
5023
  }>>;
5024
5024
  }, z.core.$loose>;
5025
5025
  }, z.core.$strict>;
@@ -28,6 +28,34 @@ export declare const SubsiteSyncDiffComputeRequestSchema: z.ZodObject<{
28
28
  }, z.core.$strip>;
29
29
  }, z.core.$strip>;
30
30
  export type SubsiteSyncDiffComputeRequest = z.infer<typeof SubsiteSyncDiffComputeRequestSchema>;
31
+ /** 新增页面的整页规模;跨页共享资源分别计数,不表示实际同步消耗。 */
32
+ export declare const SubsitePageEstimateSchema: z.ZodObject<{
33
+ page_path: z.ZodString;
34
+ page_route: z.ZodString;
35
+ page_title: z.ZodNullable<z.ZodString>;
36
+ ai_image_count: z.ZodNumber;
37
+ translation_character_count: z.ZodNumber;
38
+ }, z.core.$strip>;
39
+ export type SubsitePageEstimate = z.infer<typeof SubsitePageEstimateSchema>;
40
+ export declare const SubsiteDiffEstimateShape: {
41
+ page_count: z.ZodNumber;
42
+ ai_image_count: z.ZodNumber;
43
+ translation_character_count: z.ZodNumber;
44
+ page_estimates: z.ZodArray<z.ZodObject<{
45
+ page_path: z.ZodString;
46
+ page_route: z.ZodString;
47
+ page_title: z.ZodNullable<z.ZodString>;
48
+ ai_image_count: z.ZodNumber;
49
+ translation_character_count: z.ZodNumber;
50
+ }, z.core.$strip>>;
51
+ };
52
+ export declare function validateSubsiteDiffEstimates(value: {
53
+ pending_pages: string[];
54
+ page_count: number;
55
+ ai_image_count: number;
56
+ translation_character_count: number;
57
+ page_estimates: SubsitePageEstimate[];
58
+ }, ctx: z.RefinementCtx): void;
31
59
  /**
32
60
  * 响应体。**绝不回带 `object_key`、store 绝对路径或内部堆栈**:调用方(apps/api)
33
61
  * 那两个值本来就是自己传进去的,回显它们只会平白多一条把挂载点形状泄漏出去的路。
@@ -43,6 +71,16 @@ export declare const SubsiteSyncDiffComputeResponseSchema: z.ZodObject<{
43
71
  child_only_count: z.ZodNumber;
44
72
  base_snapshot_id: z.ZodString;
45
73
  target_snapshot_id: z.ZodString;
74
+ page_count: z.ZodNumber;
75
+ ai_image_count: z.ZodNumber;
76
+ translation_character_count: z.ZodNumber;
77
+ page_estimates: z.ZodArray<z.ZodObject<{
78
+ page_path: z.ZodString;
79
+ page_route: z.ZodString;
80
+ page_title: z.ZodNullable<z.ZodString>;
81
+ ai_image_count: z.ZodNumber;
82
+ translation_character_count: z.ZodNumber;
83
+ }, z.core.$strip>>;
46
84
  }, z.core.$strip>;
47
85
  export type SubsiteSyncDiffComputeResponse = z.infer<typeof SubsiteSyncDiffComputeResponseSchema>;
48
86
  /**
@@ -57,6 +95,7 @@ export declare const SubsiteSyncDiffErrorCodeSchema: z.ZodEnum<{
57
95
  SUBSITE_DIFF_STORE_NOT_CONFIGURED: "SUBSITE_DIFF_STORE_NOT_CONFIGURED";
58
96
  SUBSITE_DIFF_MANIFEST_MISSING: "SUBSITE_DIFF_MANIFEST_MISSING";
59
97
  SUBSITE_DIFF_MANIFEST_INVALID: "SUBSITE_DIFF_MANIFEST_INVALID";
98
+ SUBSITE_DIFF_ESTIMATE_INVALID: "SUBSITE_DIFF_ESTIMATE_INVALID";
60
99
  }>;
61
100
  export type SubsiteSyncDiffErrorCode = z.infer<typeof SubsiteSyncDiffErrorCodeSchema>;
62
101
  export declare const SubsiteSyncDiffErrorResponseSchema: z.ZodObject<{
@@ -65,6 +104,7 @@ export declare const SubsiteSyncDiffErrorResponseSchema: z.ZodObject<{
65
104
  SUBSITE_DIFF_STORE_NOT_CONFIGURED: "SUBSITE_DIFF_STORE_NOT_CONFIGURED";
66
105
  SUBSITE_DIFF_MANIFEST_MISSING: "SUBSITE_DIFF_MANIFEST_MISSING";
67
106
  SUBSITE_DIFF_MANIFEST_INVALID: "SUBSITE_DIFF_MANIFEST_INVALID";
107
+ SUBSITE_DIFF_ESTIMATE_INVALID: "SUBSITE_DIFF_ESTIMATE_INVALID";
68
108
  }>;
69
109
  message: z.ZodString;
70
110
  side: z.ZodOptional<z.ZodEnum<{
@@ -202,7 +202,7 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
202
202
  }, z.core.$strict>;
203
203
  }, z.core.$strip>, z.ZodObject<{
204
204
  kind: z.ZodLiteral<"move-node">;
205
- target: z.ZodUnion<readonly [z.ZodObject<{
205
+ target: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
206
206
  relation: z.ZodEnum<{
207
207
  before: "before";
208
208
  after: "after";
@@ -230,6 +230,13 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
230
230
  prepend: "prepend";
231
231
  append: "append";
232
232
  }>;
233
+ }, z.core.$strict>]>, z.ZodObject<{
234
+ kind: z.ZodLiteral<"source-sibling">;
235
+ relation: z.ZodEnum<{
236
+ before: "before";
237
+ after: "after";
238
+ }>;
239
+ anchorKey: z.ZodString;
233
240
  }, z.core.$strict>]>;
234
241
  preserveBindings: z.ZodOptional<z.ZodBoolean>;
235
242
  }, z.core.$strip>, z.ZodObject<{
@@ -607,7 +614,7 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
607
614
  }, z.core.$strict>;
608
615
  }, z.core.$strip>, z.ZodObject<{
609
616
  kind: z.ZodLiteral<"move-node">;
610
- target: z.ZodUnion<readonly [z.ZodObject<{
617
+ target: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
611
618
  relation: z.ZodEnum<{
612
619
  before: "before";
613
620
  after: "after";
@@ -635,6 +642,13 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
635
642
  prepend: "prepend";
636
643
  append: "append";
637
644
  }>;
645
+ }, z.core.$strict>]>, z.ZodObject<{
646
+ kind: z.ZodLiteral<"source-sibling">;
647
+ relation: z.ZodEnum<{
648
+ before: "before";
649
+ after: "after";
650
+ }>;
651
+ anchorKey: z.ZodString;
638
652
  }, z.core.$strict>]>;
639
653
  preserveBindings: z.ZodOptional<z.ZodBoolean>;
640
654
  }, z.core.$strip>, z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcp-dev/contracts",
3
- "version": "0.10.23",
3
+ "version": "0.10.24",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {