@peasant-labs/schema 0.40.0 → 0.42.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.
- package/dist/fixtures/quality.d.ts +19 -1
- package/dist/fixtures/quality.js +2 -0
- package/dist/fixtures/session-graph.d.ts +453 -39
- package/dist/internal/generated/contract/zod.gen.d.ts +2229 -187
- package/dist/internal/generated/contract/zod.gen.js +281 -23
- package/dist/internal/generated/enums.gen.d.ts +9 -0
- package/dist/internal/generated/enums.gen.js +10 -0
- package/dist/internal/generated/local-api.d.ts +28 -6
- package/dist/internal/generated/public-contract.gen.d.ts +2 -2
- package/dist/internal/generated/public-contract.gen.js +1 -1
- package/dist/internal/generated/quality-fixtures.gen.js +115 -1
- package/dist/internal/generated/session-graph-fixtures.gen.d.ts +453 -39
- package/dist/internal/generated/session-graph-fixtures.gen.js +505 -69
- package/dist/internal/generated/versions.gen.d.ts +3 -3
- package/dist/internal/generated/versions.gen.js +3 -3
- package/dist/internal/generated/wire-alias-shapes.gen.d.ts +1 -0
- package/dist/internal/generated/wire-alias-shapes.gen.js +1 -0
- package/dist/local-api.d.ts +2 -1
- package/package.json +1 -1
|
@@ -931,6 +931,14 @@ export const zLocalSyncPublicationFilter = z.enum([
|
|
|
931
931
|
'published',
|
|
932
932
|
'auto'
|
|
933
933
|
]);
|
|
934
|
+
export const zLocalSyncSessionTotals = z.object({
|
|
935
|
+
sessions: z.int().gte(0).lte(9007199254740991)
|
|
936
|
+
});
|
|
937
|
+
export const zLongestStreak = z.object({
|
|
938
|
+
endWeek: z.string().nullable(),
|
|
939
|
+
startWeek: z.string().nullable(),
|
|
940
|
+
weeks: z.int().gte(0).lte(9007199254740991)
|
|
941
|
+
});
|
|
934
942
|
export const zMapEdge = z.object({
|
|
935
943
|
count: z.int(),
|
|
936
944
|
from: z.string(),
|
|
@@ -946,6 +954,17 @@ export const zMapNodeKind = z.enum([
|
|
|
946
954
|
'package',
|
|
947
955
|
'file'
|
|
948
956
|
]);
|
|
957
|
+
export const zMedianP90 = z.object({
|
|
958
|
+
count: z.int().gte(0).lte(9007199254740991),
|
|
959
|
+
median: z.number().nullable(),
|
|
960
|
+
p90: z.number().nullable()
|
|
961
|
+
});
|
|
962
|
+
export const zAnalyticsSessionStats = z.object({
|
|
963
|
+
durationMins: zMedianP90,
|
|
964
|
+
toolCallCount: zMedianP90,
|
|
965
|
+
totalTokens: zMedianP90,
|
|
966
|
+
turnCount: zMedianP90
|
|
967
|
+
});
|
|
949
968
|
/**
|
|
950
969
|
* Message Type
|
|
951
970
|
*
|
|
@@ -1072,6 +1091,27 @@ export const zLocalContributionTraversalConflict = z.object({
|
|
|
1072
1091
|
currentTraversalRevision: zContributionTraversalRevision,
|
|
1073
1092
|
issue: zOperationIssue
|
|
1074
1093
|
});
|
|
1094
|
+
export const zOutcomeDistribution = z.object({
|
|
1095
|
+
failed: z.int().gte(0).lte(9007199254740991),
|
|
1096
|
+
partial: z.int().gte(0).lte(9007199254740991),
|
|
1097
|
+
resolved: z.int().gte(0).lte(9007199254740991),
|
|
1098
|
+
total: z.int().gte(0).lte(9007199254740991),
|
|
1099
|
+
unknown: z.int().gte(0).lte(9007199254740991)
|
|
1100
|
+
});
|
|
1101
|
+
export const zContributorBreakdown = z.object({
|
|
1102
|
+
activeWeeks: z.int().gte(0).lte(9007199254740991),
|
|
1103
|
+
contributorId: z.string(),
|
|
1104
|
+
firstSeen: z.string().nullable(),
|
|
1105
|
+
lastSeen: z.string().nullable(),
|
|
1106
|
+
outcomes: zOutcomeDistribution,
|
|
1107
|
+
sessions: z.int().gte(0).lte(9007199254740991),
|
|
1108
|
+
sessionsWithCommit: z.int().gte(0).lte(9007199254740991),
|
|
1109
|
+
totalCommits: z.int().gte(0).lte(9007199254740991),
|
|
1110
|
+
totalDurationMins: z.int().gte(0).lte(9007199254740991),
|
|
1111
|
+
totalTokens: z.int().gte(0).lte(9007199254740991),
|
|
1112
|
+
totalToolCalls: z.int().gte(0).lte(9007199254740991),
|
|
1113
|
+
totalTurns: z.int().gte(0).lte(9007199254740991)
|
|
1114
|
+
});
|
|
1075
1115
|
/**
|
|
1076
1116
|
* Omitted preserves, null requests clear, and a canonical license replaces
|
|
1077
1117
|
*/
|
|
@@ -1081,11 +1121,20 @@ export const zOwnerUpdateLicenseIntent = z.enum([
|
|
|
1081
1121
|
'CC-BY-SA-4.0'
|
|
1082
1122
|
]).nullable();
|
|
1083
1123
|
/**
|
|
1084
|
-
* Page
|
|
1124
|
+
* Page Size
|
|
1085
1125
|
*
|
|
1086
|
-
*
|
|
1126
|
+
* 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.
|
|
1087
1127
|
*/
|
|
1088
|
-
export const
|
|
1128
|
+
export const zPageSize = z.union([
|
|
1129
|
+
z.literal(25),
|
|
1130
|
+
z.literal(50),
|
|
1131
|
+
z.literal(100)
|
|
1132
|
+
]);
|
|
1133
|
+
export const zPersonalMedians = z.object({
|
|
1134
|
+
retryShare: z.number().nullish(),
|
|
1135
|
+
specQualityScore: z.number().nullish(),
|
|
1136
|
+
withinSessionReverts: z.number().nullish()
|
|
1137
|
+
});
|
|
1089
1138
|
/**
|
|
1090
1139
|
* Project Hash
|
|
1091
1140
|
*
|
|
@@ -1389,6 +1438,11 @@ export const zRetainedUnknownRecord = z.object({
|
|
|
1389
1438
|
recordIndex: z.number().int().min(0).max(9007199254740991),
|
|
1390
1439
|
sourceRef: z.string().min(1)
|
|
1391
1440
|
});
|
|
1441
|
+
export const zReturningContributorRate = z.object({
|
|
1442
|
+
rate: z.number().gte(0).lte(1),
|
|
1443
|
+
returning: z.int().gte(0).lte(9007199254740991),
|
|
1444
|
+
total: z.int().gte(0).lte(9007199254740991)
|
|
1445
|
+
});
|
|
1392
1446
|
export const zReviewSuggestion = z.object({
|
|
1393
1447
|
daysSince: z.int(),
|
|
1394
1448
|
lastEngaged: z.string(),
|
|
@@ -1786,6 +1840,11 @@ export const zSessionTeammate = z.object({
|
|
|
1786
1840
|
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");
|
|
1787
1841
|
}
|
|
1788
1842
|
});
|
|
1843
|
+
export const zSessionToCommitRate = z.object({
|
|
1844
|
+
rate: z.number().gte(0).lte(1),
|
|
1845
|
+
total: z.int().gte(0).lte(9007199254740991),
|
|
1846
|
+
withCommit: z.int().gte(0).lte(9007199254740991)
|
|
1847
|
+
});
|
|
1789
1848
|
export const zShutdownResponse = z.object({
|
|
1790
1849
|
status: z.string()
|
|
1791
1850
|
});
|
|
@@ -2018,7 +2077,8 @@ export const zLocalSyncSummary = z.object({
|
|
|
2018
2077
|
export const zLocalSessionRow = z.object({
|
|
2019
2078
|
matches: z.array(zSearchResult).optional(),
|
|
2020
2079
|
session: zSessionSummary,
|
|
2021
|
-
sync: zLocalSyncSummary.nullish()
|
|
2080
|
+
sync: zLocalSyncSummary.nullish(),
|
|
2081
|
+
title: z.string().optional()
|
|
2022
2082
|
}).superRefine((value, context) => {
|
|
2023
2083
|
const fail = (reason) => context.addIssue({ code: "custom", message: "schema.zLocalSessionRow during grouped read validation: " + reason });
|
|
2024
2084
|
if (value.session.id === "")
|
|
@@ -2057,18 +2117,21 @@ export const zLocalSessionListItem = z.object({
|
|
|
2057
2117
|
}
|
|
2058
2118
|
});
|
|
2059
2119
|
export const zLocalHelperMembersPayload = z.object({
|
|
2060
|
-
limit: z.int().gte(1).lte(9007199254740991),
|
|
2061
2120
|
members: z.array(zLocalSessionListItem.and(z.object({
|
|
2062
2121
|
context: z.null().optional(),
|
|
2063
2122
|
kind: z.enum(['transcript']).optional(),
|
|
2064
2123
|
transcript: zLocalSessionRow
|
|
2065
2124
|
}))),
|
|
2125
|
+
nextItems: z.array(zLocalSessionListItem),
|
|
2066
2126
|
page: z.int().gte(1).lte(9007199254740991),
|
|
2127
|
+
perPage: zPageSize,
|
|
2128
|
+
revision: z.string().min(1),
|
|
2067
2129
|
total: z.int().gte(0).lte(9007199254740991)
|
|
2068
2130
|
}).superRefine((value, context) => {
|
|
2069
2131
|
const fail = (reason) => context.addIssue({ code: "custom", message: "schema.zLocalHelperMembersPayload during grouped read validation: " + reason });
|
|
2070
|
-
|
|
2071
|
-
|
|
2132
|
+
const pageSize = value.perPage;
|
|
2133
|
+
if (value.members.length > pageSize || value.members.length > value.total)
|
|
2134
|
+
fail("member count exceeds page size or direct total; count direct saved helpers before paging");
|
|
2072
2135
|
const ids = new Set();
|
|
2073
2136
|
const groups = new Set();
|
|
2074
2137
|
for (const member of value.members) {
|
|
@@ -2090,10 +2153,20 @@ export const zLocalHelperMembersPayload = z.object({
|
|
|
2090
2153
|
export const zLocalSessionListPayload = z.object({
|
|
2091
2154
|
helperThreadTotal: z.int().gte(0).lte(9007199254740991),
|
|
2092
2155
|
items: z.array(zLocalSessionListItem),
|
|
2093
|
-
|
|
2156
|
+
nextItems: z.array(zLocalSessionListItem),
|
|
2094
2157
|
ordinarySessionTotal: z.int().gte(0).lte(9007199254740991),
|
|
2095
2158
|
page: z.int().gte(1).lte(9007199254740991),
|
|
2096
|
-
|
|
2159
|
+
perPage: zPageSize,
|
|
2160
|
+
revision: z.string().min(1),
|
|
2161
|
+
total: z.int().gte(0).lte(9007199254740991)
|
|
2162
|
+
});
|
|
2163
|
+
export const zLocalSessionPage = z.object({
|
|
2164
|
+
items: z.array(zLocalSessionRow),
|
|
2165
|
+
nextItems: z.array(zLocalSessionRow),
|
|
2166
|
+
page: z.int().gte(1).lte(9007199254740991),
|
|
2167
|
+
perPage: zPageSize,
|
|
2168
|
+
revision: z.string().min(1),
|
|
2169
|
+
total: z.int().gte(0).lte(9007199254740991)
|
|
2097
2170
|
});
|
|
2098
2171
|
export const zLocalSyncSessionsPayload = z.object({
|
|
2099
2172
|
sessions: z.array(zLocalSyncSummary)
|
|
@@ -2415,6 +2488,41 @@ export const zThinkingLevelChange = z.intersection(z.unknown(), z.object({
|
|
|
2415
2488
|
level: zThinkingLevel.optional(),
|
|
2416
2489
|
raw: zThinkingLevelRaw.optional()
|
|
2417
2490
|
})).refine((value) => value.level !== undefined || value.raw !== undefined, { error: "ThinkingLevelChange must carry level or raw" });
|
|
2491
|
+
export const zSessionDetailHeader = z.object({
|
|
2492
|
+
childSessions: z.array(zChildSessionRef).optional(),
|
|
2493
|
+
diagnostics: zInterpretationDiagnostics.optional(),
|
|
2494
|
+
durationMins: z.number(),
|
|
2495
|
+
earlierHistory: z.array(zEarlierHistoryState).optional(),
|
|
2496
|
+
endTime: z.iso.datetime(),
|
|
2497
|
+
gitBranch: z.string().optional(),
|
|
2498
|
+
gitRemote: z.string().optional(),
|
|
2499
|
+
harness: zHarness,
|
|
2500
|
+
id: z.string(),
|
|
2501
|
+
inputSubmissionCount: z.int().gte(0).lte(9007199254740991).optional(),
|
|
2502
|
+
model: z.string().optional(),
|
|
2503
|
+
outcome: zSessionOutcome.optional(),
|
|
2504
|
+
parentSessionId: zSessionID.nullish(),
|
|
2505
|
+
project: z.string().optional(),
|
|
2506
|
+
purpose: zSessionPurpose.optional(),
|
|
2507
|
+
relationships: z.array(zSessionRelationship).optional(),
|
|
2508
|
+
retainedUnknown: z.array(zRetainedUnknownRecord).optional(),
|
|
2509
|
+
rootSessionId: zSessionID.nullish(),
|
|
2510
|
+
schemaVersion: z.string().optional(),
|
|
2511
|
+
scorecard: zSessionScorecard.nullish(),
|
|
2512
|
+
sessionOrigin: zSessionOrigin.optional(),
|
|
2513
|
+
source: z.string().optional(),
|
|
2514
|
+
startTime: z.iso.datetime(),
|
|
2515
|
+
status: z.string().optional(),
|
|
2516
|
+
thinkingLevel: zThinkingLevel.optional(),
|
|
2517
|
+
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
2518
|
+
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
2519
|
+
tokensIn: z.int(),
|
|
2520
|
+
tokensOut: z.int(),
|
|
2521
|
+
toolCallCount: z.int(),
|
|
2522
|
+
totalTokens: z.int(),
|
|
2523
|
+
turnCount: z.int(),
|
|
2524
|
+
workingDirectory: z.string().optional()
|
|
2525
|
+
});
|
|
2418
2526
|
export const zTimelineSessionRef = z.object({
|
|
2419
2527
|
harness: zHarness,
|
|
2420
2528
|
hasCommitBinding: z.boolean(),
|
|
@@ -2637,6 +2745,58 @@ export const zSessionRelationshipNavigation = z.object({
|
|
|
2637
2745
|
status: zRelationshipNavigationStatus,
|
|
2638
2746
|
transcriptId: zTranscriptID.optional()
|
|
2639
2747
|
}).strict();
|
|
2748
|
+
export const zSessionDetailHeaderPayload = z.object({
|
|
2749
|
+
childSessions: z.array(zChildSessionRef).optional(),
|
|
2750
|
+
diagnostics: zInterpretationDiagnostics.optional(),
|
|
2751
|
+
durationMins: z.number(),
|
|
2752
|
+
earlierHistory: z.array(zEarlierHistoryState).optional(),
|
|
2753
|
+
endTime: z.iso.datetime(),
|
|
2754
|
+
gitBranch: z.string().optional(),
|
|
2755
|
+
gitRemote: z.string().optional(),
|
|
2756
|
+
harness: zHarness,
|
|
2757
|
+
id: z.string(),
|
|
2758
|
+
inputSubmissionCount: z.int().gte(0).lte(9007199254740991).optional(),
|
|
2759
|
+
model: z.string().optional(),
|
|
2760
|
+
outcome: zSessionOutcome.optional(),
|
|
2761
|
+
parentSessionId: zSessionID.optional(),
|
|
2762
|
+
project: z.string().optional(),
|
|
2763
|
+
purpose: zSessionPurpose.optional(),
|
|
2764
|
+
relationshipNavigation: z.array(zSessionRelationshipNavigation).optional(),
|
|
2765
|
+
relationships: z.array(zSessionRelationship).optional(),
|
|
2766
|
+
retainedUnknown: z.array(zRetainedUnknownRecord).optional(),
|
|
2767
|
+
rootSessionId: zSessionID.optional(),
|
|
2768
|
+
schemaVersion: z.string().optional(),
|
|
2769
|
+
scorecard: zSessionScorecard.optional(),
|
|
2770
|
+
sessionOrigin: zSessionOrigin.optional(),
|
|
2771
|
+
source: z.string().optional(),
|
|
2772
|
+
startTime: z.iso.datetime(),
|
|
2773
|
+
status: z.string().optional(),
|
|
2774
|
+
teammate: zSessionTeammate.nullish(),
|
|
2775
|
+
thinkingLevel: zThinkingLevel.optional(),
|
|
2776
|
+
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
2777
|
+
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
2778
|
+
tokensIn: z.int(),
|
|
2779
|
+
tokensOut: z.int(),
|
|
2780
|
+
toolCallCount: z.int(),
|
|
2781
|
+
totalTokens: z.int(),
|
|
2782
|
+
turnCount: z.int(),
|
|
2783
|
+
workingDirectory: z.string().optional()
|
|
2784
|
+
});
|
|
2785
|
+
export const zTranscriptSegmentRef = z.object({
|
|
2786
|
+
byteLength: z.int().gte(0).lte(9007199254740991),
|
|
2787
|
+
firstTurn: z.int().gte(0).lte(9007199254740991),
|
|
2788
|
+
index: z.int().gte(0).lte(9007199254740991),
|
|
2789
|
+
lastTurn: z.int().gte(0).lte(9007199254740991)
|
|
2790
|
+
});
|
|
2791
|
+
export const zTranscriptSegmentDirectory = z.object({
|
|
2792
|
+
directoryPage: z.int().gte(1).lte(9007199254740991).optional(),
|
|
2793
|
+
directoryPerPage: z.int().gte(1).lte(9007199254740991).optional(),
|
|
2794
|
+
revision: z.string().min(1),
|
|
2795
|
+
segments: z.array(zTranscriptSegmentRef),
|
|
2796
|
+
sessionId: zSessionID,
|
|
2797
|
+
totalSegments: z.int().gte(0).lte(9007199254740991),
|
|
2798
|
+
totalTurns: z.int().gte(0).lte(9007199254740991)
|
|
2799
|
+
});
|
|
2640
2800
|
/**
|
|
2641
2801
|
* TranscriptUpdateLicense
|
|
2642
2802
|
*
|
|
@@ -2696,6 +2856,18 @@ export const zTranscriptUpdateRequest = z.object({
|
|
|
2696
2856
|
title: z.string().max(500).optional(),
|
|
2697
2857
|
visibility: zTranscriptUpdateVisibility.optional()
|
|
2698
2858
|
}).strict();
|
|
2859
|
+
export const zTranscriptWindow = z.object({
|
|
2860
|
+
anchorTurn: z.int().gte(0).lte(9007199254740991),
|
|
2861
|
+
firstTurn: z.int().gte(0).lte(9007199254740991),
|
|
2862
|
+
hasNewer: z.boolean(),
|
|
2863
|
+
hasOlder: z.boolean(),
|
|
2864
|
+
lastTurn: z.int().gte(0).lte(9007199254740991),
|
|
2865
|
+
requestedAnchor: z.int().gte(0).lte(9007199254740991),
|
|
2866
|
+
revision: z.string().min(1),
|
|
2867
|
+
segments: z.array(z.int()),
|
|
2868
|
+
sessionId: zSessionID,
|
|
2869
|
+
span: z.int().gte(1).lte(10)
|
|
2870
|
+
});
|
|
2699
2871
|
export const zTrendsPayload = z.object({
|
|
2700
2872
|
days: z.array(zDayStats).nullable(),
|
|
2701
2873
|
totalSessions: z.int(),
|
|
@@ -2840,10 +3012,46 @@ export const zToolCallDetail = z.object({
|
|
|
2840
3012
|
toolKind: zToolCallKind.optional(),
|
|
2841
3013
|
usage: zUsageDetail.nullish()
|
|
2842
3014
|
});
|
|
3015
|
+
export const zTranscriptTurn = z.object({
|
|
3016
|
+
agentName: z.string().optional(),
|
|
3017
|
+
byteLength: z.int().gte(0).lte(9007199254740991),
|
|
3018
|
+
command: zCommandInvocation.optional(),
|
|
3019
|
+
content: z.string(),
|
|
3020
|
+
controlKind: z.string().nullish(),
|
|
3021
|
+
depth: z.int(),
|
|
3022
|
+
entryType: zEntryType.optional(),
|
|
3023
|
+
hasThinking: z.boolean().optional(),
|
|
3024
|
+
index: z.int(),
|
|
3025
|
+
observedModel: zObservedModelID.optional(),
|
|
3026
|
+
parentIndex: z.int().nullish(),
|
|
3027
|
+
provenance: zContentProvenance.optional(),
|
|
3028
|
+
role: zRole,
|
|
3029
|
+
sourceEntryRef: zSourceEntryRef.optional(),
|
|
3030
|
+
stopReason: zStopReason.optional(),
|
|
3031
|
+
thinkingLevel: zThinkingLevel.optional(),
|
|
3032
|
+
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
3033
|
+
timestamp: z.iso.datetime(),
|
|
3034
|
+
tokensIn: z.int().nullish(),
|
|
3035
|
+
tokensOut: z.int().nullish(),
|
|
3036
|
+
toolCalls: z.array(zToolCallDetail).optional(),
|
|
3037
|
+
truncated: z.boolean(),
|
|
3038
|
+
usage: zUsageDetail.optional()
|
|
3039
|
+
});
|
|
3040
|
+
export const zTranscriptSegment = z.object({
|
|
3041
|
+
byteLength: z.int().gte(0).lte(9007199254740991),
|
|
3042
|
+
firstTurn: z.int().gte(0).lte(9007199254740991),
|
|
3043
|
+
hasNewer: z.boolean(),
|
|
3044
|
+
hasOlder: z.boolean(),
|
|
3045
|
+
index: z.int().gte(0).lte(9007199254740991),
|
|
3046
|
+
lastTurn: z.int().gte(0).lte(9007199254740991),
|
|
3047
|
+
revision: z.string().min(1),
|
|
3048
|
+
turns: z.array(zTranscriptTurn)
|
|
3049
|
+
});
|
|
2843
3050
|
export const zTurnDetail = z.object({
|
|
2844
3051
|
agentName: z.string().optional(),
|
|
2845
3052
|
command: zCommandInvocation.nullish(),
|
|
2846
3053
|
content: z.string(),
|
|
3054
|
+
controlKind: z.string().nullish(),
|
|
2847
3055
|
depth: z.int(),
|
|
2848
3056
|
entryType: zEntryType.optional(),
|
|
2849
3057
|
hasThinking: z.boolean().optional(),
|
|
@@ -2907,14 +3115,15 @@ export const zSessionDetailPayload = z.object({
|
|
|
2907
3115
|
export const zSessionDetailReadPayload = z.object({
|
|
2908
3116
|
childSessions: z.array(zChildSessionRef).optional(),
|
|
2909
3117
|
diagnostics: zInterpretationDiagnostics.optional(),
|
|
2910
|
-
durationMins: z.number()
|
|
3118
|
+
durationMins: z.number(),
|
|
2911
3119
|
earlierHistory: z.array(zEarlierHistorySection).optional(),
|
|
2912
|
-
endTime: z.iso.datetime()
|
|
3120
|
+
endTime: z.iso.datetime(),
|
|
2913
3121
|
gitBranch: z.string().optional(),
|
|
2914
3122
|
gitRemote: z.string().optional(),
|
|
2915
|
-
harness: zHarness
|
|
2916
|
-
id: z.string()
|
|
3123
|
+
harness: zHarness,
|
|
3124
|
+
id: z.string(),
|
|
2917
3125
|
inputSubmissionCount: z.int().gte(0).lte(9007199254740991).optional(),
|
|
3126
|
+
medians: zPersonalMedians.nullish(),
|
|
2918
3127
|
model: z.string().optional(),
|
|
2919
3128
|
nativeMetadata: z.array(zNativeMetadataRecord).optional(),
|
|
2920
3129
|
outcome: zSessionOutcome.optional(),
|
|
@@ -2924,23 +3133,25 @@ export const zSessionDetailReadPayload = z.object({
|
|
|
2924
3133
|
relationshipNavigation: z.array(zSessionRelationshipNavigation).optional(),
|
|
2925
3134
|
relationships: z.array(zSessionRelationship).optional(),
|
|
2926
3135
|
retainedUnknown: z.array(zRetainedUnknownRecord).optional(),
|
|
3136
|
+
revision: z.string().optional(),
|
|
2927
3137
|
rootSessionId: zSessionID.optional(),
|
|
2928
3138
|
schemaVersion: z.string().optional(),
|
|
2929
3139
|
scorecard: zSessionScorecard.optional(),
|
|
2930
3140
|
sessionOrigin: zSessionOrigin.optional(),
|
|
2931
3141
|
source: z.string().optional(),
|
|
2932
|
-
startTime: z.iso.datetime()
|
|
3142
|
+
startTime: z.iso.datetime(),
|
|
2933
3143
|
status: z.string().optional(),
|
|
2934
3144
|
teammate: zSessionTeammate.nullish(),
|
|
2935
3145
|
thinkingLevel: zThinkingLevel.optional(),
|
|
2936
3146
|
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
2937
3147
|
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
3148
|
+
title: z.string().optional(),
|
|
3149
|
+
tokensIn: z.int(),
|
|
3150
|
+
tokensOut: z.int(),
|
|
3151
|
+
toolCallCount: z.int(),
|
|
3152
|
+
totalTokens: z.int(),
|
|
3153
|
+
turnCount: z.int(),
|
|
3154
|
+
turns: z.array(zTurnDetail).nullable(),
|
|
2944
3155
|
workingDirectory: z.string().optional()
|
|
2945
3156
|
});
|
|
2946
3157
|
export const zTranscriptContent = z.object({
|
|
@@ -3736,7 +3947,12 @@ export const zLocalSyncSessionRow = z.object({
|
|
|
3736
3947
|
});
|
|
3737
3948
|
export const zLocalSyncSessionPage = z.object({
|
|
3738
3949
|
items: z.array(zLocalSyncSessionRow),
|
|
3739
|
-
|
|
3950
|
+
nextItems: z.array(zLocalSyncSessionRow),
|
|
3951
|
+
page: z.int().gte(1).lte(9007199254740991),
|
|
3952
|
+
perPage: zPageSize,
|
|
3953
|
+
revision: z.string().min(1),
|
|
3954
|
+
total: z.int().gte(0).lte(9007199254740991),
|
|
3955
|
+
totals: zLocalSyncSessionTotals.optional()
|
|
3740
3956
|
});
|
|
3741
3957
|
export const zSyncPushCollectives = z.object({
|
|
3742
3958
|
add: z.array(zVillageUUID).optional(),
|
|
@@ -4171,8 +4387,9 @@ export const zVillageHelperMembersPayload = z.object({
|
|
|
4171
4387
|
total: z.int().gte(0).lte(9007199254740991)
|
|
4172
4388
|
}).superRefine((value, context) => {
|
|
4173
4389
|
const fail = (reason) => context.addIssue({ code: "custom", message: "schema.zVillageHelperMembersPayload during grouped read validation: " + reason });
|
|
4174
|
-
|
|
4175
|
-
|
|
4390
|
+
const pageSize = value.limit;
|
|
4391
|
+
if (value.members.length > pageSize || value.members.length > value.total)
|
|
4392
|
+
fail("member count exceeds page size or direct total; count direct saved helpers before paging");
|
|
4176
4393
|
const ids = new Set();
|
|
4177
4394
|
const groups = new Set();
|
|
4178
4395
|
for (const member of value.members) {
|
|
@@ -4419,3 +4636,44 @@ export const zFamiliarityPayload = z.object({
|
|
|
4419
4636
|
trails: z.array(zWalkthroughTrail).nullable(),
|
|
4420
4637
|
unexploredCount: z.int()
|
|
4421
4638
|
});
|
|
4639
|
+
export const zWeekAvgDuration = z.object({
|
|
4640
|
+
avgDurationMins: z.number().gte(0),
|
|
4641
|
+
sessions: z.int().gte(0).lte(9007199254740991),
|
|
4642
|
+
week: z.string()
|
|
4643
|
+
});
|
|
4644
|
+
export const zWeekContributors = z.object({
|
|
4645
|
+
contributors: z.int().gte(0).lte(9007199254740991),
|
|
4646
|
+
week: z.string()
|
|
4647
|
+
});
|
|
4648
|
+
export const zWeekCount = z.object({
|
|
4649
|
+
count: z.int().gte(0).lte(9007199254740991),
|
|
4650
|
+
week: z.string()
|
|
4651
|
+
});
|
|
4652
|
+
export const zWeekNewContributors = z.object({
|
|
4653
|
+
newContributors: z.int().gte(0).lte(9007199254740991),
|
|
4654
|
+
week: z.string()
|
|
4655
|
+
});
|
|
4656
|
+
export const zProjectAnalytics = z.object({
|
|
4657
|
+
avgDurationPerActiveWeek: z.array(zWeekAvgDuration),
|
|
4658
|
+
longestStreak: zLongestStreak,
|
|
4659
|
+
newContributorVelocity: z.array(zWeekNewContributors),
|
|
4660
|
+
outcomeDistribution: zOutcomeDistribution,
|
|
4661
|
+
perContributorBreakdown: z.array(zContributorBreakdown),
|
|
4662
|
+
returningContributorRate: zReturningContributorRate,
|
|
4663
|
+
sessionStats: zAnalyticsSessionStats,
|
|
4664
|
+
sessionToCommitRate: zSessionToCommitRate,
|
|
4665
|
+
sessionsPerWeek: z.array(zWeekCount),
|
|
4666
|
+
totalContributors: z.int().gte(0).lte(9007199254740991),
|
|
4667
|
+
totalProjects: z.int().gte(0).lte(9007199254740991),
|
|
4668
|
+
totalSessions: z.int().gte(0).lte(9007199254740991),
|
|
4669
|
+
weeklyActiveContributors: z.array(zWeekContributors)
|
|
4670
|
+
});
|
|
4671
|
+
export const zQualityPage = z.object({
|
|
4672
|
+
items: z.array(zQualitySession),
|
|
4673
|
+
nextItems: z.array(zQualitySession),
|
|
4674
|
+
page: z.int().gte(1).lte(9007199254740991),
|
|
4675
|
+
perPage: zPageSize,
|
|
4676
|
+
revision: z.string().min(1),
|
|
4677
|
+
summary: zProjectAnalytics,
|
|
4678
|
+
total: z.int().gte(0).lte(9007199254740991)
|
|
4679
|
+
});
|
|
@@ -14,6 +14,7 @@ import { type CollectiveFetchOutcome as CollectiveFetchOutcomeContract } from ".
|
|
|
14
14
|
import { type CollectiveObservationSource as CollectiveObservationSourceContract } from "./contract/zod.gen.js";
|
|
15
15
|
import { type CollectiveSourceOutcome as CollectiveSourceOutcomeContract } from "./contract/zod.gen.js";
|
|
16
16
|
import { type LocalSyncPublicationFilter as LocalSyncPublicationFilterContract } from "./contract/zod.gen.js";
|
|
17
|
+
import { type PageSize as PageSizeContract } from "./contract/zod.gen.js";
|
|
17
18
|
import { type PublishOperationKind as PublishOperationKindContract } from "./contract/zod.gen.js";
|
|
18
19
|
import { type VisibilityIntent as VisibilityIntentContract } from "./contract/zod.gen.js";
|
|
19
20
|
import { type AnnotationAxis as AnnotationAxisContract } from "./contract/zod.gen.js";
|
|
@@ -245,6 +246,14 @@ export declare const LocalSyncPublicationFilter: Readonly<{
|
|
|
245
246
|
}>;
|
|
246
247
|
export declare const AllLocalSyncPublicationFilters: readonly LocalSyncPublicationFilter[];
|
|
247
248
|
export declare function isLocalSyncPublicationFilter(value: unknown): value is LocalSyncPublicationFilter;
|
|
249
|
+
export type PageSize = PageSizeContract;
|
|
250
|
+
export declare const PageSize: Readonly<{
|
|
251
|
+
readonly P25: 25 | 50 | 100;
|
|
252
|
+
readonly P50: 25 | 50 | 100;
|
|
253
|
+
readonly P100: 25 | 50 | 100;
|
|
254
|
+
}>;
|
|
255
|
+
export declare const AllPageSizes: readonly PageSize[];
|
|
256
|
+
export declare function isPageSize(value: unknown): value is PageSize;
|
|
248
257
|
export type PublishOperationKind = PublishOperationKindContract;
|
|
249
258
|
export declare const PublishOperationKind: Readonly<{
|
|
250
259
|
readonly Preserve: "replace" | "append" | "preserve";
|
|
@@ -15,6 +15,7 @@ import { zCollectiveFetchOutcome } from "./contract/zod.gen.js";
|
|
|
15
15
|
import { zCollectiveObservationSource } from "./contract/zod.gen.js";
|
|
16
16
|
import { zCollectiveSourceOutcome } from "./contract/zod.gen.js";
|
|
17
17
|
import { zLocalSyncPublicationFilter } from "./contract/zod.gen.js";
|
|
18
|
+
import { zPageSize } from "./contract/zod.gen.js";
|
|
18
19
|
import { zPublishOperationKind } from "./contract/zod.gen.js";
|
|
19
20
|
import { zVisibilityIntent } from "./contract/zod.gen.js";
|
|
20
21
|
import { zAnnotationAxis } from "./contract/zod.gen.js";
|
|
@@ -262,6 +263,15 @@ export const AllLocalSyncPublicationFilters = Object.freeze([LocalSyncPublicatio
|
|
|
262
263
|
export function isLocalSyncPublicationFilter(value) {
|
|
263
264
|
return zLocalSyncPublicationFilter.safeParse(value).success;
|
|
264
265
|
}
|
|
266
|
+
export const PageSize = Object.freeze({
|
|
267
|
+
P25: zPageSize.parse(25),
|
|
268
|
+
P50: zPageSize.parse(50),
|
|
269
|
+
P100: zPageSize.parse(100),
|
|
270
|
+
});
|
|
271
|
+
export const AllPageSizes = Object.freeze([PageSize.P25, PageSize.P50, PageSize.P100]);
|
|
272
|
+
export function isPageSize(value) {
|
|
273
|
+
return zPageSize.safeParse(value).success;
|
|
274
|
+
}
|
|
265
275
|
export const PublishOperationKind = Object.freeze({
|
|
266
276
|
Preserve: zPublishOperationKind.parse("preserve"),
|
|
267
277
|
Replace: zPublishOperationKind.parse("replace"),
|
|
@@ -537,7 +537,7 @@ export interface paths {
|
|
|
537
537
|
path?: never;
|
|
538
538
|
cookie?: never;
|
|
539
539
|
};
|
|
540
|
-
/** @description Omitted view
|
|
540
|
+
/** @description Omitted view serves the same bounded offset Home page as view=home; view=grouped preserves helper groups and their membership scopes. view=home returns items/nextItems offset pages of stored authoritative roots or general immediate children of parentSessionId, ordered by start time descending then local ID ascending. The saved ingestion selection is not applied as a direct browsing eligibility predicate: it excludes no root, child, or project option that the view's own eligibility rules admit, and counts and empty states derive from the eligible browsing set the caller's explicit filters select. Independent origin, index-readiness, publication, project, parent, and account rules still apply before paging, and an explicit publication=auto filter may reflect legitimate hook eligibility, so that filtered view can change with the selection while no unfiltered stored row is added or removed. Only empty nextItems means done: short or empty items may continue. maxItems omitted or zero defaults to 25; only 25, 50, and 100 are accepted, and negative, non-member, malformed or repeated values return 400. page is one-based and omitted defaults to 1. pageToken is retired: an empty value is absent, and a nonempty value returns 400 with recovery guidance to drop the continuation and request a page. Offset paging is not snapshot-stable; a new session can shift rows. Root project/publication filters apply before paging; child calls reject them. Unknown parents return 404 without child IDs. Page hydration is limited to returned IDs and includes stored titles, bounded redaction-safe previews and canonical publication state without audience. Auto filtering may inspect scanned candidate repositories. Paging/filter parameters require view=home or an omitted view and are rejected for grouped and project-options. view=project-options returns the complete metadata-only stored root project picker, sorted by name then hash, deduplicated by hash and independent of publication/current project filters; no counts, Git summaries or enrichment. Reauthorize every request. A hydrated row still needs the saved selection for its publication metadata: when that metadata cannot be determined the read returns 500 with an actionable cause instead of omitting the row or reporting a fabricated flag, while a selection that merely excludes a session neither fails the read nor omits the row. Store failures return 500 and unavailable readers 503, never empty success. */
|
|
541
541
|
get: operations["listSyncSessionsGrouped"];
|
|
542
542
|
put?: never;
|
|
543
543
|
post?: never;
|
|
@@ -648,6 +648,7 @@ export interface components {
|
|
|
648
648
|
BestiaryHarness: Schema.Harness;
|
|
649
649
|
ClientMessage: Schema.ClientMessage;
|
|
650
650
|
DashboardPayload: Schema.DashboardPayload;
|
|
651
|
+
LocalSessionPage: Schema.LocalSessionPage;
|
|
651
652
|
LocalSyncProjectOption: Schema.LocalSyncProjectOption;
|
|
652
653
|
LocalSyncProjectOptions: Schema.LocalSyncProjectOptions;
|
|
653
654
|
LocalSyncSessionPage: Schema.LocalSyncSessionPage;
|
|
@@ -1135,6 +1136,7 @@ export interface components {
|
|
|
1135
1136
|
*/
|
|
1136
1137
|
SchemaLocalSyncPublicationFilter: Schema.LocalSyncPublicationFilter;
|
|
1137
1138
|
SchemaLocalSyncSessionRow: Schema.LocalSyncSessionRow;
|
|
1139
|
+
SchemaLocalSyncSessionTotals: Schema.LocalSyncSessionTotals;
|
|
1138
1140
|
SchemaLocalSyncSummary: Schema.LocalSyncSummary;
|
|
1139
1141
|
SchemaLocalVillageCollective: Schema.LocalVillageCollective;
|
|
1140
1142
|
SchemaLocalVillageCollectivesResponse: Schema.LocalVillageCollectivesResponse;
|
|
@@ -1222,6 +1224,16 @@ export interface components {
|
|
|
1222
1224
|
* @enum {string}
|
|
1223
1225
|
*/
|
|
1224
1226
|
SchemaOperationIssueCode: Schema.OperationIssueCode;
|
|
1227
|
+
/**
|
|
1228
|
+
* Page Size
|
|
1229
|
+
* @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.
|
|
1230
|
+
* @example 25
|
|
1231
|
+
* @example 50
|
|
1232
|
+
* @example 100
|
|
1233
|
+
* @enum {integer}
|
|
1234
|
+
*/
|
|
1235
|
+
SchemaPageSize: Schema.PageSize;
|
|
1236
|
+
SchemaPersonalMedians: Schema.PersonalMedians;
|
|
1225
1237
|
/**
|
|
1226
1238
|
* Project Hash
|
|
1227
1239
|
* @description SHA-256 hex digest of the project's origin URL or local path
|
|
@@ -1559,6 +1571,8 @@ export interface components {
|
|
|
1559
1571
|
* @example 99d59925-36bc-424c-a789-8be54d9702ba
|
|
1560
1572
|
*/
|
|
1561
1573
|
SchemaTranscriptID: Schema.TranscriptID;
|
|
1574
|
+
SchemaTranscriptSegmentRef: Schema.TranscriptSegmentRef;
|
|
1575
|
+
SchemaTranscriptTurn: Schema.TranscriptTurn;
|
|
1562
1576
|
SchemaTurnDetail: Schema.TurnDetail;
|
|
1563
1577
|
/**
|
|
1564
1578
|
* Type Origin
|
|
@@ -1684,8 +1698,14 @@ export interface components {
|
|
|
1684
1698
|
SchemaVillageUserCollective: Schema.VillageUserCollective;
|
|
1685
1699
|
SearchPayload: Schema.SearchPayload;
|
|
1686
1700
|
ServerMessage: Schema.ServerMessage;
|
|
1701
|
+
SessionDetailHeaderPayload: Schema.SessionDetailHeaderPayload;
|
|
1687
1702
|
SessionDetailPayload: Schema.SessionDetailPayload;
|
|
1688
1703
|
SessionDetailReadPayload: Schema.SessionDetailReadPayload;
|
|
1704
|
+
TranscriptSegment: Schema.TranscriptSegment;
|
|
1705
|
+
TranscriptSegmentDirectory: Schema.TranscriptSegmentDirectory;
|
|
1706
|
+
TranscriptSegmentRef: Schema.TranscriptSegmentRef;
|
|
1707
|
+
TranscriptTurn: Schema.TranscriptTurn;
|
|
1708
|
+
TranscriptWindow: Schema.TranscriptWindow;
|
|
1689
1709
|
TrendsPayload: Schema.TrendsPayload;
|
|
1690
1710
|
UICapabilitiesResponse: Schema.UICapabilitiesResponse;
|
|
1691
1711
|
};
|
|
@@ -2122,8 +2142,8 @@ export interface operations {
|
|
|
2122
2142
|
scope: string;
|
|
2123
2143
|
/** @description One-based member page */
|
|
2124
2144
|
page?: number;
|
|
2125
|
-
/** @description
|
|
2126
|
-
|
|
2145
|
+
/** @description Members per page: 25, 50, or 100 */
|
|
2146
|
+
perPage?: components["schemas"]["SchemaPageSize"];
|
|
2127
2147
|
};
|
|
2128
2148
|
header?: never;
|
|
2129
2149
|
path: {
|
|
@@ -2657,11 +2677,13 @@ export interface operations {
|
|
|
2657
2677
|
listSyncSessionsGrouped: {
|
|
2658
2678
|
parameters: {
|
|
2659
2679
|
query?: {
|
|
2660
|
-
/** @description Omit for
|
|
2680
|
+
/** @description Omit for the Home offset page; grouped retains helper groups; home selects forward pages; project-options selects metadata-only root projects */
|
|
2661
2681
|
view?: "grouped" | "home" | "project-options";
|
|
2662
|
-
/** @description Home only: omitted or zero defaults to 25;
|
|
2682
|
+
/** @description Home only: omitted or zero defaults to 25; 25, 50, and 100 are accepted; 26, 101, and negative values are refused */
|
|
2663
2683
|
maxItems?: number;
|
|
2664
|
-
/** @description Home only:
|
|
2684
|
+
/** @description Home only: one-based page number; omitted defaults to 1 */
|
|
2685
|
+
page?: number;
|
|
2686
|
+
/** @description Home only: retired continuation; omitted or empty is absent; a nonempty value is refused so an old client can recover */
|
|
2665
2687
|
pageToken?: string;
|
|
2666
2688
|
parentSessionId?: string;
|
|
2667
2689
|
projectHash?: components["schemas"]["SchemaProjectHash"];
|