@peasant-labs/schema 0.16.0 → 0.17.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.
@@ -335,6 +335,11 @@ export declare const zChildSessionRef: z.ZodObject<{
335
335
  startTime: z.ZodISODateTime;
336
336
  }, z.core.$strip>;
337
337
  export type ChildSessionRef = z.infer<typeof zChildSessionRef>;
338
+ export declare const zCommandInvocation: z.ZodObject<{
339
+ args: z.ZodOptional<z.ZodString>;
340
+ name: z.ZodString;
341
+ }, z.core.$strip>;
342
+ export type CommandInvocation = z.infer<typeof zCommandInvocation>;
338
343
  export declare const zCommitInfo: z.ZodObject<{
339
344
  authorEmail: z.ZodString;
340
345
  authorName: z.ZodString;
@@ -487,6 +492,18 @@ export declare const zDiffHunk: z.ZodObject<{
487
492
  sessionTitle: z.ZodOptional<z.ZodString>;
488
493
  }, z.core.$strip>;
489
494
  export type DiffHunk = z.infer<typeof zDiffHunk>;
495
+ /**
496
+ * Digest Item Kind
497
+ *
498
+ * Kind of one item in the prompt digest chain: a session boundary, a human prompt, a skill invocation marker, or a commit anchor
499
+ */
500
+ export declare const zDigestItemKind: z.ZodEnum<{
501
+ session: "session";
502
+ prompt: "prompt";
503
+ skill: "skill";
504
+ commit: "commit";
505
+ }>;
506
+ export type DigestItemKind = z.infer<typeof zDigestItemKind>;
490
507
  /**
491
508
  * Edge Violation Kind
492
509
  *
@@ -955,6 +972,30 @@ export declare const zProjectSummariesPayload: z.ZodObject<{
955
972
  }, z.core.$strip>>>;
956
973
  }, z.core.$strip>;
957
974
  export type ProjectSummariesPayload = z.infer<typeof zProjectSummariesPayload>;
975
+ export declare const zPromptDigestHeader: z.ZodObject<{
976
+ commitsCovered: z.ZodInt;
977
+ commitsTotal: z.ZodInt;
978
+ harness: z.ZodEnum<{
979
+ strike: "strike";
980
+ cursor: "cursor";
981
+ "claude-code": "claude-code";
982
+ "gemini-cli": "gemini-cli";
983
+ codex: "codex";
984
+ opencode: "opencode";
985
+ antigravity: "antigravity";
986
+ pi: "pi";
987
+ }>;
988
+ promptCount: z.ZodInt;
989
+ redactionLevel: z.ZodString;
990
+ sessionCount: z.ZodInt;
991
+ villageUrl: z.ZodString;
992
+ }, z.core.$strip>;
993
+ export type PromptDigestHeader = z.infer<typeof zPromptDigestHeader>;
994
+ export declare const zPromptDigestSkill: z.ZodObject<{
995
+ invocationCount: z.ZodInt;
996
+ name: z.ZodString;
997
+ }, z.core.$strip>;
998
+ export type PromptDigestSkill = z.infer<typeof zPromptDigestSkill>;
958
999
  export declare const zProvenance: z.ZodObject<{
959
1000
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
960
1001
  function: z.ZodOptional<z.ZodString>;
@@ -3323,6 +3364,64 @@ export type CanonicalPublishOperation = z.infer<typeof zCanonicalPublishOperatio
3323
3364
  */
3324
3365
  export declare const zTranscriptID: z.ZodUUID;
3325
3366
  export type TranscriptID = z.infer<typeof zTranscriptID>;
3367
+ export declare const zPromptDigestItem: z.ZodObject<{
3368
+ commitCount: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3369
+ commitSha: z.ZodOptional<z.ZodString>;
3370
+ kind: z.ZodEnum<{
3371
+ session: "session";
3372
+ prompt: "prompt";
3373
+ skill: "skill";
3374
+ commit: "commit";
3375
+ }>;
3376
+ ordinal: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3377
+ promptCount: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3378
+ text: z.ZodString;
3379
+ timestamp: z.ZodISODateTime;
3380
+ transcriptId: z.ZodUUID;
3381
+ turnIndex: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3382
+ }, z.core.$strip>;
3383
+ export type PromptDigestItem = z.infer<typeof zPromptDigestItem>;
3384
+ export declare const zPromptDigest: z.ZodObject<{
3385
+ header: z.ZodObject<{
3386
+ commitsCovered: z.ZodInt;
3387
+ commitsTotal: z.ZodInt;
3388
+ harness: z.ZodEnum<{
3389
+ strike: "strike";
3390
+ cursor: "cursor";
3391
+ "claude-code": "claude-code";
3392
+ "gemini-cli": "gemini-cli";
3393
+ codex: "codex";
3394
+ opencode: "opencode";
3395
+ antigravity: "antigravity";
3396
+ pi: "pi";
3397
+ }>;
3398
+ promptCount: z.ZodInt;
3399
+ redactionLevel: z.ZodString;
3400
+ sessionCount: z.ZodInt;
3401
+ villageUrl: z.ZodString;
3402
+ }, z.core.$strip>;
3403
+ items: z.ZodArray<z.ZodObject<{
3404
+ commitCount: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3405
+ commitSha: z.ZodOptional<z.ZodString>;
3406
+ kind: z.ZodEnum<{
3407
+ session: "session";
3408
+ prompt: "prompt";
3409
+ skill: "skill";
3410
+ commit: "commit";
3411
+ }>;
3412
+ ordinal: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3413
+ promptCount: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3414
+ text: z.ZodString;
3415
+ timestamp: z.ZodISODateTime;
3416
+ transcriptId: z.ZodUUID;
3417
+ turnIndex: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3418
+ }, z.core.$strip>>;
3419
+ skills: z.ZodArray<z.ZodObject<{
3420
+ invocationCount: z.ZodInt;
3421
+ name: z.ZodString;
3422
+ }, z.core.$strip>>;
3423
+ }, z.core.$strip>;
3424
+ export type PromptDigest = z.infer<typeof zPromptDigest>;
3326
3425
  export declare const zPullSkipGateItem: z.ZodObject<{
3327
3426
  annotationHashes: z.ZodArray<z.ZodString>;
3328
3427
  contentHash: z.ZodString;
@@ -3846,6 +3945,10 @@ export declare const zToolCallDetail: z.ZodObject<{
3846
3945
  export type ToolCallDetail = z.infer<typeof zToolCallDetail>;
3847
3946
  export declare const zTurnDetail: z.ZodObject<{
3848
3947
  agentName: z.ZodOptional<z.ZodString>;
3948
+ command: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3949
+ args: z.ZodOptional<z.ZodString>;
3950
+ name: z.ZodString;
3951
+ }, z.core.$strip>>>;
3849
3952
  content: z.ZodString;
3850
3953
  depth: z.ZodInt;
3851
3954
  entryType: z.ZodOptional<z.ZodEnum<{
@@ -4057,6 +4160,10 @@ export declare const zSessionDetailPayload: z.ZodObject<{
4057
4160
  turnCount: z.ZodInt;
4058
4161
  turns: z.ZodNullable<z.ZodArray<z.ZodObject<{
4059
4162
  agentName: z.ZodOptional<z.ZodString>;
4163
+ command: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4164
+ args: z.ZodOptional<z.ZodString>;
4165
+ name: z.ZodString;
4166
+ }, z.core.$strip>>>;
4060
4167
  content: z.ZodString;
4061
4168
  depth: z.ZodInt;
4062
4169
  entryType: z.ZodOptional<z.ZodEnum<{
@@ -4275,6 +4382,10 @@ export declare const zTranscriptContent: z.ZodObject<{
4275
4382
  turnCount: z.ZodInt;
4276
4383
  turns: z.ZodNullable<z.ZodArray<z.ZodObject<{
4277
4384
  agentName: z.ZodOptional<z.ZodString>;
4385
+ command: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4386
+ args: z.ZodOptional<z.ZodString>;
4387
+ name: z.ZodString;
4388
+ }, z.core.$strip>>>;
4278
4389
  content: z.ZodString;
4279
4390
  depth: z.ZodInt;
4280
4391
  entryType: z.ZodOptional<z.ZodEnum<{
@@ -4636,6 +4747,13 @@ export declare const zVillageErrorResponse: z.ZodObject<{
4636
4747
  error: z.ZodString;
4637
4748
  }, z.core.$strip>;
4638
4749
  export type VillageErrorResponse = z.infer<typeof zVillageErrorResponse>;
4750
+ /**
4751
+ * GitHub Webhook Payload
4752
+ *
4753
+ * GitHub event payload forwarded verbatim; validated by the X-Hub-Signature-256 HMAC over the raw body, never by shape
4754
+ */
4755
+ export declare const zVillageGitHubWebhookPayload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4756
+ export type VillageGitHubWebhookPayload = z.infer<typeof zVillageGitHubWebhookPayload>;
4639
4757
  /**
4640
4758
  * Village Group Acceptance Mode
4641
4759
  *
@@ -4752,6 +4870,61 @@ export declare const zVillageProjectNameSource: z.ZodEnum<{
4752
4870
  privacy: "privacy";
4753
4871
  }>;
4754
4872
  export type VillageProjectNameSource = z.infer<typeof zVillageProjectNameSource>;
4873
+ /**
4874
+ * Village Prompts Check Mode
4875
+ *
4876
+ * Check-run conclusion policy for a collective's linked repositories when no prompts are attached
4877
+ */
4878
+ export declare const zVillagePromptsCheckMode: z.ZodEnum<{
4879
+ required: "required";
4880
+ informational: "informational";
4881
+ }>;
4882
+ export type VillagePromptsCheckMode = z.infer<typeof zVillagePromptsCheckMode>;
4883
+ /**
4884
+ * Village Pull Request Attachment State
4885
+ *
4886
+ * Current lifecycle state of a pull request's prompt attachment
4887
+ */
4888
+ export declare const zVillagePullRequestAttachmentState: z.ZodEnum<{
4889
+ waiting: "waiting";
4890
+ preview: "preview";
4891
+ requested: "requested";
4892
+ attached: "attached";
4893
+ detached: "detached";
4894
+ }>;
4895
+ export type VillagePullRequestAttachmentState = z.infer<typeof zVillagePullRequestAttachmentState>;
4896
+ export declare const zVillagePromptRequest: z.ZodObject<{
4897
+ name: z.ZodString;
4898
+ number: z.ZodInt;
4899
+ owner: z.ZodString;
4900
+ remote: z.ZodString;
4901
+ requested_at: z.ZodISODateTime;
4902
+ state: z.ZodEnum<{
4903
+ waiting: "waiting";
4904
+ preview: "preview";
4905
+ requested: "requested";
4906
+ attached: "attached";
4907
+ detached: "detached";
4908
+ }>;
4909
+ }, z.core.$strip>;
4910
+ export type VillagePromptRequest = z.infer<typeof zVillagePromptRequest>;
4911
+ export declare const zVillagePromptRequestsResponse: z.ZodObject<{
4912
+ requests: z.ZodArray<z.ZodObject<{
4913
+ name: z.ZodString;
4914
+ number: z.ZodInt;
4915
+ owner: z.ZodString;
4916
+ remote: z.ZodString;
4917
+ requested_at: z.ZodISODateTime;
4918
+ state: z.ZodEnum<{
4919
+ waiting: "waiting";
4920
+ preview: "preview";
4921
+ requested: "requested";
4922
+ attached: "attached";
4923
+ detached: "detached";
4924
+ }>;
4925
+ }, z.core.$strip>>;
4926
+ }, z.core.$strip>;
4927
+ export type VillagePromptRequestsResponse = z.infer<typeof zVillagePromptRequestsResponse>;
4755
4928
  export declare const zVillageRemoveGroupMemberResponse: z.ZodObject<{
4756
4929
  retracted: z.ZodBoolean;
4757
4930
  status: z.ZodString;
@@ -4913,6 +5086,18 @@ export declare const zVillageContributableTranscript: z.ZodObject<{
4913
5086
  }>;
4914
5087
  }, z.core.$strip>;
4915
5088
  export type VillageContributableTranscript = z.infer<typeof zVillageContributableTranscript>;
5089
+ export declare const zVillagePullRequestAttachedTranscript: z.ZodObject<{
5090
+ position: z.ZodInt;
5091
+ previous_visibility: z.ZodEnum<{
5092
+ shared: "shared";
5093
+ private: "private";
5094
+ public: "public";
5095
+ }>;
5096
+ session_start: z.ZodNullable<z.ZodISODateTime>;
5097
+ title: z.ZodNullable<z.ZodString>;
5098
+ transcript_id: z.ZodUUID;
5099
+ }, z.core.$strip>;
5100
+ export type VillagePullRequestAttachedTranscript = z.infer<typeof zVillagePullRequestAttachedTranscript>;
4916
5101
  /**
4917
5102
  * Village UUID
4918
5103
  *
@@ -5030,6 +5215,11 @@ export declare const zVillageGroup: z.ZodObject<{
5030
5215
  id: z.ZodUUID;
5031
5216
  linked_github_org: z.ZodNullable<z.ZodString>;
5032
5217
  name: z.ZodString;
5218
+ post_prompts_check: z.ZodBoolean;
5219
+ prompts_check_mode: z.ZodEnum<{
5220
+ required: "required";
5221
+ informational: "informational";
5222
+ }>;
5033
5223
  transcript_deletion_policy: z.ZodEnum<{
5034
5224
  user_choice: "user_choice";
5035
5225
  mandatory: "mandatory";
@@ -5181,6 +5371,11 @@ export declare const zVillageGroupDetailResponse: z.ZodObject<{
5181
5371
  id: z.ZodUUID;
5182
5372
  linked_github_org: z.ZodNullable<z.ZodString>;
5183
5373
  name: z.ZodString;
5374
+ post_prompts_check: z.ZodBoolean;
5375
+ prompts_check_mode: z.ZodEnum<{
5376
+ required: "required";
5377
+ informational: "informational";
5378
+ }>;
5184
5379
  transcript_deletion_policy: z.ZodEnum<{
5185
5380
  user_choice: "user_choice";
5186
5381
  mandatory: "mandatory";
@@ -5391,6 +5586,108 @@ export declare const zVillagePublicGroup: z.ZodObject<{
5391
5586
  transcript_count: z.ZodInt;
5392
5587
  }, z.core.$strip>;
5393
5588
  export type VillagePublicGroup = z.infer<typeof zVillagePublicGroup>;
5589
+ export declare const zVillagePullRequestAttachment: z.ZodObject<{
5590
+ author_user_id: z.ZodNullable<z.ZodUUID>;
5591
+ check_run_id: z.ZodNullable<z.ZodInt>;
5592
+ comment_id: z.ZodNullable<z.ZodInt>;
5593
+ confirmed_at: z.ZodNullable<z.ZodISODateTime>;
5594
+ created_at: z.ZodISODateTime;
5595
+ detached_at: z.ZodNullable<z.ZodISODateTime>;
5596
+ head_sha: z.ZodString;
5597
+ id: z.ZodUUID;
5598
+ is_private_repository: z.ZodBoolean;
5599
+ name: z.ZodString;
5600
+ number: z.ZodInt;
5601
+ owner: z.ZodString;
5602
+ requested_by_github_id: z.ZodNullable<z.ZodInt>;
5603
+ state: z.ZodEnum<{
5604
+ waiting: "waiting";
5605
+ preview: "preview";
5606
+ requested: "requested";
5607
+ attached: "attached";
5608
+ detached: "detached";
5609
+ }>;
5610
+ updated_at: z.ZodISODateTime;
5611
+ }, z.core.$strip>;
5612
+ export type VillagePullRequestAttachment = z.infer<typeof zVillagePullRequestAttachment>;
5613
+ export declare const zVillagePullRequestAttachmentResponse: z.ZodObject<{
5614
+ attachment: z.ZodObject<{
5615
+ author_user_id: z.ZodNullable<z.ZodUUID>;
5616
+ check_run_id: z.ZodNullable<z.ZodInt>;
5617
+ comment_id: z.ZodNullable<z.ZodInt>;
5618
+ confirmed_at: z.ZodNullable<z.ZodISODateTime>;
5619
+ created_at: z.ZodISODateTime;
5620
+ detached_at: z.ZodNullable<z.ZodISODateTime>;
5621
+ head_sha: z.ZodString;
5622
+ id: z.ZodUUID;
5623
+ is_private_repository: z.ZodBoolean;
5624
+ name: z.ZodString;
5625
+ number: z.ZodInt;
5626
+ owner: z.ZodString;
5627
+ requested_by_github_id: z.ZodNullable<z.ZodInt>;
5628
+ state: z.ZodEnum<{
5629
+ waiting: "waiting";
5630
+ preview: "preview";
5631
+ requested: "requested";
5632
+ attached: "attached";
5633
+ detached: "detached";
5634
+ }>;
5635
+ updated_at: z.ZodISODateTime;
5636
+ }, z.core.$strip>;
5637
+ digest: z.ZodNullable<z.ZodObject<{
5638
+ header: z.ZodObject<{
5639
+ commitsCovered: z.ZodInt;
5640
+ commitsTotal: z.ZodInt;
5641
+ harness: z.ZodEnum<{
5642
+ strike: "strike";
5643
+ cursor: "cursor";
5644
+ "claude-code": "claude-code";
5645
+ "gemini-cli": "gemini-cli";
5646
+ codex: "codex";
5647
+ opencode: "opencode";
5648
+ antigravity: "antigravity";
5649
+ pi: "pi";
5650
+ }>;
5651
+ promptCount: z.ZodInt;
5652
+ redactionLevel: z.ZodString;
5653
+ sessionCount: z.ZodInt;
5654
+ villageUrl: z.ZodString;
5655
+ }, z.core.$strip>;
5656
+ items: z.ZodArray<z.ZodObject<{
5657
+ commitCount: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
5658
+ commitSha: z.ZodOptional<z.ZodString>;
5659
+ kind: z.ZodEnum<{
5660
+ session: "session";
5661
+ prompt: "prompt";
5662
+ skill: "skill";
5663
+ commit: "commit";
5664
+ }>;
5665
+ ordinal: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
5666
+ promptCount: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
5667
+ text: z.ZodString;
5668
+ timestamp: z.ZodISODateTime;
5669
+ transcriptId: z.ZodUUID;
5670
+ turnIndex: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
5671
+ }, z.core.$strip>>;
5672
+ skills: z.ZodArray<z.ZodObject<{
5673
+ invocationCount: z.ZodInt;
5674
+ name: z.ZodString;
5675
+ }, z.core.$strip>>;
5676
+ }, z.core.$strip>>;
5677
+ transcripts: z.ZodArray<z.ZodObject<{
5678
+ position: z.ZodInt;
5679
+ previous_visibility: z.ZodEnum<{
5680
+ shared: "shared";
5681
+ private: "private";
5682
+ public: "public";
5683
+ }>;
5684
+ session_start: z.ZodNullable<z.ZodISODateTime>;
5685
+ title: z.ZodNullable<z.ZodString>;
5686
+ transcript_id: z.ZodUUID;
5687
+ }, z.core.$strip>>;
5688
+ viewer_is_author: z.ZodBoolean;
5689
+ }, z.core.$strip>;
5690
+ export type VillagePullRequestAttachmentResponse = z.infer<typeof zVillagePullRequestAttachmentResponse>;
5394
5691
  export declare const zVillageShareTranscriptRequest: z.ZodObject<{
5395
5692
  group_ids: z.ZodArray<z.ZodUUID>;
5396
5693
  }, z.core.$strip>;
@@ -5527,12 +5824,21 @@ export declare const zVillageUpdateGroupRequest: z.ZodObject<{
5527
5824
  display_members: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5528
5825
  linked_github_org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5529
5826
  name: z.ZodOptional<z.ZodString>;
5827
+ post_prompts_check: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5828
+ prompts_check_mode: z.ZodOptional<z.ZodEnum<{
5829
+ required: "required";
5830
+ informational: "informational";
5831
+ }>>;
5530
5832
  transcript_deletion_policy: z.ZodOptional<z.ZodEnum<{
5531
5833
  user_choice: "user_choice";
5532
5834
  mandatory: "mandatory";
5533
5835
  }>>;
5534
5836
  }, z.core.$strip>;
5535
5837
  export type VillageUpdateGroupRequest = z.infer<typeof zVillageUpdateGroupRequest>;
5838
+ export declare const zVillageUpdateUserSettingsRequest: z.ZodObject<{
5839
+ preview_before_attach: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5840
+ }, z.core.$strip>;
5841
+ export type VillageUpdateUserSettingsRequest = z.infer<typeof zVillageUpdateUserSettingsRequest>;
5536
5842
  export declare const zVillageUserGroup: z.ZodObject<{
5537
5843
  acceptance_mode: z.ZodEnum<{
5538
5844
  open: "open";
@@ -5594,6 +5900,10 @@ export declare const zVillageUserGroupShare: z.ZodObject<{
5594
5900
  }>;
5595
5901
  }, z.core.$strip>;
5596
5902
  export type VillageUserGroupShare = z.infer<typeof zVillageUserGroupShare>;
5903
+ export declare const zVillageUserSettings: z.ZodObject<{
5904
+ preview_before_attach: z.ZodBoolean;
5905
+ }, z.core.$strip>;
5906
+ export type VillageUserSettings = z.infer<typeof zVillageUserSettings>;
5597
5907
  export declare const zVillageVisibleGroup: z.ZodObject<{
5598
5908
  acceptance_mode: z.ZodEnum<{
5599
5909
  open: "open";
@@ -320,6 +320,10 @@ export const zChildSessionRef = z.object({
320
320
  project: z.string().optional(),
321
321
  startTime: z.iso.datetime()
322
322
  });
323
+ export const zCommandInvocation = z.object({
324
+ args: z.string().optional(),
325
+ name: z.string()
326
+ });
323
327
  export const zCommitInfo = z.object({
324
328
  authorEmail: z.string(),
325
329
  authorName: z.string(),
@@ -427,6 +431,17 @@ export const zDiffHunk = z.object({
427
431
  sessionId: z.string().optional(),
428
432
  sessionTitle: z.string().optional()
429
433
  });
434
+ /**
435
+ * Digest Item Kind
436
+ *
437
+ * Kind of one item in the prompt digest chain: a session boundary, a human prompt, a skill invocation marker, or a commit anchor
438
+ */
439
+ export const zDigestItemKind = z.enum([
440
+ 'session',
441
+ 'prompt',
442
+ 'skill',
443
+ 'commit'
444
+ ]);
430
445
  /**
431
446
  * Edge Violation Kind
432
447
  *
@@ -730,6 +745,19 @@ export const zProjectSummary = z.object({
730
745
  export const zProjectSummariesPayload = z.object({
731
746
  projects: z.array(zProjectSummary).nullable()
732
747
  });
748
+ export const zPromptDigestHeader = z.object({
749
+ commitsCovered: z.int(),
750
+ commitsTotal: z.int(),
751
+ harness: zHarness,
752
+ promptCount: z.int(),
753
+ redactionLevel: z.string(),
754
+ sessionCount: z.int(),
755
+ villageUrl: z.string()
756
+ });
757
+ export const zPromptDigestSkill = z.object({
758
+ invocationCount: z.int(),
759
+ name: z.string()
760
+ });
733
761
  export const zProvenance = z.object({
734
762
  details: z.record(z.string(), z.string()).optional(),
735
763
  function: z.string().optional(),
@@ -1709,6 +1737,22 @@ export const zCanonicalPublishOperation = z.object({
1709
1737
  * Village-side transcript identifier (canonical lowercase-hex UUID)
1710
1738
  */
1711
1739
  export const zTranscriptID = z.uuid().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/);
1740
+ export const zPromptDigestItem = z.object({
1741
+ commitCount: z.int().nullish(),
1742
+ commitSha: z.string().optional(),
1743
+ kind: zDigestItemKind,
1744
+ ordinal: z.int().nullish(),
1745
+ promptCount: z.int().nullish(),
1746
+ text: z.string(),
1747
+ timestamp: z.iso.datetime(),
1748
+ transcriptId: zTranscriptID,
1749
+ turnIndex: z.int().nullish()
1750
+ });
1751
+ export const zPromptDigest = z.object({
1752
+ header: zPromptDigestHeader,
1753
+ items: z.array(zPromptDigestItem),
1754
+ skills: z.array(zPromptDigestSkill)
1755
+ });
1712
1756
  export const zPullSkipGateItem = z.object({
1713
1757
  annotationHashes: z.array(z.string()),
1714
1758
  contentHash: z.string(),
@@ -1896,6 +1940,7 @@ export const zToolCallDetail = z.object({
1896
1940
  });
1897
1941
  export const zTurnDetail = z.object({
1898
1942
  agentName: z.string().optional(),
1943
+ command: zCommandInvocation.nullish(),
1899
1944
  content: z.string(),
1900
1945
  depth: z.int(),
1901
1946
  entryType: zEntryType.optional(),
@@ -2012,6 +2057,12 @@ export const zVillageBatchShareResponse = z.object({
2012
2057
  export const zVillageErrorResponse = z.object({
2013
2058
  error: z.string()
2014
2059
  });
2060
+ /**
2061
+ * GitHub Webhook Payload
2062
+ *
2063
+ * GitHub event payload forwarded verbatim; validated by the X-Hub-Signature-256 HMAC over the raw body, never by shape
2064
+ */
2065
+ export const zVillageGitHubWebhookPayload = z.record(z.string(), z.unknown());
2015
2066
  /**
2016
2067
  * Village Group Acceptance Mode
2017
2068
  *
@@ -2100,6 +2151,35 @@ export const zVillageProjectNameSource = z.enum([
2100
2151
  'path',
2101
2152
  'privacy'
2102
2153
  ]);
2154
+ /**
2155
+ * Village Prompts Check Mode
2156
+ *
2157
+ * Check-run conclusion policy for a collective's linked repositories when no prompts are attached
2158
+ */
2159
+ export const zVillagePromptsCheckMode = z.enum(['informational', 'required']);
2160
+ /**
2161
+ * Village Pull Request Attachment State
2162
+ *
2163
+ * Current lifecycle state of a pull request's prompt attachment
2164
+ */
2165
+ export const zVillagePullRequestAttachmentState = z.enum([
2166
+ 'requested',
2167
+ 'waiting',
2168
+ 'preview',
2169
+ 'attached',
2170
+ 'detached'
2171
+ ]);
2172
+ export const zVillagePromptRequest = z.object({
2173
+ name: z.string(),
2174
+ number: z.int(),
2175
+ owner: z.string(),
2176
+ remote: z.string(),
2177
+ requested_at: z.iso.datetime(),
2178
+ state: zVillagePullRequestAttachmentState
2179
+ });
2180
+ export const zVillagePromptRequestsResponse = z.object({
2181
+ requests: z.array(zVillagePromptRequest)
2182
+ });
2103
2183
  export const zVillageRemoveGroupMemberResponse = z.object({
2104
2184
  retracted: z.boolean(),
2105
2185
  status: z.string()
@@ -2200,6 +2280,13 @@ export const zVillageContributableTranscript = z.object({
2200
2280
  title: z.string().nullable(),
2201
2281
  visibility: zVillageTranscriptVisibility
2202
2282
  });
2283
+ export const zVillagePullRequestAttachedTranscript = z.object({
2284
+ position: z.int(),
2285
+ previous_visibility: zVillageTranscriptVisibility,
2286
+ session_start: z.iso.datetime().nullable(),
2287
+ title: z.string().nullable(),
2288
+ transcript_id: zTranscriptID
2289
+ });
2203
2290
  /**
2204
2291
  * Village UUID
2205
2292
  *
@@ -2252,6 +2339,8 @@ export const zVillageGroup = z.object({
2252
2339
  id: zVillageUUID,
2253
2340
  linked_github_org: z.string().nullable(),
2254
2341
  name: z.string(),
2342
+ post_prompts_check: z.boolean(),
2343
+ prompts_check_mode: zVillagePromptsCheckMode,
2255
2344
  transcript_deletion_policy: zVillageTranscriptDeletionPolicy,
2256
2345
  updated_at: z.iso.datetime()
2257
2346
  });
@@ -2390,6 +2479,29 @@ export const zVillagePublicGroup = z.object({
2390
2479
  name: z.string(),
2391
2480
  transcript_count: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
2392
2481
  });
2482
+ export const zVillagePullRequestAttachment = z.object({
2483
+ author_user_id: zVillageUUID.nullable(),
2484
+ check_run_id: z.int().nullable(),
2485
+ comment_id: z.int().nullable(),
2486
+ confirmed_at: z.iso.datetime().nullable(),
2487
+ created_at: z.iso.datetime(),
2488
+ detached_at: z.iso.datetime().nullable(),
2489
+ head_sha: z.string(),
2490
+ id: zVillageUUID,
2491
+ is_private_repository: z.boolean(),
2492
+ name: z.string(),
2493
+ number: z.int(),
2494
+ owner: z.string(),
2495
+ requested_by_github_id: z.int().nullable(),
2496
+ state: zVillagePullRequestAttachmentState,
2497
+ updated_at: z.iso.datetime()
2498
+ });
2499
+ export const zVillagePullRequestAttachmentResponse = z.object({
2500
+ attachment: zVillagePullRequestAttachment,
2501
+ digest: zPromptDigest.nullable(),
2502
+ transcripts: z.array(zVillagePullRequestAttachedTranscript),
2503
+ viewer_is_author: z.boolean()
2504
+ });
2393
2505
  export const zVillageShareTranscriptRequest = z.object({
2394
2506
  group_ids: z.array(zVillageUUID)
2395
2507
  });
@@ -2482,8 +2594,13 @@ export const zVillageUpdateGroupRequest = z.object({
2482
2594
  display_members: z.boolean().nullish(),
2483
2595
  linked_github_org: z.string().nullish(),
2484
2596
  name: z.string().optional(),
2597
+ post_prompts_check: z.boolean().nullish(),
2598
+ prompts_check_mode: zVillagePromptsCheckMode.optional(),
2485
2599
  transcript_deletion_policy: zVillageTranscriptDeletionPolicy.optional()
2486
2600
  });
2601
+ export const zVillageUpdateUserSettingsRequest = z.object({
2602
+ preview_before_attach: z.boolean().nullish()
2603
+ });
2487
2604
  export const zVillageUserGroup = z.object({
2488
2605
  acceptance_mode: zVillageGroupAcceptanceMode,
2489
2606
  created_at: z.iso.datetime(),
@@ -2517,6 +2634,9 @@ export const zVillageUserGroupShare = z.object({
2517
2634
  turn_count: z.int().nullable(),
2518
2635
  visibility: zVillageTranscriptVisibility
2519
2636
  });
2637
+ export const zVillageUserSettings = z.object({
2638
+ preview_before_attach: z.boolean()
2639
+ });
2520
2640
  export const zVillageVisibleGroup = z.object({
2521
2641
  acceptance_mode: zVillageGroupAcceptanceMode,
2522
2642
  created_at: z.iso.datetime(),
@@ -58,6 +58,9 @@ import { type UsageCompleteness as UsageCompletenessContract } from "./contract/
58
58
  import { type NativeMetadataKind as NativeMetadataKindContract } from "./contract/zod.gen.js";
59
59
  import { type NativeMetadataSourceType as NativeMetadataSourceTypeContract } from "./contract/zod.gen.js";
60
60
  import { type NativePiMessageRole as NativePiMessageRoleContract } from "./contract/zod.gen.js";
61
+ import { type DigestItemKind as DigestItemKindContract } from "./contract/zod.gen.js";
62
+ import { type VillagePullRequestAttachmentState as VillagePullRequestAttachmentStateContract } from "./contract/zod.gen.js";
63
+ import { type VillagePromptsCheckMode as VillagePromptsCheckModeContract } from "./contract/zod.gen.js";
61
64
  export type PublishOperationKind = PublishOperationKindContract;
62
65
  export declare const PublishOperationKind: Readonly<{
63
66
  readonly Preserve: "replace" | "append" | "preserve";
@@ -608,3 +611,29 @@ export declare const NativePiMessageRole: Readonly<{
608
611
  }>;
609
612
  export declare const AllNativePiMessageRoles: readonly NativePiMessageRole[];
610
613
  export declare function isNativePiMessageRole(value: unknown): value is NativePiMessageRole;
614
+ export type DigestItemKind = DigestItemKindContract;
615
+ export declare const DigestItemKind: Readonly<{
616
+ readonly Session: "session" | "prompt" | "skill" | "commit";
617
+ readonly Prompt: "session" | "prompt" | "skill" | "commit";
618
+ readonly Skill: "session" | "prompt" | "skill" | "commit";
619
+ readonly Commit: "session" | "prompt" | "skill" | "commit";
620
+ }>;
621
+ export declare const AllDigestItemKinds: readonly DigestItemKind[];
622
+ export declare function isDigestItemKind(value: unknown): value is DigestItemKind;
623
+ export type VillagePullRequestAttachmentState = VillagePullRequestAttachmentStateContract;
624
+ export declare const VillagePullRequestAttachmentState: Readonly<{
625
+ readonly Requested: "waiting" | "preview" | "requested" | "attached" | "detached";
626
+ readonly Waiting: "waiting" | "preview" | "requested" | "attached" | "detached";
627
+ readonly Preview: "waiting" | "preview" | "requested" | "attached" | "detached";
628
+ readonly Attached: "waiting" | "preview" | "requested" | "attached" | "detached";
629
+ readonly Detached: "waiting" | "preview" | "requested" | "attached" | "detached";
630
+ }>;
631
+ export declare const AllVillagePullRequestAttachmentStates: readonly VillagePullRequestAttachmentState[];
632
+ export declare function isVillagePullRequestAttachmentState(value: unknown): value is VillagePullRequestAttachmentState;
633
+ export type VillagePromptsCheckMode = VillagePromptsCheckModeContract;
634
+ export declare const VillagePromptsCheckMode: Readonly<{
635
+ readonly Informational: "required" | "informational";
636
+ readonly Required: "required" | "informational";
637
+ }>;
638
+ export declare const AllVillagePromptsCheckModes: readonly VillagePromptsCheckMode[];
639
+ export declare function isVillagePromptsCheckMode(value: unknown): value is VillagePromptsCheckMode;