@peasant-labs/schema 0.31.0 → 0.32.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.
@@ -2709,7 +2709,7 @@ export declare function sessionGraphFixtures(): {
2709
2709
  readonly requiredNames: readonly ["legacy-durable-decode", "three-independent-counts", "input-count-absent", "input-count-zero", "input-count-positive", "input-count-safe-max", "input-count-null", "input-count-string", "input-count-negative", "input-count-fraction", "input-count-above-safe-max", "input-count-bool", "input-count-array", "input-count-object", "authoritative-mirrors-match", "authoritative-count-disagreement", "authoritative-count-detail-absent", "authoritative-count-metadata-absent", "authoritative-count-both-absent", "authoritative-root-values-differ", "authoritative-root-detail-absent", "authoritative-root-metadata-absent", "legacy-turn-count-local4-export5", "projected-main-count-disagreement", "graph-legacy-parent-mismatch", "digest-absent-versus-zero", "digest-same-positive", "digest-root-evidence", "digest-purpose-evidence", "digest-relationship-evidence", "digest-entry-provenance"];
2710
2710
  };
2711
2711
  readonly grouped_read: {
2712
- readonly requiredNames: readonly ["nested-local-owner", "nested-village-owner", "nested-local-leaf", "nested-village-leaf", "local-member-context-rejected", "village-member-context-rejected", "local-member-both-arms-rejected", "village-member-both-arms-rejected", "local-duplicate-member", "village-duplicate-member", "local-duplicate-nested-group", "village-duplicate-nested-group", "local-empty-page-zero-total", "village-empty-page-zero-total", "local-null-members", "village-null-members", "local-null-total", "village-null-total", "local-unsafe-total", "village-unsafe-total", "local-member-over-limit", "village-member-over-limit", "local-count-zero-preserved", "village-count-zero-preserved", "local-count-null-rejected", "village-count-null-rejected", "local-count-absent-preserved", "village-count-absent-preserved", "local-group-count-negative", "village-group-count-negative", "local-member-missing-transcript", "village-member-missing-transcript", "legacy-group-missing-prompts", "group-present-false-prompts", "group-present-true-prompts", "group-invalid-present-mode", "canonical-group-required-prompts-control", "canonical-group-present-prompts-control", "content-resolved-envelope", "content-bare-detail-rejected", "nested-local-root-counts", "nested-village-root-counts", "local-second-member-page", "village-second-member-page", "flat-detail-legacy-group", "grouped-detail-legacy-group", "flat-detail-present-prompts", "grouped-detail-present-prompts", "local-null-nested-groups", "village-null-nested-groups", "local-null-search-matches", "local-group-id-across-members", "village-group-id-across-members", "local-zero-nested-group-count", "village-zero-nested-group-count", "local-null-nested-group-count", "village-null-nested-group-count", "local-sync-member-mirrors", "local-sync-member-count-mismatch", "local-search-member-mirrors", "local-search-member-identity-mismatch", "village-collective-member-mirrors", "village-collective-member-count-mismatch", "village-pending-member-mirrors", "village-pending-member-identity-mismatch", "village-my-share-member-mirrors", "village-my-share-member-count-mismatch", "village-contributable-member-mirrors", "village-contributable-member-identity-mismatch"];
2712
+ readonly requiredNames: readonly ["nested-local-owner", "nested-village-owner", "nested-local-leaf", "nested-village-leaf", "local-member-context-rejected", "village-member-context-rejected", "local-member-both-arms-rejected", "village-member-both-arms-rejected", "local-duplicate-member", "village-duplicate-member", "local-duplicate-nested-group", "village-duplicate-nested-group", "local-empty-page-zero-total", "village-empty-page-zero-total", "local-null-members", "village-null-members", "local-null-total", "village-null-total", "local-unsafe-total", "village-unsafe-total", "local-member-over-limit", "village-member-over-limit", "local-count-zero-preserved", "village-count-zero-preserved", "local-count-null-rejected", "village-count-null-rejected", "local-count-absent-preserved", "village-count-absent-preserved", "local-group-count-negative", "village-group-count-negative", "local-member-missing-transcript", "village-member-missing-transcript", "legacy-group-missing-prompts", "group-present-false-prompts", "group-present-true-prompts", "group-invalid-present-mode", "canonical-group-required-prompts-control", "canonical-group-present-prompts-control", "content-resolved-envelope", "content-bare-detail-rejected", "nested-local-root-counts", "nested-village-root-counts", "local-second-member-page", "village-second-member-page", "flat-detail-legacy-group", "grouped-detail-legacy-group", "flat-detail-present-prompts", "grouped-detail-present-prompts", "local-null-nested-groups", "village-null-nested-groups", "local-null-search-matches", "local-group-id-across-members", "village-group-id-across-members", "local-zero-nested-group-count", "village-zero-nested-group-count", "local-null-nested-group-count", "village-null-nested-group-count", "local-sync-member-mirrors", "local-sync-member-count-mismatch", "local-search-member-mirrors", "local-search-member-identity-mismatch", "village-collective-member-mirrors", "village-collective-member-count-mismatch", "village-pending-member-mirrors", "village-pending-member-identity-mismatch", "village-my-share-member-mirrors", "village-my-share-member-count-mismatch", "village-contributable-member-mirrors", "village-contributable-member-identity-mismatch", "village-structured-diagnostics-warnings", "village-string-diagnostics-warning-rejected"];
2713
2713
  readonly cases: {
2714
2714
  readonly cases: readonly [{
2715
2715
  readonly name: "nested-local-owner";
@@ -5071,6 +5071,201 @@ export declare function sessionGraphFixtures(): {
5071
5071
  readonly expected: {
5072
5072
  readonly valid: true;
5073
5073
  };
5074
+ }, {
5075
+ readonly name: "village-structured-diagnostics-warnings";
5076
+ readonly classification: "must-pass";
5077
+ readonly provenance: {
5078
+ readonly source: "bug";
5079
+ readonly ref: "village grouped reads refused stored diagnostic warning entries";
5080
+ };
5081
+ readonly mutation: {
5082
+ readonly description: "a stored diagnostic warning object satisfies the canonical transcript metadata shape";
5083
+ };
5084
+ readonly input: {
5085
+ readonly schema: "VillageSessionListPayload";
5086
+ readonly payload: {
5087
+ readonly items: readonly [{
5088
+ readonly kind: "transcript";
5089
+ readonly transcript: {
5090
+ readonly session: {
5091
+ readonly id: "123e4567-e89b-12d3-a456-426614174006";
5092
+ readonly owner_id: "123e4567-e89b-12d3-a456-426614174001";
5093
+ readonly local_id: "123e4567-e89b-12d3-a456-426614174002";
5094
+ readonly title: null;
5095
+ readonly description: null;
5096
+ readonly visibility: "public";
5097
+ readonly model_provider: "codex";
5098
+ readonly model_name: null;
5099
+ readonly harness_version: null;
5100
+ readonly session_start: null;
5101
+ readonly session_end: null;
5102
+ readonly turn_count: 5;
5103
+ readonly token_count: 13;
5104
+ readonly blob_size_bytes: null;
5105
+ readonly schema_version: "11";
5106
+ readonly published_at: "2026-09-08T00:00:00Z";
5107
+ readonly updated_at: "2026-09-08T00:00:00Z";
5108
+ readonly parent_session_id: null;
5109
+ readonly ingested_at: null;
5110
+ readonly source_format: null;
5111
+ readonly git_branch: null;
5112
+ readonly git_remote: null;
5113
+ readonly project_hash: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
5114
+ readonly project_name: null;
5115
+ readonly project_display_name: "example";
5116
+ readonly project_name_source: "privacy";
5117
+ readonly project_remote_label: "";
5118
+ readonly tool_call_count: null;
5119
+ readonly subagent_count: null;
5120
+ readonly duration_ms: null;
5121
+ readonly subagents: null;
5122
+ readonly diagnostics_warnings: readonly [{
5123
+ readonly errorType: "unknown_data_retained";
5124
+ readonly location: "selected session entry";
5125
+ readonly message: "24 control message rows are outside the interpreted vocabulary";
5126
+ readonly remediation: "No action is required";
5127
+ }];
5128
+ readonly diagnostics_partial: null;
5129
+ readonly tokens_in: null;
5130
+ readonly tokens_out: null;
5131
+ readonly title_generated: null;
5132
+ readonly outcome: null;
5133
+ readonly files_touched: null;
5134
+ readonly lines_changed: null;
5135
+ readonly retry_loops: null;
5136
+ readonly retry_tokens_wasted: null;
5137
+ readonly within_session_reverts: null;
5138
+ readonly signal_density: null;
5139
+ readonly spec_quality_score: null;
5140
+ readonly exploration_ratio: null;
5141
+ readonly scope_breadth: null;
5142
+ readonly discovery_turns: null;
5143
+ readonly m2_token_outcome_ratio: null;
5144
+ readonly m3_unique_tool_count: null;
5145
+ readonly m4_error_recovery_count: null;
5146
+ readonly m4_consecutive_error_max: null;
5147
+ readonly m5_context_utilization_pct: null;
5148
+ readonly m5_peak_context_tokens: null;
5149
+ readonly m5_avg_message_tokens: null;
5150
+ readonly m6_output_survival_pct: null;
5151
+ readonly m6_lines_survived: null;
5152
+ readonly m6_lines_total: null;
5153
+ readonly m7_spec_word_count: null;
5154
+ readonly m7_spec_has_examples: null;
5155
+ readonly m7_spec_has_constraints: null;
5156
+ readonly computed_at: null;
5157
+ readonly compute_version: null;
5158
+ readonly content_hash: null;
5159
+ readonly license_id: null;
5160
+ readonly session_origin: "agent";
5161
+ };
5162
+ };
5163
+ }];
5164
+ readonly page: 1;
5165
+ readonly limit: 1;
5166
+ readonly totalItems: 1;
5167
+ readonly ordinarySessionTotal: 1;
5168
+ readonly helperThreadTotal: 0;
5169
+ };
5170
+ };
5171
+ readonly expected: {
5172
+ readonly valid: true;
5173
+ };
5174
+ }, {
5175
+ readonly name: "village-string-diagnostics-warning-rejected";
5176
+ readonly classification: "must-fail";
5177
+ readonly provenance: {
5178
+ readonly source: "bug";
5179
+ readonly ref: "village grouped reads refused stored diagnostic warning entries";
5180
+ };
5181
+ readonly mutation: {
5182
+ readonly description: "a bare string cannot stand in for a stored diagnostic entry";
5183
+ };
5184
+ readonly input: {
5185
+ readonly schema: "VillageSessionListPayload";
5186
+ readonly payload: {
5187
+ readonly items: readonly [{
5188
+ readonly kind: "transcript";
5189
+ readonly transcript: {
5190
+ readonly session: {
5191
+ readonly id: "123e4567-e89b-12d3-a456-426614174007";
5192
+ readonly owner_id: "123e4567-e89b-12d3-a456-426614174001";
5193
+ readonly local_id: "123e4567-e89b-12d3-a456-426614174002";
5194
+ readonly title: null;
5195
+ readonly description: null;
5196
+ readonly visibility: "public";
5197
+ readonly model_provider: "codex";
5198
+ readonly model_name: null;
5199
+ readonly harness_version: null;
5200
+ readonly session_start: null;
5201
+ readonly session_end: null;
5202
+ readonly turn_count: 5;
5203
+ readonly token_count: 13;
5204
+ readonly blob_size_bytes: null;
5205
+ readonly schema_version: "11";
5206
+ readonly published_at: "2026-09-08T00:00:00Z";
5207
+ readonly updated_at: "2026-09-08T00:00:00Z";
5208
+ readonly parent_session_id: null;
5209
+ readonly ingested_at: null;
5210
+ readonly source_format: null;
5211
+ readonly git_branch: null;
5212
+ readonly git_remote: null;
5213
+ readonly project_hash: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
5214
+ readonly project_name: null;
5215
+ readonly project_display_name: "example";
5216
+ readonly project_name_source: "privacy";
5217
+ readonly project_remote_label: "";
5218
+ readonly tool_call_count: null;
5219
+ readonly subagent_count: null;
5220
+ readonly duration_ms: null;
5221
+ readonly subagents: null;
5222
+ readonly diagnostics_warnings: readonly ["retained uncertainty"];
5223
+ readonly diagnostics_partial: null;
5224
+ readonly tokens_in: null;
5225
+ readonly tokens_out: null;
5226
+ readonly title_generated: null;
5227
+ readonly outcome: null;
5228
+ readonly files_touched: null;
5229
+ readonly lines_changed: null;
5230
+ readonly retry_loops: null;
5231
+ readonly retry_tokens_wasted: null;
5232
+ readonly within_session_reverts: null;
5233
+ readonly signal_density: null;
5234
+ readonly spec_quality_score: null;
5235
+ readonly exploration_ratio: null;
5236
+ readonly scope_breadth: null;
5237
+ readonly discovery_turns: null;
5238
+ readonly m2_token_outcome_ratio: null;
5239
+ readonly m3_unique_tool_count: null;
5240
+ readonly m4_error_recovery_count: null;
5241
+ readonly m4_consecutive_error_max: null;
5242
+ readonly m5_context_utilization_pct: null;
5243
+ readonly m5_peak_context_tokens: null;
5244
+ readonly m5_avg_message_tokens: null;
5245
+ readonly m6_output_survival_pct: null;
5246
+ readonly m6_lines_survived: null;
5247
+ readonly m6_lines_total: null;
5248
+ readonly m7_spec_word_count: null;
5249
+ readonly m7_spec_has_examples: null;
5250
+ readonly m7_spec_has_constraints: null;
5251
+ readonly computed_at: null;
5252
+ readonly compute_version: null;
5253
+ readonly content_hash: null;
5254
+ readonly license_id: null;
5255
+ readonly session_origin: "agent";
5256
+ };
5257
+ };
5258
+ }];
5259
+ readonly page: 1;
5260
+ readonly limit: 1;
5261
+ readonly totalItems: 1;
5262
+ readonly ordinarySessionTotal: 1;
5263
+ readonly helperThreadTotal: 0;
5264
+ };
5265
+ };
5266
+ readonly expected: {
5267
+ readonly valid: false;
5268
+ };
5074
5269
  }, {
5075
5270
  readonly name: "local-second-member-page";
5076
5271
  readonly classification: "must-pass";
@@ -12511,7 +12511,12 @@ export declare const zVillageCollectiveTranscript: z.ZodObject<{
12511
12511
  content_hash: z.ZodNullable<z.ZodString>;
12512
12512
  description: z.ZodNullable<z.ZodString>;
12513
12513
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
12514
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
12514
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
12515
+ errorType: z.ZodString;
12516
+ location: z.ZodString;
12517
+ message: z.ZodString;
12518
+ remediation: z.ZodString;
12519
+ }, z.core.$strip>>>;
12515
12520
  discovery_turns: z.ZodNullable<z.ZodInt>;
12516
12521
  duration_ms: z.ZodNullable<z.ZodInt>;
12517
12522
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -12731,7 +12736,12 @@ export declare const zVillageCollectiveDetailResponse: z.ZodObject<{
12731
12736
  content_hash: z.ZodNullable<z.ZodString>;
12732
12737
  description: z.ZodNullable<z.ZodString>;
12733
12738
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
12734
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
12739
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
12740
+ errorType: z.ZodString;
12741
+ location: z.ZodString;
12742
+ message: z.ZodString;
12743
+ remediation: z.ZodString;
12744
+ }, z.core.$strip>>>;
12735
12745
  discovery_turns: z.ZodNullable<z.ZodInt>;
12736
12746
  duration_ms: z.ZodNullable<z.ZodInt>;
12737
12747
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -13240,7 +13250,12 @@ export declare const zVillageTranscript: z.ZodObject<{
13240
13250
  content_hash: z.ZodNullable<z.ZodString>;
13241
13251
  description: z.ZodNullable<z.ZodString>;
13242
13252
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
13243
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
13253
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
13254
+ errorType: z.ZodString;
13255
+ location: z.ZodString;
13256
+ message: z.ZodString;
13257
+ remediation: z.ZodString;
13258
+ }, z.core.$strip>>>;
13244
13259
  discovery_turns: z.ZodNullable<z.ZodInt>;
13245
13260
  duration_ms: z.ZodNullable<z.ZodInt>;
13246
13261
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -13509,7 +13524,12 @@ export declare const zVillageTranscriptListRow: z.ZodObject<{
13509
13524
  content_hash: z.ZodNullable<z.ZodString>;
13510
13525
  description: z.ZodNullable<z.ZodString>;
13511
13526
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
13512
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
13527
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
13528
+ errorType: z.ZodString;
13529
+ location: z.ZodString;
13530
+ message: z.ZodString;
13531
+ remediation: z.ZodString;
13532
+ }, z.core.$strip>>>;
13513
13533
  discovery_turns: z.ZodNullable<z.ZodInt>;
13514
13534
  duration_ms: z.ZodNullable<z.ZodInt>;
13515
13535
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -13703,7 +13723,12 @@ export declare const zVillageTranscriptListResponse: z.ZodObject<{
13703
13723
  content_hash: z.ZodNullable<z.ZodString>;
13704
13724
  description: z.ZodNullable<z.ZodString>;
13705
13725
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
13706
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
13726
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
13727
+ errorType: z.ZodString;
13728
+ location: z.ZodString;
13729
+ message: z.ZodString;
13730
+ remediation: z.ZodString;
13731
+ }, z.core.$strip>>>;
13707
13732
  discovery_turns: z.ZodNullable<z.ZodInt>;
13708
13733
  duration_ms: z.ZodNullable<z.ZodInt>;
13709
13734
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -13921,7 +13946,12 @@ export declare const zVillageTranscriptMetadataResponse: z.ZodObject<{
13921
13946
  content_hash: z.ZodNullable<z.ZodString>;
13922
13947
  description: z.ZodNullable<z.ZodString>;
13923
13948
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
13924
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
13949
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
13950
+ errorType: z.ZodString;
13951
+ location: z.ZodString;
13952
+ message: z.ZodString;
13953
+ remediation: z.ZodString;
13954
+ }, z.core.$strip>>>;
13925
13955
  discovery_turns: z.ZodNullable<z.ZodInt>;
13926
13956
  duration_ms: z.ZodNullable<z.ZodInt>;
13927
13957
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -14243,7 +14273,12 @@ export declare const zVillageSessionRow: z.ZodObject<{
14243
14273
  content_hash: z.ZodNullable<z.ZodString>;
14244
14274
  description: z.ZodNullable<z.ZodString>;
14245
14275
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
14246
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
14276
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
14277
+ errorType: z.ZodString;
14278
+ location: z.ZodString;
14279
+ message: z.ZodString;
14280
+ remediation: z.ZodString;
14281
+ }, z.core.$strip>>>;
14247
14282
  discovery_turns: z.ZodNullable<z.ZodInt>;
14248
14283
  duration_ms: z.ZodNullable<z.ZodInt>;
14249
14284
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -14571,7 +14606,12 @@ export declare const zVillageSessionRow: z.ZodObject<{
14571
14606
  content_hash: z.ZodNullable<z.ZodString>;
14572
14607
  description: z.ZodNullable<z.ZodString>;
14573
14608
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
14574
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
14609
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
14610
+ errorType: z.ZodString;
14611
+ location: z.ZodString;
14612
+ message: z.ZodString;
14613
+ remediation: z.ZodString;
14614
+ }, z.core.$strip>>>;
14575
14615
  discovery_turns: z.ZodNullable<z.ZodInt>;
14576
14616
  duration_ms: z.ZodNullable<z.ZodInt>;
14577
14617
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -14732,7 +14772,12 @@ export declare const zVillageSessionListItem: z.ZodObject<{
14732
14772
  content_hash: z.ZodNullable<z.ZodString>;
14733
14773
  description: z.ZodNullable<z.ZodString>;
14734
14774
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
14735
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
14775
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
14776
+ errorType: z.ZodString;
14777
+ location: z.ZodString;
14778
+ message: z.ZodString;
14779
+ remediation: z.ZodString;
14780
+ }, z.core.$strip>>>;
14736
14781
  discovery_turns: z.ZodNullable<z.ZodInt>;
14737
14782
  duration_ms: z.ZodNullable<z.ZodInt>;
14738
14783
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -15060,7 +15105,12 @@ export declare const zVillageSessionListItem: z.ZodObject<{
15060
15105
  content_hash: z.ZodNullable<z.ZodString>;
15061
15106
  description: z.ZodNullable<z.ZodString>;
15062
15107
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
15063
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
15108
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
15109
+ errorType: z.ZodString;
15110
+ location: z.ZodString;
15111
+ message: z.ZodString;
15112
+ remediation: z.ZodString;
15113
+ }, z.core.$strip>>>;
15064
15114
  discovery_turns: z.ZodNullable<z.ZodInt>;
15065
15115
  duration_ms: z.ZodNullable<z.ZodInt>;
15066
15116
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -15224,7 +15274,12 @@ export declare const zVillageHelperMembersPayload: z.ZodObject<{
15224
15274
  content_hash: z.ZodNullable<z.ZodString>;
15225
15275
  description: z.ZodNullable<z.ZodString>;
15226
15276
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
15227
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
15277
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
15278
+ errorType: z.ZodString;
15279
+ location: z.ZodString;
15280
+ message: z.ZodString;
15281
+ remediation: z.ZodString;
15282
+ }, z.core.$strip>>>;
15228
15283
  discovery_turns: z.ZodNullable<z.ZodInt>;
15229
15284
  duration_ms: z.ZodNullable<z.ZodInt>;
15230
15285
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -15552,7 +15607,12 @@ export declare const zVillageHelperMembersPayload: z.ZodObject<{
15552
15607
  content_hash: z.ZodNullable<z.ZodString>;
15553
15608
  description: z.ZodNullable<z.ZodString>;
15554
15609
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
15555
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
15610
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
15611
+ errorType: z.ZodString;
15612
+ location: z.ZodString;
15613
+ message: z.ZodString;
15614
+ remediation: z.ZodString;
15615
+ }, z.core.$strip>>>;
15556
15616
  discovery_turns: z.ZodNullable<z.ZodInt>;
15557
15617
  duration_ms: z.ZodNullable<z.ZodInt>;
15558
15618
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -15690,7 +15750,12 @@ export declare const zVillageHelperMembersPayload: z.ZodObject<{
15690
15750
  content_hash: z.ZodNullable<z.ZodString>;
15691
15751
  description: z.ZodNullable<z.ZodString>;
15692
15752
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
15693
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
15753
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
15754
+ errorType: z.ZodString;
15755
+ location: z.ZodString;
15756
+ message: z.ZodString;
15757
+ remediation: z.ZodString;
15758
+ }, z.core.$strip>>>;
15694
15759
  discovery_turns: z.ZodNullable<z.ZodInt>;
15695
15760
  duration_ms: z.ZodNullable<z.ZodInt>;
15696
15761
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -16018,7 +16083,12 @@ export declare const zVillageHelperMembersPayload: z.ZodObject<{
16018
16083
  content_hash: z.ZodNullable<z.ZodString>;
16019
16084
  description: z.ZodNullable<z.ZodString>;
16020
16085
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
16021
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
16086
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
16087
+ errorType: z.ZodString;
16088
+ location: z.ZodString;
16089
+ message: z.ZodString;
16090
+ remediation: z.ZodString;
16091
+ }, z.core.$strip>>>;
16022
16092
  discovery_turns: z.ZodNullable<z.ZodInt>;
16023
16093
  duration_ms: z.ZodNullable<z.ZodInt>;
16024
16094
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -16185,7 +16255,12 @@ export declare const zVillageSessionListPayload: z.ZodObject<{
16185
16255
  content_hash: z.ZodNullable<z.ZodString>;
16186
16256
  description: z.ZodNullable<z.ZodString>;
16187
16257
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
16188
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
16258
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
16259
+ errorType: z.ZodString;
16260
+ location: z.ZodString;
16261
+ message: z.ZodString;
16262
+ remediation: z.ZodString;
16263
+ }, z.core.$strip>>>;
16189
16264
  discovery_turns: z.ZodNullable<z.ZodInt>;
16190
16265
  duration_ms: z.ZodNullable<z.ZodInt>;
16191
16266
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -16513,7 +16588,12 @@ export declare const zVillageSessionListPayload: z.ZodObject<{
16513
16588
  content_hash: z.ZodNullable<z.ZodString>;
16514
16589
  description: z.ZodNullable<z.ZodString>;
16515
16590
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
16516
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
16591
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
16592
+ errorType: z.ZodString;
16593
+ location: z.ZodString;
16594
+ message: z.ZodString;
16595
+ remediation: z.ZodString;
16596
+ }, z.core.$strip>>>;
16517
16597
  discovery_turns: z.ZodNullable<z.ZodInt>;
16518
16598
  duration_ms: z.ZodNullable<z.ZodInt>;
16519
16599
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -16689,7 +16769,12 @@ export declare const zVillageDeprecatedGroupedContributableResponse: z.ZodObject
16689
16769
  content_hash: z.ZodNullable<z.ZodString>;
16690
16770
  description: z.ZodNullable<z.ZodString>;
16691
16771
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
16692
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
16772
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
16773
+ errorType: z.ZodString;
16774
+ location: z.ZodString;
16775
+ message: z.ZodString;
16776
+ remediation: z.ZodString;
16777
+ }, z.core.$strip>>>;
16693
16778
  discovery_turns: z.ZodNullable<z.ZodInt>;
16694
16779
  duration_ms: z.ZodNullable<z.ZodInt>;
16695
16780
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -17017,7 +17102,12 @@ export declare const zVillageDeprecatedGroupedContributableResponse: z.ZodObject
17017
17102
  content_hash: z.ZodNullable<z.ZodString>;
17018
17103
  description: z.ZodNullable<z.ZodString>;
17019
17104
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
17020
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
17105
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
17106
+ errorType: z.ZodString;
17107
+ location: z.ZodString;
17108
+ message: z.ZodString;
17109
+ remediation: z.ZodString;
17110
+ }, z.core.$strip>>>;
17021
17111
  discovery_turns: z.ZodNullable<z.ZodInt>;
17022
17112
  duration_ms: z.ZodNullable<z.ZodInt>;
17023
17113
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -17264,7 +17354,12 @@ export declare const zVillageGroupedCollectiveDetailResponse: z.ZodObject<{
17264
17354
  content_hash: z.ZodNullable<z.ZodString>;
17265
17355
  description: z.ZodNullable<z.ZodString>;
17266
17356
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
17267
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
17357
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
17358
+ errorType: z.ZodString;
17359
+ location: z.ZodString;
17360
+ message: z.ZodString;
17361
+ remediation: z.ZodString;
17362
+ }, z.core.$strip>>>;
17268
17363
  discovery_turns: z.ZodNullable<z.ZodInt>;
17269
17364
  duration_ms: z.ZodNullable<z.ZodInt>;
17270
17365
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -17592,7 +17687,12 @@ export declare const zVillageGroupedCollectiveDetailResponse: z.ZodObject<{
17592
17687
  content_hash: z.ZodNullable<z.ZodString>;
17593
17688
  description: z.ZodNullable<z.ZodString>;
17594
17689
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
17595
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
17690
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
17691
+ errorType: z.ZodString;
17692
+ location: z.ZodString;
17693
+ message: z.ZodString;
17694
+ remediation: z.ZodString;
17695
+ }, z.core.$strip>>>;
17596
17696
  discovery_turns: z.ZodNullable<z.ZodInt>;
17597
17697
  duration_ms: z.ZodNullable<z.ZodInt>;
17598
17698
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -17771,7 +17871,12 @@ export declare const zVillageGroupedContributableResponse: z.ZodObject<{
17771
17871
  content_hash: z.ZodNullable<z.ZodString>;
17772
17872
  description: z.ZodNullable<z.ZodString>;
17773
17873
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
17774
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
17874
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
17875
+ errorType: z.ZodString;
17876
+ location: z.ZodString;
17877
+ message: z.ZodString;
17878
+ remediation: z.ZodString;
17879
+ }, z.core.$strip>>>;
17775
17880
  discovery_turns: z.ZodNullable<z.ZodInt>;
17776
17881
  duration_ms: z.ZodNullable<z.ZodInt>;
17777
17882
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -18099,7 +18204,12 @@ export declare const zVillageGroupedContributableResponse: z.ZodObject<{
18099
18204
  content_hash: z.ZodNullable<z.ZodString>;
18100
18205
  description: z.ZodNullable<z.ZodString>;
18101
18206
  diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
18102
- diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodString>>;
18207
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
18208
+ errorType: z.ZodString;
18209
+ location: z.ZodString;
18210
+ message: z.ZodString;
18211
+ remediation: z.ZodString;
18212
+ }, z.core.$strip>>>;
18103
18213
  discovery_turns: z.ZodNullable<z.ZodInt>;
18104
18214
  duration_ms: z.ZodNullable<z.ZodInt>;
18105
18215
  exploration_ratio: z.ZodNullable<z.ZodNumber>;
@@ -3156,7 +3156,7 @@ export const zVillageShareEvent = z.object({
3156
3156
  fail("decided_by_actor does not match the status's actor capacity");
3157
3157
  if (value.status === "pending" && value.decided_at !== null)
3158
3158
  fail("pending attempts must have null decided_at");
3159
- if (value.status !== "pending" && value.status !== "approved" && value.decided_at === null)
3159
+ if (value.status !== "pending" && value.status !== "approved" && value.status !== "rejected" && value.decided_at === null)
3160
3160
  fail("this terminal status requires decided_at");
3161
3161
  if (value.decided_at !== null && (value.decided_at === "0001-01-01T00:00:00Z" || /^0001-01-01T00:00:00\.0+Z$/.test(value.decided_at)))
3162
3162
  fail("decided_at must be a nonzero UTC timestamp when present");
@@ -3489,7 +3489,7 @@ export const zVillageCollectiveTranscript = z.object({
3489
3489
  content_hash: zTranscriptContentHash.nullable(),
3490
3490
  description: z.string().nullable(),
3491
3491
  diagnostics_partial: z.boolean().nullable(),
3492
- diagnostics_warnings: z.array(z.string()).nullable(),
3492
+ diagnostics_warnings: z.array(zDiagnosticEntry).nullable(),
3493
3493
  discovery_turns: z.int().nullable(),
3494
3494
  duration_ms: z.int().nullable(),
3495
3495
  exploration_ratio: z.number().nullable(),
@@ -3692,7 +3692,7 @@ export const zVillageTranscript = z.object({
3692
3692
  content_hash: zTranscriptContentHash.nullable(),
3693
3693
  description: z.string().nullable(),
3694
3694
  diagnostics_partial: z.boolean().nullable(),
3695
- diagnostics_warnings: z.array(z.string()).nullable(),
3695
+ diagnostics_warnings: z.array(zDiagnosticEntry).nullable(),
3696
3696
  discovery_turns: z.int().nullable(),
3697
3697
  duration_ms: z.int().nullable(),
3698
3698
  exploration_ratio: z.number().nullable(),
@@ -2709,7 +2709,7 @@ export declare const canonicalSessionGraphFixtures: {
2709
2709
  readonly requiredNames: readonly ["legacy-durable-decode", "three-independent-counts", "input-count-absent", "input-count-zero", "input-count-positive", "input-count-safe-max", "input-count-null", "input-count-string", "input-count-negative", "input-count-fraction", "input-count-above-safe-max", "input-count-bool", "input-count-array", "input-count-object", "authoritative-mirrors-match", "authoritative-count-disagreement", "authoritative-count-detail-absent", "authoritative-count-metadata-absent", "authoritative-count-both-absent", "authoritative-root-values-differ", "authoritative-root-detail-absent", "authoritative-root-metadata-absent", "legacy-turn-count-local4-export5", "projected-main-count-disagreement", "graph-legacy-parent-mismatch", "digest-absent-versus-zero", "digest-same-positive", "digest-root-evidence", "digest-purpose-evidence", "digest-relationship-evidence", "digest-entry-provenance"];
2710
2710
  };
2711
2711
  readonly grouped_read: {
2712
- readonly requiredNames: readonly ["nested-local-owner", "nested-village-owner", "nested-local-leaf", "nested-village-leaf", "local-member-context-rejected", "village-member-context-rejected", "local-member-both-arms-rejected", "village-member-both-arms-rejected", "local-duplicate-member", "village-duplicate-member", "local-duplicate-nested-group", "village-duplicate-nested-group", "local-empty-page-zero-total", "village-empty-page-zero-total", "local-null-members", "village-null-members", "local-null-total", "village-null-total", "local-unsafe-total", "village-unsafe-total", "local-member-over-limit", "village-member-over-limit", "local-count-zero-preserved", "village-count-zero-preserved", "local-count-null-rejected", "village-count-null-rejected", "local-count-absent-preserved", "village-count-absent-preserved", "local-group-count-negative", "village-group-count-negative", "local-member-missing-transcript", "village-member-missing-transcript", "legacy-group-missing-prompts", "group-present-false-prompts", "group-present-true-prompts", "group-invalid-present-mode", "canonical-group-required-prompts-control", "canonical-group-present-prompts-control", "content-resolved-envelope", "content-bare-detail-rejected", "nested-local-root-counts", "nested-village-root-counts", "local-second-member-page", "village-second-member-page", "flat-detail-legacy-group", "grouped-detail-legacy-group", "flat-detail-present-prompts", "grouped-detail-present-prompts", "local-null-nested-groups", "village-null-nested-groups", "local-null-search-matches", "local-group-id-across-members", "village-group-id-across-members", "local-zero-nested-group-count", "village-zero-nested-group-count", "local-null-nested-group-count", "village-null-nested-group-count", "local-sync-member-mirrors", "local-sync-member-count-mismatch", "local-search-member-mirrors", "local-search-member-identity-mismatch", "village-collective-member-mirrors", "village-collective-member-count-mismatch", "village-pending-member-mirrors", "village-pending-member-identity-mismatch", "village-my-share-member-mirrors", "village-my-share-member-count-mismatch", "village-contributable-member-mirrors", "village-contributable-member-identity-mismatch"];
2712
+ readonly requiredNames: readonly ["nested-local-owner", "nested-village-owner", "nested-local-leaf", "nested-village-leaf", "local-member-context-rejected", "village-member-context-rejected", "local-member-both-arms-rejected", "village-member-both-arms-rejected", "local-duplicate-member", "village-duplicate-member", "local-duplicate-nested-group", "village-duplicate-nested-group", "local-empty-page-zero-total", "village-empty-page-zero-total", "local-null-members", "village-null-members", "local-null-total", "village-null-total", "local-unsafe-total", "village-unsafe-total", "local-member-over-limit", "village-member-over-limit", "local-count-zero-preserved", "village-count-zero-preserved", "local-count-null-rejected", "village-count-null-rejected", "local-count-absent-preserved", "village-count-absent-preserved", "local-group-count-negative", "village-group-count-negative", "local-member-missing-transcript", "village-member-missing-transcript", "legacy-group-missing-prompts", "group-present-false-prompts", "group-present-true-prompts", "group-invalid-present-mode", "canonical-group-required-prompts-control", "canonical-group-present-prompts-control", "content-resolved-envelope", "content-bare-detail-rejected", "nested-local-root-counts", "nested-village-root-counts", "local-second-member-page", "village-second-member-page", "flat-detail-legacy-group", "grouped-detail-legacy-group", "flat-detail-present-prompts", "grouped-detail-present-prompts", "local-null-nested-groups", "village-null-nested-groups", "local-null-search-matches", "local-group-id-across-members", "village-group-id-across-members", "local-zero-nested-group-count", "village-zero-nested-group-count", "local-null-nested-group-count", "village-null-nested-group-count", "local-sync-member-mirrors", "local-sync-member-count-mismatch", "local-search-member-mirrors", "local-search-member-identity-mismatch", "village-collective-member-mirrors", "village-collective-member-count-mismatch", "village-pending-member-mirrors", "village-pending-member-identity-mismatch", "village-my-share-member-mirrors", "village-my-share-member-count-mismatch", "village-contributable-member-mirrors", "village-contributable-member-identity-mismatch", "village-structured-diagnostics-warnings", "village-string-diagnostics-warning-rejected"];
2713
2713
  readonly cases: {
2714
2714
  readonly cases: readonly [{
2715
2715
  readonly name: "nested-local-owner";
@@ -5071,6 +5071,201 @@ export declare const canonicalSessionGraphFixtures: {
5071
5071
  readonly expected: {
5072
5072
  readonly valid: true;
5073
5073
  };
5074
+ }, {
5075
+ readonly name: "village-structured-diagnostics-warnings";
5076
+ readonly classification: "must-pass";
5077
+ readonly provenance: {
5078
+ readonly source: "bug";
5079
+ readonly ref: "village grouped reads refused stored diagnostic warning entries";
5080
+ };
5081
+ readonly mutation: {
5082
+ readonly description: "a stored diagnostic warning object satisfies the canonical transcript metadata shape";
5083
+ };
5084
+ readonly input: {
5085
+ readonly schema: "VillageSessionListPayload";
5086
+ readonly payload: {
5087
+ readonly items: readonly [{
5088
+ readonly kind: "transcript";
5089
+ readonly transcript: {
5090
+ readonly session: {
5091
+ readonly id: "123e4567-e89b-12d3-a456-426614174006";
5092
+ readonly owner_id: "123e4567-e89b-12d3-a456-426614174001";
5093
+ readonly local_id: "123e4567-e89b-12d3-a456-426614174002";
5094
+ readonly title: null;
5095
+ readonly description: null;
5096
+ readonly visibility: "public";
5097
+ readonly model_provider: "codex";
5098
+ readonly model_name: null;
5099
+ readonly harness_version: null;
5100
+ readonly session_start: null;
5101
+ readonly session_end: null;
5102
+ readonly turn_count: 5;
5103
+ readonly token_count: 13;
5104
+ readonly blob_size_bytes: null;
5105
+ readonly schema_version: "11";
5106
+ readonly published_at: "2026-09-08T00:00:00Z";
5107
+ readonly updated_at: "2026-09-08T00:00:00Z";
5108
+ readonly parent_session_id: null;
5109
+ readonly ingested_at: null;
5110
+ readonly source_format: null;
5111
+ readonly git_branch: null;
5112
+ readonly git_remote: null;
5113
+ readonly project_hash: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
5114
+ readonly project_name: null;
5115
+ readonly project_display_name: "example";
5116
+ readonly project_name_source: "privacy";
5117
+ readonly project_remote_label: "";
5118
+ readonly tool_call_count: null;
5119
+ readonly subagent_count: null;
5120
+ readonly duration_ms: null;
5121
+ readonly subagents: null;
5122
+ readonly diagnostics_warnings: readonly [{
5123
+ readonly errorType: "unknown_data_retained";
5124
+ readonly location: "selected session entry";
5125
+ readonly message: "24 control message rows are outside the interpreted vocabulary";
5126
+ readonly remediation: "No action is required";
5127
+ }];
5128
+ readonly diagnostics_partial: null;
5129
+ readonly tokens_in: null;
5130
+ readonly tokens_out: null;
5131
+ readonly title_generated: null;
5132
+ readonly outcome: null;
5133
+ readonly files_touched: null;
5134
+ readonly lines_changed: null;
5135
+ readonly retry_loops: null;
5136
+ readonly retry_tokens_wasted: null;
5137
+ readonly within_session_reverts: null;
5138
+ readonly signal_density: null;
5139
+ readonly spec_quality_score: null;
5140
+ readonly exploration_ratio: null;
5141
+ readonly scope_breadth: null;
5142
+ readonly discovery_turns: null;
5143
+ readonly m2_token_outcome_ratio: null;
5144
+ readonly m3_unique_tool_count: null;
5145
+ readonly m4_error_recovery_count: null;
5146
+ readonly m4_consecutive_error_max: null;
5147
+ readonly m5_context_utilization_pct: null;
5148
+ readonly m5_peak_context_tokens: null;
5149
+ readonly m5_avg_message_tokens: null;
5150
+ readonly m6_output_survival_pct: null;
5151
+ readonly m6_lines_survived: null;
5152
+ readonly m6_lines_total: null;
5153
+ readonly m7_spec_word_count: null;
5154
+ readonly m7_spec_has_examples: null;
5155
+ readonly m7_spec_has_constraints: null;
5156
+ readonly computed_at: null;
5157
+ readonly compute_version: null;
5158
+ readonly content_hash: null;
5159
+ readonly license_id: null;
5160
+ readonly session_origin: "agent";
5161
+ };
5162
+ };
5163
+ }];
5164
+ readonly page: 1;
5165
+ readonly limit: 1;
5166
+ readonly totalItems: 1;
5167
+ readonly ordinarySessionTotal: 1;
5168
+ readonly helperThreadTotal: 0;
5169
+ };
5170
+ };
5171
+ readonly expected: {
5172
+ readonly valid: true;
5173
+ };
5174
+ }, {
5175
+ readonly name: "village-string-diagnostics-warning-rejected";
5176
+ readonly classification: "must-fail";
5177
+ readonly provenance: {
5178
+ readonly source: "bug";
5179
+ readonly ref: "village grouped reads refused stored diagnostic warning entries";
5180
+ };
5181
+ readonly mutation: {
5182
+ readonly description: "a bare string cannot stand in for a stored diagnostic entry";
5183
+ };
5184
+ readonly input: {
5185
+ readonly schema: "VillageSessionListPayload";
5186
+ readonly payload: {
5187
+ readonly items: readonly [{
5188
+ readonly kind: "transcript";
5189
+ readonly transcript: {
5190
+ readonly session: {
5191
+ readonly id: "123e4567-e89b-12d3-a456-426614174007";
5192
+ readonly owner_id: "123e4567-e89b-12d3-a456-426614174001";
5193
+ readonly local_id: "123e4567-e89b-12d3-a456-426614174002";
5194
+ readonly title: null;
5195
+ readonly description: null;
5196
+ readonly visibility: "public";
5197
+ readonly model_provider: "codex";
5198
+ readonly model_name: null;
5199
+ readonly harness_version: null;
5200
+ readonly session_start: null;
5201
+ readonly session_end: null;
5202
+ readonly turn_count: 5;
5203
+ readonly token_count: 13;
5204
+ readonly blob_size_bytes: null;
5205
+ readonly schema_version: "11";
5206
+ readonly published_at: "2026-09-08T00:00:00Z";
5207
+ readonly updated_at: "2026-09-08T00:00:00Z";
5208
+ readonly parent_session_id: null;
5209
+ readonly ingested_at: null;
5210
+ readonly source_format: null;
5211
+ readonly git_branch: null;
5212
+ readonly git_remote: null;
5213
+ readonly project_hash: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
5214
+ readonly project_name: null;
5215
+ readonly project_display_name: "example";
5216
+ readonly project_name_source: "privacy";
5217
+ readonly project_remote_label: "";
5218
+ readonly tool_call_count: null;
5219
+ readonly subagent_count: null;
5220
+ readonly duration_ms: null;
5221
+ readonly subagents: null;
5222
+ readonly diagnostics_warnings: readonly ["retained uncertainty"];
5223
+ readonly diagnostics_partial: null;
5224
+ readonly tokens_in: null;
5225
+ readonly tokens_out: null;
5226
+ readonly title_generated: null;
5227
+ readonly outcome: null;
5228
+ readonly files_touched: null;
5229
+ readonly lines_changed: null;
5230
+ readonly retry_loops: null;
5231
+ readonly retry_tokens_wasted: null;
5232
+ readonly within_session_reverts: null;
5233
+ readonly signal_density: null;
5234
+ readonly spec_quality_score: null;
5235
+ readonly exploration_ratio: null;
5236
+ readonly scope_breadth: null;
5237
+ readonly discovery_turns: null;
5238
+ readonly m2_token_outcome_ratio: null;
5239
+ readonly m3_unique_tool_count: null;
5240
+ readonly m4_error_recovery_count: null;
5241
+ readonly m4_consecutive_error_max: null;
5242
+ readonly m5_context_utilization_pct: null;
5243
+ readonly m5_peak_context_tokens: null;
5244
+ readonly m5_avg_message_tokens: null;
5245
+ readonly m6_output_survival_pct: null;
5246
+ readonly m6_lines_survived: null;
5247
+ readonly m6_lines_total: null;
5248
+ readonly m7_spec_word_count: null;
5249
+ readonly m7_spec_has_examples: null;
5250
+ readonly m7_spec_has_constraints: null;
5251
+ readonly computed_at: null;
5252
+ readonly compute_version: null;
5253
+ readonly content_hash: null;
5254
+ readonly license_id: null;
5255
+ readonly session_origin: "agent";
5256
+ };
5257
+ };
5258
+ }];
5259
+ readonly page: 1;
5260
+ readonly limit: 1;
5261
+ readonly totalItems: 1;
5262
+ readonly ordinarySessionTotal: 1;
5263
+ readonly helperThreadTotal: 0;
5264
+ };
5265
+ };
5266
+ readonly expected: {
5267
+ readonly valid: false;
5268
+ };
5074
5269
  }, {
5075
5270
  readonly name: "local-second-member-page";
5076
5271
  readonly classification: "must-pass";
@@ -3135,7 +3135,9 @@ export const canonicalSessionGraphFixtures = {
3135
3135
  "village-my-share-member-mirrors",
3136
3136
  "village-my-share-member-count-mismatch",
3137
3137
  "village-contributable-member-mirrors",
3138
- "village-contributable-member-identity-mismatch"
3138
+ "village-contributable-member-identity-mismatch",
3139
+ "village-structured-diagnostics-warnings",
3140
+ "village-string-diagnostics-warning-rejected"
3139
3141
  ],
3140
3142
  "cases": {
3141
3143
  "cases": [
@@ -5649,6 +5651,211 @@ export const canonicalSessionGraphFixtures = {
5649
5651
  "valid": true
5650
5652
  }
5651
5653
  },
5654
+ {
5655
+ "name": "village-structured-diagnostics-warnings",
5656
+ "classification": "must-pass",
5657
+ "provenance": {
5658
+ "source": "bug",
5659
+ "ref": "village grouped reads refused stored diagnostic warning entries"
5660
+ },
5661
+ "mutation": {
5662
+ "description": "a stored diagnostic warning object satisfies the canonical transcript metadata shape"
5663
+ },
5664
+ "input": {
5665
+ "schema": "VillageSessionListPayload",
5666
+ "payload": {
5667
+ "items": [
5668
+ {
5669
+ "kind": "transcript",
5670
+ "transcript": {
5671
+ "session": {
5672
+ "id": "123e4567-e89b-12d3-a456-426614174006",
5673
+ "owner_id": "123e4567-e89b-12d3-a456-426614174001",
5674
+ "local_id": "123e4567-e89b-12d3-a456-426614174002",
5675
+ "title": null,
5676
+ "description": null,
5677
+ "visibility": "public",
5678
+ "model_provider": "codex",
5679
+ "model_name": null,
5680
+ "harness_version": null,
5681
+ "session_start": null,
5682
+ "session_end": null,
5683
+ "turn_count": 5,
5684
+ "token_count": 13,
5685
+ "blob_size_bytes": null,
5686
+ "schema_version": "11",
5687
+ "published_at": "2026-09-08T00:00:00Z",
5688
+ "updated_at": "2026-09-08T00:00:00Z",
5689
+ "parent_session_id": null,
5690
+ "ingested_at": null,
5691
+ "source_format": null,
5692
+ "git_branch": null,
5693
+ "git_remote": null,
5694
+ "project_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5695
+ "project_name": null,
5696
+ "project_display_name": "example",
5697
+ "project_name_source": "privacy",
5698
+ "project_remote_label": "",
5699
+ "tool_call_count": null,
5700
+ "subagent_count": null,
5701
+ "duration_ms": null,
5702
+ "subagents": null,
5703
+ "diagnostics_warnings": [
5704
+ {
5705
+ "errorType": "unknown_data_retained",
5706
+ "location": "selected session entry",
5707
+ "message": "24 control message rows are outside the interpreted vocabulary",
5708
+ "remediation": "No action is required"
5709
+ }
5710
+ ],
5711
+ "diagnostics_partial": null,
5712
+ "tokens_in": null,
5713
+ "tokens_out": null,
5714
+ "title_generated": null,
5715
+ "outcome": null,
5716
+ "files_touched": null,
5717
+ "lines_changed": null,
5718
+ "retry_loops": null,
5719
+ "retry_tokens_wasted": null,
5720
+ "within_session_reverts": null,
5721
+ "signal_density": null,
5722
+ "spec_quality_score": null,
5723
+ "exploration_ratio": null,
5724
+ "scope_breadth": null,
5725
+ "discovery_turns": null,
5726
+ "m2_token_outcome_ratio": null,
5727
+ "m3_unique_tool_count": null,
5728
+ "m4_error_recovery_count": null,
5729
+ "m4_consecutive_error_max": null,
5730
+ "m5_context_utilization_pct": null,
5731
+ "m5_peak_context_tokens": null,
5732
+ "m5_avg_message_tokens": null,
5733
+ "m6_output_survival_pct": null,
5734
+ "m6_lines_survived": null,
5735
+ "m6_lines_total": null,
5736
+ "m7_spec_word_count": null,
5737
+ "m7_spec_has_examples": null,
5738
+ "m7_spec_has_constraints": null,
5739
+ "computed_at": null,
5740
+ "compute_version": null,
5741
+ "content_hash": null,
5742
+ "license_id": null,
5743
+ "session_origin": "agent"
5744
+ }
5745
+ }
5746
+ }
5747
+ ],
5748
+ "page": 1,
5749
+ "limit": 1,
5750
+ "totalItems": 1,
5751
+ "ordinarySessionTotal": 1,
5752
+ "helperThreadTotal": 0
5753
+ }
5754
+ },
5755
+ "expected": {
5756
+ "valid": true
5757
+ }
5758
+ },
5759
+ {
5760
+ "name": "village-string-diagnostics-warning-rejected",
5761
+ "classification": "must-fail",
5762
+ "provenance": {
5763
+ "source": "bug",
5764
+ "ref": "village grouped reads refused stored diagnostic warning entries"
5765
+ },
5766
+ "mutation": {
5767
+ "description": "a bare string cannot stand in for a stored diagnostic entry"
5768
+ },
5769
+ "input": {
5770
+ "schema": "VillageSessionListPayload",
5771
+ "payload": {
5772
+ "items": [
5773
+ {
5774
+ "kind": "transcript",
5775
+ "transcript": {
5776
+ "session": {
5777
+ "id": "123e4567-e89b-12d3-a456-426614174007",
5778
+ "owner_id": "123e4567-e89b-12d3-a456-426614174001",
5779
+ "local_id": "123e4567-e89b-12d3-a456-426614174002",
5780
+ "title": null,
5781
+ "description": null,
5782
+ "visibility": "public",
5783
+ "model_provider": "codex",
5784
+ "model_name": null,
5785
+ "harness_version": null,
5786
+ "session_start": null,
5787
+ "session_end": null,
5788
+ "turn_count": 5,
5789
+ "token_count": 13,
5790
+ "blob_size_bytes": null,
5791
+ "schema_version": "11",
5792
+ "published_at": "2026-09-08T00:00:00Z",
5793
+ "updated_at": "2026-09-08T00:00:00Z",
5794
+ "parent_session_id": null,
5795
+ "ingested_at": null,
5796
+ "source_format": null,
5797
+ "git_branch": null,
5798
+ "git_remote": null,
5799
+ "project_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5800
+ "project_name": null,
5801
+ "project_display_name": "example",
5802
+ "project_name_source": "privacy",
5803
+ "project_remote_label": "",
5804
+ "tool_call_count": null,
5805
+ "subagent_count": null,
5806
+ "duration_ms": null,
5807
+ "subagents": null,
5808
+ "diagnostics_warnings": [
5809
+ "retained uncertainty"
5810
+ ],
5811
+ "diagnostics_partial": null,
5812
+ "tokens_in": null,
5813
+ "tokens_out": null,
5814
+ "title_generated": null,
5815
+ "outcome": null,
5816
+ "files_touched": null,
5817
+ "lines_changed": null,
5818
+ "retry_loops": null,
5819
+ "retry_tokens_wasted": null,
5820
+ "within_session_reverts": null,
5821
+ "signal_density": null,
5822
+ "spec_quality_score": null,
5823
+ "exploration_ratio": null,
5824
+ "scope_breadth": null,
5825
+ "discovery_turns": null,
5826
+ "m2_token_outcome_ratio": null,
5827
+ "m3_unique_tool_count": null,
5828
+ "m4_error_recovery_count": null,
5829
+ "m4_consecutive_error_max": null,
5830
+ "m5_context_utilization_pct": null,
5831
+ "m5_peak_context_tokens": null,
5832
+ "m5_avg_message_tokens": null,
5833
+ "m6_output_survival_pct": null,
5834
+ "m6_lines_survived": null,
5835
+ "m6_lines_total": null,
5836
+ "m7_spec_word_count": null,
5837
+ "m7_spec_has_examples": null,
5838
+ "m7_spec_has_constraints": null,
5839
+ "computed_at": null,
5840
+ "compute_version": null,
5841
+ "content_hash": null,
5842
+ "license_id": null,
5843
+ "session_origin": "agent"
5844
+ }
5845
+ }
5846
+ }
5847
+ ],
5848
+ "page": 1,
5849
+ "limit": 1,
5850
+ "totalItems": 1,
5851
+ "ordinarySessionTotal": 1,
5852
+ "helperThreadTotal": 0
5853
+ }
5854
+ },
5855
+ "expected": {
5856
+ "valid": false
5857
+ }
5858
+ },
5652
5859
  {
5653
5860
  "name": "local-second-member-page",
5654
5861
  "classification": "must-pass",
@@ -1,4 +1,4 @@
1
- export declare const VillageAPIVersion: "0.27.0";
1
+ export declare const VillageAPIVersion: "0.28.0";
2
2
  export declare const PeasantLocalAPIVersion: "0.21.0";
3
- export declare const TypesVersion: "0.32.0";
3
+ export declare const TypesVersion: "0.33.0";
4
4
  export declare const MetadataSchemaVersion: 12;
@@ -1,5 +1,5 @@
1
1
  // Code generated from the canonical Go/OpenAPI contract. DO NOT EDIT.
2
- export const VillageAPIVersion = "0.27.0";
2
+ export const VillageAPIVersion = "0.28.0";
3
3
  export const PeasantLocalAPIVersion = "0.21.0";
4
- export const TypesVersion = "0.32.0";
4
+ export const TypesVersion = "0.33.0";
5
5
  export const MetadataSchemaVersion = 12;
@@ -1400,6 +1400,7 @@ export interface components {
1400
1400
  * @enum {string}
1401
1401
  */
1402
1402
  SchemaDeliveryOrigin: Schema.DeliveryOrigin;
1403
+ SchemaDiagnosticEntry: Schema.DiagnosticEntry;
1403
1404
  /**
1404
1405
  * Digest Item Kind
1405
1406
  * @description Kind of one item in the prompt digest chain: a session boundary, a human prompt, a skill invocation marker, or a commit anchor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peasant-labs/schema",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "Generated TypeScript contract bindings for the peasant-labs schema module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {