@peasant-labs/schema 0.53.0 → 0.57.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/README.md +8 -0
- package/dist/fixtures/session-graph.d.ts +8 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +212 -3
- package/dist/internal/generated/contract/zod.gen.d.ts +5446 -4807
- package/dist/internal/generated/contract/zod.gen.js +778 -556
- package/dist/internal/generated/enums.gen.d.ts +740 -800
- package/dist/internal/generated/enums.gen.js +615 -529
- 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/routes.gen.d.ts +9 -1
- package/dist/internal/generated/routes.gen.js +10 -0
- package/dist/internal/generated/session-graph-fixtures.gen.d.ts +8 -0
- package/dist/internal/generated/session-graph-fixtures.gen.js +10 -0
- package/dist/internal/generated/versions.gen.d.ts +4 -2
- package/dist/internal/generated/versions.gen.js +4 -2
- package/dist/internal/generated/village-api.d.ts +590 -9
- package/dist/transcript-directory-positions.d.ts +3 -0
- package/dist/transcript-directory-positions.js +89 -0
- package/dist/transcript-served-turn.d.ts +17 -0
- package/dist/transcript-served-turn.js +11 -0
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
// Code generated from the canonical Go/OpenAPI contract. DO NOT EDIT.
|
|
1
2
|
// publication-contract-semantic-refinement
|
|
2
3
|
import { collectiveContractIssue } from "../../../collective-validation.js";
|
|
3
4
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
4
5
|
import * as z from 'zod';
|
|
6
|
+
const closedSet = () => (schema) => schema;
|
|
5
7
|
export const zActivityEdge = z.object({
|
|
6
8
|
from: z.string(),
|
|
7
|
-
taskCount: z.
|
|
9
|
+
taskCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
8
10
|
to: z.string()
|
|
9
11
|
});
|
|
10
12
|
/**
|
|
@@ -12,36 +14,36 @@ export const zActivityEdge = z.object({
|
|
|
12
14
|
*
|
|
13
15
|
* Closed session graph value
|
|
14
16
|
*/
|
|
15
|
-
export const zActorOrigin = z.enum([
|
|
17
|
+
export const zActorOrigin = closedSet()(z.enum([
|
|
16
18
|
'operator',
|
|
17
19
|
'agent_delegate',
|
|
18
20
|
'harness',
|
|
19
21
|
'unknown'
|
|
20
|
-
]);
|
|
22
|
+
]));
|
|
21
23
|
/**
|
|
22
24
|
* Annotation Axis
|
|
23
25
|
*
|
|
24
26
|
* Subscription dimension for annotation channels
|
|
25
27
|
*/
|
|
26
|
-
export const zAnnotationAxis = z.enum([
|
|
28
|
+
export const zAnnotationAxis = closedSet()(z.enum([
|
|
27
29
|
'type',
|
|
28
30
|
'session',
|
|
29
31
|
'project'
|
|
30
|
-
]);
|
|
32
|
+
]));
|
|
31
33
|
/**
|
|
32
34
|
* Annotation Datatype
|
|
33
35
|
*
|
|
34
36
|
* Storage type for annotation values (maps to SQLite STRICT column type)
|
|
35
37
|
*/
|
|
36
|
-
export const zAnnotationDatatype = z.enum([
|
|
38
|
+
export const zAnnotationDatatype = closedSet()(z.enum([
|
|
37
39
|
'text',
|
|
38
40
|
'integer',
|
|
39
41
|
'real',
|
|
40
42
|
'boolean'
|
|
41
|
-
]);
|
|
43
|
+
]));
|
|
42
44
|
export const zAnnotationEntryTarget = z.object({
|
|
43
|
-
endIndex: z.
|
|
44
|
-
entryIndex: z.
|
|
45
|
+
endIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
46
|
+
entryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
45
47
|
sessionId: z.string().min(1)
|
|
46
48
|
}).superRefine((value, context) => {
|
|
47
49
|
if (value.sessionId === "")
|
|
@@ -58,45 +60,45 @@ export const zAnnotationManifestResponse = z.object({
|
|
|
58
60
|
*
|
|
59
61
|
* Per-item annotation push outcome
|
|
60
62
|
*/
|
|
61
|
-
export const zAnnotationPushStatus = z.enum([
|
|
63
|
+
export const zAnnotationPushStatus = closedSet()(z.enum([
|
|
62
64
|
'created',
|
|
63
65
|
'updated',
|
|
64
66
|
'skipped',
|
|
65
67
|
'error'
|
|
66
|
-
]);
|
|
68
|
+
]));
|
|
67
69
|
export const zAnnotationPushResult = z.object({
|
|
68
70
|
contentHash: z.string().optional(),
|
|
69
71
|
error: z.string().optional(),
|
|
70
72
|
status: zAnnotationPushStatus
|
|
71
73
|
});
|
|
72
74
|
export const zAnnotationPushResponse = z.object({
|
|
73
|
-
created: z.
|
|
74
|
-
errors: z.
|
|
75
|
+
created: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
76
|
+
errors: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
75
77
|
results: z.array(zAnnotationPushResult).optional(),
|
|
76
|
-
skipped: z.
|
|
77
|
-
updated: z.
|
|
78
|
+
skipped: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
79
|
+
updated: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
78
80
|
});
|
|
79
81
|
/**
|
|
80
82
|
* Annotation Status
|
|
81
83
|
*
|
|
82
84
|
* ISO 11179 lifecycle state of an annotation type
|
|
83
85
|
*/
|
|
84
|
-
export const zAnnotationStatus = z.enum([
|
|
86
|
+
export const zAnnotationStatus = closedSet()(z.enum([
|
|
85
87
|
'proposed',
|
|
86
88
|
'active',
|
|
87
89
|
'deprecated',
|
|
88
90
|
'retired'
|
|
89
|
-
]);
|
|
91
|
+
]));
|
|
90
92
|
/**
|
|
91
93
|
* Annotator Kind
|
|
92
94
|
*
|
|
93
95
|
* Type of entity that produced an annotation: human, agent (AI model), or rule (automated classifier)
|
|
94
96
|
*/
|
|
95
|
-
export const zAnnotatorKind = z.enum([
|
|
97
|
+
export const zAnnotatorKind = closedSet()(z.enum([
|
|
96
98
|
'human',
|
|
97
99
|
'agent',
|
|
98
100
|
'rule'
|
|
99
|
-
]);
|
|
101
|
+
]));
|
|
100
102
|
export const zAnnotatorSummary = z.object({
|
|
101
103
|
description: z.string().optional(),
|
|
102
104
|
displayName: z.string(),
|
|
@@ -112,25 +114,25 @@ export const zAnnotatorSummary = z.object({
|
|
|
112
114
|
*
|
|
113
115
|
* Producer-supplied conclusion for a session-to-commit association: confirmed or candidate
|
|
114
116
|
*/
|
|
115
|
-
export const zAssociationConclusion = z.enum(['confirmed', 'candidate']);
|
|
117
|
+
export const zAssociationConclusion = closedSet()(z.enum(['confirmed', 'candidate']));
|
|
116
118
|
/**
|
|
117
119
|
* Association Evidence Kind
|
|
118
120
|
*
|
|
119
121
|
* Atomic observation supporting a session-to-commit association
|
|
120
122
|
*/
|
|
121
|
-
export const zAssociationEvidenceKind = z.enum([
|
|
123
|
+
export const zAssociationEvidenceKind = closedSet()(z.enum([
|
|
122
124
|
'recorded_commit',
|
|
123
125
|
'touched_file',
|
|
124
126
|
'branch_membership',
|
|
125
127
|
'time_window'
|
|
126
|
-
]);
|
|
128
|
+
]));
|
|
127
129
|
export const zAssociationEvidenceObservation = z.object({
|
|
128
130
|
branchName: z.string().nullish(),
|
|
129
131
|
kind: zAssociationEvidenceKind,
|
|
130
132
|
recordedCommitHash: z.string().nullish(),
|
|
131
133
|
touchedFilePath: z.string().nullish(),
|
|
132
|
-
windowEndMs: z.
|
|
133
|
-
windowStartMs: z.
|
|
134
|
+
windowEndMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
135
|
+
windowStartMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
134
136
|
}).superRefine((value, context) => {
|
|
135
137
|
const isAbsent = (detail) => detail === undefined || detail === null;
|
|
136
138
|
const isGoWhitespace = (codePoint) => (codePoint >= 0x0009 && codePoint <= 0x000D)
|
|
@@ -244,7 +246,7 @@ export const zAuthoritativeTimestampInfo = z.object({
|
|
|
244
246
|
*
|
|
245
247
|
* Git hook that publishes an auto-publish rule's sessions
|
|
246
248
|
*/
|
|
247
|
-
export const zAutoPublishEvent = z.enum(['pre-push', 'post-commit']);
|
|
249
|
+
export const zAutoPublishEvent = closedSet()(z.enum(['pre-push', 'post-commit']));
|
|
248
250
|
export const zAutoPublishHookRemedy = z.object({
|
|
249
251
|
message: z.string().min(1),
|
|
250
252
|
snippet: z.string().optional()
|
|
@@ -254,12 +256,12 @@ export const zAutoPublishHookRemedy = z.object({
|
|
|
254
256
|
*
|
|
255
257
|
* State of one repository's auto-publish hook for one event
|
|
256
258
|
*/
|
|
257
|
-
export const zAutoPublishHookStatus = z.enum([
|
|
259
|
+
export const zAutoPublishHookStatus = closedSet()(z.enum([
|
|
258
260
|
'absent',
|
|
259
261
|
'installed',
|
|
260
262
|
'blocked',
|
|
261
263
|
'failed'
|
|
262
|
-
]);
|
|
264
|
+
]));
|
|
263
265
|
export const zAutoPublishHook = z.object({
|
|
264
266
|
event: zAutoPublishEvent,
|
|
265
267
|
remedy: zAutoPublishHookRemedy.optional(),
|
|
@@ -282,10 +284,10 @@ export const zAutoPublishRemovalResponse = z.object({
|
|
|
282
284
|
*
|
|
283
285
|
* What an auto-publish rule's match pattern names
|
|
284
286
|
*/
|
|
285
|
-
export const zAutoPublishRuleKind = z.enum(['folder', 'remote']);
|
|
287
|
+
export const zAutoPublishRuleKind = closedSet()(z.enum(['folder', 'remote']));
|
|
286
288
|
export const zBatchCreateAnnotationsErrorResponse = z.object({
|
|
287
289
|
error: z.string(),
|
|
288
|
-
failingIndex: z.
|
|
290
|
+
failingIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
289
291
|
});
|
|
290
292
|
export const zBatchCreateAnnotationsResponse = z.object({
|
|
291
293
|
ids: z.array(z.string()).nullable()
|
|
@@ -295,7 +297,7 @@ export const zBatchCreateAnnotationsResponse = z.object({
|
|
|
295
297
|
*
|
|
296
298
|
* Claude Code built-in slash command name without the leading slash
|
|
297
299
|
*/
|
|
298
|
-
export const zBuiltinCommand = z.enum([
|
|
300
|
+
export const zBuiltinCommand = closedSet()(z.enum([
|
|
299
301
|
'exit',
|
|
300
302
|
'compact',
|
|
301
303
|
'clear',
|
|
@@ -322,9 +324,9 @@ export const zBuiltinCommand = z.enum([
|
|
|
322
324
|
'privacy-settings',
|
|
323
325
|
'help',
|
|
324
326
|
'commands'
|
|
325
|
-
]);
|
|
327
|
+
]));
|
|
326
328
|
export const zCLILoginQuery = z.object({
|
|
327
|
-
port: z.
|
|
329
|
+
port: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
328
330
|
state: z.string()
|
|
329
331
|
});
|
|
330
332
|
export const zCanonicalPublishGitContext = z.object({
|
|
@@ -339,31 +341,31 @@ export const zCanonicalPublishGitContext = z.object({
|
|
|
339
341
|
*
|
|
340
342
|
* Strength of the evidence connecting a recorded session to a code change
|
|
341
343
|
*/
|
|
342
|
-
export const zChangeBinding = z.enum(['bound', 'candidate']);
|
|
344
|
+
export const zChangeBinding = closedSet()(z.enum(['bound', 'candidate']));
|
|
343
345
|
export const zChangeSummary = z.object({
|
|
344
|
-
aheadCount: z.
|
|
346
|
+
aheadCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
345
347
|
baseHash: z.string().optional(),
|
|
346
|
-
behindCount: z.
|
|
348
|
+
behindCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
347
349
|
branch: z.string(),
|
|
348
|
-
filesChanged: z.
|
|
349
|
-
lastWorkMs: z.
|
|
350
|
+
filesChanged: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
351
|
+
lastWorkMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
350
352
|
mergeCommitHash: z.string().optional(),
|
|
351
353
|
merged: z.boolean(),
|
|
352
|
-
mergedAtMs: z.
|
|
353
|
-
newEdges: z.
|
|
354
|
-
removedEdges: z.
|
|
354
|
+
mergedAtMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
355
|
+
newEdges: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
356
|
+
removedEdges: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
355
357
|
reverted: z.boolean().optional(),
|
|
356
|
-
sessionCount: z.
|
|
357
|
-
taskCount: z.
|
|
358
|
-
tipCommitMs: z.
|
|
359
|
-
violations: z.
|
|
358
|
+
sessionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
359
|
+
taskCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
360
|
+
tipCommitMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
361
|
+
violations: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
360
362
|
});
|
|
361
363
|
/**
|
|
362
364
|
* Channel Topic
|
|
363
365
|
*
|
|
364
366
|
* Subscribable WebSocket data stream
|
|
365
367
|
*/
|
|
366
|
-
export const zChannelTopic = z.enum([
|
|
368
|
+
export const zChannelTopic = closedSet()(z.enum([
|
|
367
369
|
'dashboard',
|
|
368
370
|
'sessions',
|
|
369
371
|
'session_detail',
|
|
@@ -372,7 +374,7 @@ export const zChannelTopic = z.enum([
|
|
|
372
374
|
'annotations',
|
|
373
375
|
'project_familiarity',
|
|
374
376
|
'kickstart'
|
|
375
|
-
]);
|
|
377
|
+
]));
|
|
376
378
|
export const zChannelSubscription = z.object({
|
|
377
379
|
axis: zAnnotationAxis.optional(),
|
|
378
380
|
id: z.string().optional(),
|
|
@@ -381,73 +383,73 @@ export const zChannelSubscription = z.object({
|
|
|
381
383
|
export const zChildSessionRef = z.object({
|
|
382
384
|
id: z.string(),
|
|
383
385
|
project: z.string().optional(),
|
|
384
|
-
startTime: z.iso.datetime()
|
|
386
|
+
startTime: z.iso.datetime({ offset: true })
|
|
385
387
|
});
|
|
386
388
|
/**
|
|
387
389
|
* Collective Evidence Coverage
|
|
388
390
|
*
|
|
389
391
|
* Available saved evidence or explicitly unknown source ranges
|
|
390
392
|
*/
|
|
391
|
-
export const zCollectiveEvidenceCoverage = z.enum(['available', 'unknown']);
|
|
393
|
+
export const zCollectiveEvidenceCoverage = closedSet()(z.enum(['available', 'unknown']));
|
|
392
394
|
/**
|
|
393
395
|
* Collective Fetch Commit
|
|
394
396
|
*
|
|
395
397
|
* Committed effect, including earlier commits before cancellation
|
|
396
398
|
*/
|
|
397
|
-
export const zCollectiveFetchCommit = z.enum([
|
|
399
|
+
export const zCollectiveFetchCommit = closedSet()(z.enum([
|
|
398
400
|
'updated',
|
|
399
401
|
'unchanged',
|
|
400
402
|
'retained'
|
|
401
|
-
]);
|
|
403
|
+
]));
|
|
402
404
|
/**
|
|
403
405
|
* Collective Fetch Domain
|
|
404
406
|
*
|
|
405
407
|
* Independently installed complete metadata dataset
|
|
406
408
|
*/
|
|
407
|
-
export const zCollectiveFetchDomain = z.enum([
|
|
409
|
+
export const zCollectiveFetchDomain = closedSet()(z.enum([
|
|
408
410
|
'catalog',
|
|
409
411
|
'history',
|
|
410
412
|
'associations'
|
|
411
|
-
]);
|
|
413
|
+
]));
|
|
412
414
|
/**
|
|
413
415
|
* Collective Fetch Outcome
|
|
414
416
|
*
|
|
415
417
|
* Complete only when every requested required scope completed
|
|
416
418
|
*/
|
|
417
|
-
export const zCollectiveFetchOutcome = z.enum([
|
|
419
|
+
export const zCollectiveFetchOutcome = closedSet()(z.enum([
|
|
418
420
|
'complete',
|
|
419
421
|
'partial',
|
|
420
422
|
'failed'
|
|
421
|
-
]);
|
|
423
|
+
]));
|
|
422
424
|
/**
|
|
423
425
|
* Collective Fetch State
|
|
424
426
|
*
|
|
425
427
|
* One invocation result; a failed domain retains prior completed dates
|
|
426
428
|
*/
|
|
427
|
-
export const zCollectiveFetchState = z.enum([
|
|
429
|
+
export const zCollectiveFetchState = closedSet()(z.enum([
|
|
428
430
|
'complete',
|
|
429
431
|
'failed',
|
|
430
432
|
'cancelled',
|
|
431
433
|
'superseded',
|
|
432
434
|
'not_requested'
|
|
433
|
-
]);
|
|
435
|
+
]));
|
|
434
436
|
/**
|
|
435
437
|
* Collective Observation Reason
|
|
436
438
|
*
|
|
437
439
|
* Independent dated relevance reason, not authority
|
|
438
440
|
*/
|
|
439
|
-
export const zCollectiveObservationReason = z.enum([
|
|
441
|
+
export const zCollectiveObservationReason = closedSet()(z.enum([
|
|
440
442
|
'membership',
|
|
441
443
|
'contribution',
|
|
442
444
|
'organization',
|
|
443
445
|
'explicit'
|
|
444
|
-
]);
|
|
446
|
+
]));
|
|
445
447
|
/**
|
|
446
448
|
* Collective Observation Source
|
|
447
449
|
*
|
|
448
450
|
* Narrow metadata source, no world directory or transcript content
|
|
449
451
|
*/
|
|
450
|
-
export const zCollectiveObservationSource = z.enum([
|
|
452
|
+
export const zCollectiveObservationSource = closedSet()(z.enum([
|
|
451
453
|
'membership',
|
|
452
454
|
'contribution-discovery',
|
|
453
455
|
'organization',
|
|
@@ -455,38 +457,38 @@ export const zCollectiveObservationSource = z.enum([
|
|
|
455
457
|
'submissions',
|
|
456
458
|
'attempts',
|
|
457
459
|
'associations'
|
|
458
|
-
]);
|
|
460
|
+
]));
|
|
459
461
|
/**
|
|
460
462
|
* Collective Observation State
|
|
461
463
|
*
|
|
462
464
|
* Dated disclosure state, never current authorization
|
|
463
465
|
*/
|
|
464
|
-
export const zCollectiveObservationState = z.enum([
|
|
466
|
+
export const zCollectiveObservationState = closedSet()(z.enum([
|
|
465
467
|
'observed',
|
|
466
468
|
'unavailable',
|
|
467
469
|
'invalidated'
|
|
468
|
-
]);
|
|
470
|
+
]));
|
|
469
471
|
/**
|
|
470
472
|
* Collective Operation
|
|
471
473
|
*
|
|
472
474
|
* Operation whose actual outcome is recorded
|
|
473
475
|
*/
|
|
474
|
-
export const zCollectiveOperation = z.enum([
|
|
476
|
+
export const zCollectiveOperation = closedSet()(z.enum([
|
|
475
477
|
'publish',
|
|
476
478
|
'share',
|
|
477
479
|
'fetch',
|
|
478
480
|
'pull'
|
|
479
|
-
]);
|
|
481
|
+
]));
|
|
480
482
|
/**
|
|
481
483
|
* Collective Source Outcome
|
|
482
484
|
*
|
|
483
485
|
* Privacy-safe source outcome without hidden reasons
|
|
484
486
|
*/
|
|
485
|
-
export const zCollectiveSourceOutcome = z.enum([
|
|
487
|
+
export const zCollectiveSourceOutcome = closedSet()(z.enum([
|
|
486
488
|
'disclosed',
|
|
487
489
|
'not_disclosed',
|
|
488
490
|
'failed'
|
|
489
|
-
]);
|
|
491
|
+
]));
|
|
490
492
|
export const zCommandInvocation = z.object({
|
|
491
493
|
args: z.string().optional(),
|
|
492
494
|
name: z.string()
|
|
@@ -504,11 +506,11 @@ export const zCommitInfo = z.object({
|
|
|
504
506
|
*
|
|
505
507
|
* Strength of evidence behind a derived relationship: high, medium, or low
|
|
506
508
|
*/
|
|
507
|
-
export const zConfidence = z.enum([
|
|
509
|
+
export const zConfidence = closedSet()(z.enum([
|
|
508
510
|
'high',
|
|
509
511
|
'medium',
|
|
510
512
|
'low'
|
|
511
|
-
]);
|
|
513
|
+
]));
|
|
512
514
|
/**
|
|
513
515
|
* Content Capability
|
|
514
516
|
*
|
|
@@ -520,13 +522,13 @@ export const zContentCapability = z.string();
|
|
|
520
522
|
*
|
|
521
523
|
* Payload kind carried by a transcript content envelope
|
|
522
524
|
*/
|
|
523
|
-
export const zContentKind = z.enum(['session_detail']);
|
|
525
|
+
export const zContentKind = closedSet()(z.enum(['session_detail']));
|
|
524
526
|
/**
|
|
525
527
|
* Content Origin
|
|
526
528
|
*
|
|
527
529
|
* Closed session graph value
|
|
528
530
|
*/
|
|
529
|
-
export const zContentOrigin = z.enum([
|
|
531
|
+
export const zContentOrigin = closedSet()(z.enum([
|
|
530
532
|
'submitted_input',
|
|
531
533
|
'harness_context',
|
|
532
534
|
'agent_output',
|
|
@@ -535,17 +537,17 @@ export const zContentOrigin = z.enum([
|
|
|
535
537
|
'system_control',
|
|
536
538
|
'generated_summary',
|
|
537
539
|
'unknown'
|
|
538
|
-
]);
|
|
540
|
+
]));
|
|
539
541
|
/**
|
|
540
542
|
* Content Ownership
|
|
541
543
|
*
|
|
542
544
|
* Closed session graph value
|
|
543
545
|
*/
|
|
544
|
-
export const zContentOwnership = z.enum([
|
|
546
|
+
export const zContentOwnership = closedSet()(z.enum([
|
|
545
547
|
'local',
|
|
546
548
|
'inherited',
|
|
547
549
|
'uncertain'
|
|
548
|
-
]);
|
|
550
|
+
]));
|
|
549
551
|
export const zContractVersion = z.string().nullable();
|
|
550
552
|
/**
|
|
551
553
|
* Opaque versioned selected-category traversal token; not cacheRevision or authority
|
|
@@ -563,8 +565,8 @@ export const zCreateAnnotationRequest = z.object({
|
|
|
563
565
|
reason: z.string().nullish(),
|
|
564
566
|
sessionId: z.string(),
|
|
565
567
|
targetAnnotationId: z.string().nullish(),
|
|
566
|
-
targetEntryEndIndex: z.
|
|
567
|
-
targetEntryIndex: z.
|
|
568
|
+
targetEntryEndIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
569
|
+
targetEntryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
568
570
|
typeId: z.string(),
|
|
569
571
|
value: z.string()
|
|
570
572
|
});
|
|
@@ -579,31 +581,31 @@ export const zDashboardPayload = z.object({
|
|
|
579
581
|
avgDurationMins: z.number(),
|
|
580
582
|
avgTurnsPerSession: z.number(),
|
|
581
583
|
harnessBreakdown: z.record(z.string(), z.int()).nullable(),
|
|
582
|
-
totalSessions: z.
|
|
583
|
-
totalTokens: z.
|
|
584
|
+
totalSessions: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
585
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
584
586
|
});
|
|
585
587
|
export const zDayStats = z.object({
|
|
586
588
|
date: z.string(),
|
|
587
|
-
sessions: z.
|
|
588
|
-
tokens: z.
|
|
589
|
+
sessions: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
590
|
+
tokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
589
591
|
});
|
|
590
592
|
/**
|
|
591
593
|
* Decay Level
|
|
592
594
|
*
|
|
593
595
|
* Recency band for project file familiarity
|
|
594
596
|
*/
|
|
595
|
-
export const zDecayLevel = z.enum([
|
|
597
|
+
export const zDecayLevel = closedSet()(z.enum([
|
|
596
598
|
'fresh',
|
|
597
599
|
'fading',
|
|
598
600
|
'stale',
|
|
599
601
|
'unexplored'
|
|
600
|
-
]);
|
|
602
|
+
]));
|
|
601
603
|
/**
|
|
602
604
|
* Delivery Origin
|
|
603
605
|
*
|
|
604
606
|
* Closed session graph value
|
|
605
607
|
*/
|
|
606
|
-
export const zDeliveryOrigin = z.enum([
|
|
608
|
+
export const zDeliveryOrigin = closedSet()(z.enum([
|
|
607
609
|
'session_admission',
|
|
608
610
|
'guardian_review',
|
|
609
611
|
'subagent_delivery',
|
|
@@ -611,7 +613,7 @@ export const zDeliveryOrigin = z.enum([
|
|
|
611
613
|
'tool_delivery',
|
|
612
614
|
'system_lifecycle',
|
|
613
615
|
'unknown'
|
|
614
|
-
]);
|
|
616
|
+
]));
|
|
615
617
|
export const zDiagnosticEntry = z.object({
|
|
616
618
|
errorType: z.string(),
|
|
617
619
|
location: z.string(),
|
|
@@ -627,11 +629,11 @@ export const zDiagnosticsInfo = z.object({
|
|
|
627
629
|
*
|
|
628
630
|
* Unified-diff line kind: context, addition, or deletion
|
|
629
631
|
*/
|
|
630
|
-
export const zDiffLineKind = z.enum([
|
|
632
|
+
export const zDiffLineKind = closedSet()(z.enum([
|
|
631
633
|
'context',
|
|
632
634
|
'add',
|
|
633
635
|
'del'
|
|
634
|
-
]);
|
|
636
|
+
]));
|
|
635
637
|
export const zDiffLine = z.object({
|
|
636
638
|
kind: zDiffLineKind,
|
|
637
639
|
text: z.string()
|
|
@@ -639,10 +641,10 @@ export const zDiffLine = z.object({
|
|
|
639
641
|
export const zDiffHunk = z.object({
|
|
640
642
|
header: z.string().optional(),
|
|
641
643
|
lines: z.array(zDiffLine).nullable(),
|
|
642
|
-
newLines: z.
|
|
643
|
-
newStart: z.
|
|
644
|
-
oldLines: z.
|
|
645
|
-
oldStart: z.
|
|
644
|
+
newLines: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
645
|
+
newStart: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
646
|
+
oldLines: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
647
|
+
oldStart: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
646
648
|
sessionId: z.string().optional(),
|
|
647
649
|
sessionTitle: z.string().optional()
|
|
648
650
|
});
|
|
@@ -651,24 +653,24 @@ export const zDiffHunk = z.object({
|
|
|
651
653
|
*
|
|
652
654
|
* Kind of one item in the prompt digest chain: a session boundary, a human prompt, a skill invocation marker, or a commit anchor
|
|
653
655
|
*/
|
|
654
|
-
export const zDigestItemKind = z.enum([
|
|
656
|
+
export const zDigestItemKind = closedSet()(z.enum([
|
|
655
657
|
'session',
|
|
656
658
|
'prompt',
|
|
657
659
|
'skill',
|
|
658
660
|
'commit'
|
|
659
|
-
]);
|
|
661
|
+
]));
|
|
660
662
|
/**
|
|
661
663
|
* Earlier History State
|
|
662
664
|
*
|
|
663
665
|
* Closed session graph value
|
|
664
666
|
*/
|
|
665
|
-
export const zEarlierHistoryState = z.enum(['uncertain_migrated', 'uncertain_unresolved']);
|
|
667
|
+
export const zEarlierHistoryState = closedSet()(z.enum(['uncertain_migrated', 'uncertain_unresolved']));
|
|
666
668
|
/**
|
|
667
669
|
* Edge Violation Kind
|
|
668
670
|
*
|
|
669
671
|
* Structural violation detected on a map edge
|
|
670
672
|
*/
|
|
671
|
-
export const zEdgeViolationKind = z.enum(['cycle', 'wrong_way']);
|
|
673
|
+
export const zEdgeViolationKind = closedSet()(z.enum(['cycle', 'wrong_way']));
|
|
672
674
|
export const zEdgeViolation = z.object({
|
|
673
675
|
from: z.string(),
|
|
674
676
|
kind: zEdgeViolationKind,
|
|
@@ -679,7 +681,7 @@ export const zEdgeViolation = z.object({
|
|
|
679
681
|
*
|
|
680
682
|
* Classification of a single entry within an agent session transcript
|
|
681
683
|
*/
|
|
682
|
-
export const zEntryType = z.enum([
|
|
684
|
+
export const zEntryType = closedSet()(z.enum([
|
|
683
685
|
'text',
|
|
684
686
|
'tool_use',
|
|
685
687
|
'tool_result',
|
|
@@ -688,20 +690,20 @@ export const zEntryType = z.enum([
|
|
|
688
690
|
'error',
|
|
689
691
|
'result',
|
|
690
692
|
'image'
|
|
691
|
-
]);
|
|
693
|
+
]));
|
|
692
694
|
/**
|
|
693
695
|
* Evidence Kind
|
|
694
696
|
*
|
|
695
697
|
* Closed session graph value
|
|
696
698
|
*/
|
|
697
|
-
export const zEvidenceKind = z.enum([
|
|
699
|
+
export const zEvidenceKind = closedSet()(z.enum([
|
|
698
700
|
'native_typed',
|
|
699
701
|
'lifecycle_typed',
|
|
700
702
|
'existing_adapter',
|
|
701
703
|
'retained_last_good',
|
|
702
704
|
'unknown',
|
|
703
705
|
'conflict'
|
|
704
|
-
]);
|
|
706
|
+
]));
|
|
705
707
|
export const zExchangeCodeRequest = z.object({
|
|
706
708
|
code: z.string(),
|
|
707
709
|
state: z.string()
|
|
@@ -717,12 +719,12 @@ export const zExchangeCodeResponse = z.object({
|
|
|
717
719
|
*
|
|
718
720
|
* Git file delta status: modified, added, deleted, or renamed
|
|
719
721
|
*/
|
|
720
|
-
export const zFileChangeStatus = z.enum([
|
|
722
|
+
export const zFileChangeStatus = closedSet()(z.enum([
|
|
721
723
|
'M',
|
|
722
724
|
'A',
|
|
723
725
|
'D',
|
|
724
726
|
'R'
|
|
725
|
-
]);
|
|
727
|
+
]));
|
|
726
728
|
export const zChangeDiffPayload = z.object({
|
|
727
729
|
binary: z.boolean(),
|
|
728
730
|
branch: z.string(),
|
|
@@ -733,36 +735,36 @@ export const zChangeDiffPayload = z.object({
|
|
|
733
735
|
truncated: z.boolean()
|
|
734
736
|
});
|
|
735
737
|
export const zFileChange = z.object({
|
|
736
|
-
linesAdded: z.
|
|
737
|
-
linesRemoved: z.
|
|
738
|
+
linesAdded: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
739
|
+
linesRemoved: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
738
740
|
oldPath: z.string().nullish(),
|
|
739
741
|
path: z.string(),
|
|
740
742
|
status: zFileChangeStatus
|
|
741
743
|
});
|
|
742
744
|
export const zFileFamiliarity = z.object({
|
|
743
|
-
daysSince: z.
|
|
745
|
+
daysSince: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
744
746
|
decayLevel: zDecayLevel,
|
|
745
|
-
depth: z.
|
|
746
|
-
humanTurns: z.
|
|
747
|
+
depth: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
748
|
+
humanTurns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
747
749
|
isSourceFile: z.boolean(),
|
|
748
750
|
lastEngagedAt: z.string().nullable(),
|
|
749
751
|
path: z.string(),
|
|
750
|
-
sessionCount: z.
|
|
751
|
-
totalTurns: z.
|
|
752
|
+
sessionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
753
|
+
totalTurns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
752
754
|
});
|
|
753
755
|
export const zFrictionCluster = z.object({
|
|
754
|
-
count: z.
|
|
756
|
+
count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
755
757
|
file: z.string(),
|
|
756
758
|
kind: z.string(),
|
|
757
759
|
label: z.string(),
|
|
758
|
-
sessions: z.
|
|
760
|
+
sessions: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
759
761
|
});
|
|
760
762
|
/**
|
|
761
763
|
* Harness
|
|
762
764
|
*
|
|
763
765
|
* AI coding tool or development environment
|
|
764
766
|
*/
|
|
765
|
-
export const zHarness = z.enum([
|
|
767
|
+
export const zHarness = closedSet()(z.enum([
|
|
766
768
|
'claude-code',
|
|
767
769
|
'gemini-cli',
|
|
768
770
|
'codex',
|
|
@@ -779,7 +781,7 @@ export const zHarness = z.enum([
|
|
|
779
781
|
'kiro-crew',
|
|
780
782
|
'antigravity-cli',
|
|
781
783
|
'antigravity-ide'
|
|
782
|
-
]);
|
|
784
|
+
]));
|
|
783
785
|
export const zHealthResponse = z.object({
|
|
784
786
|
status: z.string()
|
|
785
787
|
});
|
|
@@ -794,20 +796,20 @@ export const zHostSlug = z.string().regex(/^[a-zA-Z0-9._<>-]+$/);
|
|
|
794
796
|
*
|
|
795
797
|
* Recorded image media type: image/png or image/jpeg
|
|
796
798
|
*/
|
|
797
|
-
export const zImageMediaType = z.enum(['image/png', 'image/jpeg']);
|
|
799
|
+
export const zImageMediaType = closedSet()(z.enum(['image/png', 'image/jpeg']));
|
|
798
800
|
/**
|
|
799
801
|
* Input Modality
|
|
800
802
|
*
|
|
801
803
|
* Closed session graph value
|
|
802
804
|
*/
|
|
803
|
-
export const zInputModality = z.enum([
|
|
805
|
+
export const zInputModality = closedSet()(z.enum([
|
|
804
806
|
'none',
|
|
805
807
|
'text',
|
|
806
808
|
'media',
|
|
807
809
|
'user_action',
|
|
808
810
|
'mixed',
|
|
809
811
|
'unknown'
|
|
810
|
-
]);
|
|
812
|
+
]));
|
|
811
813
|
export const zInsightClassification = z.object({
|
|
812
814
|
category: z.string(),
|
|
813
815
|
cause: z.string(),
|
|
@@ -820,29 +822,29 @@ export const zInsightClassification = z.object({
|
|
|
820
822
|
*
|
|
821
823
|
* What a SessionInsight observed: a decision, friction, an unusual rate elevation, or a retry loop
|
|
822
824
|
*/
|
|
823
|
-
export const zInsightKind = z.enum([
|
|
825
|
+
export const zInsightKind = closedSet()(z.enum([
|
|
824
826
|
'decision',
|
|
825
827
|
'friction',
|
|
826
828
|
'unusual',
|
|
827
829
|
'retry_loop'
|
|
828
|
-
]);
|
|
830
|
+
]));
|
|
829
831
|
/**
|
|
830
832
|
* Insight Provenance
|
|
831
833
|
*
|
|
832
834
|
* How a SessionInsight was produced: mechanical (rule-derived) or mined
|
|
833
835
|
*/
|
|
834
|
-
export const zInsightProvenance = z.enum(['mechanical', 'mined']);
|
|
836
|
+
export const zInsightProvenance = closedSet()(z.enum(['mechanical', 'mined']));
|
|
835
837
|
/**
|
|
836
838
|
* Interaction Type
|
|
837
839
|
*
|
|
838
840
|
* How deeply a session engaged with a project file
|
|
839
841
|
*/
|
|
840
|
-
export const zInteractionType = z.enum([
|
|
842
|
+
export const zInteractionType = closedSet()(z.enum([
|
|
841
843
|
'mentioned',
|
|
842
844
|
'read',
|
|
843
845
|
'discussed',
|
|
844
846
|
'questioned'
|
|
845
|
-
]);
|
|
847
|
+
]));
|
|
846
848
|
export const zInterpretationDiagnostics = z.object({
|
|
847
849
|
partial: z.boolean()
|
|
848
850
|
});
|
|
@@ -851,17 +853,17 @@ export const zInterpretationDiagnostics = z.object({
|
|
|
851
853
|
*
|
|
852
854
|
* Content license for a published transcript
|
|
853
855
|
*/
|
|
854
|
-
export const zLicense = z.enum([
|
|
856
|
+
export const zLicense = closedSet()(z.enum([
|
|
855
857
|
'CC0-1.0',
|
|
856
858
|
'CC-BY-4.0',
|
|
857
859
|
'CC-BY-SA-4.0'
|
|
858
|
-
]);
|
|
860
|
+
]));
|
|
859
861
|
/**
|
|
860
862
|
* Local Collective Suggestion Reason
|
|
861
863
|
*
|
|
862
864
|
* Why the local server suggests a collective for a session
|
|
863
865
|
*/
|
|
864
|
-
export const zLocalCollectiveSuggestionReason = z.enum(['linked_repository', 'linked_github_org']);
|
|
866
|
+
export const zLocalCollectiveSuggestionReason = closedSet()(z.enum(['linked_repository', 'linked_github_org']));
|
|
865
867
|
export const zLocalCollectiveSuggestion = z.object({
|
|
866
868
|
match: z.string(),
|
|
867
869
|
reason: zLocalCollectiveSuggestionReason
|
|
@@ -871,23 +873,23 @@ export const zLocalCollectiveSuggestion = z.object({
|
|
|
871
873
|
*
|
|
872
874
|
* Actual request effect, never collective approval
|
|
873
875
|
*/
|
|
874
|
-
export const zLocalConfirmedContributionOutcome = z.enum(['published', 'submitted']);
|
|
876
|
+
export const zLocalConfirmedContributionOutcome = closedSet()(z.enum(['published', 'submitted']));
|
|
875
877
|
/**
|
|
876
878
|
* Local Contribution Evidence Kind
|
|
877
879
|
*
|
|
878
880
|
* One independently bounded evidence category
|
|
879
881
|
*/
|
|
880
|
-
export const zLocalContributionEvidenceKind = z.enum([
|
|
882
|
+
export const zLocalContributionEvidenceKind = closedSet()(z.enum([
|
|
881
883
|
'remote-attempts',
|
|
882
884
|
'receipts',
|
|
883
885
|
'operation-diagnostics'
|
|
884
|
-
]);
|
|
886
|
+
]));
|
|
885
887
|
/**
|
|
886
888
|
* Kickstart Close Reason
|
|
887
889
|
*
|
|
888
890
|
* Why a kickstart session ended: committed or expired
|
|
889
891
|
*/
|
|
890
|
-
export const zLocalKickstartCloseReason = z.enum(['committed', 'expired']);
|
|
892
|
+
export const zLocalKickstartCloseReason = closedSet()(z.enum(['committed', 'expired']));
|
|
891
893
|
export const zLocalKickstartConnect = z.object({
|
|
892
894
|
afterStop: z.string().optional(),
|
|
893
895
|
offered: z.boolean(),
|
|
@@ -899,20 +901,20 @@ export const zLocalKickstartConnect = z.object({
|
|
|
899
901
|
*
|
|
900
902
|
* Boundary offer answer: accept or skip. accept requires village to be connected
|
|
901
903
|
*/
|
|
902
|
-
export const zLocalKickstartConnectAnswer = z.enum(['accept', 'skip']);
|
|
904
|
+
export const zLocalKickstartConnectAnswer = closedSet()(z.enum(['accept', 'skip']));
|
|
903
905
|
/**
|
|
904
906
|
* Kickstart Diff Line Type
|
|
905
907
|
*
|
|
906
908
|
* Structured config-diff line: add, del, or ctx
|
|
907
909
|
*/
|
|
908
|
-
export const zLocalKickstartDiffLineType = z.enum([
|
|
910
|
+
export const zLocalKickstartDiffLineType = closedSet()(z.enum([
|
|
909
911
|
'add',
|
|
910
912
|
'del',
|
|
911
913
|
'ctx'
|
|
912
|
-
]);
|
|
914
|
+
]));
|
|
913
915
|
export const zLocalKickstartDiffLine = z.object({
|
|
914
|
-
newNo: z.
|
|
915
|
-
oldNo: z.
|
|
916
|
+
newNo: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
917
|
+
oldNo: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
916
918
|
text: z.string(),
|
|
917
919
|
type: zLocalKickstartDiffLineType
|
|
918
920
|
}).strict();
|
|
@@ -921,7 +923,7 @@ export const zLocalKickstartDiffLine = z.object({
|
|
|
921
923
|
*
|
|
922
924
|
* Machine-readable reason a kickstart route refused a request or could not finish it. Each token answers with one HTTP status
|
|
923
925
|
*/
|
|
924
|
-
export const zLocalKickstartErrorCode = z.enum([
|
|
926
|
+
export const zLocalKickstartErrorCode = closedSet()(z.enum([
|
|
925
927
|
'kickstart_body_missing',
|
|
926
928
|
'kickstart_body_invalid',
|
|
927
929
|
'kickstart_scope_invalid',
|
|
@@ -951,7 +953,7 @@ export const zLocalKickstartErrorCode = z.enum([
|
|
|
951
953
|
'kickstart_unavailable',
|
|
952
954
|
'kickstart_config_busy',
|
|
953
955
|
'kickstart_config_changing'
|
|
954
|
-
]);
|
|
956
|
+
]));
|
|
955
957
|
export const zLocalKickstartErrorResponse = z.object({
|
|
956
958
|
code: zLocalKickstartErrorCode,
|
|
957
959
|
error: z.string().min(1)
|
|
@@ -961,26 +963,26 @@ export const zLocalKickstartErrorResponse = z.object({
|
|
|
961
963
|
*
|
|
962
964
|
* Live kickstart topic discriminator. One event carries one session id
|
|
963
965
|
*/
|
|
964
|
-
export const zLocalKickstartEventKind = z.enum([
|
|
966
|
+
export const zLocalKickstartEventKind = closedSet()(z.enum([
|
|
965
967
|
'session',
|
|
966
968
|
'answers',
|
|
967
969
|
'conflicts',
|
|
968
970
|
'scan',
|
|
969
971
|
'ingest',
|
|
970
972
|
'closed'
|
|
971
|
-
]);
|
|
973
|
+
]));
|
|
972
974
|
/**
|
|
973
975
|
* Kickstart Field Kind
|
|
974
976
|
*
|
|
975
977
|
* Control shape of one kickstart field
|
|
976
978
|
*/
|
|
977
|
-
export const zLocalKickstartFieldKind = z.enum([
|
|
979
|
+
export const zLocalKickstartFieldKind = closedSet()(z.enum([
|
|
978
980
|
'toggle',
|
|
979
981
|
'choice',
|
|
980
982
|
'action',
|
|
981
983
|
'tree',
|
|
982
984
|
'notice'
|
|
983
|
-
]);
|
|
985
|
+
]));
|
|
984
986
|
export const zLocalKickstartGuide = z.object({
|
|
985
987
|
hints: z.array(z.string()).optional(),
|
|
986
988
|
intro: z.string().optional()
|
|
@@ -999,31 +1001,31 @@ export const zLocalKickstartDiff = z.object({
|
|
|
999
1001
|
*
|
|
1000
1002
|
* Import state pushed on the kickstart topic
|
|
1001
1003
|
*/
|
|
1002
|
-
export const zLocalKickstartIngestState = z.enum([
|
|
1004
|
+
export const zLocalKickstartIngestState = closedSet()(z.enum([
|
|
1003
1005
|
'idle',
|
|
1004
1006
|
'running',
|
|
1005
1007
|
'busy',
|
|
1006
1008
|
'failed'
|
|
1007
|
-
]);
|
|
1009
|
+
]));
|
|
1008
1010
|
export const zLocalKickstartIngest = z.object({
|
|
1009
1011
|
error: z.string().optional(),
|
|
1010
|
-
new: z.
|
|
1012
|
+
new: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
1011
1013
|
note: z.string().optional(),
|
|
1012
1014
|
state: zLocalKickstartIngestState,
|
|
1013
|
-
updated: z.
|
|
1015
|
+
updated: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808)
|
|
1014
1016
|
}).strict();
|
|
1015
1017
|
/**
|
|
1016
1018
|
* Kickstart Line Kind
|
|
1017
1019
|
*
|
|
1018
1020
|
* Typed preview or example line
|
|
1019
1021
|
*/
|
|
1020
|
-
export const zLocalKickstartLineKind = z.enum([
|
|
1022
|
+
export const zLocalKickstartLineKind = closedSet()(z.enum([
|
|
1021
1023
|
'text',
|
|
1022
1024
|
'label',
|
|
1023
1025
|
'before',
|
|
1024
1026
|
'after',
|
|
1025
1027
|
'spacer'
|
|
1026
|
-
]);
|
|
1028
|
+
]));
|
|
1027
1029
|
export const zLocalKickstartLine = z.object({
|
|
1028
1030
|
kind: zLocalKickstartLineKind,
|
|
1029
1031
|
text: z.string()
|
|
@@ -1033,13 +1035,13 @@ export const zLocalKickstartLine = z.object({
|
|
|
1033
1035
|
*
|
|
1034
1036
|
* One finish action. auto-publish-settings links to the settings section; it does not install a hook
|
|
1035
1037
|
*/
|
|
1036
|
-
export const zLocalKickstartNextStep = z.enum([
|
|
1038
|
+
export const zLocalKickstartNextStep = closedSet()(z.enum([
|
|
1037
1039
|
'config',
|
|
1038
1040
|
'web-start',
|
|
1039
1041
|
'village-login',
|
|
1040
1042
|
'village-push',
|
|
1041
1043
|
'auto-publish-settings'
|
|
1042
|
-
]);
|
|
1044
|
+
]));
|
|
1043
1045
|
export const zLocalKickstartCommitted = z.object({
|
|
1044
1046
|
configPath: z.string().min(1),
|
|
1045
1047
|
diagnostics: z.array(z.string()).optional(),
|
|
@@ -1052,24 +1054,24 @@ export const zLocalKickstartCommitted = z.object({
|
|
|
1052
1054
|
*
|
|
1053
1055
|
* Row kind in the selection forest
|
|
1054
1056
|
*/
|
|
1055
|
-
export const zLocalKickstartNodeKind = z.enum([
|
|
1057
|
+
export const zLocalKickstartNodeKind = closedSet()(z.enum([
|
|
1056
1058
|
'project',
|
|
1057
1059
|
'group',
|
|
1058
1060
|
'branch',
|
|
1059
1061
|
'session'
|
|
1060
|
-
]);
|
|
1062
|
+
]));
|
|
1061
1063
|
/**
|
|
1062
1064
|
* Kickstart Node State
|
|
1063
1065
|
*
|
|
1064
1066
|
* Server-computed selection of one forest row: none, some, or all. locked is a boolean, not a state
|
|
1065
1067
|
*/
|
|
1066
|
-
export const zLocalKickstartNodeState = z.enum([
|
|
1068
|
+
export const zLocalKickstartNodeState = closedSet()(z.enum([
|
|
1067
1069
|
'none',
|
|
1068
1070
|
'some',
|
|
1069
1071
|
'all'
|
|
1070
|
-
]);
|
|
1072
|
+
]));
|
|
1071
1073
|
export const zLocalKickstartNode = z.object({
|
|
1072
|
-
childCount: z.
|
|
1074
|
+
childCount: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
1073
1075
|
harness: z.string().optional(),
|
|
1074
1076
|
id: z.string().min(1),
|
|
1075
1077
|
kind: zLocalKickstartNodeKind,
|
|
@@ -1092,35 +1094,35 @@ export const zLocalKickstartPreview = z.object({
|
|
|
1092
1094
|
*
|
|
1093
1095
|
* Which side of one conflict row to keep: mine is the draft, theirs is the file
|
|
1094
1096
|
*/
|
|
1095
|
-
export const zLocalKickstartResolution = z.enum(['mine', 'theirs']);
|
|
1097
|
+
export const zLocalKickstartResolution = closedSet()(z.enum(['mine', 'theirs']));
|
|
1096
1098
|
/**
|
|
1097
1099
|
* Kickstart Scan State
|
|
1098
1100
|
*
|
|
1099
1101
|
* Discovery job state pushed on the kickstart topic
|
|
1100
1102
|
*/
|
|
1101
|
-
export const zLocalKickstartScanState = z.enum([
|
|
1103
|
+
export const zLocalKickstartScanState = closedSet()(z.enum([
|
|
1102
1104
|
'idle',
|
|
1103
1105
|
'running',
|
|
1104
1106
|
'done',
|
|
1105
1107
|
'error'
|
|
1106
|
-
]);
|
|
1108
|
+
]));
|
|
1107
1109
|
export const zLocalKickstartScan = z.object({
|
|
1108
|
-
done: z.
|
|
1110
|
+
done: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
1109
1111
|
droppedLabels: z.array(z.string()).max(3).optional(),
|
|
1110
|
-
droppedSelections: z.
|
|
1112
|
+
droppedSelections: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
1111
1113
|
error: z.string().optional(),
|
|
1112
|
-
lockedNodes: z.
|
|
1114
|
+
lockedNodes: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
1113
1115
|
notice: z.string().regex(/\S/).optional(),
|
|
1114
1116
|
phase: z.string().optional(),
|
|
1115
1117
|
state: zLocalKickstartScanState,
|
|
1116
|
-
total: z.
|
|
1118
|
+
total: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808)
|
|
1117
1119
|
}).strict();
|
|
1118
1120
|
/**
|
|
1119
1121
|
* Kickstart Scope
|
|
1120
1122
|
*
|
|
1121
1123
|
* Answer set a kickstart session collects: the whole wizard, or the selection page
|
|
1122
1124
|
*/
|
|
1123
|
-
export const zLocalKickstartScope = z.enum(['full', 'selection']);
|
|
1125
|
+
export const zLocalKickstartScope = closedSet()(z.enum(['full', 'selection']));
|
|
1124
1126
|
export const zLocalKickstartOpenRequest = z.object({
|
|
1125
1127
|
scope: zLocalKickstartScope
|
|
1126
1128
|
}).strict();
|
|
@@ -1133,12 +1135,12 @@ export const zLocalKickstartStatus = z.object({
|
|
|
1133
1135
|
*
|
|
1134
1136
|
* Layout of one kickstart stop
|
|
1135
1137
|
*/
|
|
1136
|
-
export const zLocalKickstartStopKind = z.enum([
|
|
1138
|
+
export const zLocalKickstartStopKind = closedSet()(z.enum([
|
|
1137
1139
|
'connection',
|
|
1138
1140
|
'config',
|
|
1139
1141
|
'review',
|
|
1140
1142
|
'ingest'
|
|
1141
|
-
]);
|
|
1143
|
+
]));
|
|
1142
1144
|
export const zLocalKickstartSummary = z.object({
|
|
1143
1145
|
effects: z.array(z.string()),
|
|
1144
1146
|
values: z.array(z.string())
|
|
@@ -1156,9 +1158,9 @@ export const zLocalKickstartVillage = z.object({
|
|
|
1156
1158
|
*
|
|
1157
1159
|
* Failure or uncertain remote effect, never successful contribution
|
|
1158
1160
|
*/
|
|
1159
|
-
export const zLocalOperationDiagnosticOutcome = z.enum(['failed', 'uncertain']);
|
|
1161
|
+
export const zLocalOperationDiagnosticOutcome = closedSet()(z.enum(['failed', 'uncertain']));
|
|
1160
1162
|
export const zLocalPublicationAttemptFailure = z.object({
|
|
1161
|
-
attemptedAt: z.iso.datetime(),
|
|
1163
|
+
attemptedAt: z.iso.datetime({ offset: true }),
|
|
1162
1164
|
message: z.string()
|
|
1163
1165
|
});
|
|
1164
1166
|
/**
|
|
@@ -1166,20 +1168,20 @@ export const zLocalPublicationAttemptFailure = z.object({
|
|
|
1166
1168
|
*
|
|
1167
1169
|
* Whether a local session has a publication on Village
|
|
1168
1170
|
*/
|
|
1169
|
-
export const zLocalPublicationState = z.enum(['unpublished', 'published']);
|
|
1171
|
+
export const zLocalPublicationState = closedSet()(z.enum(['unpublished', 'published']));
|
|
1170
1172
|
/**
|
|
1171
1173
|
* Local Setting Kind
|
|
1172
1174
|
*
|
|
1173
1175
|
* JSON type of one local setting's value
|
|
1174
1176
|
*/
|
|
1175
|
-
export const zLocalSettingKind = z.enum([
|
|
1177
|
+
export const zLocalSettingKind = closedSet()(z.enum([
|
|
1176
1178
|
'boolean',
|
|
1177
1179
|
'integer',
|
|
1178
1180
|
'string',
|
|
1179
1181
|
'string_list',
|
|
1180
1182
|
'choice',
|
|
1181
1183
|
'structured'
|
|
1182
|
-
]);
|
|
1184
|
+
]));
|
|
1183
1185
|
export const zLocalSettingRefusal = z.object({
|
|
1184
1186
|
error: z.string().min(1),
|
|
1185
1187
|
key: z.string().min(1)
|
|
@@ -1199,7 +1201,7 @@ export const zLocalSettingValue = z.union([
|
|
|
1199
1201
|
export const zLocalKickstartAnswers = z.object({
|
|
1200
1202
|
connectAnswer: zLocalKickstartConnectAnswer.optional(),
|
|
1201
1203
|
resolutions: z.record(z.string(), zLocalKickstartResolution).optional(),
|
|
1202
|
-
revision: z.
|
|
1204
|
+
revision: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
1203
1205
|
selectedIds: z.array(z.string()).optional(),
|
|
1204
1206
|
values: z.record(z.string(), zLocalSettingValue).optional()
|
|
1205
1207
|
}).strict();
|
|
@@ -1227,7 +1229,7 @@ export const zLocalKickstartField = z.object({
|
|
|
1227
1229
|
export const zLocalKickstartOverwrite = z.object({
|
|
1228
1230
|
key: z.string().min(1),
|
|
1229
1231
|
previous: zLocalSettingValue,
|
|
1230
|
-
revision: z.
|
|
1232
|
+
revision: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808)
|
|
1231
1233
|
}).strict();
|
|
1232
1234
|
export const zLocalKickstartStop = z.object({
|
|
1233
1235
|
diff: zLocalKickstartDiff.optional(),
|
|
@@ -1245,7 +1247,7 @@ export const zLocalKickstartSession = z.object({
|
|
|
1245
1247
|
connect: zLocalKickstartConnect,
|
|
1246
1248
|
id: z.string().min(1),
|
|
1247
1249
|
openedAt: z.string().min(1),
|
|
1248
|
-
revision: z.
|
|
1250
|
+
revision: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
1249
1251
|
scan: zLocalKickstartScan,
|
|
1250
1252
|
scope: zLocalKickstartScope,
|
|
1251
1253
|
stops: z.array(zLocalKickstartStop),
|
|
@@ -1256,14 +1258,14 @@ export const zLocalKickstartEvent = z.object({
|
|
|
1256
1258
|
ingest: zLocalKickstartIngest.optional(),
|
|
1257
1259
|
kind: zLocalKickstartEventKind,
|
|
1258
1260
|
reason: zLocalKickstartCloseReason.optional(),
|
|
1259
|
-
revision: z.
|
|
1261
|
+
revision: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
1260
1262
|
scan: zLocalKickstartScan.optional(),
|
|
1261
1263
|
sessionId: z.string().min(1),
|
|
1262
1264
|
view: zLocalKickstartSession.optional()
|
|
1263
1265
|
}).strict();
|
|
1264
1266
|
export const zLocalKickstartPatchResult = z.object({
|
|
1265
1267
|
overwritten: z.array(zLocalKickstartOverwrite).optional(),
|
|
1266
|
-
revision: z.
|
|
1268
|
+
revision: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
1267
1269
|
stale: z.boolean(),
|
|
1268
1270
|
view: zLocalKickstartSession.optional()
|
|
1269
1271
|
}).strict();
|
|
@@ -1286,12 +1288,12 @@ export const zLocalSettingUpdateRequest = z.object({
|
|
|
1286
1288
|
*
|
|
1287
1289
|
* Root publication filter; auto uses the canonical live hook decision
|
|
1288
1290
|
*/
|
|
1289
|
-
export const zLocalSyncPublicationFilter = z.enum([
|
|
1291
|
+
export const zLocalSyncPublicationFilter = closedSet()(z.enum([
|
|
1290
1292
|
'all',
|
|
1291
1293
|
'not-published',
|
|
1292
1294
|
'published',
|
|
1293
1295
|
'auto'
|
|
1294
|
-
]);
|
|
1296
|
+
]));
|
|
1295
1297
|
export const zLocalSyncSessionTotals = z.object({
|
|
1296
1298
|
sessions: z.int().gte(0).lte(9007199254740991)
|
|
1297
1299
|
});
|
|
@@ -1301,7 +1303,7 @@ export const zLongestStreak = z.object({
|
|
|
1301
1303
|
weeks: z.int().gte(0).lte(9007199254740991)
|
|
1302
1304
|
});
|
|
1303
1305
|
export const zMapEdge = z.object({
|
|
1304
|
-
count: z.
|
|
1306
|
+
count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1305
1307
|
from: z.string(),
|
|
1306
1308
|
to: z.string()
|
|
1307
1309
|
});
|
|
@@ -1310,11 +1312,11 @@ export const zMapEdge = z.object({
|
|
|
1310
1312
|
*
|
|
1311
1313
|
* Path-derived map node classification
|
|
1312
1314
|
*/
|
|
1313
|
-
export const zMapNodeKind = z.enum([
|
|
1315
|
+
export const zMapNodeKind = closedSet()(z.enum([
|
|
1314
1316
|
'module',
|
|
1315
1317
|
'package',
|
|
1316
1318
|
'file'
|
|
1317
|
-
]);
|
|
1319
|
+
]));
|
|
1318
1320
|
export const zMedianP90 = z.object({
|
|
1319
1321
|
count: z.int().gte(0).lte(9007199254740991),
|
|
1320
1322
|
median: z.number().nullable(),
|
|
@@ -1331,7 +1333,7 @@ export const zAnalyticsSessionStats = z.object({
|
|
|
1331
1333
|
*
|
|
1332
1334
|
* WebSocket message discriminator
|
|
1333
1335
|
*/
|
|
1334
|
-
export const zMessageType = z.enum([
|
|
1336
|
+
export const zMessageType = closedSet()(z.enum([
|
|
1335
1337
|
'subscribe',
|
|
1336
1338
|
'unsubscribe',
|
|
1337
1339
|
'dashboard',
|
|
@@ -1344,7 +1346,7 @@ export const zMessageType = z.enum([
|
|
|
1344
1346
|
'connected',
|
|
1345
1347
|
'error',
|
|
1346
1348
|
'kickstart'
|
|
1347
|
-
]);
|
|
1349
|
+
]));
|
|
1348
1350
|
export const zClientMessage = z.object({
|
|
1349
1351
|
channels: z.array(zChannelSubscription).optional(),
|
|
1350
1352
|
type: zMessageType
|
|
@@ -1375,38 +1377,38 @@ export const zModelInfo = z.object({
|
|
|
1375
1377
|
});
|
|
1376
1378
|
export const zNativeAttachmentRef = z.object({
|
|
1377
1379
|
toolCallId: z.string().optional(),
|
|
1378
|
-
turnIndex: z.
|
|
1380
|
+
turnIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
1379
1381
|
});
|
|
1380
1382
|
/**
|
|
1381
1383
|
* Native Metadata Kind
|
|
1382
1384
|
*
|
|
1383
1385
|
* Kind of bounded non-conversational native metadata
|
|
1384
1386
|
*/
|
|
1385
|
-
export const zNativeMetadataKind = z.enum([
|
|
1387
|
+
export const zNativeMetadataKind = closedSet()(z.enum([
|
|
1386
1388
|
'pi.custom.data',
|
|
1387
1389
|
'pi.custommessage.details',
|
|
1388
1390
|
'pi.toolresult.details',
|
|
1389
1391
|
'pi.compaction.details',
|
|
1390
1392
|
'pi.branchsummary.details'
|
|
1391
|
-
]);
|
|
1393
|
+
]));
|
|
1392
1394
|
/**
|
|
1393
1395
|
* Native Metadata Source Type
|
|
1394
1396
|
*
|
|
1395
1397
|
* Native source category for public metadata
|
|
1396
1398
|
*/
|
|
1397
|
-
export const zNativeMetadataSourceType = z.enum([
|
|
1399
|
+
export const zNativeMetadataSourceType = closedSet()(z.enum([
|
|
1398
1400
|
'pi.custom',
|
|
1399
1401
|
'pi.custom_message',
|
|
1400
1402
|
'pi.message',
|
|
1401
1403
|
'pi.compaction',
|
|
1402
1404
|
'pi.branch_summary'
|
|
1403
|
-
]);
|
|
1405
|
+
]));
|
|
1404
1406
|
/**
|
|
1405
1407
|
* Native Pi Message Role
|
|
1406
1408
|
*
|
|
1407
1409
|
* Pi message role needed for public metadata validation
|
|
1408
1410
|
*/
|
|
1409
|
-
export const zNativePiMessageRole = z.enum(['toolResult']);
|
|
1411
|
+
export const zNativePiMessageRole = closedSet()(z.enum(['toolResult']));
|
|
1410
1412
|
/**
|
|
1411
1413
|
* Observed Model ID
|
|
1412
1414
|
*
|
|
@@ -1418,33 +1420,33 @@ export const zObservedModelID = z.string().min(1).regex(/^(?:|[^\s])(?:[\s\S]
|
|
|
1418
1420
|
*
|
|
1419
1421
|
* Why an image part carries no bytes: unsupported (wins for a non-recorded media type), too_large, missing, or not_published
|
|
1420
1422
|
*/
|
|
1421
|
-
export const zOmittedReason = z.enum([
|
|
1423
|
+
export const zOmittedReason = closedSet()(z.enum([
|
|
1422
1424
|
'too_large',
|
|
1423
1425
|
'unsupported',
|
|
1424
1426
|
'missing',
|
|
1425
1427
|
'not_published'
|
|
1426
|
-
]);
|
|
1428
|
+
]));
|
|
1427
1429
|
export const zImagePart = z.object({
|
|
1428
|
-
byteSize: z.
|
|
1429
|
-
height: z.
|
|
1430
|
+
byteSize: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
1431
|
+
height: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
1430
1432
|
mediaType: zImageMediaType.optional(),
|
|
1431
1433
|
omittedReason: zOmittedReason.optional(),
|
|
1432
1434
|
ref: z.string().length(64).regex(/^[0-9a-f]{64}$/).optional(),
|
|
1433
|
-
width: z.
|
|
1435
|
+
width: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional()
|
|
1434
1436
|
});
|
|
1435
1437
|
/**
|
|
1436
1438
|
* Operation Issue Code
|
|
1437
1439
|
*
|
|
1438
1440
|
* Bounded failure category; retry is corrective text only
|
|
1439
1441
|
*/
|
|
1440
|
-
export const zOperationIssueCode = z.enum([
|
|
1442
|
+
export const zOperationIssueCode = closedSet()(z.enum([
|
|
1441
1443
|
'auth',
|
|
1442
1444
|
'remote',
|
|
1443
1445
|
'contract',
|
|
1444
1446
|
'deadline',
|
|
1445
1447
|
'persistence',
|
|
1446
1448
|
'superseded'
|
|
1447
|
-
]);
|
|
1449
|
+
]));
|
|
1448
1450
|
export const zOperationIssue = z.object({
|
|
1449
1451
|
code: zOperationIssueCode,
|
|
1450
1452
|
message: z.string().min(1).max(2048),
|
|
@@ -1506,16 +1508,25 @@ export const zOwnerUpdateLicenseIntent = z.enum([
|
|
|
1506
1508
|
*
|
|
1507
1509
|
* 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.
|
|
1508
1510
|
*/
|
|
1509
|
-
export const zPageSize = z.union([
|
|
1511
|
+
export const zPageSize = closedSet()(z.union([
|
|
1510
1512
|
z.literal(25),
|
|
1511
1513
|
z.literal(50),
|
|
1512
1514
|
z.literal(100)
|
|
1513
|
-
]);
|
|
1515
|
+
]));
|
|
1514
1516
|
export const zPersonalMedians = z.object({
|
|
1515
1517
|
retryShare: z.number().nullish(),
|
|
1516
1518
|
specQualityScore: z.number().nullish(),
|
|
1517
1519
|
withinSessionReverts: z.number().nullish()
|
|
1518
1520
|
});
|
|
1521
|
+
export const zPositionedSegmentRef = z.object({
|
|
1522
|
+
byteLength: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1523
|
+
conversationTurns: zConversationTurnSpan.nullish(),
|
|
1524
|
+
firstTurn: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
1525
|
+
index: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1526
|
+
lastTurn: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
1527
|
+
sourceFirstPosition: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
1528
|
+
sourceLastPosition: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808)
|
|
1529
|
+
});
|
|
1519
1530
|
/**
|
|
1520
1531
|
* Project Hash
|
|
1521
1532
|
*
|
|
@@ -1544,28 +1555,28 @@ export const zProjectResolutionPayload = z.object({
|
|
|
1544
1555
|
projectHash: zProjectHash
|
|
1545
1556
|
});
|
|
1546
1557
|
export const zProjectSummary = z.object({
|
|
1547
|
-
lastWorkMs: z.
|
|
1548
|
-
openChanges: z.
|
|
1558
|
+
lastWorkMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
1559
|
+
openChanges: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1549
1560
|
project: z.string(),
|
|
1550
1561
|
projectHash: zProjectHash,
|
|
1551
|
-
recordedFiles: z.
|
|
1552
|
-
sessions: z.
|
|
1553
|
-
totalFiles: z.
|
|
1562
|
+
recordedFiles: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1563
|
+
sessions: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1564
|
+
totalFiles: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
1554
1565
|
});
|
|
1555
1566
|
export const zProjectSummariesPayload = z.object({
|
|
1556
1567
|
projects: z.array(zProjectSummary).nullable()
|
|
1557
1568
|
});
|
|
1558
1569
|
export const zPromptDigestHeader = z.object({
|
|
1559
|
-
commitsCovered: z.
|
|
1560
|
-
commitsTotal: z.
|
|
1570
|
+
commitsCovered: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1571
|
+
commitsTotal: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1561
1572
|
harness: zHarness,
|
|
1562
|
-
promptCount: z.
|
|
1573
|
+
promptCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1563
1574
|
redactionLevel: z.string(),
|
|
1564
|
-
sessionCount: z.
|
|
1575
|
+
sessionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1565
1576
|
villageUrl: z.string()
|
|
1566
1577
|
});
|
|
1567
1578
|
export const zPromptDigestSkill = z.object({
|
|
1568
|
-
invocationCount: z.
|
|
1579
|
+
invocationCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1569
1580
|
name: z.string()
|
|
1570
1581
|
});
|
|
1571
1582
|
export const zProvenance = z.object({
|
|
@@ -1583,21 +1594,21 @@ export const zPublicRevisionRef = z.string().min(1).max(96).refine((value) => !/
|
|
|
1583
1594
|
*
|
|
1584
1595
|
* Closed session graph value
|
|
1585
1596
|
*/
|
|
1586
|
-
export const zPublicSourceAnchorKind = z.enum([
|
|
1597
|
+
export const zPublicSourceAnchorKind = closedSet()(z.enum([
|
|
1587
1598
|
'general_source_session',
|
|
1588
1599
|
'before_redacted_entry',
|
|
1589
1600
|
'through_redacted_entry'
|
|
1590
|
-
]);
|
|
1601
|
+
]));
|
|
1591
1602
|
/**
|
|
1592
1603
|
* Publish Operation Kind
|
|
1593
1604
|
*
|
|
1594
1605
|
* Mutation semantic for one publish operation arm
|
|
1595
1606
|
*/
|
|
1596
|
-
export const zPublishOperationKind = z.enum([
|
|
1607
|
+
export const zPublishOperationKind = closedSet()(z.enum([
|
|
1597
1608
|
'preserve',
|
|
1598
1609
|
'replace',
|
|
1599
1610
|
'append'
|
|
1600
|
-
]);
|
|
1611
|
+
]));
|
|
1601
1612
|
export const zPublishLicenseOperation = z.object({
|
|
1602
1613
|
kind: zPublishOperationKind,
|
|
1603
1614
|
license: zLicense.nullable()
|
|
@@ -1689,12 +1700,12 @@ export const zPublishAssociationOperation = z.object({
|
|
|
1689
1700
|
*
|
|
1690
1701
|
* Optional metadata result, independent of required content success
|
|
1691
1702
|
*/
|
|
1692
|
-
export const zPullAssociationMetadataState = z.enum([
|
|
1703
|
+
export const zPullAssociationMetadataState = closedSet()(z.enum([
|
|
1693
1704
|
'observed',
|
|
1694
1705
|
'stale',
|
|
1695
1706
|
'unknown',
|
|
1696
1707
|
'invalidated'
|
|
1697
|
-
]);
|
|
1708
|
+
]));
|
|
1698
1709
|
export const zPullAssociationMetadataResult = z.object({
|
|
1699
1710
|
observedAt: z.iso.datetime().regex(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?Z$/).nullish(),
|
|
1700
1711
|
state: zPullAssociationMetadataState,
|
|
@@ -1706,43 +1717,43 @@ export const zPullAssociationMetadataResult = z.object({
|
|
|
1706
1717
|
*
|
|
1707
1718
|
* Whether per-file read attribution is recoverable for a node's editing sessions: complete, partial, or unavailable
|
|
1708
1719
|
*/
|
|
1709
|
-
export const zReadAttributionState = z.enum([
|
|
1720
|
+
export const zReadAttributionState = closedSet()(z.enum([
|
|
1710
1721
|
'complete',
|
|
1711
1722
|
'partial',
|
|
1712
1723
|
'unavailable'
|
|
1713
|
-
]);
|
|
1724
|
+
]));
|
|
1714
1725
|
/**
|
|
1715
1726
|
* Read State Grade
|
|
1716
1727
|
*
|
|
1717
1728
|
* Ordinal explicit read-state act: none, viewed, reviewed, or reviewed_in_detail
|
|
1718
1729
|
*/
|
|
1719
|
-
export const zReadStateGrade = z.enum([
|
|
1730
|
+
export const zReadStateGrade = closedSet()(z.enum([
|
|
1720
1731
|
'none',
|
|
1721
1732
|
'viewed',
|
|
1722
1733
|
'reviewed',
|
|
1723
1734
|
'reviewed_in_detail'
|
|
1724
|
-
]);
|
|
1735
|
+
]));
|
|
1725
1736
|
export const zMapNode = z.object({
|
|
1726
|
-
agentEditedCount: z.
|
|
1727
|
-
attributedRegionCount: z.
|
|
1728
|
-
changedRegionCount: z.
|
|
1737
|
+
agentEditedCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1738
|
+
attributedRegionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1739
|
+
changedRegionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1729
1740
|
effortDensity: z.number(),
|
|
1730
|
-
fileCount: z.
|
|
1741
|
+
fileCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1731
1742
|
id: z.string(),
|
|
1732
1743
|
kind: zMapNodeKind,
|
|
1733
1744
|
language: z.string().optional(),
|
|
1734
|
-
layer: z.
|
|
1735
|
-
loc: z.
|
|
1745
|
+
layer: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1746
|
+
loc: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1736
1747
|
name: z.string(),
|
|
1737
|
-
order: z.
|
|
1748
|
+
order: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1738
1749
|
parent: z.string().optional(),
|
|
1739
1750
|
readAttribution: zReadAttributionState,
|
|
1740
|
-
readCount: z.
|
|
1751
|
+
readCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1741
1752
|
readState: zReadStateGrade,
|
|
1742
|
-
recordedFiles: z.
|
|
1743
|
-
reviewedRegionCount: z.
|
|
1744
|
-
totalFiles: z.
|
|
1745
|
-
touchCount: z.
|
|
1753
|
+
recordedFiles: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1754
|
+
reviewedRegionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1755
|
+
totalFiles: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1756
|
+
touchCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
1746
1757
|
});
|
|
1747
1758
|
export const zMapGraphPayload = z.object({
|
|
1748
1759
|
activityEdges: z.array(zActivityEdge).nullable(),
|
|
@@ -1774,7 +1785,7 @@ export const zRedactionInfo = z.object({
|
|
|
1774
1785
|
applied: z.boolean(),
|
|
1775
1786
|
content_hash_at_redact: z.string().optional(),
|
|
1776
1787
|
level: z.string().optional(),
|
|
1777
|
-
redacted_at_ms: z.
|
|
1788
|
+
redacted_at_ms: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
1778
1789
|
rule_set_version: z.string().optional()
|
|
1779
1790
|
});
|
|
1780
1791
|
/**
|
|
@@ -1782,14 +1793,14 @@ export const zRedactionInfo = z.object({
|
|
|
1782
1793
|
*
|
|
1783
1794
|
* Closed session graph value
|
|
1784
1795
|
*/
|
|
1785
|
-
export const zRelationshipNavigationStatus = z.enum([
|
|
1796
|
+
export const zRelationshipNavigationStatus = closedSet()(z.enum([
|
|
1786
1797
|
'resolved',
|
|
1787
1798
|
'general_link_only',
|
|
1788
1799
|
'known_unavailable',
|
|
1789
1800
|
'inaccessible',
|
|
1790
1801
|
'unknown',
|
|
1791
1802
|
'conflicting'
|
|
1792
|
-
]);
|
|
1803
|
+
]));
|
|
1793
1804
|
export const zHelperContextSummary = z.object({
|
|
1794
1805
|
groupId: z.string(),
|
|
1795
1806
|
ownerStatus: zRelationshipNavigationStatus
|
|
@@ -1803,13 +1814,13 @@ export const zHelperContextSummary = z.object({
|
|
|
1803
1814
|
*
|
|
1804
1815
|
* Closed session graph value
|
|
1805
1816
|
*/
|
|
1806
|
-
export const zRelationshipTargetState = z.enum([
|
|
1817
|
+
export const zRelationshipTargetState = closedSet()(z.enum([
|
|
1807
1818
|
'target_known',
|
|
1808
1819
|
'target_known_retained',
|
|
1809
1820
|
'explicit_none',
|
|
1810
1821
|
'unknown',
|
|
1811
1822
|
'conflicting_current_native_evidence'
|
|
1812
|
-
]);
|
|
1823
|
+
]));
|
|
1813
1824
|
export const zRetainedUnknownRecord = z.object({
|
|
1814
1825
|
kind: z.string().min(1),
|
|
1815
1826
|
namespace: z.string().min(1),
|
|
@@ -1825,7 +1836,7 @@ export const zReturningContributorRate = z.object({
|
|
|
1825
1836
|
total: z.int().gte(0).lte(9007199254740991)
|
|
1826
1837
|
});
|
|
1827
1838
|
export const zReviewSuggestion = z.object({
|
|
1828
|
-
daysSince: z.
|
|
1839
|
+
daysSince: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1829
1840
|
lastEngaged: z.string(),
|
|
1830
1841
|
path: z.string(),
|
|
1831
1842
|
suggestedPrompt: z.string()
|
|
@@ -1835,53 +1846,55 @@ export const zReviewSuggestion = z.object({
|
|
|
1835
1846
|
*
|
|
1836
1847
|
* Mechanism the resolver used to map a ghost commit to its successor
|
|
1837
1848
|
*/
|
|
1838
|
-
export const zRewriteMethod = z.enum([
|
|
1849
|
+
export const zRewriteMethod = closedSet()(z.enum([
|
|
1839
1850
|
'hash',
|
|
1840
1851
|
'patch_id',
|
|
1841
1852
|
'author_identity',
|
|
1842
1853
|
'message_embedded',
|
|
1843
1854
|
'temporal',
|
|
1844
1855
|
'none'
|
|
1845
|
-
]);
|
|
1856
|
+
]));
|
|
1846
1857
|
/**
|
|
1847
1858
|
* Rewrite Resolution
|
|
1848
1859
|
*
|
|
1849
1860
|
* Whether a ledger-observed commit hash is live, was rewritten, or could not be resolved
|
|
1850
1861
|
*/
|
|
1851
|
-
export const zRewriteResolution = z.enum([
|
|
1862
|
+
export const zRewriteResolution = closedSet()(z.enum([
|
|
1852
1863
|
'live',
|
|
1853
1864
|
'rewritten',
|
|
1854
1865
|
'unresolved'
|
|
1855
|
-
]);
|
|
1866
|
+
]));
|
|
1856
1867
|
/**
|
|
1857
1868
|
* Role
|
|
1858
1869
|
*
|
|
1859
1870
|
* Sender role of a message turn
|
|
1860
1871
|
*/
|
|
1861
|
-
export const zRole = z.enum([
|
|
1872
|
+
export const zRole = closedSet()(z.enum([
|
|
1862
1873
|
'user',
|
|
1863
1874
|
'assistant',
|
|
1864
1875
|
'tool',
|
|
1865
1876
|
'system'
|
|
1866
|
-
]);
|
|
1877
|
+
]));
|
|
1867
1878
|
/**
|
|
1868
1879
|
* Scale Kind
|
|
1869
1880
|
*
|
|
1870
1881
|
* Stevens measurement level: nominal (categories without order), ordinal (ordered categories), continuous (numeric range)
|
|
1871
1882
|
*/
|
|
1872
|
-
export const zScaleKind = z.enum([
|
|
1883
|
+
export const zScaleKind = closedSet()(z.enum([
|
|
1873
1884
|
'nominal',
|
|
1874
1885
|
'ordinal',
|
|
1875
1886
|
'continuous'
|
|
1876
|
-
]);
|
|
1887
|
+
]));
|
|
1877
1888
|
export const zSchemaVersionResponse = z.object({
|
|
1878
1889
|
annotationSchemaVersion: z.string(),
|
|
1879
1890
|
contentCapabilities: z.array(z.string()).optional(),
|
|
1880
1891
|
minPullContractVersion: z.string().optional(),
|
|
1881
1892
|
minPushContractVersion: z.string(),
|
|
1893
|
+
minSegmentedReadVersion: z.string().optional(),
|
|
1882
1894
|
pullContractMaxVersion: z.string().optional(),
|
|
1883
1895
|
pullContractVersion: z.string().optional(),
|
|
1884
1896
|
pushContractVersion: z.string(),
|
|
1897
|
+
segmentedReadVersion: z.string().optional(),
|
|
1885
1898
|
supportedTargetKinds: z.array(z.string()).nullable(),
|
|
1886
1899
|
supportedTypeIds: z.array(z.string()).nullable()
|
|
1887
1900
|
});
|
|
@@ -1898,14 +1911,14 @@ export const zScryTranscriptRecord = z.object({
|
|
|
1898
1911
|
*
|
|
1899
1912
|
* Whether scry examined the transcript; unchecked means scry declined unsupported content or harness
|
|
1900
1913
|
*/
|
|
1901
|
-
export const zScryVerdict = z.enum(['checked', 'unchecked']);
|
|
1914
|
+
export const zScryVerdict = closedSet()(z.enum(['checked', 'unchecked']));
|
|
1902
1915
|
export const zScryCheckResponse = z.object({
|
|
1903
1916
|
flaggedTurns: z.array(z.int().gte(0).lte(9007199254740991)),
|
|
1904
1917
|
scryVersion: z.string().regex(/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/),
|
|
1905
1918
|
verdict: zScryVerdict
|
|
1906
1919
|
}).strict();
|
|
1907
1920
|
export const zSearchResult = z.object({
|
|
1908
|
-
entryIndex: z.
|
|
1921
|
+
entryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
1909
1922
|
project: z.string(),
|
|
1910
1923
|
projectHash: zProjectHash.optional(),
|
|
1911
1924
|
role: z.string(),
|
|
@@ -1941,7 +1954,7 @@ export const zAuthoritativeSubagentRef = z.object({
|
|
|
1941
1954
|
}).strict();
|
|
1942
1955
|
export const zInsightEvidence = z.object({
|
|
1943
1956
|
commitHash: z.string().optional(),
|
|
1944
|
-
entryIndex: z.
|
|
1957
|
+
entryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
1945
1958
|
file: z.string().optional(),
|
|
1946
1959
|
sessionId: zSessionID
|
|
1947
1960
|
});
|
|
@@ -2000,11 +2013,11 @@ export const zCommitRef = z.object({
|
|
|
2000
2013
|
hash: z.string(),
|
|
2001
2014
|
sessionIds: z.array(zSessionID),
|
|
2002
2015
|
subject: z.string(),
|
|
2003
|
-
timeMs: z.
|
|
2016
|
+
timeMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
2004
2017
|
});
|
|
2005
2018
|
export const zRewrittenCommit = z.object({
|
|
2006
2019
|
associations: z.array(zSessionAssociation),
|
|
2007
|
-
authorTimeMs: z.
|
|
2020
|
+
authorTimeMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2008
2021
|
confidence: zConfidence,
|
|
2009
2022
|
ghostHash: z.string(),
|
|
2010
2023
|
method: zRewriteMethod,
|
|
@@ -2033,27 +2046,27 @@ export const zSessionInsight = z.object({
|
|
|
2033
2046
|
*
|
|
2034
2047
|
* Closed session graph value
|
|
2035
2048
|
*/
|
|
2036
|
-
export const zSessionListItemKind = z.enum(['transcript', 'context_container']);
|
|
2049
|
+
export const zSessionListItemKind = closedSet()(z.enum(['transcript', 'context_container']));
|
|
2037
2050
|
/**
|
|
2038
2051
|
* Session Origin
|
|
2039
2052
|
*
|
|
2040
2053
|
* Who drove a recorded session, as declared by the producer that recorded it
|
|
2041
2054
|
*/
|
|
2042
|
-
export const zSessionOrigin = z.enum([
|
|
2055
|
+
export const zSessionOrigin = closedSet()(z.enum([
|
|
2043
2056
|
'user',
|
|
2044
2057
|
'agent',
|
|
2045
2058
|
'unknown'
|
|
2046
|
-
]);
|
|
2059
|
+
]));
|
|
2047
2060
|
/**
|
|
2048
2061
|
* Session Outcome
|
|
2049
2062
|
*
|
|
2050
2063
|
* Resolution status of the session
|
|
2051
2064
|
*/
|
|
2052
|
-
export const zSessionOutcome = z.enum([
|
|
2065
|
+
export const zSessionOutcome = closedSet()(z.enum([
|
|
2053
2066
|
'resolved',
|
|
2054
2067
|
'partial',
|
|
2055
2068
|
'failed'
|
|
2056
|
-
]);
|
|
2069
|
+
]));
|
|
2057
2070
|
export const zAuthoritativeQualityMetrics = z.object({
|
|
2058
2071
|
computeVersion: z.int().nullish(),
|
|
2059
2072
|
computedAt: z.int().nullish(),
|
|
@@ -2143,7 +2156,7 @@ export const zQualityMetrics = z.object({
|
|
|
2143
2156
|
withinSessionReverts: z.int().nullish()
|
|
2144
2157
|
});
|
|
2145
2158
|
export const zSessionPullRequest = z.object({
|
|
2146
|
-
number: z.
|
|
2159
|
+
number: z.number().refine(Number.isInteger).gte(1).lte(9223372036854775808),
|
|
2147
2160
|
owner: z.string().min(1),
|
|
2148
2161
|
repo: z.string().min(1),
|
|
2149
2162
|
source: z.string().min(1),
|
|
@@ -2154,12 +2167,12 @@ export const zSessionPullRequest = z.object({
|
|
|
2154
2167
|
*
|
|
2155
2168
|
* Closed session graph value
|
|
2156
2169
|
*/
|
|
2157
|
-
export const zSessionPurpose = z.enum([
|
|
2170
|
+
export const zSessionPurpose = closedSet()(z.enum([
|
|
2158
2171
|
'interaction',
|
|
2159
2172
|
'delegated_work',
|
|
2160
2173
|
'helper_review',
|
|
2161
2174
|
'unknown'
|
|
2162
|
-
]);
|
|
2175
|
+
]));
|
|
2163
2176
|
export const zHelperGroupSummary = z.object({
|
|
2164
2177
|
groupId: z.string(),
|
|
2165
2178
|
helperThreadCount: z.int().gte(0).lte(9007199254740991),
|
|
@@ -2175,21 +2188,21 @@ export const zHelperGroupSummary = z.object({
|
|
|
2175
2188
|
*
|
|
2176
2189
|
* Closed session graph value
|
|
2177
2190
|
*/
|
|
2178
|
-
export const zSessionRelationshipKind = z.enum(['started_by', 'context_from']);
|
|
2191
|
+
export const zSessionRelationshipKind = closedSet()(z.enum(['started_by', 'context_from']));
|
|
2179
2192
|
export const zSessionScorecard = z.object({
|
|
2180
2193
|
costTotalUsd: z.number().nullish(),
|
|
2181
2194
|
m2TokenOutcomeRatio: z.number().nullish(),
|
|
2182
|
-
m4ConsecutiveErrorMax: z.
|
|
2195
|
+
m4ConsecutiveErrorMax: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2183
2196
|
m5ContextUtilizationPct: z.number().nullish(),
|
|
2184
2197
|
m6OutputSurvivalPct: z.number().nullish(),
|
|
2185
2198
|
m7SpecHasConstraints: z.boolean().nullish(),
|
|
2186
2199
|
m7SpecHasExamples: z.boolean().nullish(),
|
|
2187
2200
|
outcome: zSessionOutcome.optional(),
|
|
2188
|
-
retryTokensWasted: z.
|
|
2201
|
+
retryTokensWasted: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2189
2202
|
signalDensity: z.number().nullish(),
|
|
2190
2203
|
specQualityScore: z.number().nullish(),
|
|
2191
|
-
totalTokens: z.
|
|
2192
|
-
withinSessionReverts: z.
|
|
2204
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2205
|
+
withinSessionReverts: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
2193
2206
|
});
|
|
2194
2207
|
export const zSessionStats = z.object({
|
|
2195
2208
|
cachedReadTokens: z.int().nullish(),
|
|
@@ -2209,7 +2222,7 @@ export const zSessionStats = z.object({
|
|
|
2209
2222
|
*
|
|
2210
2223
|
* Record a local teammate identity rests on; only a native dynamic workflow spawn is recorded
|
|
2211
2224
|
*/
|
|
2212
|
-
export const zSessionTeammateEvidence = z.enum(['native_dynamic_workflow']);
|
|
2225
|
+
export const zSessionTeammateEvidence = closedSet()(z.enum(['native_dynamic_workflow']));
|
|
2213
2226
|
export const zSessionTeammate = z.object({
|
|
2214
2227
|
evidence: zSessionTeammateEvidence,
|
|
2215
2228
|
name: z.string().min(1).regex(/^[^\x00-\x1F\x7F-\x9F]*$/),
|
|
@@ -2283,11 +2296,11 @@ export const zSessionSummary = z.object({
|
|
|
2283
2296
|
relationships: z.array(zSessionRelationship).optional(),
|
|
2284
2297
|
rootSessionId: zSessionID.nullish(),
|
|
2285
2298
|
sessionOrigin: zSessionOrigin.optional(),
|
|
2286
|
-
startTime: z.iso.datetime(),
|
|
2299
|
+
startTime: z.iso.datetime({ offset: true }),
|
|
2287
2300
|
teammate: zSessionTeammate.nullish(),
|
|
2288
|
-
toolCallCount: z.
|
|
2289
|
-
totalTokens: z.
|
|
2290
|
-
turnCount: z.
|
|
2301
|
+
toolCallCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2302
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2303
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
2291
2304
|
});
|
|
2292
2305
|
export const zSessionsPayload = z.object({
|
|
2293
2306
|
sessions: z.array(zSessionSummary).nullable()
|
|
@@ -2297,7 +2310,7 @@ export const zSessionsPayload = z.object({
|
|
|
2297
2310
|
*
|
|
2298
2311
|
* Transcript file format
|
|
2299
2312
|
*/
|
|
2300
|
-
export const zSourceFormat = z.enum(['jsonl', 'json']);
|
|
2313
|
+
export const zSourceFormat = closedSet()(z.enum(['jsonl', 'json']));
|
|
2301
2314
|
export const zAuthoritativeSourceInfo = z.object({
|
|
2302
2315
|
filePath: z.string().optional(),
|
|
2303
2316
|
format: zSourceFormat
|
|
@@ -2311,13 +2324,13 @@ export const zSourceInfo = z.object({
|
|
|
2311
2324
|
*
|
|
2312
2325
|
* Reason why a session or turn ended (ACP-aligned)
|
|
2313
2326
|
*/
|
|
2314
|
-
export const zStopReason = z.enum([
|
|
2327
|
+
export const zStopReason = closedSet()(z.enum([
|
|
2315
2328
|
'end_turn',
|
|
2316
2329
|
'cancelled',
|
|
2317
2330
|
'max_tokens',
|
|
2318
2331
|
'max_turn_requests',
|
|
2319
2332
|
'refusal'
|
|
2320
|
-
]);
|
|
2333
|
+
]));
|
|
2321
2334
|
export const zSubagentRef = z.object({
|
|
2322
2335
|
parentUuid: zSessionID,
|
|
2323
2336
|
sessionId: zSessionID
|
|
@@ -2346,13 +2359,13 @@ export const zSyncAuthResponse = z.object({
|
|
|
2346
2359
|
*
|
|
2347
2360
|
* Why a held local session cannot be published yet
|
|
2348
2361
|
*/
|
|
2349
|
-
export const zSyncHoldReason = z.enum(['metrics_missing', 'metadata_missing']);
|
|
2362
|
+
export const zSyncHoldReason = closedSet()(z.enum(['metrics_missing', 'metadata_missing']));
|
|
2350
2363
|
/**
|
|
2351
2364
|
* Sync Login Status
|
|
2352
2365
|
*
|
|
2353
2366
|
* Result of starting the Village sign-in from the local server
|
|
2354
2367
|
*/
|
|
2355
|
-
export const zSyncLoginStatus = z.enum(['pending', 'already_authenticated']);
|
|
2368
|
+
export const zSyncLoginStatus = closedSet()(z.enum(['pending', 'already_authenticated']));
|
|
2356
2369
|
export const zSyncLoginResponse = z.object({
|
|
2357
2370
|
status: zSyncLoginStatus
|
|
2358
2371
|
});
|
|
@@ -2361,7 +2374,7 @@ export const zSyncLoginResponse = z.object({
|
|
|
2361
2374
|
*
|
|
2362
2375
|
* Result of ending this computer's Village sign-in
|
|
2363
2376
|
*/
|
|
2364
|
-
export const zSyncLogoutStatus = z.enum(['logged_out', 'already_logged_out']);
|
|
2377
|
+
export const zSyncLogoutStatus = closedSet()(z.enum(['logged_out', 'already_logged_out']));
|
|
2365
2378
|
export const zSyncLogoutResponse = z.object({
|
|
2366
2379
|
status: zSyncLogoutStatus
|
|
2367
2380
|
});
|
|
@@ -2370,42 +2383,42 @@ export const zSyncLogoutResponse = z.object({
|
|
|
2370
2383
|
*
|
|
2371
2384
|
* Outcome of one session in a push
|
|
2372
2385
|
*/
|
|
2373
|
-
export const zSyncPushSessionStatus = z.enum([
|
|
2386
|
+
export const zSyncPushSessionStatus = closedSet()(z.enum([
|
|
2374
2387
|
'new',
|
|
2375
2388
|
'updated',
|
|
2376
2389
|
'skipped',
|
|
2377
2390
|
'error',
|
|
2378
2391
|
'held'
|
|
2379
|
-
]);
|
|
2392
|
+
]));
|
|
2380
2393
|
/**
|
|
2381
2394
|
* Sync Push Step
|
|
2382
2395
|
*
|
|
2383
2396
|
* One step a push runs for a session
|
|
2384
2397
|
*/
|
|
2385
|
-
export const zSyncPushStep = z.enum([
|
|
2398
|
+
export const zSyncPushStep = closedSet()(z.enum([
|
|
2386
2399
|
'content',
|
|
2387
2400
|
'add_collective',
|
|
2388
2401
|
'remove_collective'
|
|
2389
|
-
]);
|
|
2402
|
+
]));
|
|
2390
2403
|
/**
|
|
2391
2404
|
* Sync Push Step Outcome
|
|
2392
2405
|
*
|
|
2393
2406
|
* Result of one push step
|
|
2394
2407
|
*/
|
|
2395
|
-
export const zSyncPushStepOutcome = z.enum([
|
|
2408
|
+
export const zSyncPushStepOutcome = closedSet()(z.enum([
|
|
2396
2409
|
'succeeded',
|
|
2397
2410
|
'pending_approval',
|
|
2398
2411
|
'skipped',
|
|
2399
2412
|
'failed',
|
|
2400
2413
|
'not_attempted'
|
|
2401
|
-
]);
|
|
2414
|
+
]));
|
|
2402
2415
|
export const zSyncRedactionItem = z.object({
|
|
2403
2416
|
category: z.string(),
|
|
2404
2417
|
contextAfter: z.array(z.string()),
|
|
2405
2418
|
contextBefore: z.array(z.string()),
|
|
2406
2419
|
description: z.string(),
|
|
2407
|
-
entryIndex: z.
|
|
2408
|
-
lineNumber: z.
|
|
2420
|
+
entryIndex: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
2421
|
+
lineNumber: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
2409
2422
|
originalText: z.string(),
|
|
2410
2423
|
redactedReplacement: z.string(),
|
|
2411
2424
|
ruleDisplayName: z.string(),
|
|
@@ -2413,7 +2426,7 @@ export const zSyncRedactionItem = z.object({
|
|
|
2413
2426
|
toolCallId: z.string().optional()
|
|
2414
2427
|
});
|
|
2415
2428
|
export const zSyncRedactionRuleGroup = z.object({
|
|
2416
|
-
count: z.
|
|
2429
|
+
count: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
2417
2430
|
displayName: z.string(),
|
|
2418
2431
|
items: z.array(zSyncRedactionItem),
|
|
2419
2432
|
ruleId: z.string()
|
|
@@ -2421,23 +2434,23 @@ export const zSyncRedactionRuleGroup = z.object({
|
|
|
2421
2434
|
export const zSyncRedactionCategoryGroup = z.object({
|
|
2422
2435
|
category: z.string(),
|
|
2423
2436
|
rules: z.array(zSyncRedactionRuleGroup),
|
|
2424
|
-
totalCount: z.
|
|
2437
|
+
totalCount: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808)
|
|
2425
2438
|
});
|
|
2426
2439
|
export const zSyncRedactionsResponse = z.object({
|
|
2427
2440
|
categories: z.array(zSyncRedactionCategoryGroup),
|
|
2428
|
-
total: z.
|
|
2441
|
+
total: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808)
|
|
2429
2442
|
});
|
|
2430
2443
|
/**
|
|
2431
2444
|
* Sync Status
|
|
2432
2445
|
*
|
|
2433
2446
|
* Publication status of one listed local session; held rows always carry a hold reason
|
|
2434
2447
|
*/
|
|
2435
|
-
export const zSyncStatus = z.enum([
|
|
2448
|
+
export const zSyncStatus = closedSet()(z.enum([
|
|
2436
2449
|
'new',
|
|
2437
2450
|
'updated',
|
|
2438
2451
|
'synced',
|
|
2439
2452
|
'held'
|
|
2440
|
-
]);
|
|
2453
|
+
]));
|
|
2441
2454
|
export const zLocalSyncSummary = z.object({
|
|
2442
2455
|
conversationTurnCount: z.int().gte(0).lte(9007199254740991).optional(),
|
|
2443
2456
|
durationMs: 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' }),
|
|
@@ -2455,8 +2468,8 @@ export const zLocalSyncSummary = z.object({
|
|
|
2455
2468
|
startTime: z.string(),
|
|
2456
2469
|
syncStatus: zSyncStatus,
|
|
2457
2470
|
teammate: zSessionTeammate.nullish(),
|
|
2458
|
-
totalTokens: z.
|
|
2459
|
-
turnCount: z.
|
|
2471
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2472
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
2460
2473
|
});
|
|
2461
2474
|
export const zLocalSessionRow = z.object({
|
|
2462
2475
|
matches: z.array(zSearchResult).optional(),
|
|
@@ -2560,14 +2573,14 @@ export const zLocalSyncSessionsPayload = z.object({
|
|
|
2560
2573
|
*
|
|
2561
2574
|
* What is being annotated: session-level, entry-level (turn/tool call), meta-annotation, project-level, a specific file version (content-hash keyed read-state receipt), or a durable session-to-commit association
|
|
2562
2575
|
*/
|
|
2563
|
-
export const zTargetKind = z.enum([
|
|
2576
|
+
export const zTargetKind = closedSet()(z.enum([
|
|
2564
2577
|
'session',
|
|
2565
2578
|
'entry',
|
|
2566
2579
|
'annotation',
|
|
2567
2580
|
'project',
|
|
2568
2581
|
'file_version',
|
|
2569
2582
|
'association'
|
|
2570
|
-
]);
|
|
2583
|
+
]));
|
|
2571
2584
|
export const zAnnotationPushItem = z.intersection(z.union([
|
|
2572
2585
|
z.object({
|
|
2573
2586
|
targetAssociationId: zAssociationID,
|
|
@@ -2669,8 +2682,8 @@ export const zAnnotationSummary = z.object({
|
|
|
2669
2682
|
targetAnnotationId: z.string().nullish(),
|
|
2670
2683
|
targetAssociationId: zAssociationID.nullish(),
|
|
2671
2684
|
targetContentHash: z.string().nullish(),
|
|
2672
|
-
targetEntryEndIndex: z.
|
|
2673
|
-
targetEntryIndex: z.
|
|
2685
|
+
targetEntryEndIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2686
|
+
targetEntryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2674
2687
|
targetFilePath: z.string().nullish(),
|
|
2675
2688
|
targetKind: zTargetKind,
|
|
2676
2689
|
targetProjectHash: zProjectHash.nullish(),
|
|
@@ -2757,8 +2770,8 @@ export const zLegacyPullAnnotation = z.object({
|
|
|
2757
2770
|
targetAnnotationId: z.string().nullish(),
|
|
2758
2771
|
targetAssociationId: zAssociationID.optional(),
|
|
2759
2772
|
targetContentHash: z.string().nullish(),
|
|
2760
|
-
targetEntryEndIndex: z.
|
|
2761
|
-
targetEntryIndex: z.
|
|
2773
|
+
targetEntryEndIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2774
|
+
targetEntryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2762
2775
|
targetFilePath: z.string().nullish(),
|
|
2763
2776
|
targetKind: zTargetKind.optional(),
|
|
2764
2777
|
targetProjectHash: zProjectHash.optional(),
|
|
@@ -2776,49 +2789,49 @@ export const zLegacyPullAnnotation = z.object({
|
|
|
2776
2789
|
export const zQualitySession = z.object({
|
|
2777
2790
|
conversationTurnCount: z.int().gte(0).lte(9007199254740991).optional(),
|
|
2778
2791
|
date: z.string(),
|
|
2779
|
-
discoveryTurns: z.
|
|
2792
|
+
discoveryTurns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2780
2793
|
durationMinutes: z.number(),
|
|
2781
2794
|
effectiveAnnotations: z.array(zAnnotationSummary).optional(),
|
|
2782
2795
|
explorationRatio: z.number(),
|
|
2783
|
-
filesTouched: z.
|
|
2796
|
+
filesTouched: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2784
2797
|
id: z.string(),
|
|
2785
|
-
inputTokens: z.
|
|
2786
|
-
linesChanged: z.
|
|
2798
|
+
inputTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2799
|
+
linesChanged: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2787
2800
|
outcome: z.string(),
|
|
2788
|
-
outputTokens: z.
|
|
2801
|
+
outputTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2789
2802
|
project: z.string(),
|
|
2790
|
-
retryLoops: z.
|
|
2791
|
-
retryTokensWasted: z.
|
|
2803
|
+
retryLoops: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2804
|
+
retryTokensWasted: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2792
2805
|
scope: z.string(),
|
|
2793
|
-
scopeBreadth: z.
|
|
2806
|
+
scopeBreadth: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2794
2807
|
signalDensity: z.number(),
|
|
2795
2808
|
specQualityScore: z.number(),
|
|
2796
2809
|
title: z.string(),
|
|
2797
|
-
toolCalls: z.
|
|
2798
|
-
totalTokens: z.
|
|
2799
|
-
turnCount: z.
|
|
2800
|
-
withinSessionReverts: z.
|
|
2810
|
+
toolCalls: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2811
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2812
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2813
|
+
withinSessionReverts: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
2801
2814
|
});
|
|
2802
2815
|
export const zQualityPayload = z.object({
|
|
2803
2816
|
sessions: z.array(zQualitySession).nullable()
|
|
2804
2817
|
});
|
|
2805
2818
|
export const zTaskSummary = z.object({
|
|
2806
2819
|
editedFiles: z.array(z.string()).nullable(),
|
|
2807
|
-
entryIndex: z.
|
|
2820
|
+
entryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2808
2821
|
labels: z.array(z.string()).nullable(),
|
|
2809
2822
|
outcome: z.string().optional(),
|
|
2810
|
-
readCount: z.
|
|
2823
|
+
readCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2811
2824
|
readFiles: z.array(z.string()),
|
|
2812
2825
|
retryLoop: z.boolean(),
|
|
2813
2826
|
sessionId: z.string(),
|
|
2814
|
-
startMs: z.
|
|
2827
|
+
startMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2815
2828
|
title: z.string()
|
|
2816
2829
|
});
|
|
2817
2830
|
export const zChangeSession = z.object({
|
|
2818
2831
|
binding: zChangeBinding,
|
|
2819
2832
|
harness: z.string(),
|
|
2820
2833
|
sessionId: z.string(),
|
|
2821
|
-
startMs: z.
|
|
2834
|
+
startMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2822
2835
|
tasks: z.array(zTaskSummary).nullable(),
|
|
2823
2836
|
title: z.string()
|
|
2824
2837
|
});
|
|
@@ -2828,18 +2841,18 @@ export const zMapNodeDetailPayload = z.object({
|
|
|
2828
2841
|
insights: z.array(zSessionInsight),
|
|
2829
2842
|
kind: zMapNodeKind,
|
|
2830
2843
|
language: z.string().optional(),
|
|
2831
|
-
lastTouchMs: z.
|
|
2832
|
-
loc: z.
|
|
2844
|
+
lastTouchMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2845
|
+
loc: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2833
2846
|
path: z.string(),
|
|
2834
|
-
reEdits: z.
|
|
2847
|
+
reEdits: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2835
2848
|
recentCommits: z.array(zCommitRef).nullable(),
|
|
2836
|
-
recordedFiles: z.
|
|
2837
|
-
retryLoops: z.
|
|
2849
|
+
recordedFiles: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2850
|
+
retryLoops: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2838
2851
|
rewrittenCommits: z.array(zRewrittenCommit),
|
|
2839
|
-
sessionCount: z.
|
|
2852
|
+
sessionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2840
2853
|
shapedBy: z.array(zTaskSummary).nullable(),
|
|
2841
|
-
taskCount: z.
|
|
2842
|
-
totalFiles: z.
|
|
2854
|
+
taskCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2855
|
+
totalFiles: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2843
2856
|
usedBy: z.array(z.string()).nullable()
|
|
2844
2857
|
});
|
|
2845
2858
|
export const zProjectTasksPayload = z.object({
|
|
@@ -2852,7 +2865,7 @@ export const zProjectTasksPayload = z.object({
|
|
|
2852
2865
|
*
|
|
2853
2866
|
* Canonical reasoning-effort level of assistant-generated output: off, minimal, low, medium, high, xhigh, max, ultra, ultracode. off is the single disabled state, ultra is above max, and ultracode is a distinct level. Omit the field when the level is unknown; never infer it from token budgets.
|
|
2854
2867
|
*/
|
|
2855
|
-
export const zThinkingLevel = z.enum([
|
|
2868
|
+
export const zThinkingLevel = closedSet()(z.enum([
|
|
2856
2869
|
'off',
|
|
2857
2870
|
'minimal',
|
|
2858
2871
|
'low',
|
|
@@ -2862,7 +2875,7 @@ export const zThinkingLevel = z.enum([
|
|
|
2862
2875
|
'max',
|
|
2863
2876
|
'ultra',
|
|
2864
2877
|
'ultracode'
|
|
2865
|
-
]);
|
|
2878
|
+
]));
|
|
2866
2879
|
/**
|
|
2867
2880
|
* Thinking Level Raw
|
|
2868
2881
|
*
|
|
@@ -2879,7 +2892,7 @@ export const zSessionDetailHeader = z.object({
|
|
|
2879
2892
|
diagnostics: zInterpretationDiagnostics.optional(),
|
|
2880
2893
|
durationMins: z.number(),
|
|
2881
2894
|
earlierHistory: z.array(zEarlierHistoryState).optional(),
|
|
2882
|
-
endTime: z.iso.datetime(),
|
|
2895
|
+
endTime: z.iso.datetime({ offset: true }),
|
|
2883
2896
|
gitBranch: z.string().optional(),
|
|
2884
2897
|
gitRemote: z.string().optional(),
|
|
2885
2898
|
harness: zHarness,
|
|
@@ -2897,23 +2910,23 @@ export const zSessionDetailHeader = z.object({
|
|
|
2897
2910
|
scorecard: zSessionScorecard.nullish(),
|
|
2898
2911
|
sessionOrigin: zSessionOrigin.optional(),
|
|
2899
2912
|
source: z.string().optional(),
|
|
2900
|
-
startTime: z.iso.datetime(),
|
|
2913
|
+
startTime: z.iso.datetime({ offset: true }),
|
|
2901
2914
|
status: z.string().optional(),
|
|
2902
2915
|
thinkingLevel: zThinkingLevel.optional(),
|
|
2903
2916
|
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
2904
2917
|
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
2905
|
-
tokensIn: z.
|
|
2906
|
-
tokensOut: z.
|
|
2907
|
-
toolCallCount: z.
|
|
2908
|
-
totalTokens: z.
|
|
2909
|
-
turnCount: z.
|
|
2918
|
+
tokensIn: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2919
|
+
tokensOut: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2920
|
+
toolCallCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2921
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2922
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
2910
2923
|
workingDirectory: z.string().optional()
|
|
2911
2924
|
});
|
|
2912
2925
|
export const zTimelineSessionRef = z.object({
|
|
2913
2926
|
harness: zHarness,
|
|
2914
2927
|
hasCommitBinding: z.boolean(),
|
|
2915
2928
|
sessionId: zSessionID,
|
|
2916
|
-
startMs: z.
|
|
2929
|
+
startMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2917
2930
|
title: z.string()
|
|
2918
2931
|
});
|
|
2919
2932
|
export const zReviewListPayload = z.object({
|
|
@@ -2931,20 +2944,20 @@ export const zTimestampInfo = z.object({
|
|
|
2931
2944
|
start: 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' })
|
|
2932
2945
|
});
|
|
2933
2946
|
export const zTokenUsageDetail = z.object({
|
|
2934
|
-
cacheRead: z.
|
|
2935
|
-
cacheWrite: z.
|
|
2936
|
-
cacheWrite1h: z.
|
|
2937
|
-
input: z.
|
|
2938
|
-
output: z.
|
|
2939
|
-
reasoning: z.
|
|
2940
|
-
totalTokens: z.
|
|
2947
|
+
cacheRead: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2948
|
+
cacheWrite: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2949
|
+
cacheWrite1h: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2950
|
+
input: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2951
|
+
output: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2952
|
+
reasoning: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
2953
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
2941
2954
|
});
|
|
2942
2955
|
/**
|
|
2943
2956
|
* Tool Call Kind
|
|
2944
2957
|
*
|
|
2945
2958
|
* Classification of a tool call, aligned with ACP ToolCallUpdate.kind
|
|
2946
2959
|
*/
|
|
2947
|
-
export const zToolCallKind = z.enum([
|
|
2960
|
+
export const zToolCallKind = closedSet()(z.enum([
|
|
2948
2961
|
'read',
|
|
2949
2962
|
'edit',
|
|
2950
2963
|
'delete',
|
|
@@ -2954,7 +2967,7 @@ export const zToolCallKind = z.enum([
|
|
|
2954
2967
|
'think',
|
|
2955
2968
|
'fetch',
|
|
2956
2969
|
'other'
|
|
2957
|
-
]);
|
|
2970
|
+
]));
|
|
2958
2971
|
export const zAuthoritativeSessionEntry = z.object({
|
|
2959
2972
|
contentPreview: z.string().nullish(),
|
|
2960
2973
|
depth: z.int(),
|
|
@@ -3052,6 +3065,26 @@ export const zCanonicalPublishOperation = z.object({
|
|
|
3052
3065
|
license: zPublishLicenseOperation,
|
|
3053
3066
|
replacement: zCanonicalPublishReplacement
|
|
3054
3067
|
}).strict();
|
|
3068
|
+
export const zTranscriptEntryLocateRequest = z.object({
|
|
3069
|
+
contentHash: z.string(),
|
|
3070
|
+
reference: z.string().min(1),
|
|
3071
|
+
representation: z.string(),
|
|
3072
|
+
revision: z.string()
|
|
3073
|
+
});
|
|
3074
|
+
/**
|
|
3075
|
+
* Transcript Entry Reference Kind
|
|
3076
|
+
*
|
|
3077
|
+
* Closed session graph value
|
|
3078
|
+
*/
|
|
3079
|
+
export const zTranscriptEntryReferenceKind = closedSet()(z.enum([
|
|
3080
|
+
'source',
|
|
3081
|
+
'tool_call',
|
|
3082
|
+
'tool_result'
|
|
3083
|
+
]));
|
|
3084
|
+
export const zTranscriptFlaggedTurn = z.object({
|
|
3085
|
+
position: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
3086
|
+
turn: z.int().gte(0).lte(9007199254740991).optional()
|
|
3087
|
+
});
|
|
3055
3088
|
/**
|
|
3056
3089
|
* Transcript ID
|
|
3057
3090
|
*
|
|
@@ -3089,19 +3122,19 @@ export const zCollectiveFetchDomainResult = z.object({
|
|
|
3089
3122
|
}).superRefine((value, ctx) => { const issue = collectiveContractIssue("CollectiveFetchDomainResult", value); if (issue !== undefined)
|
|
3090
3123
|
ctx.addIssue({ code: "custom", message: "Collective contract validation: " + issue + "; retain prior evidence and fetch validated metadata before retrying" }); });
|
|
3091
3124
|
export const zPromptDigestItem = z.object({
|
|
3092
|
-
additions: z.
|
|
3125
|
+
additions: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3093
3126
|
args: z.string().optional(),
|
|
3094
|
-
commitCount: z.
|
|
3127
|
+
commitCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3095
3128
|
commitSha: z.string().optional(),
|
|
3096
|
-
deletions: z.
|
|
3097
|
-
filesChanged: z.
|
|
3129
|
+
deletions: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3130
|
+
filesChanged: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3098
3131
|
kind: zDigestItemKind,
|
|
3099
|
-
ordinal: z.
|
|
3100
|
-
promptCount: z.
|
|
3132
|
+
ordinal: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3133
|
+
promptCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3101
3134
|
text: z.string(),
|
|
3102
|
-
timestamp: z.iso.datetime(),
|
|
3135
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
3103
3136
|
transcriptId: zTranscriptID,
|
|
3104
|
-
turnIndex: z.
|
|
3137
|
+
turnIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
3105
3138
|
});
|
|
3106
3139
|
export const zPromptDigest = z.object({
|
|
3107
3140
|
header: zPromptDigestHeader,
|
|
@@ -3137,7 +3170,7 @@ export const zSessionDetailHeaderPayload = z.object({
|
|
|
3137
3170
|
diagnostics: zInterpretationDiagnostics.optional(),
|
|
3138
3171
|
durationMins: z.number(),
|
|
3139
3172
|
earlierHistory: z.array(zEarlierHistoryState).optional(),
|
|
3140
|
-
endTime: z.iso.datetime(),
|
|
3173
|
+
endTime: z.iso.datetime({ offset: true }),
|
|
3141
3174
|
gitBranch: z.string().optional(),
|
|
3142
3175
|
gitRemote: z.string().optional(),
|
|
3143
3176
|
harness: zHarness,
|
|
@@ -3156,19 +3189,71 @@ export const zSessionDetailHeaderPayload = z.object({
|
|
|
3156
3189
|
scorecard: zSessionScorecard.optional(),
|
|
3157
3190
|
sessionOrigin: zSessionOrigin.optional(),
|
|
3158
3191
|
source: z.string().optional(),
|
|
3159
|
-
startTime: z.iso.datetime(),
|
|
3192
|
+
startTime: z.iso.datetime({ offset: true }),
|
|
3160
3193
|
status: z.string().optional(),
|
|
3161
3194
|
teammate: zSessionTeammate.nullish(),
|
|
3162
3195
|
thinkingLevel: zThinkingLevel.optional(),
|
|
3163
3196
|
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
3164
3197
|
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
3165
|
-
tokensIn: z.
|
|
3166
|
-
tokensOut: z.
|
|
3167
|
-
toolCallCount: z.
|
|
3168
|
-
totalTokens: z.
|
|
3169
|
-
turnCount: z.
|
|
3198
|
+
tokensIn: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3199
|
+
tokensOut: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3200
|
+
toolCallCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3201
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3202
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3170
3203
|
workingDirectory: z.string().optional()
|
|
3171
3204
|
});
|
|
3205
|
+
/**
|
|
3206
|
+
* Transcript Native Presence
|
|
3207
|
+
*
|
|
3208
|
+
* Closed session graph value
|
|
3209
|
+
*/
|
|
3210
|
+
export const zTranscriptNativePresence = closedSet()(z.enum([
|
|
3211
|
+
'absent',
|
|
3212
|
+
'present',
|
|
3213
|
+
'withheld'
|
|
3214
|
+
]));
|
|
3215
|
+
/**
|
|
3216
|
+
* Transcript Read Transport Kind
|
|
3217
|
+
*
|
|
3218
|
+
* Closed session graph value
|
|
3219
|
+
*/
|
|
3220
|
+
export const zTranscriptReadTransportKind = closedSet()(z.enum(['local_session', 'village_transcript']));
|
|
3221
|
+
/**
|
|
3222
|
+
* Transcript Read Validation
|
|
3223
|
+
*
|
|
3224
|
+
* Closed session graph value
|
|
3225
|
+
*/
|
|
3226
|
+
export const zTranscriptReadValidation = closedSet()(z.enum([
|
|
3227
|
+
'published_strict',
|
|
3228
|
+
'served_legacy',
|
|
3229
|
+
'migrated'
|
|
3230
|
+
]));
|
|
3231
|
+
/**
|
|
3232
|
+
* Transcript Recorded Index State
|
|
3233
|
+
*
|
|
3234
|
+
* Closed session graph value
|
|
3235
|
+
*/
|
|
3236
|
+
export const zTranscriptRecordedIndexState = closedSet()(z.enum([
|
|
3237
|
+
'present',
|
|
3238
|
+
'absent',
|
|
3239
|
+
'invalid'
|
|
3240
|
+
]));
|
|
3241
|
+
/**
|
|
3242
|
+
* Transcript Retained State
|
|
3243
|
+
*
|
|
3244
|
+
* Closed session graph value
|
|
3245
|
+
*/
|
|
3246
|
+
export const zTranscriptRetainedState = closedSet()(z.enum(['absent', 'deferred']));
|
|
3247
|
+
/**
|
|
3248
|
+
* Transcript Segment Partition Kind
|
|
3249
|
+
*
|
|
3250
|
+
* Closed session graph value
|
|
3251
|
+
*/
|
|
3252
|
+
export const zTranscriptSegmentPartitionKind = closedSet()(z.enum(['main', 'history']));
|
|
3253
|
+
export const zTranscriptSegmentPartition = z.object({
|
|
3254
|
+
kind: zTranscriptSegmentPartitionKind,
|
|
3255
|
+
sectionIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
3256
|
+
});
|
|
3172
3257
|
export const zTranscriptSegmentRef = z.object({
|
|
3173
3258
|
byteLength: z.int().gte(0).lte(9007199254740991),
|
|
3174
3259
|
conversationTurns: zConversationTurnSpan.optional(),
|
|
@@ -3186,23 +3271,74 @@ export const zTranscriptSegmentDirectory = z.object({
|
|
|
3186
3271
|
totalSegments: z.int().gte(0).lte(9007199254740991),
|
|
3187
3272
|
totalTurns: z.int().gte(0).lte(9007199254740991)
|
|
3188
3273
|
});
|
|
3274
|
+
export const zTranscriptServedTurn = z.record(z.string(), z.unknown());
|
|
3275
|
+
export const zTranscriptSegmentRow = z.object({
|
|
3276
|
+
displayNumber: z.string().min(1).regex(/^[1-9][0-9]*[a-z]*$/).optional(),
|
|
3277
|
+
position: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
3278
|
+
recordedIndex: z.int().gte(0).lte(9007199254740991).optional(),
|
|
3279
|
+
recordedIndexState: zTranscriptRecordedIndexState,
|
|
3280
|
+
turn: zTranscriptServedTurn
|
|
3281
|
+
});
|
|
3282
|
+
export const zTranscriptSessionHeader = z.object({
|
|
3283
|
+
conversationTurnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).optional(),
|
|
3284
|
+
durationMins: z.number().optional(),
|
|
3285
|
+
earlierHistory: z.array(z.string()).optional(),
|
|
3286
|
+
endTime: z.string().optional(),
|
|
3287
|
+
gitBranch: z.string().optional(),
|
|
3288
|
+
gitRemote: z.string().optional(),
|
|
3289
|
+
harness: z.string().optional(),
|
|
3290
|
+
id: z.string().optional(),
|
|
3291
|
+
inputSubmissionCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).optional(),
|
|
3292
|
+
model: z.string().optional(),
|
|
3293
|
+
outcome: z.string().optional(),
|
|
3294
|
+
parentSessionId: z.string().optional(),
|
|
3295
|
+
project: z.string().optional(),
|
|
3296
|
+
purpose: z.string().optional(),
|
|
3297
|
+
rootSessionId: z.string().optional(),
|
|
3298
|
+
schemaVersion: z.string().optional(),
|
|
3299
|
+
sessionOrigin: z.string().optional(),
|
|
3300
|
+
source: z.string().optional(),
|
|
3301
|
+
startTime: z.string().optional(),
|
|
3302
|
+
status: z.string().optional(),
|
|
3303
|
+
thinkingLevel: zThinkingLevel.optional(),
|
|
3304
|
+
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
3305
|
+
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
3306
|
+
tokensIn: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).optional(),
|
|
3307
|
+
tokensOut: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).optional(),
|
|
3308
|
+
toolCallCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).optional(),
|
|
3309
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).optional(),
|
|
3310
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).optional(),
|
|
3311
|
+
workingDirectory: z.string().optional()
|
|
3312
|
+
});
|
|
3313
|
+
export const zTranscriptContentHeader = z.object({
|
|
3314
|
+
canonical: z.boolean(),
|
|
3315
|
+
contentHash: z.string().optional(),
|
|
3316
|
+
contractVersion: z.string(),
|
|
3317
|
+
flaggedTurns: z.array(zTranscriptFlaggedTurn).optional(),
|
|
3318
|
+
kind: zContentKind,
|
|
3319
|
+
omittedImages: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3320
|
+
representation: z.string(),
|
|
3321
|
+
retainedEvidence: zTranscriptRetainedState.nullish(),
|
|
3322
|
+
revision: z.string(),
|
|
3323
|
+
sessionHeader: zTranscriptSessionHeader
|
|
3324
|
+
});
|
|
3189
3325
|
/**
|
|
3190
3326
|
* TranscriptUpdateLicense
|
|
3191
3327
|
*
|
|
3192
3328
|
* License value for the owner transcript update operation: a canonical menu license, or the empty string to clear. Clearing a license that was actually granted is refused, because a granted Creative Commons license is irrevocable.
|
|
3193
3329
|
*/
|
|
3194
|
-
export const zTranscriptUpdateLicense = z.enum([
|
|
3330
|
+
export const zTranscriptUpdateLicense = closedSet()(z.enum([
|
|
3195
3331
|
'',
|
|
3196
3332
|
'CC0-1.0',
|
|
3197
3333
|
'CC-BY-4.0',
|
|
3198
3334
|
'CC-BY-SA-4.0'
|
|
3199
|
-
]);
|
|
3335
|
+
]));
|
|
3200
3336
|
/**
|
|
3201
3337
|
* TranscriptUpdateVisibility
|
|
3202
3338
|
*
|
|
3203
3339
|
* Visibility values accepted by the owner transcript update operation. Organization-scoped visibility is deferred and is deliberately not offered here.
|
|
3204
3340
|
*/
|
|
3205
|
-
export const zTranscriptUpdateVisibility = z.enum(['private', 'public']);
|
|
3341
|
+
export const zTranscriptUpdateVisibility = closedSet()(z.enum(['private', 'public']));
|
|
3206
3342
|
export const zOwnerTranscriptUpdateRequest = z.object({
|
|
3207
3343
|
description: z.string().optional(),
|
|
3208
3344
|
license: zOwnerUpdateLicenseIntent.optional(),
|
|
@@ -3245,6 +3381,29 @@ export const zTranscriptUpdateRequest = z.object({
|
|
|
3245
3381
|
title: z.string().max(500).optional(),
|
|
3246
3382
|
visibility: zTranscriptUpdateVisibility.optional()
|
|
3247
3383
|
}).strict();
|
|
3384
|
+
/**
|
|
3385
|
+
* Transcript Usage Presence
|
|
3386
|
+
*
|
|
3387
|
+
* Closed session graph value
|
|
3388
|
+
*/
|
|
3389
|
+
export const zTranscriptUsagePresence = closedSet()(z.enum([
|
|
3390
|
+
'present',
|
|
3391
|
+
'empty',
|
|
3392
|
+
'unknown'
|
|
3393
|
+
]));
|
|
3394
|
+
export const zTranscriptHistorySection = z.object({
|
|
3395
|
+
index: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3396
|
+
state: z.string().optional(),
|
|
3397
|
+
totalConversationTurns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3398
|
+
totalTurns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3399
|
+
usagePresent: zTranscriptUsagePresence
|
|
3400
|
+
});
|
|
3401
|
+
/**
|
|
3402
|
+
* Transcript Viewer Projection
|
|
3403
|
+
*
|
|
3404
|
+
* Closed session graph value
|
|
3405
|
+
*/
|
|
3406
|
+
export const zTranscriptViewerProjection = closedSet()(z.enum(['anonymous', 'authenticated']));
|
|
3248
3407
|
export const zTranscriptWindow = z.object({
|
|
3249
3408
|
anchorTurn: z.int().gte(0).lte(9007199254740991),
|
|
3250
3409
|
firstTurn: z.int().gte(0).lte(9007199254740991),
|
|
@@ -3259,15 +3418,15 @@ export const zTranscriptWindow = z.object({
|
|
|
3259
3418
|
});
|
|
3260
3419
|
export const zTrendsPayload = z.object({
|
|
3261
3420
|
days: z.array(zDayStats).nullable(),
|
|
3262
|
-
totalSessions: z.
|
|
3263
|
-
totalTokens: z.
|
|
3421
|
+
totalSessions: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3422
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
3264
3423
|
});
|
|
3265
3424
|
/**
|
|
3266
3425
|
* Turn Part Type
|
|
3267
3426
|
*
|
|
3268
3427
|
* Kind of one ordered turn content part: text or image
|
|
3269
3428
|
*/
|
|
3270
|
-
export const zTurnPartType = z.enum(['text', 'image']);
|
|
3429
|
+
export const zTurnPartType = closedSet()(z.enum(['text', 'image']));
|
|
3271
3430
|
export const zTurnContentPart = z.object({
|
|
3272
3431
|
image: zImagePart.optional(),
|
|
3273
3432
|
text: z.string().optional(),
|
|
@@ -3330,19 +3489,19 @@ export const zTurnContentPart = z.object({
|
|
|
3330
3489
|
*
|
|
3331
3490
|
* Who created an annotation type: system (built-in), user (individual), or group (shared)
|
|
3332
3491
|
*/
|
|
3333
|
-
export const zTypeOrigin = z.enum([
|
|
3492
|
+
export const zTypeOrigin = closedSet()(z.enum([
|
|
3334
3493
|
'system',
|
|
3335
3494
|
'user',
|
|
3336
3495
|
'group'
|
|
3337
|
-
]);
|
|
3496
|
+
]));
|
|
3338
3497
|
export const zUICapabilitiesResponse = z.object({
|
|
3339
3498
|
uiCapabilities: z.array(z.string()).optional()
|
|
3340
3499
|
}).strict();
|
|
3341
3500
|
export const zUnifiedMetadata = z.object({
|
|
3342
|
-
adapterVersion: z.
|
|
3501
|
+
adapterVersion: z.number().refine(Number.isInteger).gte(1).lte(9223372036854775808).optional(),
|
|
3343
3502
|
contentHash: z.string(),
|
|
3344
3503
|
cwd: z.string().optional(),
|
|
3345
|
-
derivedAt: z.
|
|
3504
|
+
derivedAt: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3346
3505
|
diagnostics: zDiagnosticsInfo,
|
|
3347
3506
|
git: zGitContext,
|
|
3348
3507
|
harness: zHarness,
|
|
@@ -3355,7 +3514,7 @@ export const zUnifiedMetadata = z.object({
|
|
|
3355
3514
|
redaction: zRedactionInfo,
|
|
3356
3515
|
relationships: z.array(zSessionRelationship).optional(),
|
|
3357
3516
|
rootSessionId: zSessionID.nullish(),
|
|
3358
|
-
schemaVersion: z.
|
|
3517
|
+
schemaVersion: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3359
3518
|
sessionId: zSessionID,
|
|
3360
3519
|
source: zSourceInfo,
|
|
3361
3520
|
stats: zSessionStats,
|
|
@@ -3380,8 +3539,8 @@ export const zChangeDetailPayload = z.object({
|
|
|
3380
3539
|
files: z.array(zFileChange).nullable(),
|
|
3381
3540
|
frictions: z.array(zFrictionCluster).nullable(),
|
|
3382
3541
|
insights: z.array(zSessionInsight),
|
|
3383
|
-
linesAdded: z.
|
|
3384
|
-
linesRemoved: z.
|
|
3542
|
+
linesAdded: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3543
|
+
linesRemoved: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3385
3544
|
newEdges: z.array(zMapEdge).nullable(),
|
|
3386
3545
|
newNodes: z.array(z.string()).nullable(),
|
|
3387
3546
|
outputTokens: 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' }),
|
|
@@ -3423,22 +3582,22 @@ export const zSessionPullRequestsResponse = z.object({
|
|
|
3423
3582
|
*
|
|
3424
3583
|
* Completeness of the five base token fields
|
|
3425
3584
|
*/
|
|
3426
|
-
export const zUsageCompleteness = z.enum([
|
|
3585
|
+
export const zUsageCompleteness = closedSet()(z.enum([
|
|
3427
3586
|
'complete',
|
|
3428
3587
|
'partial',
|
|
3429
3588
|
'unknown'
|
|
3430
|
-
]);
|
|
3589
|
+
]));
|
|
3431
3590
|
export const zUsageOwnerID = z.string().nullable();
|
|
3432
3591
|
/**
|
|
3433
3592
|
* Usage Scope
|
|
3434
3593
|
*
|
|
3435
3594
|
* Native owner scope for detailed token and cost evidence
|
|
3436
3595
|
*/
|
|
3437
|
-
export const zUsageScope = z.enum([
|
|
3596
|
+
export const zUsageScope = closedSet()(z.enum([
|
|
3438
3597
|
'assistant',
|
|
3439
3598
|
'tool',
|
|
3440
3599
|
'summary'
|
|
3441
|
-
]);
|
|
3600
|
+
]));
|
|
3442
3601
|
export const zUsageDetail = z.object({
|
|
3443
3602
|
completeness: zUsageCompleteness,
|
|
3444
3603
|
cost: zRecordedCostDetail.nullish(),
|
|
@@ -3451,8 +3610,8 @@ export const zToolCallDetail = z.object({
|
|
|
3451
3610
|
arguments: z.string(),
|
|
3452
3611
|
callEntryRef: zSourceEntryRef.optional(),
|
|
3453
3612
|
callProvenance: zContentProvenance.nullish(),
|
|
3454
|
-
durationMs: z.
|
|
3455
|
-
exitCode: z.
|
|
3613
|
+
durationMs: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3614
|
+
exitCode: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3456
3615
|
filePath: z.string().optional(),
|
|
3457
3616
|
id: z.string(),
|
|
3458
3617
|
isError: z.boolean().optional(),
|
|
@@ -3471,21 +3630,21 @@ export const zTranscriptTurn = z.object({
|
|
|
3471
3630
|
content: z.string(),
|
|
3472
3631
|
contentParts: z.array(zTurnContentPart).optional(),
|
|
3473
3632
|
controlKind: z.string().nullish(),
|
|
3474
|
-
depth: z.
|
|
3633
|
+
depth: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3475
3634
|
entryType: zEntryType.optional(),
|
|
3476
3635
|
hasThinking: z.boolean().optional(),
|
|
3477
|
-
index: z.
|
|
3636
|
+
index: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3478
3637
|
observedModel: zObservedModelID.optional(),
|
|
3479
|
-
parentIndex: z.
|
|
3638
|
+
parentIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3480
3639
|
provenance: zContentProvenance.optional(),
|
|
3481
3640
|
role: zRole,
|
|
3482
3641
|
sourceEntryRef: zSourceEntryRef.optional(),
|
|
3483
3642
|
stopReason: zStopReason.optional(),
|
|
3484
3643
|
thinkingLevel: zThinkingLevel.optional(),
|
|
3485
3644
|
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
3486
|
-
timestamp: z.iso.datetime(),
|
|
3487
|
-
tokensIn: z.
|
|
3488
|
-
tokensOut: z.
|
|
3645
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
3646
|
+
tokensIn: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3647
|
+
tokensOut: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3489
3648
|
toolCalls: z.array(zToolCallDetail).optional(),
|
|
3490
3649
|
truncated: z.boolean(),
|
|
3491
3650
|
usage: zUsageDetail.optional()
|
|
@@ -3506,21 +3665,21 @@ export const zTurnDetail = z.object({
|
|
|
3506
3665
|
content: z.string(),
|
|
3507
3666
|
contentParts: z.array(zTurnContentPart).optional(),
|
|
3508
3667
|
controlKind: z.string().nullish(),
|
|
3509
|
-
depth: z.
|
|
3668
|
+
depth: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3510
3669
|
entryType: zEntryType.optional(),
|
|
3511
3670
|
hasThinking: z.boolean().optional(),
|
|
3512
|
-
index: z.
|
|
3671
|
+
index: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3513
3672
|
observedModel: zObservedModelID.optional(),
|
|
3514
|
-
parentIndex: z.
|
|
3673
|
+
parentIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3515
3674
|
provenance: zContentProvenance.nullish(),
|
|
3516
3675
|
role: zRole,
|
|
3517
3676
|
sourceEntryRef: zSourceEntryRef.optional(),
|
|
3518
3677
|
stopReason: zStopReason.nullish(),
|
|
3519
3678
|
thinkingLevel: zThinkingLevel.optional(),
|
|
3520
3679
|
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
3521
|
-
timestamp: z.iso.datetime(),
|
|
3522
|
-
tokensIn: z.
|
|
3523
|
-
tokensOut: z.
|
|
3680
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
3681
|
+
tokensIn: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3682
|
+
tokensOut: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3524
3683
|
toolCalls: z.array(zToolCallDetail).optional(),
|
|
3525
3684
|
usage: zUsageDetail.nullish()
|
|
3526
3685
|
});
|
|
@@ -3535,7 +3694,7 @@ export const zSessionDetailPayload = z.object({
|
|
|
3535
3694
|
diagnostics: zInterpretationDiagnostics.optional(),
|
|
3536
3695
|
durationMins: z.number(),
|
|
3537
3696
|
earlierHistory: z.array(zEarlierHistorySection).optional(),
|
|
3538
|
-
endTime: z.iso.datetime(),
|
|
3697
|
+
endTime: z.iso.datetime({ offset: true }),
|
|
3539
3698
|
gitBranch: z.string().optional(),
|
|
3540
3699
|
gitRemote: z.string().optional(),
|
|
3541
3700
|
harness: zHarness,
|
|
@@ -3554,16 +3713,16 @@ export const zSessionDetailPayload = z.object({
|
|
|
3554
3713
|
scorecard: zSessionScorecard.nullish(),
|
|
3555
3714
|
sessionOrigin: zSessionOrigin.optional(),
|
|
3556
3715
|
source: z.string().optional(),
|
|
3557
|
-
startTime: z.iso.datetime(),
|
|
3716
|
+
startTime: z.iso.datetime({ offset: true }),
|
|
3558
3717
|
status: z.string().optional(),
|
|
3559
3718
|
thinkingLevel: zThinkingLevel.optional(),
|
|
3560
3719
|
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
3561
3720
|
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
3562
|
-
tokensIn: z.
|
|
3563
|
-
tokensOut: z.
|
|
3564
|
-
toolCallCount: z.
|
|
3565
|
-
totalTokens: z.
|
|
3566
|
-
turnCount: z.
|
|
3721
|
+
tokensIn: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3722
|
+
tokensOut: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3723
|
+
toolCallCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3724
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3725
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3567
3726
|
turns: z.array(zTurnDetail).nullable(),
|
|
3568
3727
|
workingDirectory: z.string().optional()
|
|
3569
3728
|
});
|
|
@@ -3573,7 +3732,7 @@ export const zSessionDetailReadPayload = z.object({
|
|
|
3573
3732
|
diagnostics: zInterpretationDiagnostics.optional(),
|
|
3574
3733
|
durationMins: z.number(),
|
|
3575
3734
|
earlierHistory: z.array(zEarlierHistorySection).optional(),
|
|
3576
|
-
endTime: z.iso.datetime(),
|
|
3735
|
+
endTime: z.iso.datetime({ offset: true }),
|
|
3577
3736
|
gitBranch: z.string().optional(),
|
|
3578
3737
|
gitRemote: z.string().optional(),
|
|
3579
3738
|
harness: zHarness,
|
|
@@ -3595,18 +3754,18 @@ export const zSessionDetailReadPayload = z.object({
|
|
|
3595
3754
|
scorecard: zSessionScorecard.optional(),
|
|
3596
3755
|
sessionOrigin: zSessionOrigin.optional(),
|
|
3597
3756
|
source: z.string().optional(),
|
|
3598
|
-
startTime: z.iso.datetime(),
|
|
3757
|
+
startTime: z.iso.datetime({ offset: true }),
|
|
3599
3758
|
status: z.string().optional(),
|
|
3600
3759
|
teammate: zSessionTeammate.nullish(),
|
|
3601
3760
|
thinkingLevel: zThinkingLevel.optional(),
|
|
3602
3761
|
thinkingLevelHistory: z.array(zThinkingLevelChange).optional(),
|
|
3603
3762
|
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
3604
3763
|
title: z.string().optional(),
|
|
3605
|
-
tokensIn: z.
|
|
3606
|
-
tokensOut: z.
|
|
3607
|
-
toolCallCount: z.
|
|
3608
|
-
totalTokens: z.
|
|
3609
|
-
turnCount: z.
|
|
3764
|
+
tokensIn: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3765
|
+
tokensOut: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3766
|
+
toolCallCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3767
|
+
totalTokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3768
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3610
3769
|
turns: z.array(zTurnDetail).nullable(),
|
|
3611
3770
|
workingDirectory: z.string().optional()
|
|
3612
3771
|
});
|
|
@@ -3620,7 +3779,7 @@ export const zTranscriptContent = z.object({
|
|
|
3620
3779
|
*
|
|
3621
3780
|
* ISO 11179 value domain: enumerated (finite allowed set) or described (range/pattern constraint)
|
|
3622
3781
|
*/
|
|
3623
|
-
export const zValueDomainKind = z.enum(['enumerated', 'described']);
|
|
3782
|
+
export const zValueDomainKind = closedSet()(z.enum(['enumerated', 'described']));
|
|
3624
3783
|
export const zValueDomain = z.object({
|
|
3625
3784
|
constraintSpec: z.string().optional(),
|
|
3626
3785
|
datatype: zAnnotationDatatype,
|
|
@@ -3636,12 +3795,12 @@ export const zAnnotationTypeSummary = z.object({
|
|
|
3636
3795
|
id: z.string().optional(),
|
|
3637
3796
|
lowerIsBetter: z.boolean().nullish(),
|
|
3638
3797
|
origin: zTypeOrigin,
|
|
3639
|
-
priorityOverride: z.
|
|
3798
|
+
priorityOverride: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3640
3799
|
scaleKind: zScaleKind.optional(),
|
|
3641
3800
|
status: zAnnotationStatus,
|
|
3642
3801
|
typeId: z.string(),
|
|
3643
3802
|
valueDomain: zValueDomain,
|
|
3644
|
-
version: z.
|
|
3803
|
+
version: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
3645
3804
|
});
|
|
3646
3805
|
export const zTaxonomyFamilyNode = z.object({
|
|
3647
3806
|
family: z.string(),
|
|
@@ -3656,7 +3815,7 @@ export const zTaxonomyNode = z.object({
|
|
|
3656
3815
|
*
|
|
3657
3816
|
* Collective roles an owner may assign through the member role endpoint
|
|
3658
3817
|
*/
|
|
3659
|
-
export const zVillageAssignableCollectiveRole = z.enum(['contributor', 'member']);
|
|
3818
|
+
export const zVillageAssignableCollectiveRole = closedSet()(z.enum(['contributor', 'member']));
|
|
3660
3819
|
export const zVillageAvailableRepository = z.object({
|
|
3661
3820
|
is_private: z.boolean(),
|
|
3662
3821
|
name: z.string(),
|
|
@@ -3680,21 +3839,21 @@ export const zVillageBatchShareRequest = z.object({
|
|
|
3680
3839
|
*
|
|
3681
3840
|
* How a collective accepts new members and contributions
|
|
3682
3841
|
*/
|
|
3683
|
-
export const zVillageCollectiveAcceptanceMode = z.enum([
|
|
3842
|
+
export const zVillageCollectiveAcceptanceMode = closedSet()(z.enum([
|
|
3684
3843
|
'open',
|
|
3685
3844
|
'verified_only',
|
|
3686
3845
|
'curated'
|
|
3687
|
-
]);
|
|
3846
|
+
]));
|
|
3688
3847
|
/**
|
|
3689
3848
|
* Village Group Data Access
|
|
3690
3849
|
*
|
|
3691
3850
|
* Who may read a collective's pooled transcript data
|
|
3692
3851
|
*/
|
|
3693
|
-
export const zVillageCollectiveDataAccess = z.enum([
|
|
3852
|
+
export const zVillageCollectiveDataAccess = closedSet()(z.enum([
|
|
3694
3853
|
'members_only',
|
|
3695
3854
|
'contributors',
|
|
3696
3855
|
'public'
|
|
3697
|
-
]);
|
|
3856
|
+
]));
|
|
3698
3857
|
export const zVillageCollectiveInvitationRequest = z.object({
|
|
3699
3858
|
username: z.string().min(1)
|
|
3700
3859
|
});
|
|
@@ -3713,12 +3872,12 @@ export const zVillageCollectiveModelBreakdown = z.object({
|
|
|
3713
3872
|
*
|
|
3714
3873
|
* A user's role in one collective
|
|
3715
3874
|
*/
|
|
3716
|
-
export const zVillageCollectiveRole = z.enum([
|
|
3875
|
+
export const zVillageCollectiveRole = closedSet()(z.enum([
|
|
3717
3876
|
'owner',
|
|
3718
3877
|
'member',
|
|
3719
3878
|
'contributor',
|
|
3720
3879
|
'pending'
|
|
3721
|
-
]);
|
|
3880
|
+
]));
|
|
3722
3881
|
export const zVillageCollectiveStatusRoleResponse = z.object({
|
|
3723
3882
|
role: zVillageCollectiveRole,
|
|
3724
3883
|
status: z.string()
|
|
@@ -3736,19 +3895,19 @@ export const zVillageCollectiveTranscriptStats = z.object({
|
|
|
3736
3895
|
*
|
|
3737
3896
|
* The caller's role in a collective, or an empty string when the caller has none
|
|
3738
3897
|
*/
|
|
3739
|
-
export const zVillageCollectiveViewerRole = z.enum([
|
|
3898
|
+
export const zVillageCollectiveViewerRole = closedSet()(z.enum([
|
|
3740
3899
|
'',
|
|
3741
3900
|
'owner',
|
|
3742
3901
|
'member',
|
|
3743
3902
|
'contributor',
|
|
3744
3903
|
'pending'
|
|
3745
|
-
]);
|
|
3904
|
+
]));
|
|
3746
3905
|
/**
|
|
3747
3906
|
* Village Contribution Status
|
|
3748
3907
|
*
|
|
3749
3908
|
* Status assigned when a new collective contribution is opened
|
|
3750
3909
|
*/
|
|
3751
|
-
export const zVillageContributionStatus = z.enum(['approved', 'pending']);
|
|
3910
|
+
export const zVillageContributionStatus = closedSet()(z.enum(['approved', 'pending']));
|
|
3752
3911
|
export const zVillageBatchShareEntry = z.object({
|
|
3753
3912
|
status: zVillageContributionStatus,
|
|
3754
3913
|
transcript_id: zTranscriptID
|
|
@@ -3775,13 +3934,13 @@ export const zVillageErrorResponse = z.object({
|
|
|
3775
3934
|
*/
|
|
3776
3935
|
export const zVillageGitHubWebhookPayload = z.record(z.string(), z.unknown());
|
|
3777
3936
|
export const zVillageLinkRepositoryRequest = z.object({
|
|
3778
|
-
installation_id: z.
|
|
3937
|
+
installation_id: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3779
3938
|
name: z.string(),
|
|
3780
3939
|
owner: z.string()
|
|
3781
3940
|
});
|
|
3782
3941
|
export const zVillageListTranscriptAttestation = z.object({
|
|
3783
3942
|
attestation_type: z.string(),
|
|
3784
|
-
created_at: z.iso.datetime(),
|
|
3943
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
3785
3944
|
org_login: z.string(),
|
|
3786
3945
|
transcript_id: zTranscriptID
|
|
3787
3946
|
});
|
|
@@ -3791,7 +3950,7 @@ export const zVillageListUserOrganization = z.object({
|
|
|
3791
3950
|
});
|
|
3792
3951
|
export const zVillageMetadataUserOrganization = z.object({
|
|
3793
3952
|
avatar_url: z.string().nullable(),
|
|
3794
|
-
fetched_at: z.iso.datetime(),
|
|
3953
|
+
fetched_at: z.iso.datetime({ offset: true }),
|
|
3795
3954
|
org_id: 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' }),
|
|
3796
3955
|
org_login: z.string(),
|
|
3797
3956
|
visible: z.boolean()
|
|
@@ -3805,19 +3964,19 @@ export const zVillageNotificationEmail = z.object({
|
|
|
3805
3964
|
*
|
|
3806
3965
|
* Which source tier produced a resolved project display name
|
|
3807
3966
|
*/
|
|
3808
|
-
export const zVillageProjectNameSource = z.enum([
|
|
3967
|
+
export const zVillageProjectNameSource = closedSet()(z.enum([
|
|
3809
3968
|
'override',
|
|
3810
3969
|
'consented',
|
|
3811
3970
|
'remote',
|
|
3812
3971
|
'path',
|
|
3813
3972
|
'privacy'
|
|
3814
|
-
]);
|
|
3973
|
+
]));
|
|
3815
3974
|
/**
|
|
3816
3975
|
* Village Prompts Check Mode
|
|
3817
3976
|
*
|
|
3818
3977
|
* Check-run conclusion policy for a collective's linked repositories when no prompts are attached
|
|
3819
3978
|
*/
|
|
3820
|
-
export const zVillagePromptsCheckMode = z.enum(['informational', 'required']);
|
|
3979
|
+
export const zVillagePromptsCheckMode = closedSet()(z.enum(['informational', 'required']));
|
|
3821
3980
|
/**
|
|
3822
3981
|
* Village Public Owner
|
|
3823
3982
|
*
|
|
@@ -3853,8 +4012,8 @@ export const zPullAnnotation = z.object({
|
|
|
3853
4012
|
targetAnnotationId: z.string().nullish(),
|
|
3854
4013
|
targetAssociationId: zAssociationID.optional(),
|
|
3855
4014
|
targetContentHash: z.string().nullish(),
|
|
3856
|
-
targetEntryEndIndex: z.
|
|
3857
|
-
targetEntryIndex: z.
|
|
4015
|
+
targetEntryEndIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
4016
|
+
targetEntryIndex: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
3858
4017
|
targetFilePath: z.string().nullish(),
|
|
3859
4018
|
targetKind: zTargetKind.optional(),
|
|
3860
4019
|
targetProjectHash: zProjectHash.optional(),
|
|
@@ -3869,7 +4028,7 @@ export const zVillageCollectiveContributor = z.object({
|
|
|
3869
4028
|
});
|
|
3870
4029
|
export const zVillageCollectiveMember = z.object({
|
|
3871
4030
|
github_orgs: z.array(z.string()),
|
|
3872
|
-
joined_at: z.iso.datetime(),
|
|
4031
|
+
joined_at: z.iso.datetime({ offset: true }),
|
|
3873
4032
|
member: zVillagePublicOwner,
|
|
3874
4033
|
role: zVillageCollectiveRole
|
|
3875
4034
|
}).superRefine((value, context) => {
|
|
@@ -3890,7 +4049,7 @@ export const zVillagePendingShare = z.object({
|
|
|
3890
4049
|
purpose: zSessionPurpose.optional(),
|
|
3891
4050
|
relationships: z.array(zSessionRelationship).optional(),
|
|
3892
4051
|
root_session_id: zSessionID.nullish(),
|
|
3893
|
-
shared_at: z.iso.datetime(),
|
|
4052
|
+
shared_at: z.iso.datetime({ offset: true }),
|
|
3894
4053
|
title: z.string().nullable(),
|
|
3895
4054
|
transcript_id: zTranscriptID
|
|
3896
4055
|
}).superRefine((value, context) => {
|
|
@@ -3906,26 +4065,26 @@ export const zVillagePendingShare = z.object({
|
|
|
3906
4065
|
*
|
|
3907
4066
|
* How a person is shown to the viewer: their public profile, or anonymous. Readers treat a kind they do not know as anonymous.
|
|
3908
4067
|
*/
|
|
3909
|
-
export const zVillagePublicOwnerKind = z.enum(['profile', 'anonymous']);
|
|
4068
|
+
export const zVillagePublicOwnerKind = closedSet()(z.enum(['profile', 'anonymous']));
|
|
3910
4069
|
/**
|
|
3911
4070
|
* Village Pull Request Attachment State
|
|
3912
4071
|
*
|
|
3913
4072
|
* Current lifecycle state of a pull request's prompt attachment
|
|
3914
4073
|
*/
|
|
3915
|
-
export const zVillagePullRequestAttachmentState = z.enum([
|
|
4074
|
+
export const zVillagePullRequestAttachmentState = closedSet()(z.enum([
|
|
3916
4075
|
'requested',
|
|
3917
4076
|
'waiting',
|
|
3918
4077
|
'preview',
|
|
3919
4078
|
'attached',
|
|
3920
4079
|
'detached'
|
|
3921
|
-
]);
|
|
4080
|
+
]));
|
|
3922
4081
|
export const zVillagePromptRequest = z.object({
|
|
3923
4082
|
head_remote: z.string(),
|
|
3924
4083
|
name: z.string(),
|
|
3925
|
-
number: z.
|
|
4084
|
+
number: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3926
4085
|
owner: z.string(),
|
|
3927
4086
|
remote: z.string(),
|
|
3928
|
-
requested_at: z.iso.datetime(),
|
|
4087
|
+
requested_at: z.iso.datetime({ offset: true }),
|
|
3929
4088
|
state: zVillagePullRequestAttachmentState
|
|
3930
4089
|
});
|
|
3931
4090
|
export const zVillagePromptRequestsResponse = z.object({
|
|
@@ -3933,7 +4092,7 @@ export const zVillagePromptRequestsResponse = z.object({
|
|
|
3933
4092
|
});
|
|
3934
4093
|
export const zVillagePullRequestRef = z.object({
|
|
3935
4094
|
name: z.string().min(1),
|
|
3936
|
-
number: z.
|
|
4095
|
+
number: z.number().refine(Number.isInteger).gte(1).lte(9223372036854775808),
|
|
3937
4096
|
owner: z.string().min(1)
|
|
3938
4097
|
});
|
|
3939
4098
|
export const zVillagePullRequestsSummary = z.object({
|
|
@@ -3947,15 +4106,15 @@ export const zVillageRemoveCollectiveMemberResponse = z.object({
|
|
|
3947
4106
|
export const zVillageRepositoryCommit = z.object({
|
|
3948
4107
|
author_email: z.string().nullable(),
|
|
3949
4108
|
author_name: z.string().nullable(),
|
|
3950
|
-
authored_at: z.iso.datetime().nullable(),
|
|
3951
|
-
committed_at: z.iso.datetime().nullable(),
|
|
4109
|
+
authored_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4110
|
+
committed_at: z.iso.datetime({ offset: true }).nullable(),
|
|
3952
4111
|
message: z.string().nullable(),
|
|
3953
4112
|
sha: z.string()
|
|
3954
4113
|
});
|
|
3955
4114
|
export const zVillageRepositoryCommitsResponse = z.object({
|
|
3956
|
-
commit_count: z.
|
|
4115
|
+
commit_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
3957
4116
|
commits: z.array(zVillageRepositoryCommit),
|
|
3958
|
-
last_synced: z.iso.datetime().nullable(),
|
|
4117
|
+
last_synced: z.iso.datetime({ offset: true }).nullable(),
|
|
3959
4118
|
name: z.string(),
|
|
3960
4119
|
owner: z.string(),
|
|
3961
4120
|
refreshed: z.boolean()
|
|
@@ -3965,7 +4124,7 @@ export const zVillageRepositoryCommitsResponse = z.object({
|
|
|
3965
4124
|
*
|
|
3966
4125
|
* Decision applied by a collective owner to pending submissions
|
|
3967
4126
|
*/
|
|
3968
|
-
export const zVillageReviewDecision = z.enum(['approved', 'rejected']);
|
|
4127
|
+
export const zVillageReviewDecision = closedSet()(z.enum(['approved', 'rejected']));
|
|
3969
4128
|
export const zVillageBatchReviewRequest = z.object({
|
|
3970
4129
|
status: zVillageReviewDecision,
|
|
3971
4130
|
transcript_ids: z.array(zTranscriptID)
|
|
@@ -3984,24 +4143,24 @@ export const zVillageSetNotificationEmailRequest = z.object({
|
|
|
3984
4143
|
*
|
|
3985
4144
|
* Actor class that decided one collective share event
|
|
3986
4145
|
*/
|
|
3987
|
-
export const zVillageShareEventActor = z.enum([
|
|
4146
|
+
export const zVillageShareEventActor = closedSet()(z.enum([
|
|
3988
4147
|
'',
|
|
3989
4148
|
'owner',
|
|
3990
4149
|
'collective',
|
|
3991
4150
|
'moderator'
|
|
3992
|
-
]);
|
|
4151
|
+
]));
|
|
3993
4152
|
/**
|
|
3994
4153
|
* Village Share Status
|
|
3995
4154
|
*
|
|
3996
4155
|
* Status of one collective share-attempt event. Pending, approved, and rejected can appear in current projections; retracted and revoked are terminal ledger states.
|
|
3997
4156
|
*/
|
|
3998
|
-
export const zVillageShareStatus = z.enum([
|
|
4157
|
+
export const zVillageShareStatus = closedSet()(z.enum([
|
|
3999
4158
|
'pending',
|
|
4000
4159
|
'approved',
|
|
4001
4160
|
'rejected',
|
|
4002
4161
|
'retracted',
|
|
4003
4162
|
'revoked'
|
|
4004
|
-
]);
|
|
4163
|
+
]));
|
|
4005
4164
|
export const zVillageShareEvent = z.object({
|
|
4006
4165
|
decided_at: z.iso.datetime().regex(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?Z$/).nullable(),
|
|
4007
4166
|
decided_by_actor: zVillageShareEventActor,
|
|
@@ -4032,14 +4191,14 @@ export const zVillageStatusResponse = z.object({
|
|
|
4032
4191
|
*
|
|
4033
4192
|
* Whether leaving a collective retracts contributed transcripts by default
|
|
4034
4193
|
*/
|
|
4035
|
-
export const zVillageTranscriptDeletionPolicy = z.enum(['user_choice', 'mandatory']);
|
|
4194
|
+
export const zVillageTranscriptDeletionPolicy = closedSet()(z.enum(['user_choice', 'mandatory']));
|
|
4036
4195
|
export const zVillageTranscriptIntegrity = z.object({
|
|
4037
4196
|
flagged_turns: z.array(z.int().gte(0).lte(9007199254740991))
|
|
4038
4197
|
}).strict();
|
|
4039
4198
|
export const zVillageTranscriptPullRequest = z.object({
|
|
4040
4199
|
head_ref: z.string().nullable(),
|
|
4041
4200
|
name: z.string().min(1),
|
|
4042
|
-
number: z.
|
|
4201
|
+
number: z.number().refine(Number.isInteger).gte(1).lte(9223372036854775808),
|
|
4043
4202
|
owner: z.string().min(1),
|
|
4044
4203
|
state: zVillagePullRequestAttachmentState,
|
|
4045
4204
|
title: z.string().nullable()
|
|
@@ -4053,47 +4212,47 @@ export const zVillageTranscriptPullRequestsResponse = z.object({
|
|
|
4053
4212
|
*
|
|
4054
4213
|
* Village transcript visibility as stored and served by web routes
|
|
4055
4214
|
*/
|
|
4056
|
-
export const zVillageTranscriptVisibility = z.enum([
|
|
4215
|
+
export const zVillageTranscriptVisibility = closedSet()(z.enum([
|
|
4057
4216
|
'private',
|
|
4058
4217
|
'shared',
|
|
4059
4218
|
'public'
|
|
4060
|
-
]);
|
|
4219
|
+
]));
|
|
4061
4220
|
export const zVillageCollectiveTranscript = z.object({
|
|
4062
|
-
blob_size_bytes: z.
|
|
4063
|
-
compute_version: z.
|
|
4064
|
-
computed_at: z.iso.datetime().nullable(),
|
|
4221
|
+
blob_size_bytes: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4222
|
+
compute_version: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4223
|
+
computed_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4065
4224
|
content_hash: zTranscriptContentHash.nullable(),
|
|
4066
4225
|
conversation_turn_count: z.int().gte(0).lte(9007199254740991).nullable(),
|
|
4067
4226
|
description: z.string().nullable(),
|
|
4068
4227
|
diagnostics_partial: z.boolean().nullable(),
|
|
4069
4228
|
diagnostics_warnings: z.array(zDiagnosticEntry).nullable(),
|
|
4070
|
-
discovery_turns: z.
|
|
4229
|
+
discovery_turns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4071
4230
|
displayed_turn_count: z.int().gte(0).lte(9007199254740991).nullable(),
|
|
4072
|
-
duration_ms: z.
|
|
4231
|
+
duration_ms: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4073
4232
|
exploration_ratio: z.number().nullable(),
|
|
4074
|
-
files_touched: z.
|
|
4233
|
+
files_touched: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4075
4234
|
git_branch: z.string().nullable(),
|
|
4076
4235
|
git_remote: z.string().nullable(),
|
|
4077
4236
|
harness_version: z.string().nullable(),
|
|
4078
4237
|
id: zTranscriptID,
|
|
4079
|
-
ingested_at: z.iso.datetime().nullable(),
|
|
4238
|
+
ingested_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4080
4239
|
input_submission_count: z.int().gte(0).lte(9007199254740991).optional(),
|
|
4081
4240
|
license_id: zLicense.nullable(),
|
|
4082
|
-
lines_changed: z.
|
|
4241
|
+
lines_changed: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4083
4242
|
local_id: zSessionID,
|
|
4084
4243
|
m2_token_outcome_ratio: z.number().nullable(),
|
|
4085
|
-
m3_unique_tool_count: z.
|
|
4086
|
-
m4_consecutive_error_max: z.
|
|
4087
|
-
m4_error_recovery_count: z.
|
|
4088
|
-
m5_avg_message_tokens: z.
|
|
4244
|
+
m3_unique_tool_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4245
|
+
m4_consecutive_error_max: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4246
|
+
m4_error_recovery_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4247
|
+
m5_avg_message_tokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4089
4248
|
m5_context_utilization_pct: z.number().nullable(),
|
|
4090
|
-
m5_peak_context_tokens: z.
|
|
4091
|
-
m6_lines_survived: z.
|
|
4092
|
-
m6_lines_total: z.
|
|
4249
|
+
m5_peak_context_tokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4250
|
+
m6_lines_survived: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4251
|
+
m6_lines_total: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4093
4252
|
m6_output_survival_pct: z.number().nullable(),
|
|
4094
4253
|
m7_spec_has_constraints: z.boolean().nullable(),
|
|
4095
4254
|
m7_spec_has_examples: z.boolean().nullable(),
|
|
4096
|
-
m7_spec_word_count: z.
|
|
4255
|
+
m7_spec_word_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4097
4256
|
model_name: z.string().nullable(),
|
|
4098
4257
|
model_provider: z.string(),
|
|
4099
4258
|
outcome: zSessionOutcome.nullable(),
|
|
@@ -4105,33 +4264,33 @@ export const zVillageCollectiveTranscript = z.object({
|
|
|
4105
4264
|
project_name: z.string().nullable(),
|
|
4106
4265
|
project_name_source: zVillageProjectNameSource.nullable(),
|
|
4107
4266
|
project_remote_label: z.string().nullable(),
|
|
4108
|
-
published_at: z.iso.datetime(),
|
|
4267
|
+
published_at: z.iso.datetime({ offset: true }),
|
|
4109
4268
|
pull_requests: zVillagePullRequestsSummary,
|
|
4110
4269
|
purpose: zSessionPurpose.optional(),
|
|
4111
4270
|
relationships: z.array(zSessionRelationship).optional(),
|
|
4112
|
-
retry_loops: z.
|
|
4113
|
-
retry_tokens_wasted: z.
|
|
4271
|
+
retry_loops: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4272
|
+
retry_tokens_wasted: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4114
4273
|
root_session_id: zSessionID.nullish(),
|
|
4115
4274
|
schema_version: z.string(),
|
|
4116
|
-
scope_breadth: z.
|
|
4117
|
-
session_end: z.iso.datetime().nullable(),
|
|
4275
|
+
scope_breadth: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4276
|
+
session_end: z.iso.datetime({ offset: true }).nullable(),
|
|
4118
4277
|
session_origin: zSessionOrigin,
|
|
4119
|
-
session_start: z.iso.datetime().nullable(),
|
|
4278
|
+
session_start: z.iso.datetime({ offset: true }).nullable(),
|
|
4120
4279
|
signal_density: z.number().nullable(),
|
|
4121
4280
|
source_format: zSourceFormat.nullable(),
|
|
4122
4281
|
spec_quality_score: z.number().nullable(),
|
|
4123
|
-
subagent_count: z.
|
|
4282
|
+
subagent_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4124
4283
|
subagents: z.array(z.record(z.string(), z.unknown())).nullable(),
|
|
4125
4284
|
title: z.string().nullable(),
|
|
4126
4285
|
title_generated: z.string().nullable(),
|
|
4127
|
-
token_count: z.
|
|
4128
|
-
tokens_in: z.
|
|
4129
|
-
tokens_out: z.
|
|
4130
|
-
tool_call_count: z.
|
|
4131
|
-
turn_count: z.
|
|
4132
|
-
updated_at: z.iso.datetime(),
|
|
4286
|
+
token_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4287
|
+
tokens_in: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4288
|
+
tokens_out: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4289
|
+
tool_call_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4290
|
+
turn_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4291
|
+
updated_at: z.iso.datetime({ offset: true }),
|
|
4133
4292
|
visibility: zVillageTranscriptVisibility,
|
|
4134
|
-
within_session_reverts: z.
|
|
4293
|
+
within_session_reverts: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable()
|
|
4135
4294
|
}).superRefine((value, context) => {
|
|
4136
4295
|
const fail = (reason) => context.addIssue({ code: "custom", message: "schema.zVillageCollectiveTranscript: " + reason });
|
|
4137
4296
|
if (value.owner.kind !== "profile") {
|
|
@@ -4151,7 +4310,7 @@ export const zVillageContributableTranscript = z.object({
|
|
|
4151
4310
|
project_display_name: z.string(),
|
|
4152
4311
|
project_hash: zProjectHash,
|
|
4153
4312
|
project_name_source: zVillageProjectNameSource,
|
|
4154
|
-
published_at: z.iso.datetime(),
|
|
4313
|
+
published_at: z.iso.datetime({ offset: true }),
|
|
4155
4314
|
purpose: zSessionPurpose.optional(),
|
|
4156
4315
|
relationships: z.array(zSessionRelationship).optional(),
|
|
4157
4316
|
root_session_id: zSessionID.nullish(),
|
|
@@ -4160,48 +4319,48 @@ export const zVillageContributableTranscript = z.object({
|
|
|
4160
4319
|
visibility: zVillageTranscriptVisibility
|
|
4161
4320
|
});
|
|
4162
4321
|
export const zVillagePullRequestAttachedTranscript = z.object({
|
|
4163
|
-
position: z.
|
|
4322
|
+
position: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4164
4323
|
previous_visibility: zVillageTranscriptVisibility,
|
|
4165
|
-
session_start: z.iso.datetime().nullable(),
|
|
4324
|
+
session_start: z.iso.datetime({ offset: true }).nullable(),
|
|
4166
4325
|
title: z.string().nullable(),
|
|
4167
4326
|
transcript_id: zTranscriptID
|
|
4168
4327
|
});
|
|
4169
4328
|
export const zVillageTranscript = z.object({
|
|
4170
|
-
blob_size_bytes: z.
|
|
4171
|
-
compute_version: z.
|
|
4172
|
-
computed_at: z.iso.datetime().nullable(),
|
|
4329
|
+
blob_size_bytes: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4330
|
+
compute_version: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4331
|
+
computed_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4173
4332
|
content_hash: zTranscriptContentHash.nullable(),
|
|
4174
4333
|
conversation_turn_count: z.int().gte(0).lte(9007199254740991).nullable(),
|
|
4175
4334
|
description: z.string().nullable(),
|
|
4176
4335
|
diagnostics_partial: z.boolean().nullable(),
|
|
4177
4336
|
diagnostics_warnings: z.array(zDiagnosticEntry).nullable(),
|
|
4178
|
-
discovery_turns: z.
|
|
4337
|
+
discovery_turns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4179
4338
|
displayed_turn_count: z.int().gte(0).lte(9007199254740991).nullable(),
|
|
4180
|
-
duration_ms: z.
|
|
4339
|
+
duration_ms: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4181
4340
|
exploration_ratio: z.number().nullable(),
|
|
4182
|
-
files_touched: z.
|
|
4341
|
+
files_touched: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4183
4342
|
git_branch: z.string().nullable(),
|
|
4184
4343
|
git_remote: z.string().nullable(),
|
|
4185
4344
|
harness_version: z.string().nullable(),
|
|
4186
4345
|
id: zTranscriptID,
|
|
4187
|
-
ingested_at: z.iso.datetime().nullable(),
|
|
4346
|
+
ingested_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4188
4347
|
input_submission_count: z.int().gte(0).lte(9007199254740991).optional(),
|
|
4189
4348
|
license_id: zLicense.nullable(),
|
|
4190
|
-
lines_changed: z.
|
|
4349
|
+
lines_changed: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4191
4350
|
local_id: zSessionID,
|
|
4192
4351
|
m2_token_outcome_ratio: z.number().nullable(),
|
|
4193
|
-
m3_unique_tool_count: z.
|
|
4194
|
-
m4_consecutive_error_max: z.
|
|
4195
|
-
m4_error_recovery_count: z.
|
|
4196
|
-
m5_avg_message_tokens: z.
|
|
4352
|
+
m3_unique_tool_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4353
|
+
m4_consecutive_error_max: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4354
|
+
m4_error_recovery_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4355
|
+
m5_avg_message_tokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4197
4356
|
m5_context_utilization_pct: z.number().nullable(),
|
|
4198
|
-
m5_peak_context_tokens: z.
|
|
4199
|
-
m6_lines_survived: z.
|
|
4200
|
-
m6_lines_total: z.
|
|
4357
|
+
m5_peak_context_tokens: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4358
|
+
m6_lines_survived: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4359
|
+
m6_lines_total: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4201
4360
|
m6_output_survival_pct: z.number().nullable(),
|
|
4202
4361
|
m7_spec_has_constraints: z.boolean().nullable(),
|
|
4203
4362
|
m7_spec_has_examples: z.boolean().nullable(),
|
|
4204
|
-
m7_spec_word_count: z.
|
|
4363
|
+
m7_spec_word_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4205
4364
|
model_name: z.string().nullable(),
|
|
4206
4365
|
model_provider: z.string(),
|
|
4207
4366
|
outcome: zSessionOutcome.nullable(),
|
|
@@ -4212,32 +4371,32 @@ export const zVillageTranscript = z.object({
|
|
|
4212
4371
|
project_name: z.string().nullable(),
|
|
4213
4372
|
project_name_source: zVillageProjectNameSource.nullable(),
|
|
4214
4373
|
project_remote_label: z.string().nullable(),
|
|
4215
|
-
published_at: z.iso.datetime(),
|
|
4374
|
+
published_at: z.iso.datetime({ offset: true }),
|
|
4216
4375
|
purpose: zSessionPurpose.optional(),
|
|
4217
4376
|
relationships: z.array(zSessionRelationship).optional(),
|
|
4218
|
-
retry_loops: z.
|
|
4219
|
-
retry_tokens_wasted: z.
|
|
4377
|
+
retry_loops: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4378
|
+
retry_tokens_wasted: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4220
4379
|
root_session_id: zSessionID.nullish(),
|
|
4221
4380
|
schema_version: z.string(),
|
|
4222
|
-
scope_breadth: z.
|
|
4223
|
-
session_end: z.iso.datetime().nullable(),
|
|
4381
|
+
scope_breadth: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4382
|
+
session_end: z.iso.datetime({ offset: true }).nullable(),
|
|
4224
4383
|
session_origin: zSessionOrigin,
|
|
4225
|
-
session_start: z.iso.datetime().nullable(),
|
|
4384
|
+
session_start: z.iso.datetime({ offset: true }).nullable(),
|
|
4226
4385
|
signal_density: z.number().nullable(),
|
|
4227
4386
|
source_format: zSourceFormat.nullable(),
|
|
4228
4387
|
spec_quality_score: z.number().nullable(),
|
|
4229
|
-
subagent_count: z.
|
|
4388
|
+
subagent_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4230
4389
|
subagents: z.array(z.record(z.string(), z.unknown())).nullable(),
|
|
4231
4390
|
title: z.string().nullable(),
|
|
4232
4391
|
title_generated: z.string().nullable(),
|
|
4233
|
-
token_count: z.
|
|
4234
|
-
tokens_in: z.
|
|
4235
|
-
tokens_out: z.
|
|
4236
|
-
tool_call_count: z.
|
|
4237
|
-
turn_count: z.
|
|
4238
|
-
updated_at: z.iso.datetime(),
|
|
4392
|
+
token_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4393
|
+
tokens_in: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4394
|
+
tokens_out: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4395
|
+
tool_call_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4396
|
+
turn_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4397
|
+
updated_at: z.iso.datetime({ offset: true }),
|
|
4239
4398
|
visibility: zVillageTranscriptVisibility,
|
|
4240
|
-
within_session_reverts: z.
|
|
4399
|
+
within_session_reverts: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable()
|
|
4241
4400
|
});
|
|
4242
4401
|
/**
|
|
4243
4402
|
* Village UUID
|
|
@@ -4342,7 +4501,7 @@ export const zLocalPublication = z.object({
|
|
|
4342
4501
|
autoPublish: z.boolean(),
|
|
4343
4502
|
lastAttempt: zLocalPublicationAttemptFailure.optional(),
|
|
4344
4503
|
outsideSelection: z.boolean(),
|
|
4345
|
-
publishedAt: z.iso.datetime().optional(),
|
|
4504
|
+
publishedAt: z.iso.datetime({ offset: true }).optional(),
|
|
4346
4505
|
sessionId: z.string(),
|
|
4347
4506
|
state: zLocalPublicationState,
|
|
4348
4507
|
transcriptId: zTranscriptID.optional(),
|
|
@@ -4399,7 +4558,7 @@ export const zLocalSettingsResponse = z.object({
|
|
|
4399
4558
|
settings: z.array(zLocalSetting)
|
|
4400
4559
|
});
|
|
4401
4560
|
export const zLocalSyncSessionRow = z.object({
|
|
4402
|
-
childCount: z.
|
|
4561
|
+
childCount: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
4403
4562
|
preview: z.string(),
|
|
4404
4563
|
publication: zLocalPublication,
|
|
4405
4564
|
sync: zLocalSyncSummary,
|
|
@@ -4439,15 +4598,78 @@ export const zSyncPushSessionResult = z.object({
|
|
|
4439
4598
|
waitingPullRequests: z.array(zVillagePromptRequest).optional()
|
|
4440
4599
|
});
|
|
4441
4600
|
export const zSyncPushResponse = z.object({
|
|
4442
|
-
errors: z.
|
|
4443
|
-
new: z.
|
|
4601
|
+
errors: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
4602
|
+
new: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
4444
4603
|
sessions: z.array(zSyncPushSessionResult),
|
|
4445
|
-
skipped: z.
|
|
4446
|
-
updated: z.
|
|
4604
|
+
skipped: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808),
|
|
4605
|
+
updated: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808)
|
|
4606
|
+
});
|
|
4607
|
+
export const zTranscriptReadTransport = z.object({
|
|
4608
|
+
kind: zTranscriptReadTransportKind,
|
|
4609
|
+
sessionId: zSessionID.nullish(),
|
|
4610
|
+
transcriptId: zVillageUUID.nullish()
|
|
4611
|
+
});
|
|
4612
|
+
export const zTranscriptReadContext = z.object({
|
|
4613
|
+
contentHash: z.string().optional(),
|
|
4614
|
+
contentSessionId: z.string().nullish(),
|
|
4615
|
+
harness: z.string().optional(),
|
|
4616
|
+
model: z.string().optional(),
|
|
4617
|
+
nativePresence: zTranscriptNativePresence,
|
|
4618
|
+
protocolVersion: z.string().min(1),
|
|
4619
|
+
representation: z.string(),
|
|
4620
|
+
revision: z.string(),
|
|
4621
|
+
thinkingLevel: zThinkingLevel.optional(),
|
|
4622
|
+
thinkingLevelRaw: zThinkingLevelRaw.optional(),
|
|
4623
|
+
totalConversationTurns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
4624
|
+
totalSegments: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4625
|
+
totalTurns: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4626
|
+
transport: zTranscriptReadTransport,
|
|
4627
|
+
validation: zTranscriptReadValidation
|
|
4628
|
+
});
|
|
4629
|
+
export const zPositionedDirectory = z.object({
|
|
4630
|
+
context: zTranscriptReadContext,
|
|
4631
|
+
directoryPage: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
4632
|
+
directoryPerPage: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish(),
|
|
4633
|
+
history: z.array(zTranscriptHistorySection).optional(),
|
|
4634
|
+
partition: zTranscriptSegmentPartition,
|
|
4635
|
+
segments: z.array(zPositionedSegmentRef),
|
|
4636
|
+
usagePresent: zTranscriptUsagePresence
|
|
4637
|
+
});
|
|
4638
|
+
export const zPositionedSegment = z.object({
|
|
4639
|
+
byteLength: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4640
|
+
context: zTranscriptReadContext,
|
|
4641
|
+
hasNewer: z.boolean(),
|
|
4642
|
+
hasOlder: z.boolean(),
|
|
4643
|
+
index: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4644
|
+
nativeMetadata: z.array(zNativeMetadataRecord).optional(),
|
|
4645
|
+
partition: zTranscriptSegmentPartition,
|
|
4646
|
+
rows: z.array(zTranscriptSegmentRow).min(1)
|
|
4647
|
+
});
|
|
4648
|
+
export const zPositionedWindow = z.object({
|
|
4649
|
+
anchorPosition: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4650
|
+
anchorSegment: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4651
|
+
anchorTurn: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
4652
|
+
context: zTranscriptReadContext,
|
|
4653
|
+
firstPosition: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4654
|
+
hasNewer: z.boolean(),
|
|
4655
|
+
hasOlder: z.boolean(),
|
|
4656
|
+
lastPosition: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4657
|
+
partition: zTranscriptSegmentPartition,
|
|
4658
|
+
requestedAnchor: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
4659
|
+
requestedPosition: z.number().refine(Number.isInteger).gte(0).lte(9223372036854775808).optional(),
|
|
4660
|
+
segments: z.array(z.int()).min(1),
|
|
4661
|
+
span: z.int().gte(1).lte(10)
|
|
4662
|
+
});
|
|
4663
|
+
export const zTranscriptEntryMatch = z.object({
|
|
4664
|
+
context: zTranscriptReadContext,
|
|
4665
|
+
kind: zTranscriptEntryReferenceKind,
|
|
4666
|
+
position: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4667
|
+
recordedIndex: z.int().gte(0).lte(9007199254740991).optional(),
|
|
4668
|
+
segmentOrdinal: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
4447
4669
|
});
|
|
4448
4670
|
export const zVillageCollective = z.object({
|
|
4449
4671
|
acceptance_mode: zVillageCollectiveAcceptanceMode,
|
|
4450
|
-
created_at: z.iso.datetime(),
|
|
4672
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4451
4673
|
creator: zVillagePublicOwner,
|
|
4452
4674
|
data_access: zVillageCollectiveDataAccess,
|
|
4453
4675
|
description: z.string().nullable(),
|
|
@@ -4458,11 +4680,11 @@ export const zVillageCollective = z.object({
|
|
|
4458
4680
|
post_prompts_check: z.boolean(),
|
|
4459
4681
|
prompts_check_mode: zVillagePromptsCheckMode,
|
|
4460
4682
|
transcript_deletion_policy: zVillageTranscriptDeletionPolicy,
|
|
4461
|
-
updated_at: z.iso.datetime()
|
|
4683
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
4462
4684
|
});
|
|
4463
4685
|
export const zVillageCollectiveDetailRecord = z.object({
|
|
4464
4686
|
acceptance_mode: zVillageCollectiveAcceptanceMode,
|
|
4465
|
-
created_at: z.iso.datetime(),
|
|
4687
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4466
4688
|
creator: zVillagePublicOwner,
|
|
4467
4689
|
data_access: zVillageCollectiveDataAccess,
|
|
4468
4690
|
description: z.string().nullable(),
|
|
@@ -4473,7 +4695,7 @@ export const zVillageCollectiveDetailRecord = z.object({
|
|
|
4473
4695
|
post_prompts_check: z.boolean().nullish(),
|
|
4474
4696
|
prompts_check_mode: zVillagePromptsCheckMode.nullish(),
|
|
4475
4697
|
transcript_deletion_policy: zVillageTranscriptDeletionPolicy,
|
|
4476
|
-
updated_at: z.iso.datetime()
|
|
4698
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
4477
4699
|
});
|
|
4478
4700
|
export const zVillageCollectiveDetailResponse = z.object({
|
|
4479
4701
|
can_read: z.boolean(),
|
|
@@ -4487,8 +4709,8 @@ export const zVillageCollectiveDetailResponse = z.object({
|
|
|
4487
4709
|
your_role: zVillageCollectiveViewerRole
|
|
4488
4710
|
});
|
|
4489
4711
|
export const zVillageCollectiveInvitationSent = z.object({
|
|
4490
|
-
created_at: z.iso.datetime(),
|
|
4491
|
-
expires_at: z.iso.datetime(),
|
|
4712
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4713
|
+
expires_at: z.iso.datetime({ offset: true }),
|
|
4492
4714
|
id: zVillageUUID,
|
|
4493
4715
|
invited_by: zVillagePublicOwner,
|
|
4494
4716
|
invited_username: z.string().min(1)
|
|
@@ -4510,7 +4732,7 @@ export const zVillageCollectiveSearchResponse = z.object({
|
|
|
4510
4732
|
export const zVillageCollectiveSubmission = z.object({
|
|
4511
4733
|
event_num: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),
|
|
4512
4734
|
group_id: zVillageUUID,
|
|
4513
|
-
recorded_at: z.iso.datetime(),
|
|
4735
|
+
recorded_at: z.iso.datetime({ offset: true }),
|
|
4514
4736
|
status: zVillageShareStatus,
|
|
4515
4737
|
title: z.string().nullable(),
|
|
4516
4738
|
transcript_id: zTranscriptID
|
|
@@ -4537,7 +4759,7 @@ export const zVillageEnrichedTranscriptShare = z.object({
|
|
|
4537
4759
|
acceptance_mode: zVillageCollectiveAcceptanceMode,
|
|
4538
4760
|
group_id: zVillageUUID,
|
|
4539
4761
|
group_name: z.string(),
|
|
4540
|
-
shared_at: z.iso.datetime(),
|
|
4762
|
+
shared_at: z.iso.datetime({ offset: true }),
|
|
4541
4763
|
status: zVillageShareStatus,
|
|
4542
4764
|
transcript_id: zTranscriptID
|
|
4543
4765
|
});
|
|
@@ -4549,18 +4771,18 @@ export const zVillageInvitedCollective = z.object({
|
|
|
4549
4771
|
});
|
|
4550
4772
|
export const zVillageCollectiveInvitation = z.object({
|
|
4551
4773
|
collective: zVillageInvitedCollective,
|
|
4552
|
-
created_at: z.iso.datetime(),
|
|
4553
|
-
expires_at: z.iso.datetime(),
|
|
4774
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4775
|
+
expires_at: z.iso.datetime({ offset: true }),
|
|
4554
4776
|
id: zVillageUUID,
|
|
4555
4777
|
invited_by: zVillagePublicOwner
|
|
4556
4778
|
});
|
|
4557
4779
|
export const zVillageLinkedRepository = z.object({
|
|
4558
|
-
created_at: z.iso.datetime().nullable(),
|
|
4780
|
+
created_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4559
4781
|
group_id: zVillageUUID,
|
|
4560
4782
|
id: zVillageUUID,
|
|
4561
4783
|
installation_id: 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' }),
|
|
4562
4784
|
is_private: z.boolean(),
|
|
4563
|
-
last_synced_at: z.iso.datetime().nullable(),
|
|
4785
|
+
last_synced_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4564
4786
|
linked_by: zVillagePublicOwner,
|
|
4565
4787
|
name: z.string(),
|
|
4566
4788
|
owner: z.string()
|
|
@@ -4584,7 +4806,7 @@ export const zVillageOrganizationCollectivesResponse = z.object({
|
|
|
4584
4806
|
ctx.addIssue({ code: "custom", message: "Collective contract validation: " + issue + "; retain prior evidence and fetch validated metadata before retrying" }); });
|
|
4585
4807
|
export const zVillagePublicCollective = z.object({
|
|
4586
4808
|
acceptance_mode: zVillageCollectiveAcceptanceMode,
|
|
4587
|
-
created_at: z.iso.datetime(),
|
|
4809
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4588
4810
|
data_access: zVillageCollectiveDataAccess,
|
|
4589
4811
|
description: z.string().nullable(),
|
|
4590
4812
|
id: zVillageUUID,
|
|
@@ -4595,22 +4817,22 @@ export const zVillagePublicCollective = z.object({
|
|
|
4595
4817
|
});
|
|
4596
4818
|
export const zVillagePullRequestAttachment = z.object({
|
|
4597
4819
|
author: zVillagePublicOwner,
|
|
4598
|
-
check_run_id: z.
|
|
4599
|
-
comment_id: z.
|
|
4600
|
-
confirmed_at: z.iso.datetime().nullable(),
|
|
4601
|
-
created_at: z.iso.datetime(),
|
|
4602
|
-
detached_at: z.iso.datetime().nullable(),
|
|
4820
|
+
check_run_id: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4821
|
+
comment_id: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4822
|
+
confirmed_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4823
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4824
|
+
detached_at: z.iso.datetime({ offset: true }).nullable(),
|
|
4603
4825
|
head_ref: z.string().nullable(),
|
|
4604
4826
|
head_sha: z.string(),
|
|
4605
4827
|
id: zVillageUUID,
|
|
4606
4828
|
is_private_repository: z.boolean(),
|
|
4607
4829
|
name: z.string(),
|
|
4608
|
-
number: z.
|
|
4830
|
+
number: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4609
4831
|
owner: z.string(),
|
|
4610
4832
|
requested_by: zVillagePublicOwner.nullable(),
|
|
4611
4833
|
state: zVillagePullRequestAttachmentState,
|
|
4612
4834
|
title: z.string().nullable(),
|
|
4613
|
-
updated_at: z.iso.datetime()
|
|
4835
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
4614
4836
|
});
|
|
4615
4837
|
export const zVillagePullRequestAttachmentResponse = z.object({
|
|
4616
4838
|
attachment: zVillagePullRequestAttachment,
|
|
@@ -4628,7 +4850,7 @@ export const zVillageTag = z.object({
|
|
|
4628
4850
|
export const zVillageTranscriptAttestation = z.object({
|
|
4629
4851
|
attestation_type: z.string(),
|
|
4630
4852
|
attester: zVillagePublicOwner,
|
|
4631
|
-
created_at: z.iso.datetime(),
|
|
4853
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4632
4854
|
id: zVillageUUID,
|
|
4633
4855
|
note: z.string().nullable(),
|
|
4634
4856
|
org_login: z.string(),
|
|
@@ -4639,7 +4861,7 @@ export const zVillageTranscriptCollective = z.object({
|
|
|
4639
4861
|
id: zVillageUUID,
|
|
4640
4862
|
linked_github_org: z.string().nullable(),
|
|
4641
4863
|
name: z.string(),
|
|
4642
|
-
shared_at: z.iso.datetime()
|
|
4864
|
+
shared_at: z.iso.datetime({ offset: true })
|
|
4643
4865
|
});
|
|
4644
4866
|
export const zVillageTranscriptCollectivesResponse = z.object({
|
|
4645
4867
|
collectives: z.array(zVillageTranscriptCollective)
|
|
@@ -4665,17 +4887,17 @@ export const zVillageTranscriptListRow = z.object({
|
|
|
4665
4887
|
}
|
|
4666
4888
|
});
|
|
4667
4889
|
export const zVillageTranscriptListResponse = z.object({
|
|
4668
|
-
agent_total: z.
|
|
4890
|
+
agent_total: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4669
4891
|
next_items: z.array(zVillageTranscriptListRow),
|
|
4670
|
-
page: z.
|
|
4671
|
-
per_page: z.
|
|
4672
|
-
total: z.
|
|
4892
|
+
page: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4893
|
+
per_page: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4894
|
+
total: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4673
4895
|
transcripts: z.array(zVillageTranscriptListRow)
|
|
4674
4896
|
});
|
|
4675
4897
|
export const zVillageTranscriptShare = z.object({
|
|
4676
4898
|
group_id: zVillageUUID,
|
|
4677
4899
|
group_name: z.string(),
|
|
4678
|
-
shared_at: z.iso.datetime()
|
|
4900
|
+
shared_at: z.iso.datetime({ offset: true })
|
|
4679
4901
|
});
|
|
4680
4902
|
export const zVillageTranscriptMetadataResponse = z.object({
|
|
4681
4903
|
attestations: z.array(zVillageTranscriptAttestation),
|
|
@@ -4717,7 +4939,7 @@ export const zVillageUpdateUserSettingsRequest = z.object({
|
|
|
4717
4939
|
});
|
|
4718
4940
|
export const zVillageUser = z.object({
|
|
4719
4941
|
avatar_url: z.string().nullable(),
|
|
4720
|
-
created_at: z.iso.datetime(),
|
|
4942
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4721
4943
|
display_name: z.string().nullable(),
|
|
4722
4944
|
github_id: 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' }),
|
|
4723
4945
|
github_username: z.string(),
|
|
@@ -4726,12 +4948,12 @@ export const zVillageUser = z.object({
|
|
|
4726
4948
|
provider: z.string(),
|
|
4727
4949
|
provider_user_id: z.string(),
|
|
4728
4950
|
provider_username: z.string().nullable(),
|
|
4729
|
-
updated_at: z.iso.datetime(),
|
|
4951
|
+
updated_at: z.iso.datetime({ offset: true }),
|
|
4730
4952
|
username_chosen: z.boolean()
|
|
4731
4953
|
});
|
|
4732
4954
|
export const zVillageUserCollective = z.object({
|
|
4733
4955
|
acceptance_mode: zVillageCollectiveAcceptanceMode,
|
|
4734
|
-
created_at: z.iso.datetime(),
|
|
4956
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4735
4957
|
creator: zVillagePublicOwner,
|
|
4736
4958
|
data_access: zVillageCollectiveDataAccess,
|
|
4737
4959
|
description: z.string().nullable(),
|
|
@@ -4739,12 +4961,12 @@ export const zVillageUserCollective = z.object({
|
|
|
4739
4961
|
id: zVillageUUID,
|
|
4740
4962
|
linked_github_org: z.string().nullable(),
|
|
4741
4963
|
member_count: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),
|
|
4742
|
-
member_since: z.iso.datetime(),
|
|
4964
|
+
member_since: z.iso.datetime({ offset: true }),
|
|
4743
4965
|
name: z.string(),
|
|
4744
4966
|
role: zVillageCollectiveRole,
|
|
4745
4967
|
transcript_count: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),
|
|
4746
4968
|
transcript_deletion_policy: zVillageTranscriptDeletionPolicy,
|
|
4747
|
-
updated_at: z.iso.datetime()
|
|
4969
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
4748
4970
|
});
|
|
4749
4971
|
export const zLocalVillageCollective = z.object({
|
|
4750
4972
|
group: zVillageUserCollective,
|
|
@@ -4764,16 +4986,16 @@ export const zVillageUserCollectiveShare = z.object({
|
|
|
4764
4986
|
owner: zVillagePublicOwner,
|
|
4765
4987
|
parent_session_id: zSessionID.nullable(),
|
|
4766
4988
|
parent_transcript_id: zTranscriptID.nullable(),
|
|
4767
|
-
published_at: z.iso.datetime(),
|
|
4989
|
+
published_at: z.iso.datetime({ offset: true }),
|
|
4768
4990
|
purpose: zSessionPurpose.optional(),
|
|
4769
4991
|
relationships: z.array(zSessionRelationship).optional(),
|
|
4770
4992
|
root_session_id: zSessionID.nullish(),
|
|
4771
|
-
shared_at: z.iso.datetime(),
|
|
4993
|
+
shared_at: z.iso.datetime({ offset: true }),
|
|
4772
4994
|
status: zVillageShareStatus,
|
|
4773
4995
|
title: z.string().nullable(),
|
|
4774
|
-
tokens_in: z.
|
|
4775
|
-
tokens_out: z.
|
|
4776
|
-
turn_count: z.
|
|
4996
|
+
tokens_in: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4997
|
+
tokens_out: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4998
|
+
turn_count: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
4777
4999
|
visibility: zVillageTranscriptVisibility
|
|
4778
5000
|
});
|
|
4779
5001
|
export const zVillageSessionRow = z.object({
|
|
@@ -4922,7 +5144,7 @@ export const zVillageVerifyNotificationEmailRequest = z.object({
|
|
|
4922
5144
|
});
|
|
4923
5145
|
export const zVillageVisibleCollective = z.object({
|
|
4924
5146
|
acceptance_mode: zVillageCollectiveAcceptanceMode,
|
|
4925
|
-
created_at: z.iso.datetime(),
|
|
5147
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
4926
5148
|
creator: zVillagePublicOwner,
|
|
4927
5149
|
data_access: zVillageCollectiveDataAccess,
|
|
4928
5150
|
description: z.string().nullable(),
|
|
@@ -4930,25 +5152,25 @@ export const zVillageVisibleCollective = z.object({
|
|
|
4930
5152
|
id: zVillageUUID,
|
|
4931
5153
|
linked_github_org: z.string().nullable(),
|
|
4932
5154
|
member_count: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),
|
|
4933
|
-
member_since: z.iso.datetime().nullable(),
|
|
5155
|
+
member_since: z.iso.datetime({ offset: true }).nullable(),
|
|
4934
5156
|
name: z.string(),
|
|
4935
5157
|
role: zVillageCollectiveRole.nullable(),
|
|
4936
5158
|
transcript_count: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),
|
|
4937
5159
|
transcript_deletion_policy: zVillageTranscriptDeletionPolicy,
|
|
4938
|
-
updated_at: z.iso.datetime()
|
|
5160
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
4939
5161
|
});
|
|
4940
5162
|
/**
|
|
4941
5163
|
* Visibility
|
|
4942
5164
|
*
|
|
4943
5165
|
* Access control level for a published transcript
|
|
4944
5166
|
*/
|
|
4945
|
-
export const zVisibility = z.enum([
|
|
5167
|
+
export const zVisibility = closedSet()(z.enum([
|
|
4946
5168
|
'private',
|
|
4947
5169
|
'group',
|
|
4948
5170
|
'public'
|
|
4949
|
-
]);
|
|
5171
|
+
]));
|
|
4950
5172
|
export const zLegacyPullTranscriptInfo = z.object({
|
|
4951
|
-
annotationCount: z.
|
|
5173
|
+
annotationCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4952
5174
|
contentHash: z.string().optional(),
|
|
4953
5175
|
contractVersion: z.string().optional(),
|
|
4954
5176
|
harness: zHarness.optional(),
|
|
@@ -4972,9 +5194,9 @@ export const zLegacyPullTranscriptInfo = z.object({
|
|
|
4972
5194
|
fail("projectName sits beside an anonymous owner; omit it for an anonymous owner");
|
|
4973
5195
|
});
|
|
4974
5196
|
export const zLegacyPullListResponse = z.object({
|
|
4975
|
-
limit: z.
|
|
4976
|
-
page: z.
|
|
4977
|
-
total: z.
|
|
5197
|
+
limit: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
5198
|
+
page: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
5199
|
+
total: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
4978
5200
|
transcripts: z.array(zLegacyPullTranscriptInfo).nullable()
|
|
4979
5201
|
});
|
|
4980
5202
|
export const zPublishNormalizedValues = z.object({
|
|
@@ -5021,7 +5243,7 @@ export const zAuthoritativePublishResponse = z.object({
|
|
|
5021
5243
|
context.addIssue({ code: "custom", path: ["applied", "normalizedValues", "visibility"], message: "top-level and applied visibility must agree" });
|
|
5022
5244
|
});
|
|
5023
5245
|
export const zPullTranscriptInfo = z.object({
|
|
5024
|
-
annotationCount: z.
|
|
5246
|
+
annotationCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
5025
5247
|
contentHash: z.string().optional(),
|
|
5026
5248
|
contractVersion: z.string().optional(),
|
|
5027
5249
|
harness: zHarness.optional(),
|
|
@@ -5043,9 +5265,9 @@ export const zPullTranscriptInfo = z.object({
|
|
|
5043
5265
|
}
|
|
5044
5266
|
});
|
|
5045
5267
|
export const zPullListResponse = z.object({
|
|
5046
|
-
limit: z.
|
|
5047
|
-
page: z.
|
|
5048
|
-
total: z.
|
|
5268
|
+
limit: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
5269
|
+
page: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
5270
|
+
total: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808),
|
|
5049
5271
|
transcripts: z.array(zPullTranscriptInfo).nullable()
|
|
5050
5272
|
});
|
|
5051
5273
|
/**
|
|
@@ -5053,7 +5275,7 @@ export const zPullListResponse = z.object({
|
|
|
5053
5275
|
*
|
|
5054
5276
|
* Optional desired final access for legacy compatibility; content replacement remains private and widening occurs separately
|
|
5055
5277
|
*/
|
|
5056
|
-
export const zVisibilityIntent = z.enum(['private', 'public']);
|
|
5278
|
+
export const zVisibilityIntent = closedSet()(z.enum(['private', 'public']));
|
|
5057
5279
|
export const zAuthoritativePublishRequest = z.object({
|
|
5058
5280
|
client: zAuthoritativeClientInfo.optional(),
|
|
5059
5281
|
contentHash: zTranscriptContentHash,
|
|
@@ -5081,7 +5303,7 @@ export const zScryCheckRequest = z.object({
|
|
|
5081
5303
|
export const zWalkthroughStep = z.object({
|
|
5082
5304
|
excerpt: z.string(),
|
|
5083
5305
|
file: z.string(),
|
|
5084
|
-
line: z.
|
|
5306
|
+
line: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullish()
|
|
5085
5307
|
});
|
|
5086
5308
|
export const zWalkthroughTrail = z.object({
|
|
5087
5309
|
date: z.string(),
|
|
@@ -5089,16 +5311,16 @@ export const zWalkthroughTrail = z.object({
|
|
|
5089
5311
|
sessionId: z.string(),
|
|
5090
5312
|
steps: z.array(zWalkthroughStep).nullable(),
|
|
5091
5313
|
title: z.string(),
|
|
5092
|
-
turnCount: z.
|
|
5314
|
+
turnCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
5093
5315
|
});
|
|
5094
5316
|
export const zFamiliarityPayload = z.object({
|
|
5095
5317
|
familiarityPct: z.number(),
|
|
5096
5318
|
files: z.array(zFileFamiliarity).nullable(),
|
|
5097
|
-
freshnessDays: z.
|
|
5319
|
+
freshnessDays: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808).nullable(),
|
|
5098
5320
|
projectHash: zProjectHash,
|
|
5099
5321
|
suggestions: z.array(zReviewSuggestion).nullable(),
|
|
5100
5322
|
trails: z.array(zWalkthroughTrail).nullable(),
|
|
5101
|
-
unexploredCount: z.
|
|
5323
|
+
unexploredCount: z.number().refine(Number.isInteger).gte(-9223372036854775808).lte(9223372036854775808)
|
|
5102
5324
|
});
|
|
5103
5325
|
export const zWeekAvgDuration = z.object({
|
|
5104
5326
|
avgDurationMins: z.number().gte(0),
|