@peasant-labs/schema 0.42.0 → 0.44.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.
@@ -16013,8 +16013,201 @@ export declare const zVillageTranscriptListRow: z.ZodObject<{
16013
16013
  export type VillageTranscriptListRow = z.infer<typeof zVillageTranscriptListRow>;
16014
16014
  export declare const zVillageTranscriptListResponse: z.ZodObject<{
16015
16015
  agent_total: z.ZodInt;
16016
- limit: z.ZodInt;
16016
+ next_items: z.ZodArray<z.ZodObject<{
16017
+ attestations: z.ZodNullable<z.ZodArray<z.ZodObject<{
16018
+ attestation_type: z.ZodString;
16019
+ created_at: z.ZodISODateTime;
16020
+ org_login: z.ZodString;
16021
+ transcript_id: z.ZodUUID;
16022
+ }, z.core.$strip>>>;
16023
+ owner: z.ZodUnion<readonly [z.ZodObject<{
16024
+ avatar_url: z.ZodNullable<z.ZodString>;
16025
+ display_name: z.ZodNullable<z.ZodString>;
16026
+ id: z.ZodUUID;
16027
+ kind: z.ZodLiteral<"profile">;
16028
+ username: z.ZodString;
16029
+ }, z.core.$strip>, z.ZodObject<{
16030
+ kind: z.ZodLiteral<"anonymous">;
16031
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
16032
+ kind: z.ZodString;
16033
+ }, z.core.$strip>, z.ZodTransform<{
16034
+ kind: "anonymous";
16035
+ }, {
16036
+ kind: string;
16037
+ }>>]>;
16038
+ owner_orgs: z.ZodNullable<z.ZodArray<z.ZodObject<{
16039
+ avatar_url: z.ZodNullable<z.ZodString>;
16040
+ org_login: z.ZodString;
16041
+ }, z.core.$strip>>>;
16042
+ pull_requests: z.ZodObject<{
16043
+ count: z.ZodInt;
16044
+ recent: z.ZodArray<z.ZodObject<{
16045
+ name: z.ZodString;
16046
+ number: z.ZodInt;
16047
+ owner: z.ZodString;
16048
+ }, z.core.$strip>>;
16049
+ }, z.core.$strip>;
16050
+ shares: z.ZodNullable<z.ZodArray<z.ZodObject<{
16051
+ acceptance_mode: z.ZodEnum<{
16052
+ open: "open";
16053
+ verified_only: "verified_only";
16054
+ curated: "curated";
16055
+ }>;
16056
+ group_id: z.ZodUUID;
16057
+ group_name: z.ZodString;
16058
+ shared_at: z.ZodISODateTime;
16059
+ status: z.ZodEnum<{
16060
+ pending: "pending";
16061
+ rejected: "rejected";
16062
+ approved: "approved";
16063
+ retracted: "retracted";
16064
+ revoked: "revoked";
16065
+ }>;
16066
+ transcript_id: z.ZodUUID;
16067
+ }, z.core.$strip>>>;
16068
+ tags: z.ZodArray<z.ZodObject<{
16069
+ id: z.ZodUUID;
16070
+ name: z.ZodString;
16071
+ }, z.core.$strip>>;
16072
+ transcript: z.ZodObject<{
16073
+ blob_size_bytes: z.ZodNullable<z.ZodInt>;
16074
+ compute_version: z.ZodNullable<z.ZodInt>;
16075
+ computed_at: z.ZodNullable<z.ZodISODateTime>;
16076
+ content_hash: z.ZodNullable<z.ZodString>;
16077
+ description: z.ZodNullable<z.ZodString>;
16078
+ diagnostics_partial: z.ZodNullable<z.ZodBoolean>;
16079
+ diagnostics_warnings: z.ZodNullable<z.ZodArray<z.ZodObject<{
16080
+ errorType: z.ZodString;
16081
+ location: z.ZodString;
16082
+ message: z.ZodString;
16083
+ remediation: z.ZodString;
16084
+ }, z.core.$strip>>>;
16085
+ discovery_turns: z.ZodNullable<z.ZodInt>;
16086
+ duration_ms: z.ZodNullable<z.ZodInt>;
16087
+ exploration_ratio: z.ZodNullable<z.ZodNumber>;
16088
+ files_touched: z.ZodNullable<z.ZodInt>;
16089
+ git_branch: z.ZodNullable<z.ZodString>;
16090
+ git_remote: z.ZodNullable<z.ZodString>;
16091
+ harness_version: z.ZodNullable<z.ZodString>;
16092
+ id: z.ZodUUID;
16093
+ ingested_at: z.ZodNullable<z.ZodISODateTime>;
16094
+ input_submission_count: z.ZodOptional<z.ZodInt>;
16095
+ license_id: z.ZodNullable<z.ZodEnum<{
16096
+ "CC0-1.0": "CC0-1.0";
16097
+ "CC-BY-4.0": "CC-BY-4.0";
16098
+ "CC-BY-SA-4.0": "CC-BY-SA-4.0";
16099
+ }>>;
16100
+ lines_changed: z.ZodNullable<z.ZodInt>;
16101
+ local_id: z.ZodString;
16102
+ m2_token_outcome_ratio: z.ZodNullable<z.ZodNumber>;
16103
+ m3_unique_tool_count: z.ZodNullable<z.ZodInt>;
16104
+ m4_consecutive_error_max: z.ZodNullable<z.ZodInt>;
16105
+ m4_error_recovery_count: z.ZodNullable<z.ZodInt>;
16106
+ m5_avg_message_tokens: z.ZodNullable<z.ZodInt>;
16107
+ m5_context_utilization_pct: z.ZodNullable<z.ZodNumber>;
16108
+ m5_peak_context_tokens: z.ZodNullable<z.ZodInt>;
16109
+ m6_lines_survived: z.ZodNullable<z.ZodInt>;
16110
+ m6_lines_total: z.ZodNullable<z.ZodInt>;
16111
+ m6_output_survival_pct: z.ZodNullable<z.ZodNumber>;
16112
+ m7_spec_has_constraints: z.ZodNullable<z.ZodBoolean>;
16113
+ m7_spec_has_examples: z.ZodNullable<z.ZodBoolean>;
16114
+ m7_spec_word_count: z.ZodNullable<z.ZodInt>;
16115
+ model_name: z.ZodNullable<z.ZodString>;
16116
+ model_provider: z.ZodString;
16117
+ outcome: z.ZodNullable<z.ZodEnum<{
16118
+ failed: "failed";
16119
+ partial: "partial";
16120
+ resolved: "resolved";
16121
+ }>>;
16122
+ parent_session_id: z.ZodNullable<z.ZodString>;
16123
+ parent_transcript_id: z.ZodNullable<z.ZodUUID>;
16124
+ project_display_name: z.ZodNullable<z.ZodString>;
16125
+ project_hash: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ProjectHash", "out">>;
16126
+ project_name: z.ZodNullable<z.ZodString>;
16127
+ project_name_source: z.ZodNullable<z.ZodEnum<{
16128
+ path: "path";
16129
+ remote: "remote";
16130
+ override: "override";
16131
+ consented: "consented";
16132
+ privacy: "privacy";
16133
+ }>>;
16134
+ project_remote_label: z.ZodNullable<z.ZodString>;
16135
+ published_at: z.ZodISODateTime;
16136
+ purpose: z.ZodOptional<z.ZodEnum<{
16137
+ unknown: "unknown";
16138
+ interaction: "interaction";
16139
+ delegated_work: "delegated_work";
16140
+ helper_review: "helper_review";
16141
+ }>>;
16142
+ relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
16143
+ anchor: z.ZodOptional<z.ZodObject<{
16144
+ kind: z.ZodEnum<{
16145
+ general_source_session: "general_source_session";
16146
+ before_redacted_entry: "before_redacted_entry";
16147
+ through_redacted_entry: "through_redacted_entry";
16148
+ }>;
16149
+ sourceEntryRef: z.ZodOptional<z.ZodString>;
16150
+ sourceRevisionRef: z.ZodOptional<z.ZodString>;
16151
+ }, z.core.$strict>>;
16152
+ evidence: z.ZodEnum<{
16153
+ unknown: "unknown";
16154
+ native_typed: "native_typed";
16155
+ lifecycle_typed: "lifecycle_typed";
16156
+ existing_adapter: "existing_adapter";
16157
+ retained_last_good: "retained_last_good";
16158
+ conflict: "conflict";
16159
+ }>;
16160
+ kind: z.ZodEnum<{
16161
+ started_by: "started_by";
16162
+ context_from: "context_from";
16163
+ }>;
16164
+ targetLocalId: z.ZodOptional<z.ZodString>;
16165
+ targetState: z.ZodEnum<{
16166
+ unknown: "unknown";
16167
+ target_known: "target_known";
16168
+ target_known_retained: "target_known_retained";
16169
+ explicit_none: "explicit_none";
16170
+ conflicting_current_native_evidence: "conflicting_current_native_evidence";
16171
+ }>;
16172
+ }, z.core.$strict>>>;
16173
+ retry_loops: z.ZodNullable<z.ZodInt>;
16174
+ retry_tokens_wasted: z.ZodNullable<z.ZodInt>;
16175
+ root_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16176
+ schema_version: z.ZodString;
16177
+ scope_breadth: z.ZodNullable<z.ZodInt>;
16178
+ session_end: z.ZodNullable<z.ZodISODateTime>;
16179
+ session_origin: z.ZodEnum<{
16180
+ unknown: "unknown";
16181
+ user: "user";
16182
+ agent: "agent";
16183
+ }>;
16184
+ session_start: z.ZodNullable<z.ZodISODateTime>;
16185
+ signal_density: z.ZodNullable<z.ZodNumber>;
16186
+ source_format: z.ZodNullable<z.ZodEnum<{
16187
+ json: "json";
16188
+ jsonl: "jsonl";
16189
+ }>>;
16190
+ spec_quality_score: z.ZodNullable<z.ZodNumber>;
16191
+ subagent_count: z.ZodNullable<z.ZodInt>;
16192
+ subagents: z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
16193
+ title: z.ZodNullable<z.ZodString>;
16194
+ title_generated: z.ZodNullable<z.ZodString>;
16195
+ token_count: z.ZodNullable<z.ZodInt>;
16196
+ tokens_in: z.ZodNullable<z.ZodInt>;
16197
+ tokens_out: z.ZodNullable<z.ZodInt>;
16198
+ tool_call_count: z.ZodNullable<z.ZodInt>;
16199
+ turn_count: z.ZodNullable<z.ZodInt>;
16200
+ updated_at: z.ZodISODateTime;
16201
+ visibility: z.ZodEnum<{
16202
+ shared: "shared";
16203
+ private: "private";
16204
+ public: "public";
16205
+ }>;
16206
+ within_session_reverts: z.ZodNullable<z.ZodInt>;
16207
+ }, z.core.$strip>;
16208
+ }, z.core.$strip>>;
16017
16209
  page: z.ZodInt;
16210
+ per_page: z.ZodInt;
16018
16211
  total: z.ZodInt;
16019
16212
  transcripts: z.ZodArray<z.ZodObject<{
16020
16213
  attestations: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -4206,8 +4206,9 @@ export const zVillageTranscriptListRow = z.object({
4206
4206
  });
4207
4207
  export const zVillageTranscriptListResponse = z.object({
4208
4208
  agent_total: z.int(),
4209
- limit: z.int(),
4209
+ next_items: z.array(zVillageTranscriptListRow),
4210
4210
  page: z.int(),
4211
+ per_page: z.int(),
4211
4212
  total: z.int(),
4212
4213
  transcripts: z.array(zVillageTranscriptListRow)
4213
4214
  });
@@ -188,6 +188,23 @@ export interface paths {
188
188
  patch?: never;
189
189
  trace?: never;
190
190
  };
191
+ "/api/v1/quality": {
192
+ parameters: {
193
+ query?: never;
194
+ header?: never;
195
+ path?: never;
196
+ cookie?: never;
197
+ };
198
+ /** @description Read one bounded page of stored session quality rows beside the library-wide analytics summary at the page revision. The summary is computed over the whole library and the rows are the requested page, so no client receives every stored row. page is one-based and omitted defaults to 1; a request past the last page is served the last page. maxItems is omitted or 0 for the default of 25; only 25, 50, and 100 are accepted, and a negative, non-member, or malformed value returns 400. 500 when the page or its summary cannot be read, and 503 when the configured provider cannot serve the paginated quality read. */
199
+ get: operations["getQualityPage"];
200
+ put?: never;
201
+ post?: never;
202
+ delete?: never;
203
+ options?: never;
204
+ head?: never;
205
+ patch?: never;
206
+ trace?: never;
207
+ };
191
208
  "/api/v1/review/{projectHash}": {
192
209
  parameters: {
193
210
  query?: never;
@@ -669,6 +686,7 @@ export interface components {
669
686
  * @enum {string}
670
687
  */
671
688
  SchemaActorOrigin: Schema.ActorOrigin;
689
+ SchemaAnalyticsSessionStats: Schema.AnalyticsSessionStats;
672
690
  /**
673
691
  * Annotation Axis
674
692
  * @description Subscription dimension for annotation channels
@@ -935,6 +953,7 @@ export interface components {
935
953
  SchemaContentProvenance: Schema.ContentProvenance;
936
954
  /** @description Opaque versioned selected-category traversal token; not cacheRevision or authority */
937
955
  SchemaContributionTraversalRevision: Schema.ContributionTraversalRevision;
956
+ SchemaContributorBreakdown: Schema.ContributorBreakdown;
938
957
  SchemaCreateAnnotationRequest: Schema.CreateAnnotationRequest;
939
958
  SchemaCreateAnnotationResponse: Schema.CreateAnnotationResponse;
940
959
  SchemaDayStats: Schema.DayStats;
@@ -1140,6 +1159,7 @@ export interface components {
1140
1159
  SchemaLocalSyncSummary: Schema.LocalSyncSummary;
1141
1160
  SchemaLocalVillageCollective: Schema.LocalVillageCollective;
1142
1161
  SchemaLocalVillageCollectivesResponse: Schema.LocalVillageCollectivesResponse;
1162
+ SchemaLongestStreak: Schema.LongestStreak;
1143
1163
  SchemaMapEdge: Schema.MapEdge;
1144
1164
  SchemaMapGraphPayload: Schema.MapGraphPayload;
1145
1165
  SchemaMapNode: Schema.MapNode;
@@ -1154,6 +1174,7 @@ export interface components {
1154
1174
  */
1155
1175
  SchemaMapNodeKind: Schema.MapNodeKind;
1156
1176
  SchemaMapSlice: Schema.MapSlice;
1177
+ SchemaMedianP90: Schema.MedianP90;
1157
1178
  /**
1158
1179
  * Message Type
1159
1180
  * @description WebSocket message discriminator
@@ -1224,6 +1245,7 @@ export interface components {
1224
1245
  * @enum {string}
1225
1246
  */
1226
1247
  SchemaOperationIssueCode: Schema.OperationIssueCode;
1248
+ SchemaOutcomeDistribution: Schema.OutcomeDistribution;
1227
1249
  /**
1228
1250
  * Page Size
1229
1251
  * @description Closed page size set for local list reads: 25, 50, or 100. The value is a number on the wire; an omitted maximum maps to 25 before validation.
@@ -1234,6 +1256,7 @@ export interface components {
1234
1256
  */
1235
1257
  SchemaPageSize: Schema.PageSize;
1236
1258
  SchemaPersonalMedians: Schema.PersonalMedians;
1259
+ SchemaProjectAnalytics: Schema.ProjectAnalytics;
1237
1260
  /**
1238
1261
  * Project Hash
1239
1262
  * @description SHA-256 hex digest of the project's origin URL or local path
@@ -1260,6 +1283,7 @@ export interface components {
1260
1283
  * @enum {string}
1261
1284
  */
1262
1285
  SchemaPublicSourceAnchorKind: Schema.PublicSourceAnchorKind;
1286
+ SchemaQualityPage: Schema.QualityPage;
1263
1287
  SchemaQualitySession: Schema.QualitySession;
1264
1288
  /**
1265
1289
  * Read Attribution State
@@ -1305,6 +1329,7 @@ export interface components {
1305
1329
  */
1306
1330
  SchemaRelationshipTargetState: Schema.RelationshipTargetState;
1307
1331
  SchemaRetainedUnknownRecord: Schema.RetainedUnknownRecord;
1332
+ SchemaReturningContributorRate: Schema.ReturningContributorRate;
1308
1333
  SchemaReviewListPayload: Schema.ReviewListPayload;
1309
1334
  /**
1310
1335
  * Rewrite Method
@@ -1420,6 +1445,7 @@ export interface components {
1420
1445
  * @enum {string}
1421
1446
  */
1422
1447
  SchemaSessionTeammateEvidence: Schema.SessionTeammateEvidence;
1448
+ SchemaSessionToCommitRate: Schema.SessionToCommitRate;
1423
1449
  SchemaSessionsPayload: Schema.SessionsPayload;
1424
1450
  SchemaShutdownResponse: Schema.ShutdownResponse;
1425
1451
  /**
@@ -1696,6 +1722,10 @@ export interface components {
1696
1722
  */
1697
1723
  SchemaVillageUUID: Schema.VillageUUID;
1698
1724
  SchemaVillageUserCollective: Schema.VillageUserCollective;
1725
+ SchemaWeekAvgDuration: Schema.WeekAvgDuration;
1726
+ SchemaWeekContributors: Schema.WeekContributors;
1727
+ SchemaWeekCount: Schema.WeekCount;
1728
+ SchemaWeekNewContributors: Schema.WeekNewContributors;
1699
1729
  SearchPayload: Schema.SearchPayload;
1700
1730
  ServerMessage: Schema.ServerMessage;
1701
1731
  SessionDetailHeaderPayload: Schema.SessionDetailHeaderPayload;
@@ -2031,6 +2061,58 @@ export interface operations {
2031
2061
  };
2032
2062
  };
2033
2063
  };
2064
+ getQualityPage: {
2065
+ parameters: {
2066
+ query?: {
2067
+ /** @description One-based page number; omitted defaults to 1 */
2068
+ page?: number;
2069
+ /** @description Rows per page: omitted or 0 uses 25; only 25, 50, and 100 are accepted */
2070
+ maxItems?: number;
2071
+ };
2072
+ header?: never;
2073
+ path?: never;
2074
+ cookie?: never;
2075
+ };
2076
+ requestBody?: never;
2077
+ responses: {
2078
+ /** @description OK */
2079
+ 200: {
2080
+ headers: {
2081
+ [name: string]: unknown;
2082
+ };
2083
+ content: {
2084
+ "application/json": components["schemas"]["SchemaQualityPage"];
2085
+ };
2086
+ };
2087
+ /** @description Bad Request */
2088
+ 400: {
2089
+ headers: {
2090
+ [name: string]: unknown;
2091
+ };
2092
+ content: {
2093
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2094
+ };
2095
+ };
2096
+ /** @description Internal Server Error */
2097
+ 500: {
2098
+ headers: {
2099
+ [name: string]: unknown;
2100
+ };
2101
+ content: {
2102
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2103
+ };
2104
+ };
2105
+ /** @description Service Unavailable */
2106
+ 503: {
2107
+ headers: {
2108
+ [name: string]: unknown;
2109
+ };
2110
+ content: {
2111
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2112
+ };
2113
+ };
2114
+ };
2115
+ };
2034
2116
  listReviewChanges: {
2035
2117
  parameters: {
2036
2118
  query?: never;
@@ -1,4 +1,4 @@
1
- export declare const VillageAPIVersion: "0.35.0";
2
- export declare const PeasantLocalAPIVersion: "0.29.0";
1
+ export declare const VillageAPIVersion: "0.36.0";
2
+ export declare const PeasantLocalAPIVersion: "0.30.0";
3
3
  export declare const TypesVersion: "0.44.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.35.0";
3
- export const PeasantLocalAPIVersion = "0.29.0";
2
+ export const VillageAPIVersion = "0.36.0";
3
+ export const PeasantLocalAPIVersion = "0.30.0";
4
4
  export const TypesVersion = "0.44.0";
5
5
  export const MetadataSchemaVersion = 12;
@@ -1691,6 +1691,15 @@ export interface components {
1691
1691
  SchemaOwnerTranscriptUpdateResponse: Schema.OwnerTranscriptUpdateResponse;
1692
1692
  /** @description Omitted preserves, null requests clear, and a canonical license replaces */
1693
1693
  SchemaOwnerUpdateLicenseIntent: Schema.OwnerUpdateLicenseIntent;
1694
+ /**
1695
+ * Page Size
1696
+ * @description Closed page size set for local list reads: 25, 50, or 100. The value is a number on the wire; an omitted maximum maps to 25 before validation.
1697
+ * @example 25
1698
+ * @example 50
1699
+ * @example 100
1700
+ * @enum {integer}
1701
+ */
1702
+ SchemaPageSize: Schema.PageSize;
1694
1703
  /**
1695
1704
  * Project Hash
1696
1705
  * @description SHA-256 hex digest of the project's origin URL or local path
@@ -6318,7 +6327,10 @@ export interface operations {
6318
6327
  /** @description Set to grouped to request helper-group list items; omission preserves the flat response. */
6319
6328
  view?: components["schemas"]["OpenapiVillageGroupedView"];
6320
6329
  page?: number;
6330
+ /** @description Grouped-view page size. The flat response is paged with per_page instead. */
6321
6331
  limit?: number;
6332
+ /** @description Flat-response page size: 25, 50, or 100. Omitted reads 25. The response echoes it as per_page and bounds next_items with it. */
6333
+ per_page?: components["schemas"]["SchemaPageSize"];
6322
6334
  /** @description Search text. Matches repository identity only on rows whose repository this viewer may see; the withheld repository fields of an anonymous owner's transcript are never searched. */
6323
6335
  q?: string;
6324
6336
  provider?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peasant-labs/schema",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "description": "Generated TypeScript contract bindings for the peasant-labs schema module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {