@mossbear/protocol 0.1.0-alpha.114 → 0.1.0-alpha.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.d.ts +662 -0
- package/dist/bundles.d.ts.map +1 -0
- package/dist/bundles.js +454 -0
- package/dist/bundles.js.map +1 -0
- package/dist/bundles.test.d.ts +2 -0
- package/dist/bundles.test.d.ts.map +1 -0
- package/dist/bundles.test.js +61 -0
- package/dist/bundles.test.js.map +1 -0
- package/dist/comments.d.ts +1405 -0
- package/dist/comments.d.ts.map +1 -0
- package/dist/comments.js +683 -0
- package/dist/comments.js.map +1 -0
- package/dist/comments.test.d.ts +2 -0
- package/dist/comments.test.d.ts.map +1 -0
- package/dist/comments.test.js +64 -0
- package/dist/comments.test.js.map +1 -0
- package/dist/guideHistory.d.ts +643 -0
- package/dist/guideHistory.d.ts.map +1 -0
- package/dist/guideHistory.js +343 -0
- package/dist/guideHistory.js.map +1 -0
- package/dist/guideHistory.test.d.ts +2 -0
- package/dist/guideHistory.test.d.ts.map +1 -0
- package/dist/guideHistory.test.js +35 -0
- package/dist/guideHistory.test.js.map +1 -0
- package/dist/guideImport.d.ts +398 -0
- package/dist/guideImport.d.ts.map +1 -0
- package/dist/guideImport.js +350 -0
- package/dist/guideImport.js.map +1 -0
- package/dist/guideImport.test.d.ts +2 -0
- package/dist/guideImport.test.d.ts.map +1 -0
- package/dist/guideImport.test.js +62 -0
- package/dist/guideImport.test.js.map +1 -0
- package/dist/guideSnapshot.d.ts +105 -0
- package/dist/guideSnapshot.d.ts.map +1 -0
- package/dist/guideSnapshot.js +101 -0
- package/dist/guideSnapshot.js.map +1 -0
- package/dist/guideSnapshot.test.d.ts +2 -0
- package/dist/guideSnapshot.test.d.ts.map +1 -0
- package/dist/guideSnapshot.test.js +49 -0
- package/dist/guideSnapshot.test.js.map +1 -0
- package/dist/schemas.d.ts +5122 -11710
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +61 -2816
- package/dist/schemas.js.map +1 -1
- package/dist/search.d.ts +1222 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +474 -0
- package/dist/search.js.map +1 -0
- package/dist/search.test.d.ts +2 -0
- package/dist/search.test.d.ts.map +1 -0
- package/dist/search.test.js +64 -0
- package/dist/search.test.js.map +1 -0
- package/dist/sessionContracts.test.d.ts +2 -0
- package/dist/sessionContracts.test.d.ts.map +1 -0
- package/dist/sessionContracts.test.js +75 -0
- package/dist/sessionContracts.test.js.map +1 -0
- package/dist/sessionDigest.d.ts +149 -0
- package/dist/sessionDigest.d.ts.map +1 -0
- package/dist/sessionDigest.js +57 -0
- package/dist/sessionDigest.js.map +1 -0
- package/dist/sessionGrade.d.ts +184 -0
- package/dist/sessionGrade.d.ts.map +1 -0
- package/dist/sessionGrade.js +130 -0
- package/dist/sessionGrade.js.map +1 -0
- package/dist/types.d.ts +4 -27
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/usageOnly.d.ts +5 -5
- package/dist/wirePrimitives.d.ts +173 -0
- package/dist/wirePrimitives.d.ts.map +1 -0
- package/dist/wirePrimitives.js +210 -0
- package/dist/wirePrimitives.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import * as protocol from './index.js';
|
|
4
|
+
import * as schemas from './schemas.js';
|
|
5
|
+
import * as digest from './sessionDigest.js';
|
|
6
|
+
import * as grade from './sessionGrade.js';
|
|
7
|
+
const run = {
|
|
8
|
+
id: 's',
|
|
9
|
+
agentSessionId: 'a',
|
|
10
|
+
startedAt: '',
|
|
11
|
+
endedAt: null,
|
|
12
|
+
status: 'open',
|
|
13
|
+
};
|
|
14
|
+
const untrusted = { token: 't', startMarker: 's', endMarker: 'e', note: '' };
|
|
15
|
+
const pending = { run, state: 'pending', grade: null, untrusted: null };
|
|
16
|
+
const response = {
|
|
17
|
+
...pending,
|
|
18
|
+
digest: {
|
|
19
|
+
selfReport: null,
|
|
20
|
+
turns: [],
|
|
21
|
+
turnsTotal: 0,
|
|
22
|
+
repoId: null,
|
|
23
|
+
branch: null,
|
|
24
|
+
headSha: null,
|
|
25
|
+
dashboardPath: '',
|
|
26
|
+
comments: [],
|
|
27
|
+
notYetAvailable: ['comments'],
|
|
28
|
+
},
|
|
29
|
+
untrusted,
|
|
30
|
+
};
|
|
31
|
+
describe('session contract extraction', () => {
|
|
32
|
+
it('keeps the existing exports as the same objects and shares response dependencies', () => {
|
|
33
|
+
for (const [name, value] of [...Object.entries(grade), ...Object.entries(digest)]) {
|
|
34
|
+
if (name === 'GradeFailedAttemptsSchema')
|
|
35
|
+
continue;
|
|
36
|
+
expect(Reflect.get(schemas, name), name).toBe(value);
|
|
37
|
+
expect(Reflect.get(protocol, name), name).toBe(value);
|
|
38
|
+
}
|
|
39
|
+
expect('GradeFailedAttemptsSchema' in protocol).toBe(false);
|
|
40
|
+
const entries = digest.SessionDigestResponseSchema.entries;
|
|
41
|
+
expect(entries.run).toBe(grade.GradedSessionSchema);
|
|
42
|
+
expect(entries.state).toBe(grade.SessionGradeStateSchema);
|
|
43
|
+
expect(entries.grade.wrapped).toBe(grade.SessionGradeSchema);
|
|
44
|
+
expect(entries.gradeFailedAttempts).toBe(grade.SessionGradeResponseSchema.entries.gradeFailedAttempts);
|
|
45
|
+
expect(entries.untrusted).toBe(schemas.GuideHistoryUntrustedSchema);
|
|
46
|
+
expect(grade.SessionGradeGuideSchema.entries.verdict).toBe(schemas.SessionGuideVerdictValueSchema);
|
|
47
|
+
});
|
|
48
|
+
it('preserves identifier trimming, exclusive selection, and ValiError failures', () => {
|
|
49
|
+
expect(protocol.parseRunGradeRequest({ agent_session: ' a ', detail: 'digest' })).toEqual({ agent_session: 'a', detail: 'digest' });
|
|
50
|
+
expect(protocol.parseRunGradeRequest({ session: ' s ' })).toEqual({ session: 's' });
|
|
51
|
+
for (const input of [
|
|
52
|
+
{},
|
|
53
|
+
{ session: 's', agent_session: 'a' },
|
|
54
|
+
{ session: '\u0000' },
|
|
55
|
+
]) {
|
|
56
|
+
expect(() => protocol.parseRunGradeRequest(input)).toThrow(v.ValiError);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
it('preserves absence without defaults and distinguishes null from optional fields', () => {
|
|
60
|
+
expect(protocol.parseSessionGradeResponse(pending)).toEqual(pending);
|
|
61
|
+
expect(protocol.parseSessionDigestResponse(response)).toEqual(response);
|
|
62
|
+
for (const value of [null, -1, 0.5]) {
|
|
63
|
+
expect(() => protocol.parseSessionDigestResponse({ ...response, gradeFailedAttempts: value })).toThrow(v.ValiError);
|
|
64
|
+
}
|
|
65
|
+
expect(protocol.parseSessionGradeResponse({ ...pending, gradeFailedAttempts: 0 })).toEqual({ ...pending, gradeFailedAttempts: 0 });
|
|
66
|
+
expect(() => protocol.parseSessionDigestResponse({ ...response, untrusted: null })).toThrow(v.ValiError);
|
|
67
|
+
expect(() => protocol.parseSessionDigestResponse({
|
|
68
|
+
...response,
|
|
69
|
+
digest: { ...response.digest, dashboardUrl: null },
|
|
70
|
+
})).toThrow(v.ValiError);
|
|
71
|
+
const { endedAt: _, ...missingNullable } = run;
|
|
72
|
+
expect(() => protocol.parseSessionGradeResponse({ ...pending, run: missingNullable })).toThrow(v.ValiError);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=sessionContracts.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionContracts.test.js","sourceRoot":"","sources":["../src/sessionContracts.test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;A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AAC,CACtE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QACtB,MAAM,CAAC,GAAG,EAAE,CACV,QAAQ,CAAC,0BAA0B,CAAC;YAClC,GAAG,QAAQ;YACX,MAAM,EAAE,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE;SACnD,CAAC,CACH,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QACtB,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,eAAe,EAAE,GAAG,GAAG,CAAA;QAC9C,MAAM,CAAC,GAAG,EAAE,CACV,QAAQ,CAAC,yBAAyB,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CACzE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IACxB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/** Most turns one digest returns; `turnsTotal` says how many the session has. */
|
|
3
|
+
export declare const SESSION_DIGEST_MAX_TURNS = 50;
|
|
4
|
+
/** What the digest cannot carry yet, named so an absence is never read as "none". */
|
|
5
|
+
export declare const SESSION_DIGEST_UNAVAILABLE: readonly ["comments", "resumeCommand", "cloudUrl"];
|
|
6
|
+
export declare const SessionDigestUnavailableSchema: v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>;
|
|
7
|
+
export type SessionDigestUnavailable = v.InferOutput<typeof SessionDigestUnavailableSchema>;
|
|
8
|
+
export declare const SessionDigestTurnSchema: v.ObjectSchema<{
|
|
9
|
+
readonly ordinal: v.NumberSchema<undefined>;
|
|
10
|
+
/** What the user said, **wrapped in the response's untrusted markers** and bounded. */
|
|
11
|
+
readonly text: v.StringSchema<undefined>;
|
|
12
|
+
/** The steering classifier's label, or null when the turn was never classified. */
|
|
13
|
+
readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
export type SessionDigestTurn = v.InferOutput<typeof SessionDigestTurnSchema>;
|
|
16
|
+
export declare const SessionDigestSchema: v.ObjectSchema<{
|
|
17
|
+
/** The agent's own closing account of the session, wrapped and bounded; null when it gave none. */
|
|
18
|
+
readonly selfReport: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
19
|
+
/** The user's turns in order, at most `SESSION_DIGEST_MAX_TURNS`. */
|
|
20
|
+
readonly turns: v.ArraySchema<v.ObjectSchema<{
|
|
21
|
+
readonly ordinal: v.NumberSchema<undefined>;
|
|
22
|
+
/** What the user said, **wrapped in the response's untrusted markers** and bounded. */
|
|
23
|
+
readonly text: v.StringSchema<undefined>;
|
|
24
|
+
/** The steering classifier's label, or null when the turn was never classified. */
|
|
25
|
+
readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
26
|
+
}, undefined>, undefined>;
|
|
27
|
+
/** Every turn the session recorded, so a cut list is not read as the whole. */
|
|
28
|
+
readonly turnsTotal: v.NumberSchema<undefined>;
|
|
29
|
+
/** The repository's identity digest, or null when the session recorded none. */
|
|
30
|
+
readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
31
|
+
/** The branch observed at close, wrapped like any text taken from the repo; null when unrecorded. */
|
|
32
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
33
|
+
/** The head commit observed at close, or null. A commit made mid-session is not it. */
|
|
34
|
+
readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
35
|
+
/** The session's page on the dashboard, as a path; the client prefixes the dashboard address. */
|
|
36
|
+
readonly dashboardPath: v.StringSchema<undefined>;
|
|
37
|
+
/** Absolute dashboard link, added by the client that knows the address. */
|
|
38
|
+
readonly dashboardUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
39
|
+
/** Comments on this session, wrapped; empty until sessions can be commented on. */
|
|
40
|
+
readonly comments: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
41
|
+
/** The parts of a digest no session carries yet. */
|
|
42
|
+
readonly notYetAvailable: v.ArraySchema<v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>, undefined>;
|
|
43
|
+
}, undefined>;
|
|
44
|
+
export type SessionDigest = v.InferOutput<typeof SessionDigestSchema>;
|
|
45
|
+
export declare const SessionDigestResponseSchema: v.ObjectSchema<{
|
|
46
|
+
readonly run: v.ObjectSchema<{
|
|
47
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
48
|
+
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
49
|
+
readonly startedAt: v.StringSchema<undefined>;
|
|
50
|
+
readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
51
|
+
readonly status: v.PicklistSchema<["open", "closed"], undefined>;
|
|
52
|
+
}, undefined>;
|
|
53
|
+
readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired", "grading_off"], undefined>;
|
|
54
|
+
readonly gradeFailedAttempts: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
55
|
+
readonly grade: v.NullableSchema<v.ObjectSchema<{
|
|
56
|
+
readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
57
|
+
readonly gradedAt: v.StringSchema<undefined>;
|
|
58
|
+
readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
59
|
+
readonly superseded: v.BooleanSchema<undefined>;
|
|
60
|
+
readonly guides: v.ArraySchema<v.ObjectSchema<{
|
|
61
|
+
readonly guideId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
62
|
+
readonly title: v.StringSchema<undefined>;
|
|
63
|
+
readonly verdict: v.PicklistSchema<readonly ["aligned", "misaligned", "not_applicable"], undefined>;
|
|
64
|
+
readonly reasoning: v.StringSchema<undefined>;
|
|
65
|
+
}, undefined>, undefined>;
|
|
66
|
+
}, undefined>, undefined>;
|
|
67
|
+
readonly digest: v.ObjectSchema<{
|
|
68
|
+
/** The agent's own closing account of the session, wrapped and bounded; null when it gave none. */
|
|
69
|
+
readonly selfReport: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
70
|
+
/** The user's turns in order, at most `SESSION_DIGEST_MAX_TURNS`. */
|
|
71
|
+
readonly turns: v.ArraySchema<v.ObjectSchema<{
|
|
72
|
+
readonly ordinal: v.NumberSchema<undefined>;
|
|
73
|
+
/** What the user said, **wrapped in the response's untrusted markers** and bounded. */
|
|
74
|
+
readonly text: v.StringSchema<undefined>;
|
|
75
|
+
/** The steering classifier's label, or null when the turn was never classified. */
|
|
76
|
+
readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
77
|
+
}, undefined>, undefined>;
|
|
78
|
+
/** Every turn the session recorded, so a cut list is not read as the whole. */
|
|
79
|
+
readonly turnsTotal: v.NumberSchema<undefined>;
|
|
80
|
+
/** The repository's identity digest, or null when the session recorded none. */
|
|
81
|
+
readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
82
|
+
/** The branch observed at close, wrapped like any text taken from the repo; null when unrecorded. */
|
|
83
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
84
|
+
/** The head commit observed at close, or null. A commit made mid-session is not it. */
|
|
85
|
+
readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
86
|
+
/** The session's page on the dashboard, as a path; the client prefixes the dashboard address. */
|
|
87
|
+
readonly dashboardPath: v.StringSchema<undefined>;
|
|
88
|
+
/** Absolute dashboard link, added by the client that knows the address. */
|
|
89
|
+
readonly dashboardUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
90
|
+
/** Comments on this session, wrapped; empty until sessions can be commented on. */
|
|
91
|
+
readonly comments: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
92
|
+
/** The parts of a digest no session carries yet. */
|
|
93
|
+
readonly notYetAvailable: v.ArraySchema<v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>, undefined>;
|
|
94
|
+
}, undefined>;
|
|
95
|
+
/** One marker pair over every wrapped block in the response, present always. */
|
|
96
|
+
readonly untrusted: v.ObjectSchema<{
|
|
97
|
+
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
98
|
+
readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
99
|
+
readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
100
|
+
readonly note: v.StringSchema<undefined>;
|
|
101
|
+
}, undefined>;
|
|
102
|
+
}, undefined>;
|
|
103
|
+
export type SessionDigestResponse = v.InferOutput<typeof SessionDigestResponseSchema>;
|
|
104
|
+
export declare function parseSessionDigestResponse(data: unknown): {
|
|
105
|
+
run: {
|
|
106
|
+
id: string;
|
|
107
|
+
agentSessionId: string;
|
|
108
|
+
startedAt: string;
|
|
109
|
+
endedAt: string | null;
|
|
110
|
+
status: "open" | "closed";
|
|
111
|
+
};
|
|
112
|
+
state: "pending" | "expired" | "graded" | "nothing_to_grade" | "grading_off";
|
|
113
|
+
gradeFailedAttempts?: number | undefined;
|
|
114
|
+
grade: {
|
|
115
|
+
summary: string | null;
|
|
116
|
+
gradedAt: string;
|
|
117
|
+
model: string | null;
|
|
118
|
+
superseded: boolean;
|
|
119
|
+
guides: {
|
|
120
|
+
guideId: string;
|
|
121
|
+
title: string;
|
|
122
|
+
verdict: "aligned" | "misaligned" | "not_applicable";
|
|
123
|
+
reasoning: string;
|
|
124
|
+
}[];
|
|
125
|
+
} | null;
|
|
126
|
+
digest: {
|
|
127
|
+
selfReport: string | null;
|
|
128
|
+
turns: {
|
|
129
|
+
ordinal: number;
|
|
130
|
+
text: string;
|
|
131
|
+
steeringLabel: string | null;
|
|
132
|
+
}[];
|
|
133
|
+
turnsTotal: number;
|
|
134
|
+
repoId: string | null;
|
|
135
|
+
branch: string | null;
|
|
136
|
+
headSha: string | null;
|
|
137
|
+
dashboardPath: string;
|
|
138
|
+
dashboardUrl?: string | undefined;
|
|
139
|
+
comments: string[];
|
|
140
|
+
notYetAvailable: ("comments" | "resumeCommand" | "cloudUrl")[];
|
|
141
|
+
};
|
|
142
|
+
untrusted: {
|
|
143
|
+
token: string;
|
|
144
|
+
startMarker: string;
|
|
145
|
+
endMarker: string;
|
|
146
|
+
note: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=sessionDigest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionDigest.d.ts","sourceRoot":"","sources":["../src/sessionDigest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAc5B,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,KAAK,CAAA;AAE1C,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,oDAI7B,CAAA;AAEV,eAAO,MAAM,8BAA8B,iFAAyC,CAAA;AAEpF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED,eAAO,MAAM,uBAAuB;;IAElC,uFAAuF;;IAEvF,mFAAmF;;aAEnF,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,eAAO,MAAM,mBAAmB;IAC9B,mGAAmG;;IAEnG,qEAAqE;;;QAXrE,uFAAuF;;QAEvF,mFAAmF;;;IAWnF,+EAA+E;;IAE/E,gFAAgF;;IAEhF,qGAAqG;;IAErG,uFAAuF;;IAEvF,iGAAiG;;IAEjG,2EAA2E;;IAE3E,mFAAmF;;IAEnF,oDAAoD;;aAEpD,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;QAxBtC,mGAAmG;;QAEnG,qEAAqE;;;YAXrE,uFAAuF;;YAEvF,mFAAmF;;;QAWnF,+EAA+E;;QAE/E,gFAAgF;;QAEhF,qGAAqG;;QAErG,uFAAuF;;QAEvF,iGAAiG;;QAEjG,2EAA2E;;QAE3E,mFAAmF;;QAEnF,oDAAoD;;;IAYpD,gFAAgF;;;;;;;aAEhF,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEvD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { GradedSessionSchema, SessionGradeStateSchema, GradeFailedAttemptsSchema, SessionGradeSchema, } from './sessionGrade.js';
|
|
3
|
+
import { GuideHistoryUntrustedSchema } from './wirePrimitives.js';
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Session digest — `GET /api/v1/runs/grade?detail=digest`
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
/** Most turns one digest returns; `turnsTotal` says how many the session has. */
|
|
8
|
+
export const SESSION_DIGEST_MAX_TURNS = 50;
|
|
9
|
+
/** What the digest cannot carry yet, named so an absence is never read as "none". */
|
|
10
|
+
export const SESSION_DIGEST_UNAVAILABLE = [
|
|
11
|
+
'comments',
|
|
12
|
+
'resumeCommand',
|
|
13
|
+
'cloudUrl',
|
|
14
|
+
];
|
|
15
|
+
export const SessionDigestUnavailableSchema = v.picklist(SESSION_DIGEST_UNAVAILABLE);
|
|
16
|
+
export const SessionDigestTurnSchema = v.object({
|
|
17
|
+
ordinal: v.number(),
|
|
18
|
+
/** What the user said, **wrapped in the response's untrusted markers** and bounded. */
|
|
19
|
+
text: v.string(),
|
|
20
|
+
/** The steering classifier's label, or null when the turn was never classified. */
|
|
21
|
+
steeringLabel: v.nullable(v.string()),
|
|
22
|
+
});
|
|
23
|
+
export const SessionDigestSchema = v.object({
|
|
24
|
+
/** The agent's own closing account of the session, wrapped and bounded; null when it gave none. */
|
|
25
|
+
selfReport: v.nullable(v.string()),
|
|
26
|
+
/** The user's turns in order, at most `SESSION_DIGEST_MAX_TURNS`. */
|
|
27
|
+
turns: v.array(SessionDigestTurnSchema),
|
|
28
|
+
/** Every turn the session recorded, so a cut list is not read as the whole. */
|
|
29
|
+
turnsTotal: v.number(),
|
|
30
|
+
/** The repository's identity digest, or null when the session recorded none. */
|
|
31
|
+
repoId: v.nullable(v.string()),
|
|
32
|
+
/** The branch observed at close, wrapped like any text taken from the repo; null when unrecorded. */
|
|
33
|
+
branch: v.nullable(v.string()),
|
|
34
|
+
/** The head commit observed at close, or null. A commit made mid-session is not it. */
|
|
35
|
+
headSha: v.nullable(v.string()),
|
|
36
|
+
/** The session's page on the dashboard, as a path; the client prefixes the dashboard address. */
|
|
37
|
+
dashboardPath: v.string(),
|
|
38
|
+
/** Absolute dashboard link, added by the client that knows the address. */
|
|
39
|
+
dashboardUrl: v.optional(v.string()),
|
|
40
|
+
/** Comments on this session, wrapped; empty until sessions can be commented on. */
|
|
41
|
+
comments: v.array(v.string()),
|
|
42
|
+
/** The parts of a digest no session carries yet. */
|
|
43
|
+
notYetAvailable: v.array(SessionDigestUnavailableSchema),
|
|
44
|
+
});
|
|
45
|
+
export const SessionDigestResponseSchema = v.object({
|
|
46
|
+
run: GradedSessionSchema,
|
|
47
|
+
state: SessionGradeStateSchema,
|
|
48
|
+
gradeFailedAttempts: GradeFailedAttemptsSchema,
|
|
49
|
+
grade: v.nullable(SessionGradeSchema),
|
|
50
|
+
digest: SessionDigestSchema,
|
|
51
|
+
/** One marker pair over every wrapped block in the response, present always. */
|
|
52
|
+
untrusted: GuideHistoryUntrustedSchema,
|
|
53
|
+
});
|
|
54
|
+
export function parseSessionDigestResponse(data) {
|
|
55
|
+
return v.parse(SessionDigestResponseSchema, data);
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=sessionDigest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionDigest.js","sourceRoot":"","sources":["../src/sessionDigest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AAEjE,8EAA8E;AAC9E,0DAA0D;AAC1D,8EAA8E;AAE9E,iFAAiF;AACjF,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAE1C,qFAAqF;AACrF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,UAAU;IACV,eAAe;IACf,UAAU;CACF,CAAA;AAEV,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAA;AAMpF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,uFAAuF;IACvF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,mFAAmF;IACnF,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACtC,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAA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,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const SessionGradeRequestSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3
|
+
readonly session: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>, v.CheckAction<string, "identifier must not contain control characters">]>, undefined>;
|
|
4
|
+
readonly agent_session: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>, v.CheckAction<string, "identifier must not contain control characters">]>, undefined>;
|
|
5
|
+
/**
|
|
6
|
+
* Opt in to the session digest: the grade plus the turns, self-report and
|
|
7
|
+
* git position of the session. Omitted, the small grade payload is
|
|
8
|
+
* returned unchanged.
|
|
9
|
+
*/
|
|
10
|
+
readonly detail: v.OptionalSchema<v.LiteralSchema<"digest", undefined>, undefined>;
|
|
11
|
+
}, undefined>, v.CheckAction<{
|
|
12
|
+
session?: string | undefined;
|
|
13
|
+
agent_session?: string | undefined;
|
|
14
|
+
detail?: "digest" | undefined;
|
|
15
|
+
}, "Pass exactly one of session or agent_session">]>;
|
|
16
|
+
export type SessionGradeRequest = v.InferOutput<typeof SessionGradeRequestSchema>;
|
|
17
|
+
/**
|
|
18
|
+
* Which of four states the run's grade is in — a required field rather than
|
|
19
|
+
* something a reader infers from a null `grade`.
|
|
20
|
+
*
|
|
21
|
+
* These states need different sentences, and the absence of a grade is never
|
|
22
|
+
* one of them on its own:
|
|
23
|
+
*
|
|
24
|
+
* - `pending` — no grade yet, and the grading sweep can still pick the run
|
|
25
|
+
* up (it is open, or closed inside the grading window). "Not graded yet"
|
|
26
|
+
* is honest here and only here — unless `gradeFailedAttempts` is above
|
|
27
|
+
* zero, when grading has been tried and has not finished.
|
|
28
|
+
* - `graded` — a grader judged it; `grade` carries what it said.
|
|
29
|
+
* - `nothing_to_grade` — a grader ran and found nothing to judge: no
|
|
30
|
+
* gradeable actions, or no guides in the agent's context. The record
|
|
31
|
+
* cannot tell those two apart, so neither can the sentence.
|
|
32
|
+
* - `expired` — no grade, and the run closed too long ago for the sweep to
|
|
33
|
+
* select it. It will never be graded, and telling a reader to wait would
|
|
34
|
+
* promise work the system does not do.
|
|
35
|
+
* - `grading_off` — only usage was synced; no behavioral grade is requested.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SessionGradeStateSchema: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired", "grading_off"], undefined>;
|
|
38
|
+
export type SessionGradeState = v.InferOutput<typeof SessionGradeStateSchema>;
|
|
39
|
+
/** One guide's verdict for the run, with the grader's reasoning wrapped. */
|
|
40
|
+
export declare const SessionGradeGuideSchema: v.ObjectSchema<{
|
|
41
|
+
readonly guideId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
42
|
+
readonly title: v.StringSchema<undefined>;
|
|
43
|
+
readonly verdict: v.PicklistSchema<readonly ["aligned", "misaligned", "not_applicable"], undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* The grader's reasoning, **already wrapped in the response's untrusted
|
|
46
|
+
* markers** — model-authored text derived from a transcript, delimited at the
|
|
47
|
+
* source so a consumer cannot skip the markers. Empty between the markers
|
|
48
|
+
* when the row recorded none.
|
|
49
|
+
*/
|
|
50
|
+
readonly reasoning: v.StringSchema<undefined>;
|
|
51
|
+
}, undefined>;
|
|
52
|
+
export type SessionGradeGuide = v.InferOutput<typeof SessionGradeGuideSchema>;
|
|
53
|
+
export declare const SessionGradeSchema: v.ObjectSchema<{
|
|
54
|
+
/** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
|
|
55
|
+
readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
56
|
+
/** ISO timestamp, machine format — display formatting is the reader's job. */
|
|
57
|
+
readonly gradedAt: v.StringSchema<undefined>;
|
|
58
|
+
/** The model that produced the judgment, or null when the record does not say. */
|
|
59
|
+
readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* True when the run grew after this grade was written — a later sync
|
|
62
|
+
* attached more actions — so the judgment describes a smaller run than the
|
|
63
|
+
* one on record. A superseded grade is real and is still reported; it is
|
|
64
|
+
* labelled rather than hidden.
|
|
65
|
+
*/
|
|
66
|
+
readonly superseded: v.BooleanSchema<undefined>;
|
|
67
|
+
readonly guides: v.ArraySchema<v.ObjectSchema<{
|
|
68
|
+
readonly guideId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
69
|
+
readonly title: v.StringSchema<undefined>;
|
|
70
|
+
readonly verdict: v.PicklistSchema<readonly ["aligned", "misaligned", "not_applicable"], undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* The grader's reasoning, **already wrapped in the response's untrusted
|
|
73
|
+
* markers** — model-authored text derived from a transcript, delimited at the
|
|
74
|
+
* source so a consumer cannot skip the markers. Empty between the markers
|
|
75
|
+
* when the row recorded none.
|
|
76
|
+
*/
|
|
77
|
+
readonly reasoning: v.StringSchema<undefined>;
|
|
78
|
+
}, undefined>, undefined>;
|
|
79
|
+
}, undefined>;
|
|
80
|
+
export type SessionGrade = v.InferOutput<typeof SessionGradeSchema>;
|
|
81
|
+
export declare const GradedSessionSchema: v.ObjectSchema<{
|
|
82
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
83
|
+
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
84
|
+
readonly startedAt: v.StringSchema<undefined>;
|
|
85
|
+
readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
86
|
+
readonly status: v.PicklistSchema<["open", "closed"], undefined>;
|
|
87
|
+
}, undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Grading passes on the run's current content that ended without a grade:
|
|
90
|
+
* a provider error, quota spent, a response that did not parse. It sits
|
|
91
|
+
* beside `state` rather than adding one, because the sweep keeps retrying
|
|
92
|
+
* such a run, so it is still `pending` (or `expired` once the window closes),
|
|
93
|
+
* and a new `state` value would fail every installed client's parse. Above
|
|
94
|
+
* zero beside `pending`, "not graded yet" is no longer the whole answer:
|
|
95
|
+
* grading was tried, did not finish, and is still being retried. Beside a
|
|
96
|
+
* superseded `graded`, it counts failed re-grades of the newer content.
|
|
97
|
+
* Absent from a server that predates it, which means "not reported", never 0.
|
|
98
|
+
*/
|
|
99
|
+
export declare const GradeFailedAttemptsSchema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
100
|
+
export declare const SessionGradeResponseSchema: v.ObjectSchema<{
|
|
101
|
+
readonly run: v.ObjectSchema<{
|
|
102
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
103
|
+
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
104
|
+
readonly startedAt: v.StringSchema<undefined>;
|
|
105
|
+
readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
106
|
+
readonly status: v.PicklistSchema<["open", "closed"], undefined>;
|
|
107
|
+
}, undefined>;
|
|
108
|
+
readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired", "grading_off"], undefined>;
|
|
109
|
+
readonly gradeFailedAttempts: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
110
|
+
/** Present exactly when `state` is `graded`. */
|
|
111
|
+
readonly grade: v.NullableSchema<v.ObjectSchema<{
|
|
112
|
+
/** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
|
|
113
|
+
readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
114
|
+
/** ISO timestamp, machine format — display formatting is the reader's job. */
|
|
115
|
+
readonly gradedAt: v.StringSchema<undefined>;
|
|
116
|
+
/** The model that produced the judgment, or null when the record does not say. */
|
|
117
|
+
readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
118
|
+
/**
|
|
119
|
+
* True when the run grew after this grade was written — a later sync
|
|
120
|
+
* attached more actions — so the judgment describes a smaller run than the
|
|
121
|
+
* one on record. A superseded grade is real and is still reported; it is
|
|
122
|
+
* labelled rather than hidden.
|
|
123
|
+
*/
|
|
124
|
+
readonly superseded: v.BooleanSchema<undefined>;
|
|
125
|
+
readonly guides: v.ArraySchema<v.ObjectSchema<{
|
|
126
|
+
readonly guideId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
127
|
+
readonly title: v.StringSchema<undefined>;
|
|
128
|
+
readonly verdict: v.PicklistSchema<readonly ["aligned", "misaligned", "not_applicable"], undefined>;
|
|
129
|
+
/**
|
|
130
|
+
* The grader's reasoning, **already wrapped in the response's untrusted
|
|
131
|
+
* markers** — model-authored text derived from a transcript, delimited at the
|
|
132
|
+
* source so a consumer cannot skip the markers. Empty between the markers
|
|
133
|
+
* when the row recorded none.
|
|
134
|
+
*/
|
|
135
|
+
readonly reasoning: v.StringSchema<undefined>;
|
|
136
|
+
}, undefined>, undefined>;
|
|
137
|
+
}, undefined>, undefined>;
|
|
138
|
+
/**
|
|
139
|
+
* The markers every `summary` and `reasoning` in this response is wrapped in.
|
|
140
|
+
* Present exactly when `grade` is — there is nothing to delimit otherwise.
|
|
141
|
+
*/
|
|
142
|
+
readonly untrusted: v.NullableSchema<v.ObjectSchema<{
|
|
143
|
+
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
144
|
+
readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
145
|
+
readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
146
|
+
readonly note: v.StringSchema<undefined>;
|
|
147
|
+
}, undefined>, undefined>;
|
|
148
|
+
}, undefined>;
|
|
149
|
+
export type SessionGradeResponse = v.InferOutput<typeof SessionGradeResponseSchema>;
|
|
150
|
+
export declare function parseRunGradeRequest(data: unknown): {
|
|
151
|
+
session?: string | undefined;
|
|
152
|
+
agent_session?: string | undefined;
|
|
153
|
+
detail?: "digest" | undefined;
|
|
154
|
+
};
|
|
155
|
+
export declare function parseSessionGradeResponse(data: unknown): {
|
|
156
|
+
run: {
|
|
157
|
+
id: string;
|
|
158
|
+
agentSessionId: string;
|
|
159
|
+
startedAt: string;
|
|
160
|
+
endedAt: string | null;
|
|
161
|
+
status: "open" | "closed";
|
|
162
|
+
};
|
|
163
|
+
state: "pending" | "expired" | "graded" | "nothing_to_grade" | "grading_off";
|
|
164
|
+
gradeFailedAttempts?: number | undefined;
|
|
165
|
+
grade: {
|
|
166
|
+
summary: string | null;
|
|
167
|
+
gradedAt: string;
|
|
168
|
+
model: string | null;
|
|
169
|
+
superseded: boolean;
|
|
170
|
+
guides: {
|
|
171
|
+
guideId: string;
|
|
172
|
+
title: string;
|
|
173
|
+
verdict: "aligned" | "misaligned" | "not_applicable";
|
|
174
|
+
reasoning: string;
|
|
175
|
+
}[];
|
|
176
|
+
} | null;
|
|
177
|
+
untrusted: {
|
|
178
|
+
token: string;
|
|
179
|
+
startMarker: string;
|
|
180
|
+
endMarker: string;
|
|
181
|
+
note: string;
|
|
182
|
+
} | null;
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=sessionGrade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session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BAAyB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtD"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { NonEmptyStringSchema, GuideHistoryUntrustedSchema, SessionGuideVerdictValueSchema, } from './wirePrimitives.js';
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Run grade — one run's verdict, for the terminal (`GET /api/v1/runs/grade`)
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* One session's grade, read by the MCP `session_digest` tool.
|
|
8
|
+
*
|
|
9
|
+
* The loop this closes: a session ends with "synced N item(s) to the
|
|
10
|
+
* dashboard." and the verdict exists only in the dashboard. This is the read
|
|
11
|
+
* that brings it back to the terminal the work happened in.
|
|
12
|
+
*
|
|
13
|
+
* **Evidence out, never instructions out** — the same contract as the guide
|
|
14
|
+
* history read above. It returns data and never a directive; nothing on the
|
|
15
|
+
* server writes as a result of it.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* How the caller names the run. Exactly one of the two.
|
|
19
|
+
*
|
|
20
|
+
* The CLI only ever knows an *agent session* id — the `SessionEnd` hook
|
|
21
|
+
* payload's `session_id`, which `mossbear complete` reports — so
|
|
22
|
+
* the `agent_session` form is the one it uses. The session id is for a caller
|
|
23
|
+
* that already has one, from a dashboard URL say. Both are opaque and both
|
|
24
|
+
* reach a SQL predicate, so they are bounded and shape-checked here.
|
|
25
|
+
*/
|
|
26
|
+
const SessionGradeIdentifierSchema = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(256), v.check((value) => !/[\u0000-\u001f\u007f]/.test(value), 'identifier must not contain control characters'));
|
|
27
|
+
export const SessionGradeRequestSchema = v.pipe(v.object({
|
|
28
|
+
session: v.optional(SessionGradeIdentifierSchema),
|
|
29
|
+
agent_session: v.optional(SessionGradeIdentifierSchema),
|
|
30
|
+
/**
|
|
31
|
+
* Opt in to the session digest: the grade plus the turns, self-report and
|
|
32
|
+
* git position of the session. Omitted, the small grade payload is
|
|
33
|
+
* returned unchanged.
|
|
34
|
+
*/
|
|
35
|
+
detail: v.optional(v.literal('digest')),
|
|
36
|
+
}), v.check((request) => (request.session !== undefined) !== (request.agent_session !== undefined), 'Pass exactly one of session or agent_session'));
|
|
37
|
+
/**
|
|
38
|
+
* Which of four states the run's grade is in — a required field rather than
|
|
39
|
+
* something a reader infers from a null `grade`.
|
|
40
|
+
*
|
|
41
|
+
* These states need different sentences, and the absence of a grade is never
|
|
42
|
+
* one of them on its own:
|
|
43
|
+
*
|
|
44
|
+
* - `pending` — no grade yet, and the grading sweep can still pick the run
|
|
45
|
+
* up (it is open, or closed inside the grading window). "Not graded yet"
|
|
46
|
+
* is honest here and only here — unless `gradeFailedAttempts` is above
|
|
47
|
+
* zero, when grading has been tried and has not finished.
|
|
48
|
+
* - `graded` — a grader judged it; `grade` carries what it said.
|
|
49
|
+
* - `nothing_to_grade` — a grader ran and found nothing to judge: no
|
|
50
|
+
* gradeable actions, or no guides in the agent's context. The record
|
|
51
|
+
* cannot tell those two apart, so neither can the sentence.
|
|
52
|
+
* - `expired` — no grade, and the run closed too long ago for the sweep to
|
|
53
|
+
* select it. It will never be graded, and telling a reader to wait would
|
|
54
|
+
* promise work the system does not do.
|
|
55
|
+
* - `grading_off` — only usage was synced; no behavioral grade is requested.
|
|
56
|
+
*/
|
|
57
|
+
export const SessionGradeStateSchema = v.picklist([
|
|
58
|
+
'pending',
|
|
59
|
+
'graded',
|
|
60
|
+
'nothing_to_grade',
|
|
61
|
+
'expired',
|
|
62
|
+
'grading_off',
|
|
63
|
+
]);
|
|
64
|
+
/** One guide's verdict for the run, with the grader's reasoning wrapped. */
|
|
65
|
+
export const SessionGradeGuideSchema = v.object({
|
|
66
|
+
guideId: NonEmptyStringSchema,
|
|
67
|
+
title: v.string(),
|
|
68
|
+
verdict: SessionGuideVerdictValueSchema,
|
|
69
|
+
/**
|
|
70
|
+
* The grader's reasoning, **already wrapped in the response's untrusted
|
|
71
|
+
* markers** — model-authored text derived from a transcript, delimited at the
|
|
72
|
+
* source so a consumer cannot skip the markers. Empty between the markers
|
|
73
|
+
* when the row recorded none.
|
|
74
|
+
*/
|
|
75
|
+
reasoning: v.string(),
|
|
76
|
+
});
|
|
77
|
+
export const SessionGradeSchema = v.object({
|
|
78
|
+
/** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
|
|
79
|
+
summary: v.nullable(v.string()),
|
|
80
|
+
/** ISO timestamp, machine format — display formatting is the reader's job. */
|
|
81
|
+
gradedAt: v.string(),
|
|
82
|
+
/** The model that produced the judgment, or null when the record does not say. */
|
|
83
|
+
model: v.nullable(v.string()),
|
|
84
|
+
/**
|
|
85
|
+
* True when the run grew after this grade was written — a later sync
|
|
86
|
+
* attached more actions — so the judgment describes a smaller run than the
|
|
87
|
+
* one on record. A superseded grade is real and is still reported; it is
|
|
88
|
+
* labelled rather than hidden.
|
|
89
|
+
*/
|
|
90
|
+
superseded: v.boolean(),
|
|
91
|
+
guides: v.array(SessionGradeGuideSchema),
|
|
92
|
+
});
|
|
93
|
+
export const GradedSessionSchema = v.object({
|
|
94
|
+
id: NonEmptyStringSchema,
|
|
95
|
+
agentSessionId: NonEmptyStringSchema,
|
|
96
|
+
startedAt: v.string(),
|
|
97
|
+
endedAt: v.nullable(v.string()),
|
|
98
|
+
status: v.picklist(['open', 'closed']),
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Grading passes on the run's current content that ended without a grade:
|
|
102
|
+
* a provider error, quota spent, a response that did not parse. It sits
|
|
103
|
+
* beside `state` rather than adding one, because the sweep keeps retrying
|
|
104
|
+
* such a run, so it is still `pending` (or `expired` once the window closes),
|
|
105
|
+
* and a new `state` value would fail every installed client's parse. Above
|
|
106
|
+
* zero beside `pending`, "not graded yet" is no longer the whole answer:
|
|
107
|
+
* grading was tried, did not finish, and is still being retried. Beside a
|
|
108
|
+
* superseded `graded`, it counts failed re-grades of the newer content.
|
|
109
|
+
* Absent from a server that predates it, which means "not reported", never 0.
|
|
110
|
+
*/
|
|
111
|
+
export const GradeFailedAttemptsSchema = v.optional(v.pipe(v.number(), v.integer(), v.minValue(0)));
|
|
112
|
+
export const SessionGradeResponseSchema = v.object({
|
|
113
|
+
run: GradedSessionSchema,
|
|
114
|
+
state: SessionGradeStateSchema,
|
|
115
|
+
gradeFailedAttempts: GradeFailedAttemptsSchema,
|
|
116
|
+
/** Present exactly when `state` is `graded`. */
|
|
117
|
+
grade: v.nullable(SessionGradeSchema),
|
|
118
|
+
/**
|
|
119
|
+
* The markers every `summary` and `reasoning` in this response is wrapped in.
|
|
120
|
+
* Present exactly when `grade` is — there is nothing to delimit otherwise.
|
|
121
|
+
*/
|
|
122
|
+
untrusted: v.nullable(GuideHistoryUntrustedSchema),
|
|
123
|
+
});
|
|
124
|
+
export function parseRunGradeRequest(data) {
|
|
125
|
+
return v.parse(SessionGradeRequestSchema, data);
|
|
126
|
+
}
|
|
127
|
+
export function parseSessionGradeResponse(data) {
|
|
128
|
+
return v.parse(SessionGradeResponseSchema, data);
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=sessionGrade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionGrade.js","sourceRoot":"","sources":["../src/sessionGrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,qBAAqB,CAAA;AAE5B,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAE9E;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AACH,MAAM,4BAA4B,GAAG,CAAC,CAAC,IAAI,CACzC,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,IAAI,EAAE,EACR,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACd,CAAC,CA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