@tansr/protocol 0.2.0 → 0.4.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.
package/dist/storage.d.ts CHANGED
@@ -19,8 +19,10 @@
19
19
  * 同词);冷清单由热清单派生时字段直接搬运,开发者不见两套清单词汇。
20
20
  */
21
21
  import { z } from 'zod';
22
- /** 持久化格式版本(读端:≤ 本值可读;> 本值拒绝) */
23
- export declare const STORAGE_FORMAT_VERSION: 2;
22
+ /** 共同冷清单入口支持的最高格式;不是旧布局写入器的缺省版本。 */
23
+ export declare const STORAGE_FORMAT_VERSION: 5;
24
+ /** 原 SegmentManifest 读写合同的最高格式;1—4 的含义保持不变。 */
25
+ export declare const LEGACY_STORAGE_FORMAT_VERSION: 4;
24
26
  /** 段编解码词表:jsonl 明文 / gzip(node:zlib 恒可用,缺省)/ zstd(Node ≥ 22.15 可选) */
25
27
  export declare const SEGMENT_CODECS: readonly ["jsonl", "jsonl+gzip", "jsonl+zstd"];
26
28
  export declare const SegmentCodecSchema: z.ZodEnum<["jsonl", "jsonl+gzip", "jsonl+zstd"]>;
@@ -129,7 +131,8 @@ export declare const AttachmentEntrySchema: z.ZodObject<{
129
131
  export type AttachmentEntry = z.infer<typeof AttachmentEntrySchema>;
130
132
  /** 清单 = 提交点(一卷一份;整体重写;CAS) */
131
133
  export declare const SegmentManifestSchema: z.ZodObject<{
132
- formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
134
+ /** INIT:3 对应 indexed-journal-v1,4 对应有界页 v2;旧版语义保留,未知版本入口拒绝。 */
135
+ formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
133
136
  sessionId: z.ZodString;
134
137
  /** sha256(endUserId) 前 16 hex(doc/98 §九);sdk 单租户形态 'local' */
135
138
  endUserKey: z.ZodString;
@@ -254,7 +257,8 @@ export declare const SegmentManifestSchema: z.ZodObject<{
254
257
  platformSessionId: z.ZodOptional<z.ZodString>;
255
258
  }, z.ZodTypeAny, "passthrough">>>;
256
259
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
257
- formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
260
+ /** INIT:3 对应 indexed-journal-v1,4 对应有界页 v2;旧版语义保留,未知版本入口拒绝。 */
261
+ formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
258
262
  sessionId: z.ZodString;
259
263
  /** sha256(endUserId) 前 16 hex(doc/98 §九);sdk 单租户形态 'local' */
260
264
  endUserKey: z.ZodString;
@@ -379,7 +383,8 @@ export declare const SegmentManifestSchema: z.ZodObject<{
379
383
  platformSessionId: z.ZodOptional<z.ZodString>;
380
384
  }, z.ZodTypeAny, "passthrough">>>;
381
385
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
382
- formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
386
+ /** INIT:3 对应 indexed-journal-v1,4 对应有界页 v2;旧版语义保留,未知版本入口拒绝。 */
387
+ formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
383
388
  sessionId: z.ZodString;
384
389
  /** sha256(endUserId) 前 16 hex(doc/98 §九);sdk 单租户形态 'local' */
385
390
  endUserKey: z.ZodString;
@@ -505,3 +510,1040 @@ export declare const SegmentManifestSchema: z.ZodObject<{
505
510
  }, z.ZodTypeAny, "passthrough">>>;
506
511
  }, z.ZodTypeAny, "passthrough">>;
507
512
  export type SegmentManifest = z.infer<typeof SegmentManifestSchema>;
513
+ /**
514
+ * STO-01 已会签格式 5:文件日志冷归档的独立提交点。
515
+ * 原 storage 提交链与原 JournalRecord 链分别登记,不复用旧 segments 单链。
516
+ * schema 只约束形状;消费端仍须校验完整 scope、同一提交、对象哈希与来源预算。
517
+ * storageIdentity / 原件中的 owner、lease 不能授予新的业务写资格。
518
+ */
519
+ export declare const SessionLogFileManifestSchema: z.ZodObject<{
520
+ formatVersion: z.ZodLiteral<5>;
521
+ layout: z.ZodLiteral<"session-log-file-v2">;
522
+ sessionId: z.ZodString;
523
+ endUserKey: z.ZodString;
524
+ volumeId: z.ZodString;
525
+ generation: z.ZodNumber;
526
+ updatedAt: z.ZodString;
527
+ expiresAt: z.ZodOptional<z.ZodString>;
528
+ storageIdentity: z.ZodObject<{
529
+ storageId: z.ZodString;
530
+ generation: z.ZodString;
531
+ }, "strip", z.ZodTypeAny, {
532
+ generation: string;
533
+ storageId: string;
534
+ }, {
535
+ generation: string;
536
+ storageId: string;
537
+ }>;
538
+ scopeKey: z.ZodString;
539
+ commit: z.ZodObject<{
540
+ revision: z.ZodNumber;
541
+ lastSeq: z.ZodNumber;
542
+ logDigest: z.ZodString;
543
+ contextHead: z.ZodNumber;
544
+ }, "strip", z.ZodTypeAny, {
545
+ revision: number;
546
+ lastSeq: number;
547
+ logDigest: string;
548
+ contextHead: number;
549
+ }, {
550
+ revision: number;
551
+ lastSeq: number;
552
+ logDigest: string;
553
+ contextHead: number;
554
+ }>;
555
+ resumeHead: z.ZodObject<{
556
+ key: z.ZodString;
557
+ bytes: z.ZodNumber;
558
+ sha256: z.ZodString;
559
+ headerBytes: z.ZodNumber;
560
+ headerSha256: z.ZodString;
561
+ }, "strip", z.ZodTypeAny, {
562
+ bytes: number;
563
+ key: string;
564
+ sha256: string;
565
+ headerBytes: number;
566
+ headerSha256: string;
567
+ }, {
568
+ bytes: number;
569
+ key: string;
570
+ sha256: string;
571
+ headerBytes: number;
572
+ headerSha256: string;
573
+ }>;
574
+ materialCatalog: z.ZodObject<{
575
+ key: z.ZodString;
576
+ bytes: z.ZodNumber;
577
+ sha256: z.ZodString;
578
+ /** 所列物理材料的总量;不递归包含目录根自身,实际目录 I/O 仍计操作预算。 */
579
+ objects: z.ZodNumber;
580
+ totalBytes: z.ZodNumber;
581
+ }, "strip", z.ZodTypeAny, {
582
+ bytes: number;
583
+ key: string;
584
+ sha256: string;
585
+ objects: number;
586
+ totalBytes: number;
587
+ }, {
588
+ bytes: number;
589
+ key: string;
590
+ sha256: string;
591
+ objects: number;
592
+ totalBytes: number;
593
+ }>;
594
+ originalJournal: z.ZodOptional<z.ZodObject<{
595
+ lastSeq: z.ZodNumber;
596
+ lastEventId: z.ZodString;
597
+ lastHash: z.ZodString;
598
+ }, "strip", z.ZodTypeAny, {
599
+ lastSeq: number;
600
+ lastHash: string;
601
+ lastEventId: string;
602
+ }, {
603
+ lastSeq: number;
604
+ lastHash: string;
605
+ lastEventId: string;
606
+ }>>;
607
+ sessionMeta: z.ZodOptional<z.ZodObject<{
608
+ createdAt: z.ZodOptional<z.ZodString>;
609
+ title: z.ZodOptional<z.ZodString>;
610
+ platformSessionId: z.ZodOptional<z.ZodString>;
611
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
612
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
613
+ createdAt: z.ZodOptional<z.ZodString>;
614
+ title: z.ZodOptional<z.ZodString>;
615
+ platformSessionId: z.ZodOptional<z.ZodString>;
616
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
617
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
618
+ createdAt: z.ZodOptional<z.ZodString>;
619
+ title: z.ZodOptional<z.ZodString>;
620
+ platformSessionId: z.ZodOptional<z.ZodString>;
621
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
622
+ }, z.ZodTypeAny, "passthrough">>>;
623
+ segments: z.ZodOptional<z.ZodNever>;
624
+ checkpoints: z.ZodOptional<z.ZodNever>;
625
+ attachments: z.ZodOptional<z.ZodNever>;
626
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
627
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
628
+ formatVersion: z.ZodLiteral<5>;
629
+ layout: z.ZodLiteral<"session-log-file-v2">;
630
+ sessionId: z.ZodString;
631
+ endUserKey: z.ZodString;
632
+ volumeId: z.ZodString;
633
+ generation: z.ZodNumber;
634
+ updatedAt: z.ZodString;
635
+ expiresAt: z.ZodOptional<z.ZodString>;
636
+ storageIdentity: z.ZodObject<{
637
+ storageId: z.ZodString;
638
+ generation: z.ZodString;
639
+ }, "strip", z.ZodTypeAny, {
640
+ generation: string;
641
+ storageId: string;
642
+ }, {
643
+ generation: string;
644
+ storageId: string;
645
+ }>;
646
+ scopeKey: z.ZodString;
647
+ commit: z.ZodObject<{
648
+ revision: z.ZodNumber;
649
+ lastSeq: z.ZodNumber;
650
+ logDigest: z.ZodString;
651
+ contextHead: z.ZodNumber;
652
+ }, "strip", z.ZodTypeAny, {
653
+ revision: number;
654
+ lastSeq: number;
655
+ logDigest: string;
656
+ contextHead: number;
657
+ }, {
658
+ revision: number;
659
+ lastSeq: number;
660
+ logDigest: string;
661
+ contextHead: number;
662
+ }>;
663
+ resumeHead: z.ZodObject<{
664
+ key: z.ZodString;
665
+ bytes: z.ZodNumber;
666
+ sha256: z.ZodString;
667
+ headerBytes: z.ZodNumber;
668
+ headerSha256: z.ZodString;
669
+ }, "strip", z.ZodTypeAny, {
670
+ bytes: number;
671
+ key: string;
672
+ sha256: string;
673
+ headerBytes: number;
674
+ headerSha256: string;
675
+ }, {
676
+ bytes: number;
677
+ key: string;
678
+ sha256: string;
679
+ headerBytes: number;
680
+ headerSha256: string;
681
+ }>;
682
+ materialCatalog: z.ZodObject<{
683
+ key: z.ZodString;
684
+ bytes: z.ZodNumber;
685
+ sha256: z.ZodString;
686
+ /** 所列物理材料的总量;不递归包含目录根自身,实际目录 I/O 仍计操作预算。 */
687
+ objects: z.ZodNumber;
688
+ totalBytes: z.ZodNumber;
689
+ }, "strip", z.ZodTypeAny, {
690
+ bytes: number;
691
+ key: string;
692
+ sha256: string;
693
+ objects: number;
694
+ totalBytes: number;
695
+ }, {
696
+ bytes: number;
697
+ key: string;
698
+ sha256: string;
699
+ objects: number;
700
+ totalBytes: number;
701
+ }>;
702
+ originalJournal: z.ZodOptional<z.ZodObject<{
703
+ lastSeq: z.ZodNumber;
704
+ lastEventId: z.ZodString;
705
+ lastHash: z.ZodString;
706
+ }, "strip", z.ZodTypeAny, {
707
+ lastSeq: number;
708
+ lastHash: string;
709
+ lastEventId: string;
710
+ }, {
711
+ lastSeq: number;
712
+ lastHash: string;
713
+ lastEventId: string;
714
+ }>>;
715
+ sessionMeta: z.ZodOptional<z.ZodObject<{
716
+ createdAt: z.ZodOptional<z.ZodString>;
717
+ title: z.ZodOptional<z.ZodString>;
718
+ platformSessionId: z.ZodOptional<z.ZodString>;
719
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
720
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
721
+ createdAt: z.ZodOptional<z.ZodString>;
722
+ title: z.ZodOptional<z.ZodString>;
723
+ platformSessionId: z.ZodOptional<z.ZodString>;
724
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
725
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
726
+ createdAt: z.ZodOptional<z.ZodString>;
727
+ title: z.ZodOptional<z.ZodString>;
728
+ platformSessionId: z.ZodOptional<z.ZodString>;
729
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
730
+ }, z.ZodTypeAny, "passthrough">>>;
731
+ segments: z.ZodOptional<z.ZodNever>;
732
+ checkpoints: z.ZodOptional<z.ZodNever>;
733
+ attachments: z.ZodOptional<z.ZodNever>;
734
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
735
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
736
+ formatVersion: z.ZodLiteral<5>;
737
+ layout: z.ZodLiteral<"session-log-file-v2">;
738
+ sessionId: z.ZodString;
739
+ endUserKey: z.ZodString;
740
+ volumeId: z.ZodString;
741
+ generation: z.ZodNumber;
742
+ updatedAt: z.ZodString;
743
+ expiresAt: z.ZodOptional<z.ZodString>;
744
+ storageIdentity: z.ZodObject<{
745
+ storageId: z.ZodString;
746
+ generation: z.ZodString;
747
+ }, "strip", z.ZodTypeAny, {
748
+ generation: string;
749
+ storageId: string;
750
+ }, {
751
+ generation: string;
752
+ storageId: string;
753
+ }>;
754
+ scopeKey: z.ZodString;
755
+ commit: z.ZodObject<{
756
+ revision: z.ZodNumber;
757
+ lastSeq: z.ZodNumber;
758
+ logDigest: z.ZodString;
759
+ contextHead: z.ZodNumber;
760
+ }, "strip", z.ZodTypeAny, {
761
+ revision: number;
762
+ lastSeq: number;
763
+ logDigest: string;
764
+ contextHead: number;
765
+ }, {
766
+ revision: number;
767
+ lastSeq: number;
768
+ logDigest: string;
769
+ contextHead: number;
770
+ }>;
771
+ resumeHead: z.ZodObject<{
772
+ key: z.ZodString;
773
+ bytes: z.ZodNumber;
774
+ sha256: z.ZodString;
775
+ headerBytes: z.ZodNumber;
776
+ headerSha256: z.ZodString;
777
+ }, "strip", z.ZodTypeAny, {
778
+ bytes: number;
779
+ key: string;
780
+ sha256: string;
781
+ headerBytes: number;
782
+ headerSha256: string;
783
+ }, {
784
+ bytes: number;
785
+ key: string;
786
+ sha256: string;
787
+ headerBytes: number;
788
+ headerSha256: string;
789
+ }>;
790
+ materialCatalog: z.ZodObject<{
791
+ key: z.ZodString;
792
+ bytes: z.ZodNumber;
793
+ sha256: z.ZodString;
794
+ /** 所列物理材料的总量;不递归包含目录根自身,实际目录 I/O 仍计操作预算。 */
795
+ objects: z.ZodNumber;
796
+ totalBytes: z.ZodNumber;
797
+ }, "strip", z.ZodTypeAny, {
798
+ bytes: number;
799
+ key: string;
800
+ sha256: string;
801
+ objects: number;
802
+ totalBytes: number;
803
+ }, {
804
+ bytes: number;
805
+ key: string;
806
+ sha256: string;
807
+ objects: number;
808
+ totalBytes: number;
809
+ }>;
810
+ originalJournal: z.ZodOptional<z.ZodObject<{
811
+ lastSeq: z.ZodNumber;
812
+ lastEventId: z.ZodString;
813
+ lastHash: z.ZodString;
814
+ }, "strip", z.ZodTypeAny, {
815
+ lastSeq: number;
816
+ lastHash: string;
817
+ lastEventId: string;
818
+ }, {
819
+ lastSeq: number;
820
+ lastHash: string;
821
+ lastEventId: string;
822
+ }>>;
823
+ sessionMeta: z.ZodOptional<z.ZodObject<{
824
+ createdAt: z.ZodOptional<z.ZodString>;
825
+ title: z.ZodOptional<z.ZodString>;
826
+ platformSessionId: z.ZodOptional<z.ZodString>;
827
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
828
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
829
+ createdAt: z.ZodOptional<z.ZodString>;
830
+ title: z.ZodOptional<z.ZodString>;
831
+ platformSessionId: z.ZodOptional<z.ZodString>;
832
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
833
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
834
+ createdAt: z.ZodOptional<z.ZodString>;
835
+ title: z.ZodOptional<z.ZodString>;
836
+ platformSessionId: z.ZodOptional<z.ZodString>;
837
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
838
+ }, z.ZodTypeAny, "passthrough">>>;
839
+ segments: z.ZodOptional<z.ZodNever>;
840
+ checkpoints: z.ZodOptional<z.ZodNever>;
841
+ attachments: z.ZodOptional<z.ZodNever>;
842
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
843
+ }, z.ZodTypeAny, "passthrough">>;
844
+ export type SessionLogFileManifest = z.infer<typeof SessionLogFileManifestSchema>;
845
+ /** 新共同入口按判别版本消费;旧 SegmentManifest 方法不因此接受格式 5。 */
846
+ export declare const ColdStorageManifestSchema: z.ZodUnion<[z.ZodObject<{
847
+ /** INIT:3 对应 indexed-journal-v1,4 对应有界页 v2;旧版语义保留,未知版本入口拒绝。 */
848
+ formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
849
+ sessionId: z.ZodString;
850
+ /** sha256(endUserId) 前 16 hex(doc/98 §九);sdk 单租户形态 'local' */
851
+ endUserKey: z.ZodString;
852
+ /** 卷代际:压缩 / 清空 / 恢复即换卷 */
853
+ volumeId: z.ZodString;
854
+ /** 清单版本号(CAS);每次重写 +1 */
855
+ generation: z.ZodNumber;
856
+ /** 按 n 升序 */
857
+ segments: z.ZodArray<z.ZodObject<{
858
+ /** 卷内段序号(1 起,连续;=== 热清单 JournalManifestSegment.n) */
859
+ n: z.ZodNumber;
860
+ /** 首记录 seq(含) */
861
+ firstSeq: z.ZodNumber;
862
+ /** 末记录 seq(含);下一段 firstSeq === lastSeq + 1 */
863
+ lastSeq: z.ZodNumber;
864
+ records: z.ZodNumber;
865
+ /** 编码后对象字节数 */
866
+ bytes: z.ZodNumber;
867
+ codec: z.ZodEnum<["jsonl", "jsonl+gzip", "jsonl+zstd"]>;
868
+ /**
869
+ * 段首记录的 integrity.previousHash(链接:=== 前一段 lastHash;卷首段 = 卷首记录的
870
+ * previousHash,自创世起的卷为 null)
871
+ */
872
+ previousHash: z.ZodNullable<z.ZodString>;
873
+ /** 段末记录 hash(=== 热清单 JournalManifestSegment.lastHash) */
874
+ lastHash: z.ZodString;
875
+ /** 编码后对象内容哈希(put 幂等判据) */
876
+ sha256: z.ZodString;
877
+ key: z.ZodString;
878
+ /**
879
+ * 信息位(可选;IO-12):热清单派生时随行,让「热层全失仅凭冷层重建热清单」无损——
880
+ * rawBytes = 段文件明文字节(热清单 bytes);sealedAt = 封段时刻(热清单 sealedAt,ISO-8601)。
881
+ * 旧清单缺席时读端以 0 / 清单 updatedAt 兜底;载入正确性不依赖二者。
882
+ */
883
+ rawBytes: z.ZodOptional<z.ZodNumber>;
884
+ sealedAt: z.ZodOptional<z.ZodString>;
885
+ }, "strip", z.ZodTypeAny, {
886
+ bytes: number;
887
+ previousHash: string | null;
888
+ key: string;
889
+ n: number;
890
+ firstSeq: number;
891
+ lastSeq: number;
892
+ records: number;
893
+ codec: "jsonl" | "jsonl+gzip" | "jsonl+zstd";
894
+ lastHash: string;
895
+ sha256: string;
896
+ rawBytes?: number | undefined;
897
+ sealedAt?: string | undefined;
898
+ }, {
899
+ bytes: number;
900
+ previousHash: string | null;
901
+ key: string;
902
+ n: number;
903
+ firstSeq: number;
904
+ lastSeq: number;
905
+ records: number;
906
+ codec: "jsonl" | "jsonl+gzip" | "jsonl+zstd";
907
+ lastHash: string;
908
+ sha256: string;
909
+ rawBytes?: number | undefined;
910
+ sealedAt?: string | undefined;
911
+ }>, "many">;
912
+ checkpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
913
+ id: z.ZodString;
914
+ atSeq: z.ZodNumber;
915
+ key: z.ZodString;
916
+ bytes: z.ZodNumber;
917
+ sha256: z.ZodString;
918
+ createdAt: z.ZodString;
919
+ }, "strip", z.ZodTypeAny, {
920
+ id: string;
921
+ createdAt: string;
922
+ bytes: number;
923
+ key: string;
924
+ sha256: string;
925
+ atSeq: number;
926
+ }, {
927
+ id: string;
928
+ createdAt: string;
929
+ bytes: number;
930
+ key: string;
931
+ sha256: string;
932
+ atSeq: number;
933
+ }>, "many">>;
934
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
935
+ sha256: z.ZodString;
936
+ key: z.ZodString;
937
+ bytes: z.ZodNumber;
938
+ mime: z.ZodOptional<z.ZodString>;
939
+ }, "strip", z.ZodTypeAny, {
940
+ bytes: number;
941
+ key: string;
942
+ sha256: string;
943
+ mime?: string | undefined;
944
+ }, {
945
+ bytes: number;
946
+ key: string;
947
+ sha256: string;
948
+ mime?: string | undefined;
949
+ }>, "many">>;
950
+ /** ISO-8601 */
951
+ updatedAt: z.ZodString;
952
+ /** 生命周期提示;不是删除承诺 */
953
+ expiresAt: z.ZodOptional<z.ZodString>;
954
+ /**
955
+ * 会话展示元(可选;IO-13 集成修订):热层 meta.json 的 createdAt / title 等随清单落冷层,
956
+ * 让「热层全失仅凭冷层重建」(A10)与无 index 的 conditional-put 策略下 listSessions 仍能
957
+ * 回展示位。恒不携消息内容;字段全部可选、前向容忍。
958
+ */
959
+ sessionMeta: z.ZodOptional<z.ZodObject<{
960
+ createdAt: z.ZodOptional<z.ZodString>;
961
+ title: z.ZodOptional<z.ZodString>;
962
+ platformSessionId: z.ZodOptional<z.ZodString>;
963
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
964
+ createdAt: z.ZodOptional<z.ZodString>;
965
+ title: z.ZodOptional<z.ZodString>;
966
+ platformSessionId: z.ZodOptional<z.ZodString>;
967
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
968
+ createdAt: z.ZodOptional<z.ZodString>;
969
+ title: z.ZodOptional<z.ZodString>;
970
+ platformSessionId: z.ZodOptional<z.ZodString>;
971
+ }, z.ZodTypeAny, "passthrough">>>;
972
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
973
+ /** INIT:3 对应 indexed-journal-v1,4 对应有界页 v2;旧版语义保留,未知版本入口拒绝。 */
974
+ formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
975
+ sessionId: z.ZodString;
976
+ /** sha256(endUserId) 前 16 hex(doc/98 §九);sdk 单租户形态 'local' */
977
+ endUserKey: z.ZodString;
978
+ /** 卷代际:压缩 / 清空 / 恢复即换卷 */
979
+ volumeId: z.ZodString;
980
+ /** 清单版本号(CAS);每次重写 +1 */
981
+ generation: z.ZodNumber;
982
+ /** 按 n 升序 */
983
+ segments: z.ZodArray<z.ZodObject<{
984
+ /** 卷内段序号(1 起,连续;=== 热清单 JournalManifestSegment.n) */
985
+ n: z.ZodNumber;
986
+ /** 首记录 seq(含) */
987
+ firstSeq: z.ZodNumber;
988
+ /** 末记录 seq(含);下一段 firstSeq === lastSeq + 1 */
989
+ lastSeq: z.ZodNumber;
990
+ records: z.ZodNumber;
991
+ /** 编码后对象字节数 */
992
+ bytes: z.ZodNumber;
993
+ codec: z.ZodEnum<["jsonl", "jsonl+gzip", "jsonl+zstd"]>;
994
+ /**
995
+ * 段首记录的 integrity.previousHash(链接:=== 前一段 lastHash;卷首段 = 卷首记录的
996
+ * previousHash,自创世起的卷为 null)
997
+ */
998
+ previousHash: z.ZodNullable<z.ZodString>;
999
+ /** 段末记录 hash(=== 热清单 JournalManifestSegment.lastHash) */
1000
+ lastHash: z.ZodString;
1001
+ /** 编码后对象内容哈希(put 幂等判据) */
1002
+ sha256: z.ZodString;
1003
+ key: z.ZodString;
1004
+ /**
1005
+ * 信息位(可选;IO-12):热清单派生时随行,让「热层全失仅凭冷层重建热清单」无损——
1006
+ * rawBytes = 段文件明文字节(热清单 bytes);sealedAt = 封段时刻(热清单 sealedAt,ISO-8601)。
1007
+ * 旧清单缺席时读端以 0 / 清单 updatedAt 兜底;载入正确性不依赖二者。
1008
+ */
1009
+ rawBytes: z.ZodOptional<z.ZodNumber>;
1010
+ sealedAt: z.ZodOptional<z.ZodString>;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ bytes: number;
1013
+ previousHash: string | null;
1014
+ key: string;
1015
+ n: number;
1016
+ firstSeq: number;
1017
+ lastSeq: number;
1018
+ records: number;
1019
+ codec: "jsonl" | "jsonl+gzip" | "jsonl+zstd";
1020
+ lastHash: string;
1021
+ sha256: string;
1022
+ rawBytes?: number | undefined;
1023
+ sealedAt?: string | undefined;
1024
+ }, {
1025
+ bytes: number;
1026
+ previousHash: string | null;
1027
+ key: string;
1028
+ n: number;
1029
+ firstSeq: number;
1030
+ lastSeq: number;
1031
+ records: number;
1032
+ codec: "jsonl" | "jsonl+gzip" | "jsonl+zstd";
1033
+ lastHash: string;
1034
+ sha256: string;
1035
+ rawBytes?: number | undefined;
1036
+ sealedAt?: string | undefined;
1037
+ }>, "many">;
1038
+ checkpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
1039
+ id: z.ZodString;
1040
+ atSeq: z.ZodNumber;
1041
+ key: z.ZodString;
1042
+ bytes: z.ZodNumber;
1043
+ sha256: z.ZodString;
1044
+ createdAt: z.ZodString;
1045
+ }, "strip", z.ZodTypeAny, {
1046
+ id: string;
1047
+ createdAt: string;
1048
+ bytes: number;
1049
+ key: string;
1050
+ sha256: string;
1051
+ atSeq: number;
1052
+ }, {
1053
+ id: string;
1054
+ createdAt: string;
1055
+ bytes: number;
1056
+ key: string;
1057
+ sha256: string;
1058
+ atSeq: number;
1059
+ }>, "many">>;
1060
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1061
+ sha256: z.ZodString;
1062
+ key: z.ZodString;
1063
+ bytes: z.ZodNumber;
1064
+ mime: z.ZodOptional<z.ZodString>;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ bytes: number;
1067
+ key: string;
1068
+ sha256: string;
1069
+ mime?: string | undefined;
1070
+ }, {
1071
+ bytes: number;
1072
+ key: string;
1073
+ sha256: string;
1074
+ mime?: string | undefined;
1075
+ }>, "many">>;
1076
+ /** ISO-8601 */
1077
+ updatedAt: z.ZodString;
1078
+ /** 生命周期提示;不是删除承诺 */
1079
+ expiresAt: z.ZodOptional<z.ZodString>;
1080
+ /**
1081
+ * 会话展示元(可选;IO-13 集成修订):热层 meta.json 的 createdAt / title 等随清单落冷层,
1082
+ * 让「热层全失仅凭冷层重建」(A10)与无 index 的 conditional-put 策略下 listSessions 仍能
1083
+ * 回展示位。恒不携消息内容;字段全部可选、前向容忍。
1084
+ */
1085
+ sessionMeta: z.ZodOptional<z.ZodObject<{
1086
+ createdAt: z.ZodOptional<z.ZodString>;
1087
+ title: z.ZodOptional<z.ZodString>;
1088
+ platformSessionId: z.ZodOptional<z.ZodString>;
1089
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1090
+ createdAt: z.ZodOptional<z.ZodString>;
1091
+ title: z.ZodOptional<z.ZodString>;
1092
+ platformSessionId: z.ZodOptional<z.ZodString>;
1093
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1094
+ createdAt: z.ZodOptional<z.ZodString>;
1095
+ title: z.ZodOptional<z.ZodString>;
1096
+ platformSessionId: z.ZodOptional<z.ZodString>;
1097
+ }, z.ZodTypeAny, "passthrough">>>;
1098
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1099
+ /** INIT:3 对应 indexed-journal-v1,4 对应有界页 v2;旧版语义保留,未知版本入口拒绝。 */
1100
+ formatVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
1101
+ sessionId: z.ZodString;
1102
+ /** sha256(endUserId) 前 16 hex(doc/98 §九);sdk 单租户形态 'local' */
1103
+ endUserKey: z.ZodString;
1104
+ /** 卷代际:压缩 / 清空 / 恢复即换卷 */
1105
+ volumeId: z.ZodString;
1106
+ /** 清单版本号(CAS);每次重写 +1 */
1107
+ generation: z.ZodNumber;
1108
+ /** 按 n 升序 */
1109
+ segments: z.ZodArray<z.ZodObject<{
1110
+ /** 卷内段序号(1 起,连续;=== 热清单 JournalManifestSegment.n) */
1111
+ n: z.ZodNumber;
1112
+ /** 首记录 seq(含) */
1113
+ firstSeq: z.ZodNumber;
1114
+ /** 末记录 seq(含);下一段 firstSeq === lastSeq + 1 */
1115
+ lastSeq: z.ZodNumber;
1116
+ records: z.ZodNumber;
1117
+ /** 编码后对象字节数 */
1118
+ bytes: z.ZodNumber;
1119
+ codec: z.ZodEnum<["jsonl", "jsonl+gzip", "jsonl+zstd"]>;
1120
+ /**
1121
+ * 段首记录的 integrity.previousHash(链接:=== 前一段 lastHash;卷首段 = 卷首记录的
1122
+ * previousHash,自创世起的卷为 null)
1123
+ */
1124
+ previousHash: z.ZodNullable<z.ZodString>;
1125
+ /** 段末记录 hash(=== 热清单 JournalManifestSegment.lastHash) */
1126
+ lastHash: z.ZodString;
1127
+ /** 编码后对象内容哈希(put 幂等判据) */
1128
+ sha256: z.ZodString;
1129
+ key: z.ZodString;
1130
+ /**
1131
+ * 信息位(可选;IO-12):热清单派生时随行,让「热层全失仅凭冷层重建热清单」无损——
1132
+ * rawBytes = 段文件明文字节(热清单 bytes);sealedAt = 封段时刻(热清单 sealedAt,ISO-8601)。
1133
+ * 旧清单缺席时读端以 0 / 清单 updatedAt 兜底;载入正确性不依赖二者。
1134
+ */
1135
+ rawBytes: z.ZodOptional<z.ZodNumber>;
1136
+ sealedAt: z.ZodOptional<z.ZodString>;
1137
+ }, "strip", z.ZodTypeAny, {
1138
+ bytes: number;
1139
+ previousHash: string | null;
1140
+ key: string;
1141
+ n: number;
1142
+ firstSeq: number;
1143
+ lastSeq: number;
1144
+ records: number;
1145
+ codec: "jsonl" | "jsonl+gzip" | "jsonl+zstd";
1146
+ lastHash: string;
1147
+ sha256: string;
1148
+ rawBytes?: number | undefined;
1149
+ sealedAt?: string | undefined;
1150
+ }, {
1151
+ bytes: number;
1152
+ previousHash: string | null;
1153
+ key: string;
1154
+ n: number;
1155
+ firstSeq: number;
1156
+ lastSeq: number;
1157
+ records: number;
1158
+ codec: "jsonl" | "jsonl+gzip" | "jsonl+zstd";
1159
+ lastHash: string;
1160
+ sha256: string;
1161
+ rawBytes?: number | undefined;
1162
+ sealedAt?: string | undefined;
1163
+ }>, "many">;
1164
+ checkpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
1165
+ id: z.ZodString;
1166
+ atSeq: z.ZodNumber;
1167
+ key: z.ZodString;
1168
+ bytes: z.ZodNumber;
1169
+ sha256: z.ZodString;
1170
+ createdAt: z.ZodString;
1171
+ }, "strip", z.ZodTypeAny, {
1172
+ id: string;
1173
+ createdAt: string;
1174
+ bytes: number;
1175
+ key: string;
1176
+ sha256: string;
1177
+ atSeq: number;
1178
+ }, {
1179
+ id: string;
1180
+ createdAt: string;
1181
+ bytes: number;
1182
+ key: string;
1183
+ sha256: string;
1184
+ atSeq: number;
1185
+ }>, "many">>;
1186
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1187
+ sha256: z.ZodString;
1188
+ key: z.ZodString;
1189
+ bytes: z.ZodNumber;
1190
+ mime: z.ZodOptional<z.ZodString>;
1191
+ }, "strip", z.ZodTypeAny, {
1192
+ bytes: number;
1193
+ key: string;
1194
+ sha256: string;
1195
+ mime?: string | undefined;
1196
+ }, {
1197
+ bytes: number;
1198
+ key: string;
1199
+ sha256: string;
1200
+ mime?: string | undefined;
1201
+ }>, "many">>;
1202
+ /** ISO-8601 */
1203
+ updatedAt: z.ZodString;
1204
+ /** 生命周期提示;不是删除承诺 */
1205
+ expiresAt: z.ZodOptional<z.ZodString>;
1206
+ /**
1207
+ * 会话展示元(可选;IO-13 集成修订):热层 meta.json 的 createdAt / title 等随清单落冷层,
1208
+ * 让「热层全失仅凭冷层重建」(A10)与无 index 的 conditional-put 策略下 listSessions 仍能
1209
+ * 回展示位。恒不携消息内容;字段全部可选、前向容忍。
1210
+ */
1211
+ sessionMeta: z.ZodOptional<z.ZodObject<{
1212
+ createdAt: z.ZodOptional<z.ZodString>;
1213
+ title: z.ZodOptional<z.ZodString>;
1214
+ platformSessionId: z.ZodOptional<z.ZodString>;
1215
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1216
+ createdAt: z.ZodOptional<z.ZodString>;
1217
+ title: z.ZodOptional<z.ZodString>;
1218
+ platformSessionId: z.ZodOptional<z.ZodString>;
1219
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1220
+ createdAt: z.ZodOptional<z.ZodString>;
1221
+ title: z.ZodOptional<z.ZodString>;
1222
+ platformSessionId: z.ZodOptional<z.ZodString>;
1223
+ }, z.ZodTypeAny, "passthrough">>>;
1224
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1225
+ formatVersion: z.ZodLiteral<5>;
1226
+ layout: z.ZodLiteral<"session-log-file-v2">;
1227
+ sessionId: z.ZodString;
1228
+ endUserKey: z.ZodString;
1229
+ volumeId: z.ZodString;
1230
+ generation: z.ZodNumber;
1231
+ updatedAt: z.ZodString;
1232
+ expiresAt: z.ZodOptional<z.ZodString>;
1233
+ storageIdentity: z.ZodObject<{
1234
+ storageId: z.ZodString;
1235
+ generation: z.ZodString;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ generation: string;
1238
+ storageId: string;
1239
+ }, {
1240
+ generation: string;
1241
+ storageId: string;
1242
+ }>;
1243
+ scopeKey: z.ZodString;
1244
+ commit: z.ZodObject<{
1245
+ revision: z.ZodNumber;
1246
+ lastSeq: z.ZodNumber;
1247
+ logDigest: z.ZodString;
1248
+ contextHead: z.ZodNumber;
1249
+ }, "strip", z.ZodTypeAny, {
1250
+ revision: number;
1251
+ lastSeq: number;
1252
+ logDigest: string;
1253
+ contextHead: number;
1254
+ }, {
1255
+ revision: number;
1256
+ lastSeq: number;
1257
+ logDigest: string;
1258
+ contextHead: number;
1259
+ }>;
1260
+ resumeHead: z.ZodObject<{
1261
+ key: z.ZodString;
1262
+ bytes: z.ZodNumber;
1263
+ sha256: z.ZodString;
1264
+ headerBytes: z.ZodNumber;
1265
+ headerSha256: z.ZodString;
1266
+ }, "strip", z.ZodTypeAny, {
1267
+ bytes: number;
1268
+ key: string;
1269
+ sha256: string;
1270
+ headerBytes: number;
1271
+ headerSha256: string;
1272
+ }, {
1273
+ bytes: number;
1274
+ key: string;
1275
+ sha256: string;
1276
+ headerBytes: number;
1277
+ headerSha256: string;
1278
+ }>;
1279
+ materialCatalog: z.ZodObject<{
1280
+ key: z.ZodString;
1281
+ bytes: z.ZodNumber;
1282
+ sha256: z.ZodString;
1283
+ /** 所列物理材料的总量;不递归包含目录根自身,实际目录 I/O 仍计操作预算。 */
1284
+ objects: z.ZodNumber;
1285
+ totalBytes: z.ZodNumber;
1286
+ }, "strip", z.ZodTypeAny, {
1287
+ bytes: number;
1288
+ key: string;
1289
+ sha256: string;
1290
+ objects: number;
1291
+ totalBytes: number;
1292
+ }, {
1293
+ bytes: number;
1294
+ key: string;
1295
+ sha256: string;
1296
+ objects: number;
1297
+ totalBytes: number;
1298
+ }>;
1299
+ originalJournal: z.ZodOptional<z.ZodObject<{
1300
+ lastSeq: z.ZodNumber;
1301
+ lastEventId: z.ZodString;
1302
+ lastHash: z.ZodString;
1303
+ }, "strip", z.ZodTypeAny, {
1304
+ lastSeq: number;
1305
+ lastHash: string;
1306
+ lastEventId: string;
1307
+ }, {
1308
+ lastSeq: number;
1309
+ lastHash: string;
1310
+ lastEventId: string;
1311
+ }>>;
1312
+ sessionMeta: z.ZodOptional<z.ZodObject<{
1313
+ createdAt: z.ZodOptional<z.ZodString>;
1314
+ title: z.ZodOptional<z.ZodString>;
1315
+ platformSessionId: z.ZodOptional<z.ZodString>;
1316
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1317
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1318
+ createdAt: z.ZodOptional<z.ZodString>;
1319
+ title: z.ZodOptional<z.ZodString>;
1320
+ platformSessionId: z.ZodOptional<z.ZodString>;
1321
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1322
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1323
+ createdAt: z.ZodOptional<z.ZodString>;
1324
+ title: z.ZodOptional<z.ZodString>;
1325
+ platformSessionId: z.ZodOptional<z.ZodString>;
1326
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1327
+ }, z.ZodTypeAny, "passthrough">>>;
1328
+ segments: z.ZodOptional<z.ZodNever>;
1329
+ checkpoints: z.ZodOptional<z.ZodNever>;
1330
+ attachments: z.ZodOptional<z.ZodNever>;
1331
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1332
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1333
+ formatVersion: z.ZodLiteral<5>;
1334
+ layout: z.ZodLiteral<"session-log-file-v2">;
1335
+ sessionId: z.ZodString;
1336
+ endUserKey: z.ZodString;
1337
+ volumeId: z.ZodString;
1338
+ generation: z.ZodNumber;
1339
+ updatedAt: z.ZodString;
1340
+ expiresAt: z.ZodOptional<z.ZodString>;
1341
+ storageIdentity: z.ZodObject<{
1342
+ storageId: z.ZodString;
1343
+ generation: z.ZodString;
1344
+ }, "strip", z.ZodTypeAny, {
1345
+ generation: string;
1346
+ storageId: string;
1347
+ }, {
1348
+ generation: string;
1349
+ storageId: string;
1350
+ }>;
1351
+ scopeKey: z.ZodString;
1352
+ commit: z.ZodObject<{
1353
+ revision: z.ZodNumber;
1354
+ lastSeq: z.ZodNumber;
1355
+ logDigest: z.ZodString;
1356
+ contextHead: z.ZodNumber;
1357
+ }, "strip", z.ZodTypeAny, {
1358
+ revision: number;
1359
+ lastSeq: number;
1360
+ logDigest: string;
1361
+ contextHead: number;
1362
+ }, {
1363
+ revision: number;
1364
+ lastSeq: number;
1365
+ logDigest: string;
1366
+ contextHead: number;
1367
+ }>;
1368
+ resumeHead: z.ZodObject<{
1369
+ key: z.ZodString;
1370
+ bytes: z.ZodNumber;
1371
+ sha256: z.ZodString;
1372
+ headerBytes: z.ZodNumber;
1373
+ headerSha256: z.ZodString;
1374
+ }, "strip", z.ZodTypeAny, {
1375
+ bytes: number;
1376
+ key: string;
1377
+ sha256: string;
1378
+ headerBytes: number;
1379
+ headerSha256: string;
1380
+ }, {
1381
+ bytes: number;
1382
+ key: string;
1383
+ sha256: string;
1384
+ headerBytes: number;
1385
+ headerSha256: string;
1386
+ }>;
1387
+ materialCatalog: z.ZodObject<{
1388
+ key: z.ZodString;
1389
+ bytes: z.ZodNumber;
1390
+ sha256: z.ZodString;
1391
+ /** 所列物理材料的总量;不递归包含目录根自身,实际目录 I/O 仍计操作预算。 */
1392
+ objects: z.ZodNumber;
1393
+ totalBytes: z.ZodNumber;
1394
+ }, "strip", z.ZodTypeAny, {
1395
+ bytes: number;
1396
+ key: string;
1397
+ sha256: string;
1398
+ objects: number;
1399
+ totalBytes: number;
1400
+ }, {
1401
+ bytes: number;
1402
+ key: string;
1403
+ sha256: string;
1404
+ objects: number;
1405
+ totalBytes: number;
1406
+ }>;
1407
+ originalJournal: z.ZodOptional<z.ZodObject<{
1408
+ lastSeq: z.ZodNumber;
1409
+ lastEventId: z.ZodString;
1410
+ lastHash: z.ZodString;
1411
+ }, "strip", z.ZodTypeAny, {
1412
+ lastSeq: number;
1413
+ lastHash: string;
1414
+ lastEventId: string;
1415
+ }, {
1416
+ lastSeq: number;
1417
+ lastHash: string;
1418
+ lastEventId: string;
1419
+ }>>;
1420
+ sessionMeta: z.ZodOptional<z.ZodObject<{
1421
+ createdAt: z.ZodOptional<z.ZodString>;
1422
+ title: z.ZodOptional<z.ZodString>;
1423
+ platformSessionId: z.ZodOptional<z.ZodString>;
1424
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1425
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1426
+ createdAt: z.ZodOptional<z.ZodString>;
1427
+ title: z.ZodOptional<z.ZodString>;
1428
+ platformSessionId: z.ZodOptional<z.ZodString>;
1429
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1430
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1431
+ createdAt: z.ZodOptional<z.ZodString>;
1432
+ title: z.ZodOptional<z.ZodString>;
1433
+ platformSessionId: z.ZodOptional<z.ZodString>;
1434
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1435
+ }, z.ZodTypeAny, "passthrough">>>;
1436
+ segments: z.ZodOptional<z.ZodNever>;
1437
+ checkpoints: z.ZodOptional<z.ZodNever>;
1438
+ attachments: z.ZodOptional<z.ZodNever>;
1439
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1440
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1441
+ formatVersion: z.ZodLiteral<5>;
1442
+ layout: z.ZodLiteral<"session-log-file-v2">;
1443
+ sessionId: z.ZodString;
1444
+ endUserKey: z.ZodString;
1445
+ volumeId: z.ZodString;
1446
+ generation: z.ZodNumber;
1447
+ updatedAt: z.ZodString;
1448
+ expiresAt: z.ZodOptional<z.ZodString>;
1449
+ storageIdentity: z.ZodObject<{
1450
+ storageId: z.ZodString;
1451
+ generation: z.ZodString;
1452
+ }, "strip", z.ZodTypeAny, {
1453
+ generation: string;
1454
+ storageId: string;
1455
+ }, {
1456
+ generation: string;
1457
+ storageId: string;
1458
+ }>;
1459
+ scopeKey: z.ZodString;
1460
+ commit: z.ZodObject<{
1461
+ revision: z.ZodNumber;
1462
+ lastSeq: z.ZodNumber;
1463
+ logDigest: z.ZodString;
1464
+ contextHead: z.ZodNumber;
1465
+ }, "strip", z.ZodTypeAny, {
1466
+ revision: number;
1467
+ lastSeq: number;
1468
+ logDigest: string;
1469
+ contextHead: number;
1470
+ }, {
1471
+ revision: number;
1472
+ lastSeq: number;
1473
+ logDigest: string;
1474
+ contextHead: number;
1475
+ }>;
1476
+ resumeHead: z.ZodObject<{
1477
+ key: z.ZodString;
1478
+ bytes: z.ZodNumber;
1479
+ sha256: z.ZodString;
1480
+ headerBytes: z.ZodNumber;
1481
+ headerSha256: z.ZodString;
1482
+ }, "strip", z.ZodTypeAny, {
1483
+ bytes: number;
1484
+ key: string;
1485
+ sha256: string;
1486
+ headerBytes: number;
1487
+ headerSha256: string;
1488
+ }, {
1489
+ bytes: number;
1490
+ key: string;
1491
+ sha256: string;
1492
+ headerBytes: number;
1493
+ headerSha256: string;
1494
+ }>;
1495
+ materialCatalog: z.ZodObject<{
1496
+ key: z.ZodString;
1497
+ bytes: z.ZodNumber;
1498
+ sha256: z.ZodString;
1499
+ /** 所列物理材料的总量;不递归包含目录根自身,实际目录 I/O 仍计操作预算。 */
1500
+ objects: z.ZodNumber;
1501
+ totalBytes: z.ZodNumber;
1502
+ }, "strip", z.ZodTypeAny, {
1503
+ bytes: number;
1504
+ key: string;
1505
+ sha256: string;
1506
+ objects: number;
1507
+ totalBytes: number;
1508
+ }, {
1509
+ bytes: number;
1510
+ key: string;
1511
+ sha256: string;
1512
+ objects: number;
1513
+ totalBytes: number;
1514
+ }>;
1515
+ originalJournal: z.ZodOptional<z.ZodObject<{
1516
+ lastSeq: z.ZodNumber;
1517
+ lastEventId: z.ZodString;
1518
+ lastHash: z.ZodString;
1519
+ }, "strip", z.ZodTypeAny, {
1520
+ lastSeq: number;
1521
+ lastHash: string;
1522
+ lastEventId: string;
1523
+ }, {
1524
+ lastSeq: number;
1525
+ lastHash: string;
1526
+ lastEventId: string;
1527
+ }>>;
1528
+ sessionMeta: z.ZodOptional<z.ZodObject<{
1529
+ createdAt: z.ZodOptional<z.ZodString>;
1530
+ title: z.ZodOptional<z.ZodString>;
1531
+ platformSessionId: z.ZodOptional<z.ZodString>;
1532
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1533
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1534
+ createdAt: z.ZodOptional<z.ZodString>;
1535
+ title: z.ZodOptional<z.ZodString>;
1536
+ platformSessionId: z.ZodOptional<z.ZodString>;
1537
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1538
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1539
+ createdAt: z.ZodOptional<z.ZodString>;
1540
+ title: z.ZodOptional<z.ZodString>;
1541
+ platformSessionId: z.ZodOptional<z.ZodString>;
1542
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1543
+ }, z.ZodTypeAny, "passthrough">>>;
1544
+ segments: z.ZodOptional<z.ZodNever>;
1545
+ checkpoints: z.ZodOptional<z.ZodNever>;
1546
+ attachments: z.ZodOptional<z.ZodNever>;
1547
+ indexedJournalLayout: z.ZodOptional<z.ZodNever>;
1548
+ }, z.ZodTypeAny, "passthrough">>]>;
1549
+ export type ColdStorageManifest = z.infer<typeof ColdStorageManifestSchema>;