@peasant-labs/schema 0.33.1 → 0.34.1

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.
@@ -2064,6 +2064,17 @@ export declare const zServerMessage: z.ZodObject<{
2064
2064
  version: z.ZodOptional<z.ZodString>;
2065
2065
  }, z.core.$strip>;
2066
2066
  export type ServerMessage = z.infer<typeof zServerMessage>;
2067
+ export declare const zSessionCommitsResponse: z.ZodObject<{
2068
+ commits: z.ZodArray<z.ZodObject<{
2069
+ authorEmail: z.ZodString;
2070
+ authorName: z.ZodString;
2071
+ authorTime: z.ZodCoercedBigInt<unknown>;
2072
+ commitTime: z.ZodCoercedBigInt<unknown>;
2073
+ hash: z.ZodString;
2074
+ message: z.ZodString;
2075
+ }, z.core.$strip>>;
2076
+ }, z.core.$strip>;
2077
+ export type SessionCommitsResponse = z.infer<typeof zSessionCommitsResponse>;
2067
2078
  /**
2068
2079
  * Session ID
2069
2080
  *
@@ -2366,6 +2377,24 @@ export declare const zQualityMetrics: z.ZodObject<{
2366
2377
  withinSessionReverts: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2367
2378
  }, z.core.$strip>;
2368
2379
  export type QualityMetrics = z.infer<typeof zQualityMetrics>;
2380
+ export declare const zSessionPullRequest: z.ZodObject<{
2381
+ number: z.ZodInt;
2382
+ owner: z.ZodString;
2383
+ repo: z.ZodString;
2384
+ source: z.ZodString;
2385
+ url: z.ZodString;
2386
+ }, z.core.$strip>;
2387
+ export type SessionPullRequest = z.infer<typeof zSessionPullRequest>;
2388
+ export declare const zSessionPullRequestsResponse: z.ZodObject<{
2389
+ pullRequests: z.ZodArray<z.ZodObject<{
2390
+ number: z.ZodInt;
2391
+ owner: z.ZodString;
2392
+ repo: z.ZodString;
2393
+ source: z.ZodString;
2394
+ url: z.ZodString;
2395
+ }, z.core.$strip>>;
2396
+ }, z.core.$strip>;
2397
+ export type SessionPullRequestsResponse = z.infer<typeof zSessionPullRequestsResponse>;
2369
2398
  /**
2370
2399
  * Session Purpose
2371
2400
  *
@@ -2433,6 +2462,23 @@ export declare const zSessionStats: z.ZodObject<{
2433
2462
  turnCount: z.ZodInt;
2434
2463
  }, z.core.$strip>;
2435
2464
  export type SessionStats = z.infer<typeof zSessionStats>;
2465
+ /**
2466
+ * Session Teammate Evidence
2467
+ *
2468
+ * Record a local teammate identity rests on; only a native dynamic workflow spawn is recorded
2469
+ */
2470
+ export declare const zSessionTeammateEvidence: z.ZodEnum<{
2471
+ native_dynamic_workflow: "native_dynamic_workflow";
2472
+ }>;
2473
+ export type SessionTeammateEvidence = z.infer<typeof zSessionTeammateEvidence>;
2474
+ export declare const zSessionTeammate: z.ZodObject<{
2475
+ evidence: z.ZodEnum<{
2476
+ native_dynamic_workflow: "native_dynamic_workflow";
2477
+ }>;
2478
+ name: z.ZodString;
2479
+ team: z.ZodString;
2480
+ }, z.core.$strip>;
2481
+ export type SessionTeammate = z.infer<typeof zSessionTeammate>;
2436
2482
  export declare const zShutdownResponse: z.ZodObject<{
2437
2483
  status: z.ZodString;
2438
2484
  }, z.core.$strip>;
@@ -2636,6 +2682,13 @@ export declare const zSessionSummary: z.ZodObject<{
2636
2682
  agent: "agent";
2637
2683
  }>>;
2638
2684
  startTime: z.ZodISODateTime;
2685
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2686
+ evidence: z.ZodEnum<{
2687
+ native_dynamic_workflow: "native_dynamic_workflow";
2688
+ }>;
2689
+ name: z.ZodString;
2690
+ team: z.ZodString;
2691
+ }, z.core.$strip>>>;
2639
2692
  toolCallCount: z.ZodInt;
2640
2693
  totalTokens: z.ZodInt;
2641
2694
  turnCount: z.ZodInt;
@@ -2706,6 +2759,13 @@ export declare const zSessionsPayload: z.ZodObject<{
2706
2759
  agent: "agent";
2707
2760
  }>>;
2708
2761
  startTime: z.ZodISODateTime;
2762
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2763
+ evidence: z.ZodEnum<{
2764
+ native_dynamic_workflow: "native_dynamic_workflow";
2765
+ }>;
2766
+ name: z.ZodString;
2767
+ team: z.ZodString;
2768
+ }, z.core.$strip>>>;
2709
2769
  toolCallCount: z.ZodInt;
2710
2770
  totalTokens: z.ZodInt;
2711
2771
  turnCount: z.ZodInt;
@@ -3025,6 +3085,13 @@ export declare const zLocalSyncSummary: z.ZodObject<{
3025
3085
  held: "held";
3026
3086
  synced: "synced";
3027
3087
  }>;
3088
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3089
+ evidence: z.ZodEnum<{
3090
+ native_dynamic_workflow: "native_dynamic_workflow";
3091
+ }>;
3092
+ name: z.ZodString;
3093
+ team: z.ZodString;
3094
+ }, z.core.$strip>>>;
3028
3095
  totalTokens: z.ZodInt;
3029
3096
  turnCount: z.ZodInt;
3030
3097
  }, z.core.$strip>;
@@ -3103,6 +3170,13 @@ export declare const zLocalSessionRow: z.ZodObject<{
3103
3170
  agent: "agent";
3104
3171
  }>>;
3105
3172
  startTime: z.ZodISODateTime;
3173
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3174
+ evidence: z.ZodEnum<{
3175
+ native_dynamic_workflow: "native_dynamic_workflow";
3176
+ }>;
3177
+ name: z.ZodString;
3178
+ team: z.ZodString;
3179
+ }, z.core.$strip>>>;
3106
3180
  toolCallCount: z.ZodInt;
3107
3181
  totalTokens: z.ZodInt;
3108
3182
  turnCount: z.ZodInt;
@@ -3139,6 +3213,13 @@ export declare const zLocalSessionRow: z.ZodObject<{
3139
3213
  held: "held";
3140
3214
  synced: "synced";
3141
3215
  }>;
3216
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3217
+ evidence: z.ZodEnum<{
3218
+ native_dynamic_workflow: "native_dynamic_workflow";
3219
+ }>;
3220
+ name: z.ZodString;
3221
+ team: z.ZodString;
3222
+ }, z.core.$strip>>>;
3142
3223
  totalTokens: z.ZodInt;
3143
3224
  turnCount: z.ZodInt;
3144
3225
  }, z.core.$strip>>>;
@@ -3245,6 +3326,13 @@ export declare const zLocalSessionListItem: z.ZodObject<{
3245
3326
  agent: "agent";
3246
3327
  }>>;
3247
3328
  startTime: z.ZodISODateTime;
3329
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3330
+ evidence: z.ZodEnum<{
3331
+ native_dynamic_workflow: "native_dynamic_workflow";
3332
+ }>;
3333
+ name: z.ZodString;
3334
+ team: z.ZodString;
3335
+ }, z.core.$strip>>>;
3248
3336
  toolCallCount: z.ZodInt;
3249
3337
  totalTokens: z.ZodInt;
3250
3338
  turnCount: z.ZodInt;
@@ -3281,6 +3369,13 @@ export declare const zLocalSessionListItem: z.ZodObject<{
3281
3369
  held: "held";
3282
3370
  synced: "synced";
3283
3371
  }>;
3372
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3373
+ evidence: z.ZodEnum<{
3374
+ native_dynamic_workflow: "native_dynamic_workflow";
3375
+ }>;
3376
+ name: z.ZodString;
3377
+ team: z.ZodString;
3378
+ }, z.core.$strip>>>;
3284
3379
  totalTokens: z.ZodInt;
3285
3380
  turnCount: z.ZodInt;
3286
3381
  }, z.core.$strip>>>;
@@ -3390,6 +3485,13 @@ export declare const zLocalHelperMembersPayload: z.ZodObject<{
3390
3485
  agent: "agent";
3391
3486
  }>>;
3392
3487
  startTime: z.ZodISODateTime;
3488
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3489
+ evidence: z.ZodEnum<{
3490
+ native_dynamic_workflow: "native_dynamic_workflow";
3491
+ }>;
3492
+ name: z.ZodString;
3493
+ team: z.ZodString;
3494
+ }, z.core.$strip>>>;
3393
3495
  toolCallCount: z.ZodInt;
3394
3496
  totalTokens: z.ZodInt;
3395
3497
  turnCount: z.ZodInt;
@@ -3426,6 +3528,13 @@ export declare const zLocalHelperMembersPayload: z.ZodObject<{
3426
3528
  held: "held";
3427
3529
  synced: "synced";
3428
3530
  }>;
3531
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3532
+ evidence: z.ZodEnum<{
3533
+ native_dynamic_workflow: "native_dynamic_workflow";
3534
+ }>;
3535
+ name: z.ZodString;
3536
+ team: z.ZodString;
3537
+ }, z.core.$strip>>>;
3429
3538
  totalTokens: z.ZodInt;
3430
3539
  turnCount: z.ZodInt;
3431
3540
  }, z.core.$strip>>>;
@@ -3509,6 +3618,13 @@ export declare const zLocalHelperMembersPayload: z.ZodObject<{
3509
3618
  agent: "agent";
3510
3619
  }>>;
3511
3620
  startTime: z.ZodISODateTime;
3621
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3622
+ evidence: z.ZodEnum<{
3623
+ native_dynamic_workflow: "native_dynamic_workflow";
3624
+ }>;
3625
+ name: z.ZodString;
3626
+ team: z.ZodString;
3627
+ }, z.core.$strip>>>;
3512
3628
  toolCallCount: z.ZodInt;
3513
3629
  totalTokens: z.ZodInt;
3514
3630
  turnCount: z.ZodInt;
@@ -3545,6 +3661,13 @@ export declare const zLocalHelperMembersPayload: z.ZodObject<{
3545
3661
  held: "held";
3546
3662
  synced: "synced";
3547
3663
  }>;
3664
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3665
+ evidence: z.ZodEnum<{
3666
+ native_dynamic_workflow: "native_dynamic_workflow";
3667
+ }>;
3668
+ name: z.ZodString;
3669
+ team: z.ZodString;
3670
+ }, z.core.$strip>>>;
3548
3671
  totalTokens: z.ZodInt;
3549
3672
  turnCount: z.ZodInt;
3550
3673
  }, z.core.$strip>>>;
@@ -3657,6 +3780,13 @@ export declare const zLocalSessionListPayload: z.ZodObject<{
3657
3780
  agent: "agent";
3658
3781
  }>>;
3659
3782
  startTime: z.ZodISODateTime;
3783
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3784
+ evidence: z.ZodEnum<{
3785
+ native_dynamic_workflow: "native_dynamic_workflow";
3786
+ }>;
3787
+ name: z.ZodString;
3788
+ team: z.ZodString;
3789
+ }, z.core.$strip>>>;
3660
3790
  toolCallCount: z.ZodInt;
3661
3791
  totalTokens: z.ZodInt;
3662
3792
  turnCount: z.ZodInt;
@@ -3693,6 +3823,13 @@ export declare const zLocalSessionListPayload: z.ZodObject<{
3693
3823
  held: "held";
3694
3824
  synced: "synced";
3695
3825
  }>;
3826
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3827
+ evidence: z.ZodEnum<{
3828
+ native_dynamic_workflow: "native_dynamic_workflow";
3829
+ }>;
3830
+ name: z.ZodString;
3831
+ team: z.ZodString;
3832
+ }, z.core.$strip>>>;
3696
3833
  totalTokens: z.ZodInt;
3697
3834
  turnCount: z.ZodInt;
3698
3835
  }, z.core.$strip>>>;
@@ -3737,6 +3874,13 @@ export declare const zLocalSyncSessionsPayload: z.ZodObject<{
3737
3874
  held: "held";
3738
3875
  synced: "synced";
3739
3876
  }>;
3877
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3878
+ evidence: z.ZodEnum<{
3879
+ native_dynamic_workflow: "native_dynamic_workflow";
3880
+ }>;
3881
+ name: z.ZodString;
3882
+ team: z.ZodString;
3883
+ }, z.core.$strip>>>;
3740
3884
  totalTokens: z.ZodInt;
3741
3885
  turnCount: z.ZodInt;
3742
3886
  }, z.core.$strip>>;
@@ -8465,6 +8609,13 @@ export declare const zSessionDetailReadPayload: z.ZodObject<{
8465
8609
  source: z.ZodOptional<z.ZodString>;
8466
8610
  startTime: z.ZodOptional<z.ZodISODateTime>;
8467
8611
  status: z.ZodOptional<z.ZodString>;
8612
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
8613
+ evidence: z.ZodEnum<{
8614
+ native_dynamic_workflow: "native_dynamic_workflow";
8615
+ }>;
8616
+ name: z.ZodString;
8617
+ team: z.ZodString;
8618
+ }, z.core.$strip>>>;
8468
8619
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
8469
8620
  max: "max";
8470
8621
  high: "high";
@@ -9806,6 +9957,10 @@ export declare const zVillageCollectiveDataAccess: z.ZodEnum<{
9806
9957
  contributors: "contributors";
9807
9958
  }>;
9808
9959
  export type VillageCollectiveDataAccess = z.infer<typeof zVillageCollectiveDataAccess>;
9960
+ export declare const zVillageCollectiveInvitationRequest: z.ZodObject<{
9961
+ username: z.ZodString;
9962
+ }, z.core.$strip>;
9963
+ export type VillageCollectiveInvitationRequest = z.infer<typeof zVillageCollectiveInvitationRequest>;
9809
9964
  export declare const zVillageCollectiveMemberRoleRequest: z.ZodObject<{
9810
9965
  role: z.ZodEnum<{
9811
9966
  contributor: "contributor";
@@ -9949,6 +10104,11 @@ export declare const zVillageMetadataUserOrganization: z.ZodObject<{
9949
10104
  visible: z.ZodBoolean;
9950
10105
  }, z.core.$strip>;
9951
10106
  export type VillageMetadataUserOrganization = z.infer<typeof zVillageMetadataUserOrganization>;
10107
+ export declare const zVillageNotificationEmail: z.ZodObject<{
10108
+ address: z.ZodString;
10109
+ verified: z.ZodBoolean;
10110
+ }, z.core.$strip>;
10111
+ export type VillageNotificationEmail = z.infer<typeof zVillageNotificationEmail>;
9952
10112
  /**
9953
10113
  * Village Project Name Source
9954
10114
  *
@@ -10295,6 +10455,10 @@ export declare const zVillageReviewShareResponse: z.ZodObject<{
10295
10455
  }>;
10296
10456
  }, z.core.$strip>;
10297
10457
  export type VillageReviewShareResponse = z.infer<typeof zVillageReviewShareResponse>;
10458
+ export declare const zVillageSetNotificationEmailRequest: z.ZodObject<{
10459
+ address: z.ZodString;
10460
+ }, z.core.$strip>;
10461
+ export type VillageSetNotificationEmailRequest = z.infer<typeof zVillageSetNotificationEmailRequest>;
10298
10462
  /**
10299
10463
  * Village Share Event Actor
10300
10464
  *
@@ -12685,6 +12849,13 @@ export declare const zLocalSyncSessionRow: z.ZodObject<{
12685
12849
  held: "held";
12686
12850
  synced: "synced";
12687
12851
  }>;
12852
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
12853
+ evidence: z.ZodEnum<{
12854
+ native_dynamic_workflow: "native_dynamic_workflow";
12855
+ }>;
12856
+ name: z.ZodString;
12857
+ team: z.ZodString;
12858
+ }, z.core.$strip>>>;
12688
12859
  totalTokens: z.ZodInt;
12689
12860
  turnCount: z.ZodInt;
12690
12861
  }, z.core.$strip>;
@@ -12754,6 +12925,13 @@ export declare const zLocalSyncSessionPage: z.ZodObject<{
12754
12925
  held: "held";
12755
12926
  synced: "synced";
12756
12927
  }>;
12928
+ teammate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
12929
+ evidence: z.ZodEnum<{
12930
+ native_dynamic_workflow: "native_dynamic_workflow";
12931
+ }>;
12932
+ name: z.ZodString;
12933
+ team: z.ZodString;
12934
+ }, z.core.$strip>>>;
12757
12935
  totalTokens: z.ZodInt;
12758
12936
  turnCount: z.ZodInt;
12759
12937
  }, z.core.$strip>;
@@ -13270,6 +13448,52 @@ export declare const zVillageCollectiveDetailResponse: z.ZodObject<{
13270
13448
  }>;
13271
13449
  }, z.core.$strip>;
13272
13450
  export type VillageCollectiveDetailResponse = z.infer<typeof zVillageCollectiveDetailResponse>;
13451
+ export declare const zVillageCollectiveInvitationSent: z.ZodObject<{
13452
+ created_at: z.ZodISODateTime;
13453
+ expires_at: z.ZodISODateTime;
13454
+ id: z.ZodUUID;
13455
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13456
+ avatar_url: z.ZodNullable<z.ZodString>;
13457
+ display_name: z.ZodNullable<z.ZodString>;
13458
+ id: z.ZodUUID;
13459
+ kind: z.ZodLiteral<"profile">;
13460
+ username: z.ZodString;
13461
+ }, z.core.$strip>, z.ZodObject<{
13462
+ kind: z.ZodLiteral<"anonymous">;
13463
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13464
+ kind: z.ZodString;
13465
+ }, z.core.$strip>, z.ZodTransform<{
13466
+ kind: "anonymous";
13467
+ }, {
13468
+ kind: string;
13469
+ }>>]>;
13470
+ invited_username: z.ZodString;
13471
+ }, z.core.$strip>;
13472
+ export type VillageCollectiveInvitationSent = z.infer<typeof zVillageCollectiveInvitationSent>;
13473
+ export declare const zVillageCollectiveInvitationsSentResponse: z.ZodObject<{
13474
+ invitations: z.ZodArray<z.ZodObject<{
13475
+ created_at: z.ZodISODateTime;
13476
+ expires_at: z.ZodISODateTime;
13477
+ id: z.ZodUUID;
13478
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13479
+ avatar_url: z.ZodNullable<z.ZodString>;
13480
+ display_name: z.ZodNullable<z.ZodString>;
13481
+ id: z.ZodUUID;
13482
+ kind: z.ZodLiteral<"profile">;
13483
+ username: z.ZodString;
13484
+ }, z.core.$strip>, z.ZodObject<{
13485
+ kind: z.ZodLiteral<"anonymous">;
13486
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13487
+ kind: z.ZodString;
13488
+ }, z.core.$strip>, z.ZodTransform<{
13489
+ kind: "anonymous";
13490
+ }, {
13491
+ kind: string;
13492
+ }>>]>;
13493
+ invited_username: z.ZodString;
13494
+ }, z.core.$strip>>;
13495
+ }, z.core.$strip>;
13496
+ export type VillageCollectiveInvitationsSentResponse = z.infer<typeof zVillageCollectiveInvitationsSentResponse>;
13273
13497
  export declare const zVillageCollectiveSearchResult: z.ZodObject<{
13274
13498
  description: z.ZodNullable<z.ZodString>;
13275
13499
  id: z.ZodUUID;
@@ -13420,6 +13644,48 @@ export declare const zVillageEnrichedTranscriptShare: z.ZodObject<{
13420
13644
  transcript_id: z.ZodUUID;
13421
13645
  }, z.core.$strip>;
13422
13646
  export type VillageEnrichedTranscriptShare = z.infer<typeof zVillageEnrichedTranscriptShare>;
13647
+ export declare const zVillageInvitedCollective: z.ZodObject<{
13648
+ acceptance_mode: z.ZodEnum<{
13649
+ open: "open";
13650
+ verified_only: "verified_only";
13651
+ curated: "curated";
13652
+ }>;
13653
+ description: z.ZodNullable<z.ZodString>;
13654
+ id: z.ZodUUID;
13655
+ name: z.ZodString;
13656
+ }, z.core.$strip>;
13657
+ export type VillageInvitedCollective = z.infer<typeof zVillageInvitedCollective>;
13658
+ export declare const zVillageCollectiveInvitation: z.ZodObject<{
13659
+ collective: z.ZodObject<{
13660
+ acceptance_mode: z.ZodEnum<{
13661
+ open: "open";
13662
+ verified_only: "verified_only";
13663
+ curated: "curated";
13664
+ }>;
13665
+ description: z.ZodNullable<z.ZodString>;
13666
+ id: z.ZodUUID;
13667
+ name: z.ZodString;
13668
+ }, z.core.$strip>;
13669
+ created_at: z.ZodISODateTime;
13670
+ expires_at: z.ZodISODateTime;
13671
+ id: z.ZodUUID;
13672
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13673
+ avatar_url: z.ZodNullable<z.ZodString>;
13674
+ display_name: z.ZodNullable<z.ZodString>;
13675
+ id: z.ZodUUID;
13676
+ kind: z.ZodLiteral<"profile">;
13677
+ username: z.ZodString;
13678
+ }, z.core.$strip>, z.ZodObject<{
13679
+ kind: z.ZodLiteral<"anonymous">;
13680
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13681
+ kind: z.ZodString;
13682
+ }, z.core.$strip>, z.ZodTransform<{
13683
+ kind: "anonymous";
13684
+ }, {
13685
+ kind: string;
13686
+ }>>]>;
13687
+ }, z.core.$strip>;
13688
+ export type VillageCollectiveInvitation = z.infer<typeof zVillageCollectiveInvitation>;
13423
13689
  export declare const zVillageLinkedRepository: z.ZodObject<{
13424
13690
  created_at: z.ZodNullable<z.ZodISODateTime>;
13425
13691
  group_id: z.ZodUUID;
@@ -13474,6 +13740,39 @@ export declare const zVillageLinkedRepositoriesResponse: z.ZodObject<{
13474
13740
  }, z.core.$strip>>;
13475
13741
  }, z.core.$strip>;
13476
13742
  export type VillageLinkedRepositoriesResponse = z.infer<typeof zVillageLinkedRepositoriesResponse>;
13743
+ export declare const zVillageMyInvitationsResponse: z.ZodObject<{
13744
+ invitations: z.ZodArray<z.ZodObject<{
13745
+ collective: z.ZodObject<{
13746
+ acceptance_mode: z.ZodEnum<{
13747
+ open: "open";
13748
+ verified_only: "verified_only";
13749
+ curated: "curated";
13750
+ }>;
13751
+ description: z.ZodNullable<z.ZodString>;
13752
+ id: z.ZodUUID;
13753
+ name: z.ZodString;
13754
+ }, z.core.$strip>;
13755
+ created_at: z.ZodISODateTime;
13756
+ expires_at: z.ZodISODateTime;
13757
+ id: z.ZodUUID;
13758
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13759
+ avatar_url: z.ZodNullable<z.ZodString>;
13760
+ display_name: z.ZodNullable<z.ZodString>;
13761
+ id: z.ZodUUID;
13762
+ kind: z.ZodLiteral<"profile">;
13763
+ username: z.ZodString;
13764
+ }, z.core.$strip>, z.ZodObject<{
13765
+ kind: z.ZodLiteral<"anonymous">;
13766
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13767
+ kind: z.ZodString;
13768
+ }, z.core.$strip>, z.ZodTransform<{
13769
+ kind: "anonymous";
13770
+ }, {
13771
+ kind: string;
13772
+ }>>]>;
13773
+ }, z.core.$strip>>;
13774
+ }, z.core.$strip>;
13775
+ export type VillageMyInvitationsResponse = z.infer<typeof zVillageMyInvitationsResponse>;
13477
13776
  export declare const zVillageOrganizationCollective: z.ZodObject<{
13478
13777
  description: z.ZodNullable<z.ZodString>;
13479
13778
  id: z.ZodUUID;
@@ -14393,6 +14692,7 @@ export declare const zVillageUpdateCollectiveRequest: z.ZodObject<{
14393
14692
  export type VillageUpdateCollectiveRequest = z.infer<typeof zVillageUpdateCollectiveRequest>;
14394
14693
  export declare const zVillageUpdateUserSettingsRequest: z.ZodObject<{
14395
14694
  auto_attach_pull_requests: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
14695
+ email_invitations: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
14396
14696
  preview_before_attach: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
14397
14697
  }, z.core.$strip>;
14398
14698
  export type VillageUpdateUserSettingsRequest = z.infer<typeof zVillageUpdateUserSettingsRequest>;
@@ -19223,6 +19523,11 @@ export declare const zVillageGroupedContributableResponse: z.ZodObject<{
19223
19523
  export type VillageGroupedContributableResponse = z.infer<typeof zVillageGroupedContributableResponse>;
19224
19524
  export declare const zVillageUserSettings: z.ZodObject<{
19225
19525
  auto_attach_pull_requests: z.ZodBoolean;
19526
+ email_invitations: z.ZodBoolean;
19527
+ notification_email: z.ZodNullable<z.ZodObject<{
19528
+ address: z.ZodString;
19529
+ verified: z.ZodBoolean;
19530
+ }, z.core.$strip>>;
19226
19531
  preview_before_attach: z.ZodBoolean;
19227
19532
  }, z.core.$strip>;
19228
19533
  export type VillageUserSettings = z.infer<typeof zVillageUserSettings>;
@@ -19234,6 +19539,10 @@ export declare const zVillageUserStats: z.ZodObject<{
19234
19539
  total_turns: z.ZodCoercedBigInt<unknown>;
19235
19540
  }, z.core.$strip>;
19236
19541
  export type VillageUserStats = z.infer<typeof zVillageUserStats>;
19542
+ export declare const zVillageVerifyNotificationEmailRequest: z.ZodObject<{
19543
+ token: z.ZodString;
19544
+ }, z.core.$strip>;
19545
+ export type VillageVerifyNotificationEmailRequest = z.infer<typeof zVillageVerifyNotificationEmailRequest>;
19237
19546
  export declare const zVillageVisibleCollective: z.ZodObject<{
19238
19547
  acceptance_mode: z.ZodEnum<{
19239
19548
  open: "open";
@@ -1468,6 +1468,9 @@ export const zServerMessage = z.object({
1468
1468
  type: zMessageType,
1469
1469
  version: z.string().optional()
1470
1470
  });
1471
+ export const zSessionCommitsResponse = z.object({
1472
+ commits: z.array(zCommitInfo)
1473
+ });
1471
1474
  /**
1472
1475
  * Session ID
1473
1476
  *
@@ -1681,6 +1684,16 @@ export const zQualityMetrics = z.object({
1681
1684
  turnCount: z.int().nullish(),
1682
1685
  withinSessionReverts: z.int().nullish()
1683
1686
  });
1687
+ export const zSessionPullRequest = z.object({
1688
+ number: z.int().gte(1),
1689
+ owner: z.string().min(1),
1690
+ repo: z.string().min(1),
1691
+ source: z.string().min(1),
1692
+ url: z.string().min(1)
1693
+ });
1694
+ export const zSessionPullRequestsResponse = z.object({
1695
+ pullRequests: z.array(zSessionPullRequest)
1696
+ });
1684
1697
  /**
1685
1698
  * Session Purpose
1686
1699
  *
@@ -1735,6 +1748,24 @@ export const zSessionStats = z.object({
1735
1748
  toolCallCount: z.int(),
1736
1749
  turnCount: z.int()
1737
1750
  });
1751
+ /**
1752
+ * Session Teammate Evidence
1753
+ *
1754
+ * Record a local teammate identity rests on; only a native dynamic workflow spawn is recorded
1755
+ */
1756
+ export const zSessionTeammateEvidence = z.enum(['native_dynamic_workflow']);
1757
+ export const zSessionTeammate = z.object({
1758
+ evidence: zSessionTeammateEvidence,
1759
+ name: z.string().min(1).regex(/^[^\x00-\x1F\x7F-\x9F]*$/),
1760
+ team: z.string().min(1).regex(/^[^\x00-\x1F\x7F-\x9F]*$/)
1761
+ }).superRefine((value, context) => {
1762
+ const fail = (reason) => context.addIssue({ code: "custom", message: "schema.SessionTeammate during local teammate identity validation: " + reason });
1763
+ for (const entry of [["team", value.team], ["name", value.name]]) {
1764
+ const codePoints = [...entry[1]].length;
1765
+ if (codePoints > 256)
1766
+ fail(entry[0] + " is " + codePoints + " Unicode code points, over the 256-code-point bound that Go and the published JSON Schema enforce; shorten the recorded " + entry[0] + " at the producing boundary rather than truncating here");
1767
+ }
1768
+ });
1738
1769
  export const zShutdownResponse = z.object({
1739
1770
  status: z.string()
1740
1771
  });
@@ -1791,6 +1822,7 @@ export const zSessionSummary = z.object({
1791
1822
  rootSessionId: zSessionID.nullish(),
1792
1823
  sessionOrigin: zSessionOrigin.optional(),
1793
1824
  startTime: z.iso.datetime(),
1825
+ teammate: zSessionTeammate.nullish(),
1794
1826
  toolCallCount: z.int(),
1795
1827
  totalTokens: z.int(),
1796
1828
  turnCount: z.int()
@@ -1959,6 +1991,7 @@ export const zLocalSyncSummary = z.object({
1959
1991
  projectName: z.string(),
1960
1992
  startTime: z.string(),
1961
1993
  syncStatus: zSyncStatus,
1994
+ teammate: zSessionTeammate.nullish(),
1962
1995
  totalTokens: z.int(),
1963
1996
  turnCount: z.int()
1964
1997
  });
@@ -1976,6 +2009,13 @@ export const zLocalSessionRow = z.object({
1976
2009
  const s = value.session, v = value.sync;
1977
2010
  if (v.id !== s.id || v.harness !== s.harness || v.projectName !== s.project || v.projectHash !== s.projectHash || v.totalTokens !== s.totalTokens || v.turnCount !== s.turnCount || v.inputSubmissionCount !== s.inputSubmissionCount || (v.parentSessionId ?? undefined) !== (s.parentSessionId ?? undefined) || (v.parentUnresolved ?? undefined) !== (s.parentUnresolved ?? undefined))
1978
2011
  fail("sync identity, parent, or count mirrors disagree; derive both from the same row");
2012
+ const sameTeammate = (left, right) => {
2013
+ if (left == null || right == null)
2014
+ return left == null && right == null;
2015
+ return left.team === right.team && left.name === right.name && left.evidence === right.evidence;
2016
+ };
2017
+ if (!sameTeammate(s.teammate, v.teammate))
2018
+ fail("sync teammate disagrees with the session teammate; the list and the sync chooser would show different identities for one transcript, so derive both from the same evidence read");
1979
2019
  }
1980
2020
  if (value.matches?.some(match => match.sessionId !== value.session.id))
1981
2021
  fail("search match belongs to another session; retain only this transcript's evidence");
@@ -2846,6 +2886,7 @@ export const zSessionDetailReadPayload = z.object({
2846
2886
  source: z.string().optional(),
2847
2887
  startTime: z.iso.datetime().optional(),
2848
2888
  status: z.string().optional(),
2889
+ teammate: zSessionTeammate.nullish(),
2849
2890
  thinkingLevel: zThinkingLevel.optional(),
2850
2891
  thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
2851
2892
  thinkingLevelRaw: zThinkingLevelRaw.optional(),
@@ -2942,6 +2983,9 @@ export const zVillageCollectiveDataAccess = z.enum([
2942
2983
  'contributors',
2943
2984
  'public'
2944
2985
  ]);
2986
+ export const zVillageCollectiveInvitationRequest = z.object({
2987
+ username: z.string().min(1)
2988
+ });
2945
2989
  export const zVillageCollectiveMemberRoleRequest = z.object({
2946
2990
  role: zVillageAssignableCollectiveRole
2947
2991
  });
@@ -3040,6 +3084,10 @@ export const zVillageMetadataUserOrganization = z.object({
3040
3084
  org_login: z.string(),
3041
3085
  visible: z.boolean()
3042
3086
  });
3087
+ export const zVillageNotificationEmail = z.object({
3088
+ address: z.string().min(3).max(254),
3089
+ verified: z.boolean()
3090
+ });
3043
3091
  /**
3044
3092
  * Village Project Name Source
3045
3093
  *
@@ -3216,6 +3264,9 @@ export const zVillageReviewShareRequest = z.object({
3216
3264
  export const zVillageReviewShareResponse = z.object({
3217
3265
  status: zVillageReviewDecision
3218
3266
  });
3267
+ export const zVillageSetNotificationEmailRequest = z.object({
3268
+ address: z.string().min(3).max(254)
3269
+ });
3219
3270
  /**
3220
3271
  * Village Share Event Actor
3221
3272
  *
@@ -3710,6 +3761,16 @@ export const zVillageCollectiveDetailResponse = z.object({
3710
3761
  transcripts: z.array(zVillageCollectiveTranscript),
3711
3762
  your_role: zVillageCollectiveViewerRole
3712
3763
  });
3764
+ export const zVillageCollectiveInvitationSent = z.object({
3765
+ created_at: z.iso.datetime(),
3766
+ expires_at: z.iso.datetime(),
3767
+ id: zVillageUUID,
3768
+ invited_by: zVillagePublicOwner,
3769
+ invited_username: z.string().min(1)
3770
+ });
3771
+ export const zVillageCollectiveInvitationsSentResponse = z.object({
3772
+ invitations: z.array(zVillageCollectiveInvitationSent)
3773
+ });
3713
3774
  export const zVillageCollectiveSearchResult = z.object({
3714
3775
  description: z.string().nullable(),
3715
3776
  id: zVillageUUID,
@@ -3755,6 +3816,19 @@ export const zVillageEnrichedTranscriptShare = z.object({
3755
3816
  status: zVillageShareStatus,
3756
3817
  transcript_id: zTranscriptID
3757
3818
  });
3819
+ export const zVillageInvitedCollective = z.object({
3820
+ acceptance_mode: zVillageCollectiveAcceptanceMode,
3821
+ description: z.string().nullable(),
3822
+ id: zVillageUUID,
3823
+ name: z.string().min(1)
3824
+ });
3825
+ export const zVillageCollectiveInvitation = z.object({
3826
+ collective: zVillageInvitedCollective,
3827
+ created_at: z.iso.datetime(),
3828
+ expires_at: z.iso.datetime(),
3829
+ id: zVillageUUID,
3830
+ invited_by: zVillagePublicOwner
3831
+ });
3758
3832
  export const zVillageLinkedRepository = z.object({
3759
3833
  created_at: z.iso.datetime().nullable(),
3760
3834
  group_id: zVillageUUID,
@@ -3769,6 +3843,9 @@ export const zVillageLinkedRepository = z.object({
3769
3843
  export const zVillageLinkedRepositoriesResponse = z.object({
3770
3844
  repositories: z.array(zVillageLinkedRepository)
3771
3845
  });
3846
+ export const zVillageMyInvitationsResponse = z.object({
3847
+ invitations: z.array(zVillageCollectiveInvitation)
3848
+ });
3772
3849
  export const zVillageOrganizationCollective = z.object({
3773
3850
  description: z.string().nullable(),
3774
3851
  id: zVillageUUID,
@@ -3908,6 +3985,7 @@ export const zVillageUpdateCollectiveRequest = z.object({
3908
3985
  });
3909
3986
  export const zVillageUpdateUserSettingsRequest = z.object({
3910
3987
  auto_attach_pull_requests: z.boolean().nullish(),
3988
+ email_invitations: z.boolean().nullish(),
3911
3989
  preview_before_attach: z.boolean().nullish()
3912
3990
  });
3913
3991
  export const zVillageUser = z.object({
@@ -4097,6 +4175,8 @@ export const zVillageGroupedContributableResponse = z.object({
4097
4175
  });
4098
4176
  export const zVillageUserSettings = z.object({
4099
4177
  auto_attach_pull_requests: z.boolean(),
4178
+ email_invitations: z.boolean(),
4179
+ notification_email: zVillageNotificationEmail.nullable(),
4100
4180
  preview_before_attach: z.boolean()
4101
4181
  });
4102
4182
  export const zVillageUserStats = z.object({
@@ -4106,6 +4186,9 @@ export const zVillageUserStats = z.object({
4106
4186
  total_transcripts: z.int().gte(0).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),
4107
4187
  total_turns: z.coerce.bigint().gte(BigInt(0)).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })
4108
4188
  });
4189
+ export const zVillageVerifyNotificationEmailRequest = z.object({
4190
+ token: z.string().min(1)
4191
+ });
4109
4192
  export const zVillageVisibleCollective = z.object({
4110
4193
  acceptance_mode: zVillageCollectiveAcceptanceMode,
4111
4194
  created_at: z.iso.datetime(),