@peasant-labs/schema 0.23.0 → 0.25.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.
@@ -78,7 +78,7 @@ export interface paths {
78
78
  /** @description List collectives the authenticated caller belongs to, with the caller's role and membership time. */
79
79
  get: operations["listGroups"];
80
80
  put?: never;
81
- /** @description Create a collective. Name is required; acceptance_mode defaults to open and data_access defaults to members_only when omitted. */
81
+ /** @description Create a collective. Name is required; acceptance_mode defaults to open and data_access defaults to members_only when omitted. linked_github_org may be omitted or null for no organization, as on update. */
82
82
  post: operations["createGroup"];
83
83
  delete?: never;
84
84
  options?: never;
@@ -653,6 +653,23 @@ export interface paths {
653
653
  patch?: never;
654
654
  trace?: never;
655
655
  };
656
+ "/api/v1/transcripts/{id}/pulls": {
657
+ parameters: {
658
+ query?: never;
659
+ header?: never;
660
+ path?: never;
661
+ cookie?: never;
662
+ };
663
+ /** @description List the pull requests whose prompt attachment includes this transcript, attached or detached, with each pull request's title and head branch. A requested, waiting, or preview attachment is never listed. An attachment on a private repository is listed only to the pull request author, a member of the collective the attachment belongs to, or, for an attached attachment, a reader of the repository; any other attachment on a private repository is omitted rather than refused, and so is one whose visibility check cannot complete. A caller who may not read the transcript receives 404, never 403, so the read does not reveal that the transcript exists. 429 means the private-repository visibility check is rate limited; retry later. */
664
+ get: operations["listTranscriptPullRequests"];
665
+ put?: never;
666
+ post?: never;
667
+ delete?: never;
668
+ options?: never;
669
+ head?: never;
670
+ patch?: never;
671
+ trace?: never;
672
+ };
656
673
  "/api/v1/transcripts/{id}/share": {
657
674
  parameters: {
658
675
  query?: never;
@@ -762,7 +779,7 @@ export interface paths {
762
779
  path?: never;
763
780
  cookie?: never;
764
781
  };
765
- /** @description Read the caller's settings, including preview_before_attach. */
782
+ /** @description Read the caller's settings, including preview_before_attach and auto_attach_pull_requests. auto_attach_pull_requests is off by default; when on, Village links the caller's transcripts that trace a pull request's commits when the pull request opens in a repository one of the caller's collectives links, and never changes who can read them. */
766
783
  get: operations["getMySettings"];
767
784
  put?: never;
768
785
  post?: never;
@@ -773,6 +790,23 @@ export interface paths {
773
790
  patch: operations["updateMySettings"];
774
791
  trace?: never;
775
792
  };
793
+ "/api/v1/users/me/stats": {
794
+ parameters: {
795
+ query?: never;
796
+ header?: never;
797
+ path?: never;
798
+ cookie?: never;
799
+ };
800
+ /** @description Read totals over every transcript the caller published: transcripts, turns, recorded duration, tokens, and the distinct pull requests attached to those transcripts that the caller may read under the visibility rule of listTranscriptPullRequests (state attached; detached pull requests are not counted). The totals cover every transcript, not one page of a list. */
801
+ get: operations["getMyStats"];
802
+ put?: never;
803
+ post?: never;
804
+ delete?: never;
805
+ options?: never;
806
+ head?: never;
807
+ patch?: never;
808
+ trace?: never;
809
+ };
776
810
  }
777
811
  export type webhooks = Record<string, never>;
778
812
  export interface components {
@@ -978,6 +1012,7 @@ export interface components {
978
1012
  * @enum {string}
979
1013
  */
980
1014
  SchemaInputModality: Schema.InputModality;
1015
+ SchemaInterpretationDiagnostics: Schema.InterpretationDiagnostics;
981
1016
  /**
982
1017
  * License
983
1018
  * @description Content license for a published transcript
@@ -1101,6 +1136,7 @@ export interface components {
1101
1136
  * @enum {string}
1102
1137
  */
1103
1138
  SchemaRelationshipTargetState: Schema.RelationshipTargetState;
1139
+ SchemaRetainedUnknownRecord: Schema.RetainedUnknownRecord;
1104
1140
  /**
1105
1141
  * Role
1106
1142
  * @description Sender role of a message turn
@@ -1392,6 +1428,8 @@ export interface components {
1392
1428
  * @enum {string}
1393
1429
  */
1394
1430
  SchemaVillagePullRequestAttachmentState: Schema.VillagePullRequestAttachmentState;
1431
+ SchemaVillagePullRequestRef: Schema.VillagePullRequestRef;
1432
+ SchemaVillagePullRequestsSummary: Schema.VillagePullRequestsSummary;
1395
1433
  SchemaVillageRemoveGroupMemberResponse: Schema.VillageRemoveGroupMemberResponse;
1396
1434
  SchemaVillageRepositoryCommit: Schema.VillageRepositoryCommit;
1397
1435
  SchemaVillageRepositoryCommitsResponse: Schema.VillageRepositoryCommitsResponse;
@@ -1448,6 +1486,8 @@ export interface components {
1448
1486
  SchemaVillageTranscriptListResponse: Schema.VillageTranscriptListResponse;
1449
1487
  SchemaVillageTranscriptListRow: Schema.VillageTranscriptListRow;
1450
1488
  SchemaVillageTranscriptMetadataResponse: Schema.VillageTranscriptMetadataResponse;
1489
+ SchemaVillageTranscriptPullRequest: Schema.VillageTranscriptPullRequest;
1490
+ SchemaVillageTranscriptPullRequestsResponse: Schema.VillageTranscriptPullRequestsResponse;
1451
1491
  SchemaVillageTranscriptShare: Schema.VillageTranscriptShare;
1452
1492
  /**
1453
1493
  * Village Transcript Visibility
@@ -1471,6 +1511,7 @@ export interface components {
1471
1511
  SchemaVillageUserGroup: Schema.VillageUserGroup;
1472
1512
  SchemaVillageUserGroupShare: Schema.VillageUserGroupShare;
1473
1513
  SchemaVillageUserSettings: Schema.VillageUserSettings;
1514
+ SchemaVillageUserStats: Schema.VillageUserStats;
1474
1515
  SchemaVillageVisibleGroup: Schema.VillageVisibleGroup;
1475
1516
  /**
1476
1517
  * Visibility
@@ -3851,6 +3892,65 @@ export interface operations {
3851
3892
  };
3852
3893
  };
3853
3894
  };
3895
+ listTranscriptPullRequests: {
3896
+ parameters: {
3897
+ query?: never;
3898
+ header?: never;
3899
+ path: {
3900
+ /** @description Transcript identifier */
3901
+ id: components["schemas"]["SchemaTranscriptID"];
3902
+ };
3903
+ cookie?: never;
3904
+ };
3905
+ requestBody?: never;
3906
+ responses: {
3907
+ /** @description OK */
3908
+ 200: {
3909
+ headers: {
3910
+ [name: string]: unknown;
3911
+ };
3912
+ content: {
3913
+ "application/json": components["schemas"]["SchemaVillageTranscriptPullRequestsResponse"];
3914
+ };
3915
+ };
3916
+ /** @description Bad Request */
3917
+ 400: {
3918
+ headers: {
3919
+ [name: string]: unknown;
3920
+ };
3921
+ content: {
3922
+ "application/json": components["schemas"]["SchemaVillageErrorResponse"];
3923
+ };
3924
+ };
3925
+ /** @description Not Found */
3926
+ 404: {
3927
+ headers: {
3928
+ [name: string]: unknown;
3929
+ };
3930
+ content: {
3931
+ "application/json": components["schemas"]["SchemaVillageErrorResponse"];
3932
+ };
3933
+ };
3934
+ /** @description Too Many Requests */
3935
+ 429: {
3936
+ headers: {
3937
+ [name: string]: unknown;
3938
+ };
3939
+ content: {
3940
+ "application/json": components["schemas"]["SchemaVillageErrorResponse"];
3941
+ };
3942
+ };
3943
+ /** @description Internal Server Error */
3944
+ 500: {
3945
+ headers: {
3946
+ [name: string]: unknown;
3947
+ };
3948
+ content: {
3949
+ "application/json": components["schemas"]["SchemaVillageErrorResponse"];
3950
+ };
3951
+ };
3952
+ };
3953
+ };
3854
3954
  shareTranscriptWithGroups: {
3855
3955
  parameters: {
3856
3956
  query?: never;
@@ -4278,4 +4378,42 @@ export interface operations {
4278
4378
  };
4279
4379
  };
4280
4380
  };
4381
+ getMyStats: {
4382
+ parameters: {
4383
+ query?: never;
4384
+ header?: never;
4385
+ path?: never;
4386
+ cookie?: never;
4387
+ };
4388
+ requestBody?: never;
4389
+ responses: {
4390
+ /** @description OK */
4391
+ 200: {
4392
+ headers: {
4393
+ [name: string]: unknown;
4394
+ };
4395
+ content: {
4396
+ "application/json": components["schemas"]["SchemaVillageUserStats"];
4397
+ };
4398
+ };
4399
+ /** @description Unauthorized */
4400
+ 401: {
4401
+ headers: {
4402
+ [name: string]: unknown;
4403
+ };
4404
+ content: {
4405
+ "application/json": components["schemas"]["SchemaVillageErrorResponse"];
4406
+ };
4407
+ };
4408
+ /** @description Internal Server Error */
4409
+ 500: {
4410
+ headers: {
4411
+ [name: string]: unknown;
4412
+ };
4413
+ content: {
4414
+ "application/json": components["schemas"]["SchemaVillageErrorResponse"];
4415
+ };
4416
+ };
4417
+ };
4418
+ };
4281
4419
  }
@@ -0,0 +1,267 @@
1
+ export declare const wireAliasShapes: {
2
+ readonly ActorOrigin: {};
3
+ readonly ChildSessionRef: {
4
+ readonly fields: {
5
+ readonly id: {};
6
+ readonly project: {};
7
+ readonly startTime: {};
8
+ };
9
+ };
10
+ readonly CommandInvocation: {
11
+ readonly fields: {
12
+ readonly args: {};
13
+ readonly name: {};
14
+ };
15
+ };
16
+ readonly ContentKind: {};
17
+ readonly ContentOrigin: {};
18
+ readonly ContentOwnership: {};
19
+ readonly ContentProvenance: {
20
+ readonly fields: {
21
+ readonly actor: "ActorOrigin";
22
+ readonly delivery: "DeliveryOrigin";
23
+ readonly evidence: "EvidenceKind";
24
+ readonly inputModality: "InputModality";
25
+ readonly origin: "ContentOrigin";
26
+ readonly ownership: "ContentOwnership";
27
+ readonly submissionRef: "SubmissionRef";
28
+ };
29
+ };
30
+ readonly DeliveryOrigin: {};
31
+ readonly EarlierHistorySection: {
32
+ readonly fields: {
33
+ readonly nativeMetadata: {
34
+ readonly items: "NativeMetadataRecord";
35
+ };
36
+ readonly state: "EarlierHistoryState";
37
+ readonly turns: {
38
+ readonly items: "TurnDetail";
39
+ };
40
+ };
41
+ };
42
+ readonly EarlierHistoryState: {};
43
+ readonly EntryType: {};
44
+ readonly EvidenceKind: {};
45
+ readonly Harness: {};
46
+ readonly InputModality: {};
47
+ readonly InterpretationDiagnostics: {
48
+ readonly fields: {
49
+ readonly partial: {};
50
+ };
51
+ };
52
+ readonly NativeAttachmentRef: {
53
+ readonly fields: {
54
+ readonly toolCallId: {};
55
+ readonly turnIndex: {};
56
+ };
57
+ };
58
+ readonly NativeMetadataKind: {};
59
+ readonly NativeMetadataRecord: {
60
+ readonly fields: {
61
+ readonly attachment: "NativeAttachmentRef";
62
+ readonly customType: {};
63
+ readonly data: {};
64
+ readonly id: {};
65
+ readonly kind: "NativeMetadataKind";
66
+ readonly source: "NativeSourceRef";
67
+ };
68
+ };
69
+ readonly NativeMetadataSourceType: {};
70
+ readonly NativePiMessageRole: {};
71
+ readonly NativeSourceRef: {
72
+ readonly fields: {
73
+ readonly entryRef: "SourceEntryRef";
74
+ readonly messageRole: "NativePiMessageRole";
75
+ readonly sourceType: "NativeMetadataSourceType";
76
+ };
77
+ };
78
+ readonly ObservedModelID: {};
79
+ readonly PublicRevisionRef: {};
80
+ readonly PublicSourceAnchor: {
81
+ readonly fields: {
82
+ readonly kind: "PublicSourceAnchorKind";
83
+ readonly sourceEntryRef: "SourceEntryRef";
84
+ readonly sourceRevisionRef: "PublicRevisionRef";
85
+ };
86
+ };
87
+ readonly PublicSourceAnchorKind: {};
88
+ readonly RecordedCostDetail: {
89
+ readonly fields: {
90
+ readonly cacheRead: {};
91
+ readonly cacheWrite: {};
92
+ readonly input: {};
93
+ readonly output: {};
94
+ readonly source: {};
95
+ readonly total: {};
96
+ };
97
+ };
98
+ readonly RelationshipTargetState: {};
99
+ readonly RetainedUnknownRecord: {
100
+ readonly fields: {
101
+ readonly kind: {};
102
+ readonly namespace: {};
103
+ readonly payload: {};
104
+ readonly pointer: {};
105
+ readonly position: {};
106
+ readonly recordIndex: {};
107
+ readonly sourceRef: {};
108
+ };
109
+ };
110
+ readonly Role: {};
111
+ readonly SessionDetailPayload: {
112
+ readonly fields: {
113
+ readonly childSessions: {
114
+ readonly items: "ChildSessionRef";
115
+ };
116
+ readonly diagnostics: "InterpretationDiagnostics";
117
+ readonly durationMins: {};
118
+ readonly earlierHistory: {
119
+ readonly items: "EarlierHistorySection";
120
+ };
121
+ readonly endTime: {};
122
+ readonly gitBranch: {};
123
+ readonly gitRemote: {};
124
+ readonly harness: "Harness";
125
+ readonly id: {};
126
+ readonly inputSubmissionCount: {};
127
+ readonly model: {};
128
+ readonly nativeMetadata: {
129
+ readonly items: "NativeMetadataRecord";
130
+ };
131
+ readonly outcome: "SessionOutcome";
132
+ readonly parentSessionId: "SessionID";
133
+ readonly project: {};
134
+ readonly purpose: "SessionPurpose";
135
+ readonly relationships: {
136
+ readonly items: "SessionRelationship";
137
+ };
138
+ readonly retainedUnknown: {
139
+ readonly items: "RetainedUnknownRecord";
140
+ };
141
+ readonly rootSessionId: "SessionID";
142
+ readonly schemaVersion: {};
143
+ readonly scorecard: "SessionScorecard";
144
+ readonly sessionOrigin: "SessionOrigin";
145
+ readonly source: {};
146
+ readonly startTime: {};
147
+ readonly status: {};
148
+ readonly tokensIn: {};
149
+ readonly tokensOut: {};
150
+ readonly toolCallCount: {};
151
+ readonly totalTokens: {};
152
+ readonly turnCount: {};
153
+ readonly turns: {
154
+ readonly items: "TurnDetail";
155
+ };
156
+ readonly workingDirectory: {};
157
+ };
158
+ };
159
+ readonly SessionID: {};
160
+ readonly SessionOrigin: {};
161
+ readonly SessionOutcome: {};
162
+ readonly SessionPurpose: {};
163
+ readonly SessionRelationship: {
164
+ readonly fields: {
165
+ readonly anchor: "PublicSourceAnchor";
166
+ readonly evidence: "EvidenceKind";
167
+ readonly kind: "SessionRelationshipKind";
168
+ readonly targetLocalId: "SessionID";
169
+ readonly targetState: "RelationshipTargetState";
170
+ };
171
+ };
172
+ readonly SessionRelationshipKind: {};
173
+ readonly SessionScorecard: {
174
+ readonly fields: {
175
+ readonly costTotalUsd: {};
176
+ readonly m2TokenOutcomeRatio: {};
177
+ readonly m4ConsecutiveErrorMax: {};
178
+ readonly m5ContextUtilizationPct: {};
179
+ readonly m6OutputSurvivalPct: {};
180
+ readonly m7SpecHasConstraints: {};
181
+ readonly m7SpecHasExamples: {};
182
+ readonly outcome: "SessionOutcome";
183
+ readonly retryTokensWasted: {};
184
+ readonly signalDensity: {};
185
+ readonly specQualityScore: {};
186
+ readonly totalTokens: {};
187
+ readonly withinSessionReverts: {};
188
+ };
189
+ };
190
+ readonly SourceEntryRef: {};
191
+ readonly StopReason: {};
192
+ readonly SubmissionRef: {};
193
+ readonly TokenUsageDetail: {
194
+ readonly fields: {
195
+ readonly cacheRead: {};
196
+ readonly cacheWrite: {};
197
+ readonly cacheWrite1h: {};
198
+ readonly input: {};
199
+ readonly output: {};
200
+ readonly reasoning: {};
201
+ readonly totalTokens: {};
202
+ };
203
+ };
204
+ readonly ToolCallDetail: {
205
+ readonly fields: {
206
+ readonly arguments: {};
207
+ readonly callEntryRef: "SourceEntryRef";
208
+ readonly callProvenance: "ContentProvenance";
209
+ readonly durationMs: {};
210
+ readonly exitCode: {};
211
+ readonly filePath: {};
212
+ readonly id: {};
213
+ readonly isError: {};
214
+ readonly name: {};
215
+ readonly namespace: {};
216
+ readonly result: {};
217
+ readonly resultEntryRef: "SourceEntryRef";
218
+ readonly resultProvenance: "ContentProvenance";
219
+ readonly toolKind: "ToolCallKind";
220
+ readonly usage: "UsageDetail";
221
+ };
222
+ };
223
+ readonly ToolCallKind: {};
224
+ readonly TranscriptContent: {
225
+ readonly fields: {
226
+ readonly contractVersion: {};
227
+ readonly kind: "ContentKind";
228
+ readonly sessionDetail: "SessionDetailPayload";
229
+ };
230
+ };
231
+ readonly TurnDetail: {
232
+ readonly fields: {
233
+ readonly agentName: {};
234
+ readonly command: "CommandInvocation";
235
+ readonly content: {};
236
+ readonly depth: {};
237
+ readonly entryType: "EntryType";
238
+ readonly hasThinking: {};
239
+ readonly index: {};
240
+ readonly observedModel: "ObservedModelID";
241
+ readonly parentIndex: {};
242
+ readonly provenance: "ContentProvenance";
243
+ readonly role: "Role";
244
+ readonly sourceEntryRef: "SourceEntryRef";
245
+ readonly stopReason: "StopReason";
246
+ readonly timestamp: {};
247
+ readonly tokensIn: {};
248
+ readonly tokensOut: {};
249
+ readonly toolCalls: {
250
+ readonly items: "ToolCallDetail";
251
+ };
252
+ readonly usage: "UsageDetail";
253
+ };
254
+ };
255
+ readonly UsageCompleteness: {};
256
+ readonly UsageDetail: {
257
+ readonly fields: {
258
+ readonly completeness: "UsageCompleteness";
259
+ readonly cost: "RecordedCostDetail";
260
+ readonly ownerId: {};
261
+ readonly scope: "UsageScope";
262
+ readonly sourceEntryRef: "SourceEntryRef";
263
+ readonly tokens: "TokenUsageDetail";
264
+ };
265
+ };
266
+ readonly UsageScope: {};
267
+ };