@peasant-labs/schema 0.33.0 → 0.34.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.
@@ -2000,6 +2000,7 @@ export declare const zSchemaVersionResponse: z.ZodObject<{
2000
2000
  contentCapabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
2001
2001
  minPullContractVersion: z.ZodOptional<z.ZodString>;
2002
2002
  minPushContractVersion: z.ZodString;
2003
+ pullContractMaxVersion: z.ZodOptional<z.ZodString>;
2003
2004
  pullContractVersion: z.ZodOptional<z.ZodString>;
2004
2005
  pushContractVersion: z.ZodString;
2005
2006
  supportedTargetKinds: z.ZodNullable<z.ZodArray<z.ZodString>>;
@@ -2063,6 +2064,17 @@ export declare const zServerMessage: z.ZodObject<{
2063
2064
  version: z.ZodOptional<z.ZodString>;
2064
2065
  }, z.core.$strip>;
2065
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>;
2066
2078
  /**
2067
2079
  * Session ID
2068
2080
  *
@@ -2365,6 +2377,24 @@ export declare const zQualityMetrics: z.ZodObject<{
2365
2377
  withinSessionReverts: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2366
2378
  }, z.core.$strip>;
2367
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>;
2368
2398
  /**
2369
2399
  * Session Purpose
2370
2400
  *
@@ -3952,6 +3982,49 @@ export declare const zAnnotationsPayload: z.ZodObject<{
3952
3982
  id: z.ZodString;
3953
3983
  }, z.core.$strip>;
3954
3984
  export type AnnotationsPayload = z.infer<typeof zAnnotationsPayload>;
3985
+ export declare const zLegacyPullAnnotation: z.ZodObject<{
3986
+ annotatorKind: z.ZodOptional<z.ZodEnum<{
3987
+ human: "human";
3988
+ agent: "agent";
3989
+ rule: "rule";
3990
+ }>>;
3991
+ annotatorName: z.ZodOptional<z.ZodString>;
3992
+ authorUserId: z.ZodString;
3993
+ authorUsername: z.ZodString;
3994
+ confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3995
+ contentHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3996
+ createdAt: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
3997
+ id: z.ZodOptional<z.ZodString>;
3998
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
3999
+ provenance: z.ZodOptional<z.ZodObject<{
4000
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4001
+ function: z.ZodOptional<z.ZodString>;
4002
+ method: z.ZodString;
4003
+ version: z.ZodOptional<z.ZodString>;
4004
+ }, z.core.$strip>>;
4005
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4006
+ supersededBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4007
+ targetAnnotationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4008
+ targetAssociationId: z.ZodOptional<z.ZodString>;
4009
+ targetContentHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4010
+ targetEntryEndIndex: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
4011
+ targetEntryIndex: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
4012
+ targetFilePath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4013
+ targetKind: z.ZodOptional<z.ZodEnum<{
4014
+ session: "session";
4015
+ annotation: "annotation";
4016
+ project: "project";
4017
+ entry: "entry";
4018
+ file_version: "file_version";
4019
+ association: "association";
4020
+ }>>;
4021
+ targetProjectHash: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ProjectHash", "out">>;
4022
+ targetSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4023
+ typeId: z.ZodOptional<z.ZodString>;
4024
+ typeName: z.ZodOptional<z.ZodString>;
4025
+ value: z.ZodOptional<z.ZodString>;
4026
+ }, z.core.$strip>;
4027
+ export type LegacyPullAnnotation = z.infer<typeof zLegacyPullAnnotation>;
3955
4028
  export declare const zQualitySession: z.ZodObject<{
3956
4029
  date: z.ZodString;
3957
4030
  discoveryTurns: z.ZodInt;
@@ -9762,6 +9835,10 @@ export declare const zVillageCollectiveDataAccess: z.ZodEnum<{
9762
9835
  contributors: "contributors";
9763
9836
  }>;
9764
9837
  export type VillageCollectiveDataAccess = z.infer<typeof zVillageCollectiveDataAccess>;
9838
+ export declare const zVillageCollectiveInvitationRequest: z.ZodObject<{
9839
+ username: z.ZodString;
9840
+ }, z.core.$strip>;
9841
+ export type VillageCollectiveInvitationRequest = z.infer<typeof zVillageCollectiveInvitationRequest>;
9765
9842
  export declare const zVillageCollectiveMemberRoleRequest: z.ZodObject<{
9766
9843
  role: z.ZodEnum<{
9767
9844
  contributor: "contributor";
@@ -9905,6 +9982,11 @@ export declare const zVillageMetadataUserOrganization: z.ZodObject<{
9905
9982
  visible: z.ZodBoolean;
9906
9983
  }, z.core.$strip>;
9907
9984
  export type VillageMetadataUserOrganization = z.infer<typeof zVillageMetadataUserOrganization>;
9985
+ export declare const zVillageNotificationEmail: z.ZodObject<{
9986
+ address: z.ZodString;
9987
+ verified: z.ZodBoolean;
9988
+ }, z.core.$strip>;
9989
+ export type VillageNotificationEmail = z.infer<typeof zVillageNotificationEmail>;
9908
9990
  /**
9909
9991
  * Village Project Name Source
9910
9992
  *
@@ -10251,6 +10333,10 @@ export declare const zVillageReviewShareResponse: z.ZodObject<{
10251
10333
  }>;
10252
10334
  }, z.core.$strip>;
10253
10335
  export type VillageReviewShareResponse = z.infer<typeof zVillageReviewShareResponse>;
10336
+ export declare const zVillageSetNotificationEmailRequest: z.ZodObject<{
10337
+ address: z.ZodString;
10338
+ }, z.core.$strip>;
10339
+ export type VillageSetNotificationEmailRequest = z.infer<typeof zVillageSetNotificationEmailRequest>;
10254
10340
  /**
10255
10341
  * Village Share Event Actor
10256
10342
  *
@@ -13226,6 +13312,52 @@ export declare const zVillageCollectiveDetailResponse: z.ZodObject<{
13226
13312
  }>;
13227
13313
  }, z.core.$strip>;
13228
13314
  export type VillageCollectiveDetailResponse = z.infer<typeof zVillageCollectiveDetailResponse>;
13315
+ export declare const zVillageCollectiveInvitationSent: z.ZodObject<{
13316
+ created_at: z.ZodISODateTime;
13317
+ expires_at: z.ZodISODateTime;
13318
+ id: z.ZodUUID;
13319
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13320
+ avatar_url: z.ZodNullable<z.ZodString>;
13321
+ display_name: z.ZodNullable<z.ZodString>;
13322
+ id: z.ZodUUID;
13323
+ kind: z.ZodLiteral<"profile">;
13324
+ username: z.ZodString;
13325
+ }, z.core.$strip>, z.ZodObject<{
13326
+ kind: z.ZodLiteral<"anonymous">;
13327
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13328
+ kind: z.ZodString;
13329
+ }, z.core.$strip>, z.ZodTransform<{
13330
+ kind: "anonymous";
13331
+ }, {
13332
+ kind: string;
13333
+ }>>]>;
13334
+ invited_username: z.ZodString;
13335
+ }, z.core.$strip>;
13336
+ export type VillageCollectiveInvitationSent = z.infer<typeof zVillageCollectiveInvitationSent>;
13337
+ export declare const zVillageCollectiveInvitationsSentResponse: z.ZodObject<{
13338
+ invitations: z.ZodArray<z.ZodObject<{
13339
+ created_at: z.ZodISODateTime;
13340
+ expires_at: z.ZodISODateTime;
13341
+ id: z.ZodUUID;
13342
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13343
+ avatar_url: z.ZodNullable<z.ZodString>;
13344
+ display_name: z.ZodNullable<z.ZodString>;
13345
+ id: z.ZodUUID;
13346
+ kind: z.ZodLiteral<"profile">;
13347
+ username: z.ZodString;
13348
+ }, z.core.$strip>, z.ZodObject<{
13349
+ kind: z.ZodLiteral<"anonymous">;
13350
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13351
+ kind: z.ZodString;
13352
+ }, z.core.$strip>, z.ZodTransform<{
13353
+ kind: "anonymous";
13354
+ }, {
13355
+ kind: string;
13356
+ }>>]>;
13357
+ invited_username: z.ZodString;
13358
+ }, z.core.$strip>>;
13359
+ }, z.core.$strip>;
13360
+ export type VillageCollectiveInvitationsSentResponse = z.infer<typeof zVillageCollectiveInvitationsSentResponse>;
13229
13361
  export declare const zVillageCollectiveSearchResult: z.ZodObject<{
13230
13362
  description: z.ZodNullable<z.ZodString>;
13231
13363
  id: z.ZodUUID;
@@ -13376,6 +13508,48 @@ export declare const zVillageEnrichedTranscriptShare: z.ZodObject<{
13376
13508
  transcript_id: z.ZodUUID;
13377
13509
  }, z.core.$strip>;
13378
13510
  export type VillageEnrichedTranscriptShare = z.infer<typeof zVillageEnrichedTranscriptShare>;
13511
+ export declare const zVillageInvitedCollective: z.ZodObject<{
13512
+ acceptance_mode: z.ZodEnum<{
13513
+ open: "open";
13514
+ verified_only: "verified_only";
13515
+ curated: "curated";
13516
+ }>;
13517
+ description: z.ZodNullable<z.ZodString>;
13518
+ id: z.ZodUUID;
13519
+ name: z.ZodString;
13520
+ }, z.core.$strip>;
13521
+ export type VillageInvitedCollective = z.infer<typeof zVillageInvitedCollective>;
13522
+ export declare const zVillageCollectiveInvitation: z.ZodObject<{
13523
+ collective: z.ZodObject<{
13524
+ acceptance_mode: z.ZodEnum<{
13525
+ open: "open";
13526
+ verified_only: "verified_only";
13527
+ curated: "curated";
13528
+ }>;
13529
+ description: z.ZodNullable<z.ZodString>;
13530
+ id: z.ZodUUID;
13531
+ name: z.ZodString;
13532
+ }, z.core.$strip>;
13533
+ created_at: z.ZodISODateTime;
13534
+ expires_at: z.ZodISODateTime;
13535
+ id: z.ZodUUID;
13536
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13537
+ avatar_url: z.ZodNullable<z.ZodString>;
13538
+ display_name: z.ZodNullable<z.ZodString>;
13539
+ id: z.ZodUUID;
13540
+ kind: z.ZodLiteral<"profile">;
13541
+ username: z.ZodString;
13542
+ }, z.core.$strip>, z.ZodObject<{
13543
+ kind: z.ZodLiteral<"anonymous">;
13544
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13545
+ kind: z.ZodString;
13546
+ }, z.core.$strip>, z.ZodTransform<{
13547
+ kind: "anonymous";
13548
+ }, {
13549
+ kind: string;
13550
+ }>>]>;
13551
+ }, z.core.$strip>;
13552
+ export type VillageCollectiveInvitation = z.infer<typeof zVillageCollectiveInvitation>;
13379
13553
  export declare const zVillageLinkedRepository: z.ZodObject<{
13380
13554
  created_at: z.ZodNullable<z.ZodISODateTime>;
13381
13555
  group_id: z.ZodUUID;
@@ -13430,6 +13604,39 @@ export declare const zVillageLinkedRepositoriesResponse: z.ZodObject<{
13430
13604
  }, z.core.$strip>>;
13431
13605
  }, z.core.$strip>;
13432
13606
  export type VillageLinkedRepositoriesResponse = z.infer<typeof zVillageLinkedRepositoriesResponse>;
13607
+ export declare const zVillageMyInvitationsResponse: z.ZodObject<{
13608
+ invitations: z.ZodArray<z.ZodObject<{
13609
+ collective: z.ZodObject<{
13610
+ acceptance_mode: z.ZodEnum<{
13611
+ open: "open";
13612
+ verified_only: "verified_only";
13613
+ curated: "curated";
13614
+ }>;
13615
+ description: z.ZodNullable<z.ZodString>;
13616
+ id: z.ZodUUID;
13617
+ name: z.ZodString;
13618
+ }, z.core.$strip>;
13619
+ created_at: z.ZodISODateTime;
13620
+ expires_at: z.ZodISODateTime;
13621
+ id: z.ZodUUID;
13622
+ invited_by: z.ZodUnion<readonly [z.ZodObject<{
13623
+ avatar_url: z.ZodNullable<z.ZodString>;
13624
+ display_name: z.ZodNullable<z.ZodString>;
13625
+ id: z.ZodUUID;
13626
+ kind: z.ZodLiteral<"profile">;
13627
+ username: z.ZodString;
13628
+ }, z.core.$strip>, z.ZodObject<{
13629
+ kind: z.ZodLiteral<"anonymous">;
13630
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
13631
+ kind: z.ZodString;
13632
+ }, z.core.$strip>, z.ZodTransform<{
13633
+ kind: "anonymous";
13634
+ }, {
13635
+ kind: string;
13636
+ }>>]>;
13637
+ }, z.core.$strip>>;
13638
+ }, z.core.$strip>;
13639
+ export type VillageMyInvitationsResponse = z.infer<typeof zVillageMyInvitationsResponse>;
13433
13640
  export declare const zVillageOrganizationCollective: z.ZodObject<{
13434
13641
  description: z.ZodNullable<z.ZodString>;
13435
13642
  id: z.ZodUUID;
@@ -14349,6 +14556,7 @@ export declare const zVillageUpdateCollectiveRequest: z.ZodObject<{
14349
14556
  export type VillageUpdateCollectiveRequest = z.infer<typeof zVillageUpdateCollectiveRequest>;
14350
14557
  export declare const zVillageUpdateUserSettingsRequest: z.ZodObject<{
14351
14558
  auto_attach_pull_requests: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
14559
+ email_invitations: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
14352
14560
  preview_before_attach: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
14353
14561
  }, z.core.$strip>;
14354
14562
  export type VillageUpdateUserSettingsRequest = z.infer<typeof zVillageUpdateUserSettingsRequest>;
@@ -19179,6 +19387,11 @@ export declare const zVillageGroupedContributableResponse: z.ZodObject<{
19179
19387
  export type VillageGroupedContributableResponse = z.infer<typeof zVillageGroupedContributableResponse>;
19180
19388
  export declare const zVillageUserSettings: z.ZodObject<{
19181
19389
  auto_attach_pull_requests: z.ZodBoolean;
19390
+ email_invitations: z.ZodBoolean;
19391
+ notification_email: z.ZodNullable<z.ZodObject<{
19392
+ address: z.ZodString;
19393
+ verified: z.ZodBoolean;
19394
+ }, z.core.$strip>>;
19182
19395
  preview_before_attach: z.ZodBoolean;
19183
19396
  }, z.core.$strip>;
19184
19397
  export type VillageUserSettings = z.infer<typeof zVillageUserSettings>;
@@ -19190,6 +19403,10 @@ export declare const zVillageUserStats: z.ZodObject<{
19190
19403
  total_turns: z.ZodCoercedBigInt<unknown>;
19191
19404
  }, z.core.$strip>;
19192
19405
  export type VillageUserStats = z.infer<typeof zVillageUserStats>;
19406
+ export declare const zVillageVerifyNotificationEmailRequest: z.ZodObject<{
19407
+ token: z.ZodString;
19408
+ }, z.core.$strip>;
19409
+ export type VillageVerifyNotificationEmailRequest = z.infer<typeof zVillageVerifyNotificationEmailRequest>;
19193
19410
  export declare const zVillageVisibleCollective: z.ZodObject<{
19194
19411
  acceptance_mode: z.ZodEnum<{
19195
19412
  open: "open";
@@ -19249,6 +19466,79 @@ export declare const zVisibility: z.ZodEnum<{
19249
19466
  group: "group";
19250
19467
  }>;
19251
19468
  export type Visibility = z.infer<typeof zVisibility>;
19469
+ export declare const zLegacyPullTranscriptInfo: z.ZodObject<{
19470
+ annotationCount: z.ZodInt;
19471
+ contentHash: z.ZodOptional<z.ZodString>;
19472
+ contractVersion: z.ZodOptional<z.ZodString>;
19473
+ harness: z.ZodOptional<z.ZodEnum<{
19474
+ strike: "strike";
19475
+ cursor: "cursor";
19476
+ "claude-code": "claude-code";
19477
+ "gemini-cli": "gemini-cli";
19478
+ codex: "codex";
19479
+ opencode: "opencode";
19480
+ antigravity: "antigravity";
19481
+ pi: "pi";
19482
+ }>>;
19483
+ license: z.ZodOptional<z.ZodEnum<{
19484
+ "CC0-1.0": "CC0-1.0";
19485
+ "CC-BY-4.0": "CC-BY-4.0";
19486
+ "CC-BY-SA-4.0": "CC-BY-SA-4.0";
19487
+ }>>;
19488
+ localId: z.ZodOptional<z.ZodString>;
19489
+ ownerUserId: z.ZodString;
19490
+ ownerUsername: z.ZodString;
19491
+ projectName: z.ZodOptional<z.ZodString>;
19492
+ publishedAt: z.ZodCoercedBigInt<unknown>;
19493
+ title: z.ZodOptional<z.ZodString>;
19494
+ transcriptId: z.ZodUUID;
19495
+ updatedAt: z.ZodCoercedBigInt<unknown>;
19496
+ visibility: z.ZodEnum<{
19497
+ private: "private";
19498
+ public: "public";
19499
+ group: "group";
19500
+ }>;
19501
+ }, z.core.$strip>;
19502
+ export type LegacyPullTranscriptInfo = z.infer<typeof zLegacyPullTranscriptInfo>;
19503
+ export declare const zLegacyPullListResponse: z.ZodObject<{
19504
+ limit: z.ZodInt;
19505
+ page: z.ZodInt;
19506
+ total: z.ZodInt;
19507
+ transcripts: z.ZodNullable<z.ZodArray<z.ZodObject<{
19508
+ annotationCount: z.ZodInt;
19509
+ contentHash: z.ZodOptional<z.ZodString>;
19510
+ contractVersion: z.ZodOptional<z.ZodString>;
19511
+ harness: z.ZodOptional<z.ZodEnum<{
19512
+ strike: "strike";
19513
+ cursor: "cursor";
19514
+ "claude-code": "claude-code";
19515
+ "gemini-cli": "gemini-cli";
19516
+ codex: "codex";
19517
+ opencode: "opencode";
19518
+ antigravity: "antigravity";
19519
+ pi: "pi";
19520
+ }>>;
19521
+ license: z.ZodOptional<z.ZodEnum<{
19522
+ "CC0-1.0": "CC0-1.0";
19523
+ "CC-BY-4.0": "CC-BY-4.0";
19524
+ "CC-BY-SA-4.0": "CC-BY-SA-4.0";
19525
+ }>>;
19526
+ localId: z.ZodOptional<z.ZodString>;
19527
+ ownerUserId: z.ZodString;
19528
+ ownerUsername: z.ZodString;
19529
+ projectName: z.ZodOptional<z.ZodString>;
19530
+ publishedAt: z.ZodCoercedBigInt<unknown>;
19531
+ title: z.ZodOptional<z.ZodString>;
19532
+ transcriptId: z.ZodUUID;
19533
+ updatedAt: z.ZodCoercedBigInt<unknown>;
19534
+ visibility: z.ZodEnum<{
19535
+ private: "private";
19536
+ public: "public";
19537
+ group: "group";
19538
+ }>;
19539
+ }, z.core.$strip>>>;
19540
+ }, z.core.$strip>;
19541
+ export type LegacyPullListResponse = z.infer<typeof zLegacyPullListResponse>;
19252
19542
  export declare const zPublishNormalizedValues: z.ZodObject<{
19253
19543
  derivedTitle: z.ZodNullable<z.ZodString>;
19254
19544
  entryHarnesses: z.ZodArray<z.ZodEnum<{
@@ -1440,6 +1440,7 @@ export const zSchemaVersionResponse = z.object({
1440
1440
  contentCapabilities: z.array(z.string()).optional(),
1441
1441
  minPullContractVersion: z.string().optional(),
1442
1442
  minPushContractVersion: z.string(),
1443
+ pullContractMaxVersion: z.string().optional(),
1443
1444
  pullContractVersion: z.string().optional(),
1444
1445
  pushContractVersion: z.string(),
1445
1446
  supportedTargetKinds: z.array(z.string()).nullable(),
@@ -1467,6 +1468,9 @@ export const zServerMessage = z.object({
1467
1468
  type: zMessageType,
1468
1469
  version: z.string().optional()
1469
1470
  });
1471
+ export const zSessionCommitsResponse = z.object({
1472
+ commits: z.array(zCommitInfo)
1473
+ });
1470
1474
  /**
1471
1475
  * Session ID
1472
1476
  *
@@ -1680,6 +1684,16 @@ export const zQualityMetrics = z.object({
1680
1684
  turnCount: z.int().nullish(),
1681
1685
  withinSessionReverts: z.int().nullish()
1682
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
+ });
1683
1697
  /**
1684
1698
  * Session Purpose
1685
1699
  *
@@ -2223,6 +2237,38 @@ export const zAnnotationsPayload = z.object({
2223
2237
  axis: zAnnotationAxis,
2224
2238
  id: z.string()
2225
2239
  });
2240
+ export const zLegacyPullAnnotation = z.object({
2241
+ annotatorKind: zAnnotatorKind.optional(),
2242
+ annotatorName: z.string().optional(),
2243
+ authorUserId: z.string(),
2244
+ authorUsername: z.string(),
2245
+ confidence: z.number().nullish(),
2246
+ contentHash: z.string().nullish(),
2247
+ createdAt: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),
2248
+ id: z.string().optional(),
2249
+ isPrimary: z.boolean().optional(),
2250
+ provenance: zProvenance.optional(),
2251
+ reason: z.string().nullish(),
2252
+ supersededBy: z.string().nullish(),
2253
+ targetAnnotationId: z.string().nullish(),
2254
+ targetAssociationId: zAssociationID.optional(),
2255
+ targetContentHash: z.string().nullish(),
2256
+ targetEntryEndIndex: z.int().nullish(),
2257
+ targetEntryIndex: z.int().nullish(),
2258
+ targetFilePath: z.string().nullish(),
2259
+ targetKind: zTargetKind.optional(),
2260
+ targetProjectHash: zProjectHash.optional(),
2261
+ targetSessionId: z.string().nullish(),
2262
+ typeId: z.string().optional(),
2263
+ typeName: z.string().optional(),
2264
+ value: z.string().optional()
2265
+ }).superRefine((value, context) => {
2266
+ const fail = (reason) => context.addIssue({ code: "custom", message: "schema.zLegacyPullAnnotation: " + reason });
2267
+ if (value.authorUserId === "" && value.authorUsername !== "anon")
2268
+ fail("an empty id carries a username; a hidden person would be named; send anon beside an empty id");
2269
+ if (value.authorUserId !== "" && value.authorUsername === "")
2270
+ fail("an id carries no username; send the profile's username, or an empty id with anon");
2271
+ });
2226
2272
  export const zQualitySession = z.object({
2227
2273
  date: z.string(),
2228
2274
  discoveryTurns: z.int(),
@@ -2909,6 +2955,9 @@ export const zVillageCollectiveDataAccess = z.enum([
2909
2955
  'contributors',
2910
2956
  'public'
2911
2957
  ]);
2958
+ export const zVillageCollectiveInvitationRequest = z.object({
2959
+ username: z.string().min(1)
2960
+ });
2912
2961
  export const zVillageCollectiveMemberRoleRequest = z.object({
2913
2962
  role: zVillageAssignableCollectiveRole
2914
2963
  });
@@ -3007,6 +3056,10 @@ export const zVillageMetadataUserOrganization = z.object({
3007
3056
  org_login: z.string(),
3008
3057
  visible: z.boolean()
3009
3058
  });
3059
+ export const zVillageNotificationEmail = z.object({
3060
+ address: z.string().min(3).max(254),
3061
+ verified: z.boolean()
3062
+ });
3010
3063
  /**
3011
3064
  * Village Project Name Source
3012
3065
  *
@@ -3183,6 +3236,9 @@ export const zVillageReviewShareRequest = z.object({
3183
3236
  export const zVillageReviewShareResponse = z.object({
3184
3237
  status: zVillageReviewDecision
3185
3238
  });
3239
+ export const zVillageSetNotificationEmailRequest = z.object({
3240
+ address: z.string().min(3).max(254)
3241
+ });
3186
3242
  /**
3187
3243
  * Village Share Event Actor
3188
3244
  *
@@ -3677,6 +3733,16 @@ export const zVillageCollectiveDetailResponse = z.object({
3677
3733
  transcripts: z.array(zVillageCollectiveTranscript),
3678
3734
  your_role: zVillageCollectiveViewerRole
3679
3735
  });
3736
+ export const zVillageCollectiveInvitationSent = z.object({
3737
+ created_at: z.iso.datetime(),
3738
+ expires_at: z.iso.datetime(),
3739
+ id: zVillageUUID,
3740
+ invited_by: zVillagePublicOwner,
3741
+ invited_username: z.string().min(1)
3742
+ });
3743
+ export const zVillageCollectiveInvitationsSentResponse = z.object({
3744
+ invitations: z.array(zVillageCollectiveInvitationSent)
3745
+ });
3680
3746
  export const zVillageCollectiveSearchResult = z.object({
3681
3747
  description: z.string().nullable(),
3682
3748
  id: zVillageUUID,
@@ -3722,6 +3788,19 @@ export const zVillageEnrichedTranscriptShare = z.object({
3722
3788
  status: zVillageShareStatus,
3723
3789
  transcript_id: zTranscriptID
3724
3790
  });
3791
+ export const zVillageInvitedCollective = z.object({
3792
+ acceptance_mode: zVillageCollectiveAcceptanceMode,
3793
+ description: z.string().nullable(),
3794
+ id: zVillageUUID,
3795
+ name: z.string().min(1)
3796
+ });
3797
+ export const zVillageCollectiveInvitation = z.object({
3798
+ collective: zVillageInvitedCollective,
3799
+ created_at: z.iso.datetime(),
3800
+ expires_at: z.iso.datetime(),
3801
+ id: zVillageUUID,
3802
+ invited_by: zVillagePublicOwner
3803
+ });
3725
3804
  export const zVillageLinkedRepository = z.object({
3726
3805
  created_at: z.iso.datetime().nullable(),
3727
3806
  group_id: zVillageUUID,
@@ -3736,6 +3815,9 @@ export const zVillageLinkedRepository = z.object({
3736
3815
  export const zVillageLinkedRepositoriesResponse = z.object({
3737
3816
  repositories: z.array(zVillageLinkedRepository)
3738
3817
  });
3818
+ export const zVillageMyInvitationsResponse = z.object({
3819
+ invitations: z.array(zVillageCollectiveInvitation)
3820
+ });
3739
3821
  export const zVillageOrganizationCollective = z.object({
3740
3822
  description: z.string().nullable(),
3741
3823
  id: zVillageUUID,
@@ -3875,6 +3957,7 @@ export const zVillageUpdateCollectiveRequest = z.object({
3875
3957
  });
3876
3958
  export const zVillageUpdateUserSettingsRequest = z.object({
3877
3959
  auto_attach_pull_requests: z.boolean().nullish(),
3960
+ email_invitations: z.boolean().nullish(),
3878
3961
  preview_before_attach: z.boolean().nullish()
3879
3962
  });
3880
3963
  export const zVillageUser = z.object({
@@ -4064,6 +4147,8 @@ export const zVillageGroupedContributableResponse = z.object({
4064
4147
  });
4065
4148
  export const zVillageUserSettings = z.object({
4066
4149
  auto_attach_pull_requests: z.boolean(),
4150
+ email_invitations: z.boolean(),
4151
+ notification_email: zVillageNotificationEmail.nullable(),
4067
4152
  preview_before_attach: z.boolean()
4068
4153
  });
4069
4154
  export const zVillageUserStats = z.object({
@@ -4073,6 +4158,9 @@ export const zVillageUserStats = z.object({
4073
4158
  total_transcripts: z.int().gte(0).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),
4074
4159
  total_turns: z.coerce.bigint().gte(BigInt(0)).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })
4075
4160
  });
4161
+ export const zVillageVerifyNotificationEmailRequest = z.object({
4162
+ token: z.string().min(1)
4163
+ });
4076
4164
  export const zVillageVisibleCollective = z.object({
4077
4165
  acceptance_mode: zVillageCollectiveAcceptanceMode,
4078
4166
  created_at: z.iso.datetime(),
@@ -4100,6 +4188,36 @@ export const zVisibility = z.enum([
4100
4188
  'group',
4101
4189
  'public'
4102
4190
  ]);
4191
+ export const zLegacyPullTranscriptInfo = z.object({
4192
+ annotationCount: z.int(),
4193
+ contentHash: z.string().optional(),
4194
+ contractVersion: z.string().optional(),
4195
+ harness: zHarness.optional(),
4196
+ license: zLicense.optional(),
4197
+ localId: z.string().optional(),
4198
+ ownerUserId: z.string(),
4199
+ ownerUsername: z.string(),
4200
+ projectName: z.string().optional(),
4201
+ publishedAt: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),
4202
+ title: z.string().optional(),
4203
+ transcriptId: zTranscriptID,
4204
+ updatedAt: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),
4205
+ visibility: zVisibility
4206
+ }).superRefine((value, context) => {
4207
+ const fail = (reason) => context.addIssue({ code: "custom", message: "schema.zLegacyPullTranscriptInfo: " + reason });
4208
+ if (value.ownerUserId === "" && value.ownerUsername !== "anon")
4209
+ fail("an empty id carries a username; a hidden person would be named; send anon beside an empty id");
4210
+ if (value.ownerUserId !== "" && value.ownerUsername === "")
4211
+ fail("an id carries no username; send the profile's username, or an empty id with anon");
4212
+ if (value.ownerUserId === "" && (value.projectName ?? "") !== "")
4213
+ fail("projectName sits beside an anonymous owner; omit it for an anonymous owner");
4214
+ });
4215
+ export const zLegacyPullListResponse = z.object({
4216
+ limit: z.int(),
4217
+ page: z.int(),
4218
+ total: z.int(),
4219
+ transcripts: z.array(zLegacyPullTranscriptInfo).nullable()
4220
+ });
4103
4221
  export const zPublishNormalizedValues = z.object({
4104
4222
  derivedTitle: z.string().nullable(),
4105
4223
  entryHarnesses: z.array(zHarness),