@mossbear/protocol 0.1.0-alpha.73 → 0.1.0-alpha.74
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/schemas.d.ts +1002 -125
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +344 -64
- package/dist/schemas.js.map +1 -1
- package/dist/schemas.test.js +5 -31
- package/dist/schemas.test.js.map +1 -1
- package/dist/types.d.ts +1 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/whatSyncs.d.ts.map +1 -1
- package/dist/whatSyncs.js +0 -4
- package/dist/whatSyncs.js.map +1 -1
- package/dist/whatSyncs.test.js +1 -4
- package/dist/whatSyncs.test.js.map +1 -1
- package/package.json +1 -1
package/dist/schemas.d.ts
CHANGED
|
@@ -1035,6 +1035,28 @@ export type GuideHistoryUntrusted = v.InferOutput<typeof GuideHistoryUntrustedSc
|
|
|
1035
1035
|
* never the thing that silently drops a comment a person left.
|
|
1036
1036
|
*/
|
|
1037
1037
|
export declare const MAX_ITEM_COMMENTS_ON_WIRE = 20;
|
|
1038
|
+
/** What a finding rests on: graded sessions, how loads read a skill, or the rubric alone. */
|
|
1039
|
+
export declare const FindingTierSchema: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
1040
|
+
export type FindingTier = v.InferOutput<typeof FindingTierSchema>;
|
|
1041
|
+
/**
|
|
1042
|
+
* What a Mossbear finding carries on the comment read, besides its claim.
|
|
1043
|
+
*
|
|
1044
|
+
* `tierLine` and `blindSpot` are written by the server from data it holds —
|
|
1045
|
+
* the cited sessions, the load counts, the rubric check — never by a model, so
|
|
1046
|
+
* they sit outside the response's untrusted markers. `prediction` is
|
|
1047
|
+
* model-authored and arrives inside them. A finding never carries replacement
|
|
1048
|
+
* text: the reader's agent has the repository and writes the fix.
|
|
1049
|
+
*/
|
|
1050
|
+
export declare const ContextItemFindingSchema: v.ObjectSchema<{
|
|
1051
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
1052
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
1053
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1054
|
+
/** What the drafter did not read, fixed per tier. */
|
|
1055
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1056
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
1057
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1058
|
+
}, undefined>;
|
|
1059
|
+
export type ContextItemFinding = v.InferOutput<typeof ContextItemFindingSchema>;
|
|
1038
1060
|
/**
|
|
1039
1061
|
* One comment a **person** left about a context item, riding the item it is about.
|
|
1040
1062
|
*
|
|
@@ -1070,10 +1092,19 @@ export declare const ContextItemCommentSchema: v.ObjectSchema<{
|
|
|
1070
1092
|
*/
|
|
1071
1093
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1072
1094
|
/**
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1095
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
1096
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
1097
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
1075
1098
|
*/
|
|
1076
|
-
readonly
|
|
1099
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
1100
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
1101
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
1102
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1103
|
+
/** What the drafter did not read, fixed per tier. */
|
|
1104
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1105
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
1106
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1107
|
+
}, undefined>, undefined>;
|
|
1077
1108
|
/**
|
|
1078
1109
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
1079
1110
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -1267,10 +1298,19 @@ export declare const ContextItemSchema: v.ObjectSchema<{
|
|
|
1267
1298
|
*/
|
|
1268
1299
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1269
1300
|
/**
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1301
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
1302
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
1303
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
1272
1304
|
*/
|
|
1273
|
-
readonly
|
|
1305
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
1306
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
1307
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
1308
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1309
|
+
/** What the drafter did not read, fixed per tier. */
|
|
1310
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1311
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
1312
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1313
|
+
}, undefined>, undefined>;
|
|
1274
1314
|
/**
|
|
1275
1315
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
1276
1316
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -1332,7 +1372,12 @@ export declare const ContextItemSchema: v.ObjectSchema<{
|
|
|
1332
1372
|
} | undefined;
|
|
1333
1373
|
body: string;
|
|
1334
1374
|
suggestion?: string | undefined;
|
|
1335
|
-
|
|
1375
|
+
finding?: {
|
|
1376
|
+
tier: "observed" | "usage" | "practice";
|
|
1377
|
+
tierLine: string;
|
|
1378
|
+
blindSpot: string;
|
|
1379
|
+
prediction: string | null;
|
|
1380
|
+
} | undefined;
|
|
1336
1381
|
approved?: boolean | undefined;
|
|
1337
1382
|
authorName: string | null;
|
|
1338
1383
|
createdAt: string;
|
|
@@ -1509,10 +1554,19 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
|
|
|
1509
1554
|
*/
|
|
1510
1555
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1511
1556
|
/**
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1557
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
1558
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
1559
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
1514
1560
|
*/
|
|
1515
|
-
readonly
|
|
1561
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
1562
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
1563
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
1564
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1565
|
+
/** What the drafter did not read, fixed per tier. */
|
|
1566
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1567
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
1568
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1569
|
+
}, undefined>, undefined>;
|
|
1516
1570
|
/**
|
|
1517
1571
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
1518
1572
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -1574,7 +1628,12 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
|
|
|
1574
1628
|
} | undefined;
|
|
1575
1629
|
body: string;
|
|
1576
1630
|
suggestion?: string | undefined;
|
|
1577
|
-
|
|
1631
|
+
finding?: {
|
|
1632
|
+
tier: "observed" | "usage" | "practice";
|
|
1633
|
+
tierLine: string;
|
|
1634
|
+
blindSpot: string;
|
|
1635
|
+
prediction: string | null;
|
|
1636
|
+
} | undefined;
|
|
1578
1637
|
approved?: boolean | undefined;
|
|
1579
1638
|
authorName: string | null;
|
|
1580
1639
|
createdAt: string;
|
|
@@ -1776,10 +1835,19 @@ export declare const ItemCommentWithSubjectSchema: v.ObjectSchema<{
|
|
|
1776
1835
|
*/
|
|
1777
1836
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1778
1837
|
/**
|
|
1779
|
-
*
|
|
1780
|
-
*
|
|
1838
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
1839
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
1840
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
1781
1841
|
*/
|
|
1782
|
-
readonly
|
|
1842
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
1843
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
1844
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
1845
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1846
|
+
/** What the drafter did not read, fixed per tier. */
|
|
1847
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1848
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
1849
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1850
|
+
}, undefined>, undefined>;
|
|
1783
1851
|
/**
|
|
1784
1852
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
1785
1853
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -1869,10 +1937,19 @@ export declare const ItemCommentsResponseSchema: v.ObjectSchema<{
|
|
|
1869
1937
|
*/
|
|
1870
1938
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1871
1939
|
/**
|
|
1872
|
-
*
|
|
1873
|
-
*
|
|
1940
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
1941
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
1942
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
1874
1943
|
*/
|
|
1875
|
-
readonly
|
|
1944
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
1945
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
1946
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
1947
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1948
|
+
/** What the drafter did not read, fixed per tier. */
|
|
1949
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
1950
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
1951
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1952
|
+
}, undefined>, undefined>;
|
|
1876
1953
|
/**
|
|
1877
1954
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
1878
1955
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -1936,32 +2013,31 @@ export declare const ItemCommentsResponseSchema: v.ObjectSchema<{
|
|
|
1936
2013
|
}, undefined>;
|
|
1937
2014
|
export type ItemCommentsResponse = v.InferOutput<typeof ItemCommentsResponseSchema>;
|
|
1938
2015
|
/**
|
|
1939
|
-
* The evidence behind one Mossbear
|
|
1940
|
-
* (`GET /api/v1/context/comments/evidence
|
|
2016
|
+
* The evidence behind one Mossbear finding an agent was handed
|
|
2017
|
+
* (`GET /api/v1/context/comments/evidence`).
|
|
1941
2018
|
*
|
|
1942
|
-
* `list_comments` carries a one-line
|
|
1943
|
-
*
|
|
1944
|
-
*
|
|
1945
|
-
* deliver to this reader, so another
|
|
1946
|
-
* repo, or a draft listed only to a
|
|
1947
|
-
*
|
|
1948
|
-
* before the person approves it.
|
|
2019
|
+
* `list_comments` carries the claim and a one-line tier; this is the finding
|
|
2020
|
+
* in full: the claim, the change it predicts in future sessions, what the
|
|
2021
|
+
* drafter did not read, and the evidence for its tier. Readable only through a
|
|
2022
|
+
* comment the comment read itself would deliver to this reader, so another
|
|
2023
|
+
* person's finding, one drafted from another repo, or a draft listed only to a
|
|
2024
|
+
* newer client has no evidence here either. A draft the reader was listed
|
|
2025
|
+
* does: an agent can say why it was raised before the person approves it.
|
|
1949
2026
|
*
|
|
1950
|
-
* Citations are reduced to what the reader may
|
|
1951
|
-
* date and a short excerpt of the grader's
|
|
1952
|
-
* correction turn. A `navigation` citation
|
|
1953
|
-
*
|
|
1954
|
-
*
|
|
1955
|
-
*
|
|
1956
|
-
* list is never mistaken for the whole of it.
|
|
2027
|
+
* Citations (observed and usage findings) are reduced to what the reader may
|
|
2028
|
+
* see: their own sessions, with a date and a short excerpt of the grader's
|
|
2029
|
+
* reasoning or of their own redacted correction turn. A `navigation` citation
|
|
2030
|
+
* has an empty excerpt: it is dated evidence that a session loaded the skill,
|
|
2031
|
+
* and nothing more. `citationsWithheld` counts any that were dropped, so a
|
|
2032
|
+
* short list is never mistaken for the whole of it.
|
|
1957
2033
|
*/
|
|
1958
2034
|
export declare const CommentEvidenceCitationSchema: v.ObjectSchema<{
|
|
1959
2035
|
/**
|
|
1960
|
-
* `navigation` is a skill load
|
|
1961
|
-
*
|
|
1962
|
-
*
|
|
1963
|
-
* sessions
|
|
1964
|
-
*
|
|
2036
|
+
* `navigation` is a skill load counted when a finding was drafted from how
|
|
2037
|
+
* the skill's files were read: evidence of how a skill was used, not of a
|
|
2038
|
+
* failure. `action` is a recorded step of a workflow repeated across
|
|
2039
|
+
* sessions. A server sends it only to a client that names a version new
|
|
2040
|
+
* enough to parse it.
|
|
1965
2041
|
*/
|
|
1966
2042
|
readonly kind: v.PicklistSchema<["verdict", "turn", "navigation", "action"], undefined>;
|
|
1967
2043
|
readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -1971,22 +2047,95 @@ export declare const CommentEvidenceCitationSchema: v.ObjectSchema<{
|
|
|
1971
2047
|
readonly excerpt: v.StringSchema<undefined>;
|
|
1972
2048
|
}, undefined>;
|
|
1973
2049
|
export type CommentEvidenceCitation = v.InferOutput<typeof CommentEvidenceCitationSchema>;
|
|
2050
|
+
/** What a usage finding adds to its citations: the counts for one reference file. */
|
|
2051
|
+
export declare const CommentEvidenceUsageSchema: v.ObjectSchema<{
|
|
2052
|
+
/** The reference's skill-relative path, wrapped in the response's untrusted markers. */
|
|
2053
|
+
readonly path: v.StringSchema<undefined>;
|
|
2054
|
+
/** Eligible loads of the skill. */
|
|
2055
|
+
readonly loads: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2056
|
+
/** Distinct sessions those loads span. */
|
|
2057
|
+
readonly sessions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2058
|
+
/** Loads followed by a successful read of the reference. */
|
|
2059
|
+
readonly loadsWithRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2060
|
+
}, undefined>;
|
|
2061
|
+
/**
|
|
2062
|
+
* What a practice finding adds: the rubric check it answers and the rubric's
|
|
2063
|
+
* version, the practice lines it weighs with their sources, the facts measured
|
|
2064
|
+
* from the file, and the answer to each item of evidence the check asks for.
|
|
2065
|
+
* `answers[].answer` is model-written, so it travels wrapped in the response's
|
|
2066
|
+
* untrusted markers.
|
|
2067
|
+
*/
|
|
2068
|
+
export declare const CommentEvidencePracticeSchema: v.ObjectSchema<{
|
|
2069
|
+
readonly check: v.ObjectSchema<{
|
|
2070
|
+
readonly id: v.StringSchema<undefined>;
|
|
2071
|
+
readonly name: v.StringSchema<undefined>;
|
|
2072
|
+
}, undefined>;
|
|
2073
|
+
readonly rubricVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2074
|
+
readonly practices: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2075
|
+
readonly text: v.StringSchema<undefined>;
|
|
2076
|
+
readonly source: v.ObjectSchema<{
|
|
2077
|
+
readonly title: v.StringSchema<undefined>;
|
|
2078
|
+
readonly url: v.StringSchema<undefined>;
|
|
2079
|
+
}, undefined>;
|
|
2080
|
+
}, undefined>, undefined>, readonly []>;
|
|
2081
|
+
readonly facts: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
2082
|
+
readonly answers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2083
|
+
readonly item: v.StringSchema<undefined>;
|
|
2084
|
+
readonly answer: v.StringSchema<undefined>;
|
|
2085
|
+
}, undefined>, undefined>, readonly []>;
|
|
2086
|
+
}, undefined>;
|
|
1974
2087
|
export declare const CommentEvidenceResponseSchema: v.ObjectSchema<{
|
|
1975
2088
|
/** The comment's full id, even when the request named a prefix. */
|
|
1976
2089
|
readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1977
2090
|
readonly itemName: v.StringSchema<undefined>;
|
|
1978
2091
|
readonly itemPath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
2092
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
2093
|
+
/** One line saying how the finding is known; server-written, outside the markers. */
|
|
2094
|
+
readonly tierLine: v.StringSchema<undefined>;
|
|
2095
|
+
/** What the drafter did not read; server-written, outside the markers. */
|
|
2096
|
+
readonly blindSpot: v.StringSchema<undefined>;
|
|
2097
|
+
/** What goes wrong, wrapped in the response's untrusted markers. */
|
|
2098
|
+
readonly claim: v.StringSchema<undefined>;
|
|
2099
|
+
/** What future sessions should show if the finding is fixed, wrapped; null if none. */
|
|
1982
2100
|
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2101
|
+
/** A usage finding's counts; null on every other tier. */
|
|
2102
|
+
readonly usage: v.NullableSchema<v.ObjectSchema<{
|
|
2103
|
+
/** The reference's skill-relative path, wrapped in the response's untrusted markers. */
|
|
2104
|
+
readonly path: v.StringSchema<undefined>;
|
|
2105
|
+
/** Eligible loads of the skill. */
|
|
2106
|
+
readonly loads: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2107
|
+
/** Distinct sessions those loads span. */
|
|
2108
|
+
readonly sessions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2109
|
+
/** Loads followed by a successful read of the reference. */
|
|
2110
|
+
readonly loadsWithRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2111
|
+
}, undefined>, undefined>;
|
|
2112
|
+
/** A practice finding's rubric check; null on every other tier. */
|
|
2113
|
+
readonly practice: v.NullableSchema<v.ObjectSchema<{
|
|
2114
|
+
readonly check: v.ObjectSchema<{
|
|
2115
|
+
readonly id: v.StringSchema<undefined>;
|
|
2116
|
+
readonly name: v.StringSchema<undefined>;
|
|
2117
|
+
}, undefined>;
|
|
2118
|
+
readonly rubricVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
2119
|
+
readonly practices: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2120
|
+
readonly text: v.StringSchema<undefined>;
|
|
2121
|
+
readonly source: v.ObjectSchema<{
|
|
2122
|
+
readonly title: v.StringSchema<undefined>;
|
|
2123
|
+
readonly url: v.StringSchema<undefined>;
|
|
2124
|
+
}, undefined>;
|
|
2125
|
+
}, undefined>, undefined>, readonly []>;
|
|
2126
|
+
readonly facts: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
2127
|
+
readonly answers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2128
|
+
readonly item: v.StringSchema<undefined>;
|
|
2129
|
+
readonly answer: v.StringSchema<undefined>;
|
|
2130
|
+
}, undefined>, undefined>, readonly []>;
|
|
2131
|
+
}, undefined>, undefined>;
|
|
1983
2132
|
readonly citations: v.ArraySchema<v.ObjectSchema<{
|
|
1984
2133
|
/**
|
|
1985
|
-
* `navigation` is a skill load
|
|
1986
|
-
*
|
|
1987
|
-
*
|
|
1988
|
-
* sessions
|
|
1989
|
-
*
|
|
2134
|
+
* `navigation` is a skill load counted when a finding was drafted from how
|
|
2135
|
+
* the skill's files were read: evidence of how a skill was used, not of a
|
|
2136
|
+
* failure. `action` is a recorded step of a workflow repeated across
|
|
2137
|
+
* sessions. A server sends it only to a client that names a version new
|
|
2138
|
+
* enough to parse it.
|
|
1990
2139
|
*/
|
|
1991
2140
|
readonly kind: v.PicklistSchema<["verdict", "turn", "navigation", "action"], undefined>;
|
|
1992
2141
|
readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -2184,10 +2333,19 @@ export declare const PushContextResponseSchema: v.ObjectSchema<{
|
|
|
2184
2333
|
*/
|
|
2185
2334
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2186
2335
|
/**
|
|
2187
|
-
*
|
|
2188
|
-
*
|
|
2336
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
2337
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
2338
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
2189
2339
|
*/
|
|
2190
|
-
readonly
|
|
2340
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
2341
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
2342
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
2343
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
2344
|
+
/** What the drafter did not read, fixed per tier. */
|
|
2345
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
2346
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
2347
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2348
|
+
}, undefined>, undefined>;
|
|
2191
2349
|
/**
|
|
2192
2350
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
2193
2351
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -2249,7 +2407,12 @@ export declare const PushContextResponseSchema: v.ObjectSchema<{
|
|
|
2249
2407
|
} | undefined;
|
|
2250
2408
|
body: string;
|
|
2251
2409
|
suggestion?: string | undefined;
|
|
2252
|
-
|
|
2410
|
+
finding?: {
|
|
2411
|
+
tier: "observed" | "usage" | "practice";
|
|
2412
|
+
tierLine: string;
|
|
2413
|
+
blindSpot: string;
|
|
2414
|
+
prediction: string | null;
|
|
2415
|
+
} | undefined;
|
|
2253
2416
|
approved?: boolean | undefined;
|
|
2254
2417
|
authorName: string | null;
|
|
2255
2418
|
createdAt: string;
|
|
@@ -2515,10 +2678,19 @@ export declare const UpdateContextItemResponseSchema: v.ObjectSchema<{
|
|
|
2515
2678
|
*/
|
|
2516
2679
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2517
2680
|
/**
|
|
2518
|
-
*
|
|
2519
|
-
*
|
|
2681
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
2682
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
2683
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
2520
2684
|
*/
|
|
2521
|
-
readonly
|
|
2685
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
2686
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
2687
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
2688
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
2689
|
+
/** What the drafter did not read, fixed per tier. */
|
|
2690
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
2691
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
2692
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2693
|
+
}, undefined>, undefined>;
|
|
2522
2694
|
/**
|
|
2523
2695
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
2524
2696
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -2580,7 +2752,12 @@ export declare const UpdateContextItemResponseSchema: v.ObjectSchema<{
|
|
|
2580
2752
|
} | undefined;
|
|
2581
2753
|
body: string;
|
|
2582
2754
|
suggestion?: string | undefined;
|
|
2583
|
-
|
|
2755
|
+
finding?: {
|
|
2756
|
+
tier: "observed" | "usage" | "practice";
|
|
2757
|
+
tierLine: string;
|
|
2758
|
+
blindSpot: string;
|
|
2759
|
+
prediction: string | null;
|
|
2760
|
+
} | undefined;
|
|
2584
2761
|
approved?: boolean | undefined;
|
|
2585
2762
|
authorName: string | null;
|
|
2586
2763
|
createdAt: string;
|
|
@@ -3007,10 +3184,19 @@ export declare const ContextItemResponseSchema: v.ObjectSchema<{
|
|
|
3007
3184
|
*/
|
|
3008
3185
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3009
3186
|
/**
|
|
3010
|
-
*
|
|
3011
|
-
*
|
|
3187
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
3188
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
3189
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
3012
3190
|
*/
|
|
3013
|
-
readonly
|
|
3191
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
3192
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
3193
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
3194
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
3195
|
+
/** What the drafter did not read, fixed per tier. */
|
|
3196
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
3197
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
3198
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3199
|
+
}, undefined>, undefined>;
|
|
3014
3200
|
/**
|
|
3015
3201
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
3016
3202
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -3072,7 +3258,12 @@ export declare const ContextItemResponseSchema: v.ObjectSchema<{
|
|
|
3072
3258
|
} | undefined;
|
|
3073
3259
|
body: string;
|
|
3074
3260
|
suggestion?: string | undefined;
|
|
3075
|
-
|
|
3261
|
+
finding?: {
|
|
3262
|
+
tier: "observed" | "usage" | "practice";
|
|
3263
|
+
tierLine: string;
|
|
3264
|
+
blindSpot: string;
|
|
3265
|
+
prediction: string | null;
|
|
3266
|
+
} | undefined;
|
|
3076
3267
|
approved?: boolean | undefined;
|
|
3077
3268
|
authorName: string | null;
|
|
3078
3269
|
createdAt: string;
|
|
@@ -3251,10 +3442,19 @@ export declare const ArchiveContextItemResponseSchema: v.ObjectSchema<{
|
|
|
3251
3442
|
*/
|
|
3252
3443
|
readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3253
3444
|
/**
|
|
3254
|
-
*
|
|
3255
|
-
*
|
|
3445
|
+
* What a comment Mossbear wrote is: a finding about the item, never an edit.
|
|
3446
|
+
* Present only on a Mossbear comment. The comment's `body` begins with the
|
|
3447
|
+
* claim (what goes wrong); this carries what the claim rests on.
|
|
3256
3448
|
*/
|
|
3257
|
-
readonly
|
|
3449
|
+
readonly finding: v.OptionalSchema<v.ObjectSchema<{
|
|
3450
|
+
readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
|
|
3451
|
+
/** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
|
|
3452
|
+
readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
3453
|
+
/** What the drafter did not read, fixed per tier. */
|
|
3454
|
+
readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
|
|
3455
|
+
/** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
|
|
3456
|
+
readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3457
|
+
}, undefined>, undefined>;
|
|
3258
3458
|
/**
|
|
3259
3459
|
* Whether the person approved a comment Mossbear drafted. Present on every
|
|
3260
3460
|
* Mossbear comment and absent on a person's or an agent's, which are
|
|
@@ -3316,7 +3516,12 @@ export declare const ArchiveContextItemResponseSchema: v.ObjectSchema<{
|
|
|
3316
3516
|
} | undefined;
|
|
3317
3517
|
body: string;
|
|
3318
3518
|
suggestion?: string | undefined;
|
|
3319
|
-
|
|
3519
|
+
finding?: {
|
|
3520
|
+
tier: "observed" | "usage" | "practice";
|
|
3521
|
+
tierLine: string;
|
|
3522
|
+
blindSpot: string;
|
|
3523
|
+
prediction: string | null;
|
|
3524
|
+
} | undefined;
|
|
3320
3525
|
approved?: boolean | undefined;
|
|
3321
3526
|
authorName: string | null;
|
|
3322
3527
|
createdAt: string;
|
|
@@ -3769,17 +3974,9 @@ export declare const DashboardGuideSuggestionSchema: v.ObjectSchema<{
|
|
|
3769
3974
|
}, undefined>], undefined>, undefined>, undefined>;
|
|
3770
3975
|
readonly status: v.OptionalSchema<v.PicklistSchema<["pending", "accepted", "dismissed"], undefined>, undefined>;
|
|
3771
3976
|
}, undefined>;
|
|
3772
|
-
export declare const DashboardFeedbackCandidateSchema: v.ObjectSchema<{
|
|
3773
|
-
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3774
|
-
readonly signal: v.StringSchema<undefined>;
|
|
3775
|
-
readonly signalType: v.PicklistSchema<["correction", "approval", "implied_preference", "stated_preference", "skill_suggestion"], undefined>;
|
|
3776
|
-
readonly confidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
3777
|
-
readonly occurrences: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
3778
|
-
readonly status: v.OptionalSchema<v.PicklistSchema<["inferred", "confirmed", "dismissed"], undefined>, undefined>;
|
|
3779
|
-
}, undefined>;
|
|
3780
3977
|
/** Max number of actions accepted in a single `POST /api/sync` request. */
|
|
3781
3978
|
export declare const MAX_SYNC_ACTIONS_BATCH = 500;
|
|
3782
|
-
/** Max number of guideSuggestions/
|
|
3979
|
+
/** Max number of guideSuggestions/runUsage entries per sync request. */
|
|
3783
3980
|
export declare const MAX_SYNC_AUX_BATCH = 100;
|
|
3784
3981
|
/**
|
|
3785
3982
|
* Max rule files one delivery manifest enumerates. Well above what a real repo
|
|
@@ -4074,21 +4271,6 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
|
|
|
4074
4271
|
})[] | undefined;
|
|
4075
4272
|
status?: "pending" | "accepted" | "dismissed" | undefined;
|
|
4076
4273
|
}[], 100, undefined>]>, undefined>;
|
|
4077
|
-
readonly feedbackCandidates: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
4078
|
-
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
4079
|
-
readonly signal: v.StringSchema<undefined>;
|
|
4080
|
-
readonly signalType: v.PicklistSchema<["correction", "approval", "implied_preference", "stated_preference", "skill_suggestion"], undefined>;
|
|
4081
|
-
readonly confidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
4082
|
-
readonly occurrences: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
4083
|
-
readonly status: v.OptionalSchema<v.PicklistSchema<["inferred", "confirmed", "dismissed"], undefined>, undefined>;
|
|
4084
|
-
}, undefined>, undefined>, v.MaxLengthAction<{
|
|
4085
|
-
id?: string | undefined;
|
|
4086
|
-
signal: string;
|
|
4087
|
-
signalType: "correction" | "approval" | "implied_preference" | "stated_preference" | "skill_suggestion";
|
|
4088
|
-
confidence?: number | undefined;
|
|
4089
|
-
occurrences?: number | undefined;
|
|
4090
|
-
status?: "dismissed" | "inferred" | "confirmed" | undefined;
|
|
4091
|
-
}[], 100, undefined>]>, undefined>;
|
|
4092
4274
|
readonly runUsage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
4093
4275
|
readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
4094
4276
|
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -4990,9 +5172,16 @@ export type GuideHistoryResponse = v.InferOutput<typeof GuideHistoryResponseSche
|
|
|
4990
5172
|
export declare const SessionGradeRequestSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
4991
5173
|
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>;
|
|
4992
5174
|
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>;
|
|
5175
|
+
/**
|
|
5176
|
+
* Opt in to the session digest: the grade plus the turns, self-report and
|
|
5177
|
+
* git position of the session. Omitted, the small grade payload that
|
|
5178
|
+
* `mossbear sessions` and session start read is unchanged.
|
|
5179
|
+
*/
|
|
5180
|
+
readonly detail: v.OptionalSchema<v.LiteralSchema<"digest", undefined>, undefined>;
|
|
4993
5181
|
}, undefined>, v.CheckAction<{
|
|
4994
5182
|
session?: string | undefined;
|
|
4995
5183
|
agent_session?: string | undefined;
|
|
5184
|
+
detail?: "digest" | undefined;
|
|
4996
5185
|
}, "Pass exactly one of session or agent_session">]>;
|
|
4997
5186
|
export type SessionGradeRequest = v.InferOutput<typeof SessionGradeRequestSchema>;
|
|
4998
5187
|
/**
|
|
@@ -5121,26 +5310,146 @@ export declare const SessionGradeResponseSchema: v.ObjectSchema<{
|
|
|
5121
5310
|
}, undefined>, undefined>;
|
|
5122
5311
|
}, undefined>;
|
|
5123
5312
|
export type SessionGradeResponse = v.InferOutput<typeof SessionGradeResponseSchema>;
|
|
5313
|
+
/** Most turns one digest returns; `turnsTotal` says how many the session has. */
|
|
5314
|
+
export declare const SESSION_DIGEST_MAX_TURNS = 50;
|
|
5315
|
+
/** What the digest cannot carry yet, named so an absence is never read as "none". */
|
|
5316
|
+
export declare const SESSION_DIGEST_UNAVAILABLE: readonly ["comments", "resumeCommand", "cloudUrl"];
|
|
5317
|
+
export declare const SessionDigestUnavailableSchema: v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>;
|
|
5318
|
+
export type SessionDigestUnavailable = v.InferOutput<typeof SessionDigestUnavailableSchema>;
|
|
5319
|
+
export declare const SessionDigestTurnSchema: v.ObjectSchema<{
|
|
5320
|
+
readonly ordinal: v.NumberSchema<undefined>;
|
|
5321
|
+
/** What the user said, **wrapped in the response's untrusted markers** and bounded. */
|
|
5322
|
+
readonly text: v.StringSchema<undefined>;
|
|
5323
|
+
/** The steering classifier's label, or null when the turn was never classified. */
|
|
5324
|
+
readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5325
|
+
}, undefined>;
|
|
5326
|
+
export type SessionDigestTurn = v.InferOutput<typeof SessionDigestTurnSchema>;
|
|
5327
|
+
export declare const SessionDigestSchema: v.ObjectSchema<{
|
|
5328
|
+
/** The agent's own closing account of the session, wrapped and bounded; null when it gave none. */
|
|
5329
|
+
readonly selfReport: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5330
|
+
/** The user's turns in order, at most `SESSION_DIGEST_MAX_TURNS`. */
|
|
5331
|
+
readonly turns: v.ArraySchema<v.ObjectSchema<{
|
|
5332
|
+
readonly ordinal: v.NumberSchema<undefined>;
|
|
5333
|
+
/** What the user said, **wrapped in the response's untrusted markers** and bounded. */
|
|
5334
|
+
readonly text: v.StringSchema<undefined>;
|
|
5335
|
+
/** The steering classifier's label, or null when the turn was never classified. */
|
|
5336
|
+
readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5337
|
+
}, undefined>, undefined>;
|
|
5338
|
+
/** Every turn the session recorded, so a cut list is not read as the whole. */
|
|
5339
|
+
readonly turnsTotal: v.NumberSchema<undefined>;
|
|
5340
|
+
/** The repository's identity digest, or null when the session recorded none. */
|
|
5341
|
+
readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5342
|
+
/** The branch observed at close, wrapped like any text taken from the repo; null when unrecorded. */
|
|
5343
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5344
|
+
/** The head commit observed at close, or null. A commit made mid-session is not it. */
|
|
5345
|
+
readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5346
|
+
/** The session's page on the dashboard, as a path; the client prefixes the dashboard address. */
|
|
5347
|
+
readonly dashboardPath: v.StringSchema<undefined>;
|
|
5348
|
+
/** Absolute dashboard link, added by the client that knows the address. */
|
|
5349
|
+
readonly dashboardUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5350
|
+
/** Comments on this session, wrapped; empty until sessions can be commented on. */
|
|
5351
|
+
readonly comments: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
5352
|
+
/** The parts of a digest no session carries yet. */
|
|
5353
|
+
readonly notYetAvailable: v.ArraySchema<v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>, undefined>;
|
|
5354
|
+
}, undefined>;
|
|
5355
|
+
export type SessionDigest = v.InferOutput<typeof SessionDigestSchema>;
|
|
5356
|
+
export declare const SessionDigestResponseSchema: v.ObjectSchema<{
|
|
5357
|
+
readonly run: v.ObjectSchema<{
|
|
5358
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5359
|
+
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5360
|
+
readonly startedAt: v.StringSchema<undefined>;
|
|
5361
|
+
readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5362
|
+
readonly status: v.PicklistSchema<["open", "closed"], undefined>;
|
|
5363
|
+
}, undefined>;
|
|
5364
|
+
readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired"], undefined>;
|
|
5365
|
+
readonly grade: v.NullableSchema<v.ObjectSchema<{
|
|
5366
|
+
/** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
|
|
5367
|
+
readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5368
|
+
/** ISO timestamp, machine format — display formatting is the reader's job. */
|
|
5369
|
+
readonly gradedAt: v.StringSchema<undefined>;
|
|
5370
|
+
/** The model that produced the judgment, or null when the record does not say. */
|
|
5371
|
+
readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5372
|
+
/**
|
|
5373
|
+
* True when the run grew after this grade was written — a later sync
|
|
5374
|
+
* attached more actions — so the judgment describes a smaller run than the
|
|
5375
|
+
* one on record. A superseded grade is real and is still reported; it is
|
|
5376
|
+
* labelled rather than hidden.
|
|
5377
|
+
*/
|
|
5378
|
+
readonly superseded: v.BooleanSchema<undefined>;
|
|
5379
|
+
readonly guides: v.ArraySchema<v.ObjectSchema<{
|
|
5380
|
+
readonly guideId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5381
|
+
readonly title: v.StringSchema<undefined>;
|
|
5382
|
+
readonly verdict: v.PicklistSchema<["aligned", "misaligned", "not_applicable"], undefined>;
|
|
5383
|
+
/**
|
|
5384
|
+
* The grader's reasoning, **already wrapped in the response's untrusted
|
|
5385
|
+
* markers** — model-authored text derived from a transcript, delimited at the
|
|
5386
|
+
* source so a consumer cannot skip the markers. Empty between the markers
|
|
5387
|
+
* when the row recorded none.
|
|
5388
|
+
*/
|
|
5389
|
+
readonly reasoning: v.StringSchema<undefined>;
|
|
5390
|
+
}, undefined>, undefined>;
|
|
5391
|
+
}, undefined>, undefined>;
|
|
5392
|
+
readonly digest: v.ObjectSchema<{
|
|
5393
|
+
/** The agent's own closing account of the session, wrapped and bounded; null when it gave none. */
|
|
5394
|
+
readonly selfReport: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5395
|
+
/** The user's turns in order, at most `SESSION_DIGEST_MAX_TURNS`. */
|
|
5396
|
+
readonly turns: v.ArraySchema<v.ObjectSchema<{
|
|
5397
|
+
readonly ordinal: v.NumberSchema<undefined>;
|
|
5398
|
+
/** What the user said, **wrapped in the response's untrusted markers** and bounded. */
|
|
5399
|
+
readonly text: v.StringSchema<undefined>;
|
|
5400
|
+
/** The steering classifier's label, or null when the turn was never classified. */
|
|
5401
|
+
readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5402
|
+
}, undefined>, undefined>;
|
|
5403
|
+
/** Every turn the session recorded, so a cut list is not read as the whole. */
|
|
5404
|
+
readonly turnsTotal: v.NumberSchema<undefined>;
|
|
5405
|
+
/** The repository's identity digest, or null when the session recorded none. */
|
|
5406
|
+
readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5407
|
+
/** The branch observed at close, wrapped like any text taken from the repo; null when unrecorded. */
|
|
5408
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5409
|
+
/** The head commit observed at close, or null. A commit made mid-session is not it. */
|
|
5410
|
+
readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5411
|
+
/** The session's page on the dashboard, as a path; the client prefixes the dashboard address. */
|
|
5412
|
+
readonly dashboardPath: v.StringSchema<undefined>;
|
|
5413
|
+
/** Absolute dashboard link, added by the client that knows the address. */
|
|
5414
|
+
readonly dashboardUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5415
|
+
/** Comments on this session, wrapped; empty until sessions can be commented on. */
|
|
5416
|
+
readonly comments: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
5417
|
+
/** The parts of a digest no session carries yet. */
|
|
5418
|
+
readonly notYetAvailable: v.ArraySchema<v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>, undefined>;
|
|
5419
|
+
}, undefined>;
|
|
5420
|
+
/** One marker pair over every wrapped block in the response, present always. */
|
|
5421
|
+
readonly untrusted: v.ObjectSchema<{
|
|
5422
|
+
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5423
|
+
readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5424
|
+
readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5425
|
+
readonly note: v.StringSchema<undefined>;
|
|
5426
|
+
}, undefined>;
|
|
5427
|
+
}, undefined>;
|
|
5428
|
+
export type SessionDigestResponse = v.InferOutput<typeof SessionDigestResponseSchema>;
|
|
5124
5429
|
/**
|
|
5125
|
-
* The corpora a search can reach today
|
|
5430
|
+
* The corpora a search can reach today.
|
|
5126
5431
|
*
|
|
5127
5432
|
* `guides` is guide bodies and their author-written eval criteria; `verdicts`
|
|
5128
|
-
* is the grader's reasoning for why a session did or did not follow a guide
|
|
5129
|
-
*
|
|
5130
|
-
*
|
|
5433
|
+
* is the grader's reasoning for why a session did or did not follow a guide;
|
|
5434
|
+
* `content` is the name and body of the documents saved in bundles; `comments`
|
|
5435
|
+
* is the text of comments left on guides and documents; `turns` is what the
|
|
5436
|
+
* caller themself said to their agents, redacted. One registry on the
|
|
5437
|
+
* server declares how each is matched and scoped; this list is only what a
|
|
5438
|
+
* caller may name.
|
|
5131
5439
|
*/
|
|
5132
|
-
export declare const SEARCH_CORPUS_IDS: readonly ["guides", "verdicts"];
|
|
5133
|
-
export declare const SearchCorpusIdSchema: v.PicklistSchema<readonly ["guides", "verdicts"], undefined>;
|
|
5440
|
+
export declare const SEARCH_CORPUS_IDS: readonly ["guides", "verdicts", "content", "comments", "turns"];
|
|
5441
|
+
export declare const SearchCorpusIdSchema: v.PicklistSchema<readonly ["guides", "verdicts", "content", "comments", "turns"], undefined>;
|
|
5134
5442
|
export type SearchCorpusId = v.InferOutput<typeof SearchCorpusIdSchema>;
|
|
5135
5443
|
/**
|
|
5136
|
-
* Every stored text no search reaches yet —
|
|
5137
|
-
*
|
|
5138
|
-
*
|
|
5139
|
-
*
|
|
5140
|
-
*
|
|
5444
|
+
* Every stored text no search reaches yet — comments left on a session (a
|
|
5445
|
+
* comment on a guide or document is searched; findings and guide suggestions
|
|
5446
|
+
* are comments), the sessions a run records, and the actions and
|
|
5447
|
+
* their narration. Every response names them, so "nothing found" can never be read
|
|
5448
|
+
* as covering them. (Earlier wordings of a guide are deliberately never
|
|
5449
|
+
* searched, which is a different thing from not yet.)
|
|
5141
5450
|
*/
|
|
5142
|
-
export declare const SEARCH_UNIMPLEMENTED_CORPORA: readonly ["
|
|
5143
|
-
export declare const SearchUnimplementedCorpusSchema: v.PicklistSchema<readonly ["
|
|
5451
|
+
export declare const SEARCH_UNIMPLEMENTED_CORPORA: readonly ["session-comments", "sessions", "actions"];
|
|
5452
|
+
export declare const SearchUnimplementedCorpusSchema: v.PicklistSchema<readonly ["session-comments", "sessions", "actions"], undefined>;
|
|
5144
5453
|
/** Hits returned per corpus when the caller does not say. */
|
|
5145
5454
|
export declare const SEARCH_DEFAULT_LIMIT = 10;
|
|
5146
5455
|
/** The most hits one corpus returns. Totals are counted past it. */
|
|
@@ -5167,10 +5476,42 @@ export declare const SearchTermSchema: v.SchemaWithPipe<readonly [v.StringSchema
|
|
|
5167
5476
|
export declare const SEARCH_DETAILS: readonly ["excerpt", "section"];
|
|
5168
5477
|
export declare const SearchDetailSchema: v.PicklistSchema<readonly ["excerpt", "section"], undefined>;
|
|
5169
5478
|
export type SearchDetail = v.InferOutput<typeof SearchDetailSchema>;
|
|
5479
|
+
/** Frontmatter filters a `content` search accepts at once. */
|
|
5480
|
+
export declare const SEARCH_MAX_FRONTMATTER_FILTERS = 3;
|
|
5481
|
+
/**
|
|
5482
|
+
* One top-level frontmatter field a `content` item must carry, by exact scalar
|
|
5483
|
+
* value (`type: recipe`). The key is a plain YAML key so it can be matched
|
|
5484
|
+
* without being interpreted; the value is literal text, compared
|
|
5485
|
+
* case-insensitively.
|
|
5486
|
+
*/
|
|
5487
|
+
export declare const SearchFrontmatterSchema: v.SchemaWithPipe<readonly [v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "frontmatter keys are plain names">]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a frontmatter value must not be empty">, v.MaxLengthAction<string, 100, "a frontmatter value must be at most 100 characters">, v.CheckAction<string, "a frontmatter value must not contain control characters">]>, undefined>, v.CheckAction<{
|
|
5488
|
+
[x: string]: string;
|
|
5489
|
+
}, "frontmatter takes between 1 and 3 fields">]>;
|
|
5490
|
+
export type SearchFrontmatter = v.InferOutput<typeof SearchFrontmatterSchema>;
|
|
5491
|
+
/** Who wrote a comment: a person, an agent, or Mossbear itself. */
|
|
5492
|
+
export declare const SEARCH_COMMENT_AUTHOR_KINDS: readonly ["person", "agent", "mossbear"];
|
|
5493
|
+
export declare const SearchCommentAuthorKindSchema: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
|
|
5494
|
+
export type SearchCommentAuthorKind = v.InferOutput<typeof SearchCommentAuthorKindSchema>;
|
|
5495
|
+
/**
|
|
5496
|
+
* What a comment is attached to. `item` is a guide or a document; `session` is
|
|
5497
|
+
* accepted so a caller can ask for it, but nothing searches session comments
|
|
5498
|
+
* yet, and a request that names only `session` says so rather than returning
|
|
5499
|
+
* an empty match.
|
|
5500
|
+
*/
|
|
5501
|
+
export declare const SEARCH_COMMENT_SUBJECT_KINDS: readonly ["item", "session"];
|
|
5502
|
+
export declare const SearchCommentSubjectKindSchema: v.PicklistSchema<readonly ["item", "session"], undefined>;
|
|
5503
|
+
export type SearchCommentSubjectKind = v.InferOutput<typeof SearchCommentSubjectKindSchema>;
|
|
5504
|
+
/**
|
|
5505
|
+
* What a user turn was, as the session classifier labels it. The same
|
|
5506
|
+
* vocabulary the classifier writes; a `turns` search may keep only some.
|
|
5507
|
+
*/
|
|
5508
|
+
export declare const SEARCH_STEERING_LABELS: readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"];
|
|
5509
|
+
export declare const SearchSteeringLabelSchema: v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>;
|
|
5510
|
+
export type SearchSteeringLabel = v.InferOutput<typeof SearchSteeringLabelSchema>;
|
|
5170
5511
|
export declare const SearchRequestSchema: v.ObjectSchema<{
|
|
5171
5512
|
readonly q: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 2, "q must be at least 2 characters">, v.MaxLengthAction<string, 200, "q must be at most 200 characters">, v.CheckAction<string, "q must not contain control characters">, v.CheckAction<string, "q must contain at least 2 characters besides * and ?">]>;
|
|
5172
5513
|
/** Which corpora to search; every one when absent. */
|
|
5173
|
-
readonly corpora: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["guides", "verdicts"], undefined>, undefined>, v.MinLengthAction<("guides" | "verdicts")[], 1, undefined>]>, undefined>;
|
|
5514
|
+
readonly corpora: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["guides", "verdicts", "content", "comments", "turns"], undefined>, undefined>, v.MinLengthAction<("content" | "guides" | "comments" | "turns" | "verdicts")[], 1, undefined>]>, undefined>;
|
|
5174
5515
|
/**
|
|
5175
5516
|
* The bundles a scoped caller may read content from — `mossbear mcp
|
|
5176
5517
|
* --bundles` resolved to ids by the CLI, since the server never sees that
|
|
@@ -5188,13 +5529,35 @@ export declare const SearchRequestSchema: v.ObjectSchema<{
|
|
|
5188
5529
|
* id the caller cannot read matches nothing. Does not touch other corpora.
|
|
5189
5530
|
*/
|
|
5190
5531
|
readonly fileIds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MinLengthAction<string[], 1, undefined>, v.MaxLengthAction<string[], 25, undefined>]>, undefined>;
|
|
5532
|
+
/**
|
|
5533
|
+
* Restrict the `content` corpus to items whose frontmatter carries every one
|
|
5534
|
+
* of these fields. Does not touch other corpora.
|
|
5535
|
+
*/
|
|
5536
|
+
readonly frontmatter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "frontmatter keys are plain names">]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a frontmatter value must not be empty">, v.MaxLengthAction<string, 100, "a frontmatter value must be at most 100 characters">, v.CheckAction<string, "a frontmatter value must not contain control characters">]>, undefined>, v.CheckAction<{
|
|
5537
|
+
[x: string]: string;
|
|
5538
|
+
}, "frontmatter takes between 1 and 3 fields">]>, undefined>;
|
|
5539
|
+
/**
|
|
5540
|
+
* Restrict the `comments` corpus to comments written by these kinds of
|
|
5541
|
+
* author. Does not touch other corpora.
|
|
5542
|
+
*/
|
|
5543
|
+
readonly authorKinds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>, undefined>, v.MinLengthAction<("person" | "agent" | "mossbear")[], 1, undefined>]>, undefined>;
|
|
5544
|
+
/**
|
|
5545
|
+
* Restrict the `comments` corpus to comments on these kinds of subject. Does
|
|
5546
|
+
* not touch other corpora.
|
|
5547
|
+
*/
|
|
5548
|
+
readonly subjectKinds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["item", "session"], undefined>, undefined>, v.MinLengthAction<("item" | "session")[], 1, undefined>]>, undefined>;
|
|
5549
|
+
/**
|
|
5550
|
+
* Restrict the `turns` corpus to turns the classifier gave one of these
|
|
5551
|
+
* labels. A turn with no label never matches. Does not touch other corpora.
|
|
5552
|
+
*/
|
|
5553
|
+
readonly steeringLabels: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>, undefined>, v.MinLengthAction<("correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence")[], 1, undefined>]>, undefined>;
|
|
5191
5554
|
}, undefined>;
|
|
5192
5555
|
export type SearchRequest = v.InferOutput<typeof SearchRequestSchema>;
|
|
5193
5556
|
/**
|
|
5194
5557
|
* Why a corpus was not searched. Codes, never prose: each caller writes its own
|
|
5195
5558
|
* sentence, and the dashboard's has to be a translatable one.
|
|
5196
5559
|
*/
|
|
5197
|
-
export declare const SearchSkipReasonSchema: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
|
|
5560
|
+
export declare const SearchSkipReasonSchema: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5198
5561
|
export type SearchSkipReason = v.InferOutput<typeof SearchSkipReasonSchema>;
|
|
5199
5562
|
/** Why a searched corpus covered less than the caller's whole scope. */
|
|
5200
5563
|
export declare const SearchNarrowingSchema: v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>;
|
|
@@ -5242,6 +5605,111 @@ export declare const SearchVerdictHitSchema: v.ObjectSchema<{
|
|
|
5242
5605
|
readonly reasoning: v.StringSchema<undefined>;
|
|
5243
5606
|
}, undefined>;
|
|
5244
5607
|
export type SearchVerdictHit = v.InferOutput<typeof SearchVerdictHitSchema>;
|
|
5608
|
+
/**
|
|
5609
|
+
* A saved document whose name or body matched — an item `pull_context` returns
|
|
5610
|
+
* as `type: content`. The name, workspace name and excerpt are wrapped in
|
|
5611
|
+
* `untrusted`'s markers.
|
|
5612
|
+
*/
|
|
5613
|
+
export declare const SearchContentHitSchema: v.ObjectSchema<{
|
|
5614
|
+
readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5615
|
+
/** Wrapped in `untrusted`'s markers; null when the item has no name. */
|
|
5616
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5617
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5618
|
+
/** Wrapped in `untrusted`'s markers. */
|
|
5619
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
5620
|
+
/**
|
|
5621
|
+
* Slugs of the bundles that hold the item and that the caller may read — the
|
|
5622
|
+
* argument `pull_context` takes to read the whole document. Never more than
|
|
5623
|
+
* a scoped caller's allowlist reaches.
|
|
5624
|
+
*/
|
|
5625
|
+
readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
5626
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
5627
|
+
/**
|
|
5628
|
+
* Where the item opens on the dashboard. Added by the CLI, which knows the
|
|
5629
|
+
* dashboard's address; the server does not send it.
|
|
5630
|
+
*/
|
|
5631
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5632
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
5633
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
5634
|
+
}, undefined>;
|
|
5635
|
+
export type SearchContentHit = v.InferOutput<typeof SearchContentHitSchema>;
|
|
5636
|
+
/**
|
|
5637
|
+
* A comment on a guide or document that matched. `body` and `itemName` and
|
|
5638
|
+
* `workspaceName` are wrapped in `untrusted`'s markers.
|
|
5639
|
+
*/
|
|
5640
|
+
export declare const SearchCommentHitSchema: v.ObjectSchema<{
|
|
5641
|
+
readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5642
|
+
/** The thread's root; equal to `commentId` for a root comment. */
|
|
5643
|
+
readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5644
|
+
readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
|
|
5645
|
+
readonly subjectKind: v.LiteralSchema<"item", undefined>;
|
|
5646
|
+
readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5647
|
+
/**
|
|
5648
|
+
* The guide the item belongs to, or null for a standalone document. A comment
|
|
5649
|
+
* on a guide sits on its body file, so this is the id the dashboard's guide
|
|
5650
|
+
* page takes; `itemId` is the one a document page takes.
|
|
5651
|
+
*/
|
|
5652
|
+
readonly guideId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
5653
|
+
/** Wrapped in `untrusted`'s markers; null when the item has no name. */
|
|
5654
|
+
readonly itemName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5655
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5656
|
+
/** Wrapped in `untrusted`'s markers. */
|
|
5657
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
5658
|
+
/** Whether the thread has been resolved — a resolved thread is answered, not open. */
|
|
5659
|
+
readonly resolved: v.BooleanSchema<undefined>;
|
|
5660
|
+
/** Whether the item has been edited since the comment was written. */
|
|
5661
|
+
readonly itemChangedSince: v.BooleanSchema<undefined>;
|
|
5662
|
+
/**
|
|
5663
|
+
* Whether the match is in the comment's text or in the replacement it
|
|
5664
|
+
* suggests (Mossbear's drafted edits).
|
|
5665
|
+
*/
|
|
5666
|
+
readonly matchedIn: v.PicklistSchema<["body", "suggestion"], undefined>;
|
|
5667
|
+
/**
|
|
5668
|
+
* A Mossbear suggestion's draft state: whether its owner has handed it to
|
|
5669
|
+
* their agents. Absent on a person's or an agent's comment and on a reply.
|
|
5670
|
+
*/
|
|
5671
|
+
readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
5672
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
5673
|
+
/**
|
|
5674
|
+
* Where the comment's item opens on the dashboard. Added by the CLI, which
|
|
5675
|
+
* knows the dashboard's address; the server does not send it.
|
|
5676
|
+
*/
|
|
5677
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5678
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
5679
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
5680
|
+
}, undefined>;
|
|
5681
|
+
export type SearchCommentHit = v.InferOutput<typeof SearchCommentHitSchema>;
|
|
5682
|
+
/**
|
|
5683
|
+
* One thing the caller said to an agent, redacted at the source. `excerpt` and
|
|
5684
|
+
* `projectId` and `branch` are wrapped in `untrusted`'s markers: a turn is text a
|
|
5685
|
+
* person typed (or pasted) and a branch name is whatever git was told.
|
|
5686
|
+
*/
|
|
5687
|
+
export declare const SearchTurnHitSchema: v.ObjectSchema<{
|
|
5688
|
+
/** The agent's own session id — the key a session digest takes. */
|
|
5689
|
+
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5690
|
+
/**
|
|
5691
|
+
* The dashboard's id for the session, which its session page takes. Null when
|
|
5692
|
+
* the session has not been recorded as a run yet.
|
|
5693
|
+
*/
|
|
5694
|
+
readonly sessionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
5695
|
+
/** Which turn of the session this was, counting from 1. */
|
|
5696
|
+
readonly ordinal: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
5697
|
+
/** Null when the classifier has not labelled the turn. */
|
|
5698
|
+
readonly steeringLabel: v.NullableSchema<v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>, undefined>;
|
|
5699
|
+
/** Wrapped in `untrusted`'s markers; null where the session recorded none. */
|
|
5700
|
+
readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5701
|
+
/** Wrapped in `untrusted`'s markers; null where the session recorded none. */
|
|
5702
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5703
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
5704
|
+
/**
|
|
5705
|
+
* Where the session opens on the dashboard. Added by the CLI, which knows the
|
|
5706
|
+
* dashboard's address; the server does not send it.
|
|
5707
|
+
*/
|
|
5708
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5709
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
5710
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
5711
|
+
}, undefined>;
|
|
5712
|
+
export type SearchTurnHit = v.InferOutput<typeof SearchTurnHitSchema>;
|
|
5245
5713
|
export declare const SearchGuidesReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
|
|
5246
5714
|
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
5247
5715
|
/** Every match in scope, counted past the returned page. */
|
|
@@ -5278,7 +5746,7 @@ export declare const SearchGuidesReportSchema: v.VariantSchema<"status", [v.Obje
|
|
|
5278
5746
|
}, undefined>, undefined>;
|
|
5279
5747
|
}, undefined>, v.ObjectSchema<{
|
|
5280
5748
|
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
5281
|
-
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
|
|
5749
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5282
5750
|
}, undefined>], undefined>;
|
|
5283
5751
|
export declare const SearchVerdictsReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
|
|
5284
5752
|
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
@@ -5300,10 +5768,131 @@ export declare const SearchVerdictsReportSchema: v.VariantSchema<"status", [v.Ob
|
|
|
5300
5768
|
}, undefined>, undefined>;
|
|
5301
5769
|
}, undefined>, v.ObjectSchema<{
|
|
5302
5770
|
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
5303
|
-
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
|
|
5771
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5772
|
+
}, undefined>], undefined>;
|
|
5773
|
+
export declare const SearchContentReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
|
|
5774
|
+
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
5775
|
+
/** Every match in scope, counted past the returned page. */
|
|
5776
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
5777
|
+
readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
|
|
5778
|
+
/** Newest first, at most the request's limit. */
|
|
5779
|
+
readonly hits: v.ArraySchema<v.ObjectSchema<{
|
|
5780
|
+
readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5781
|
+
/** Wrapped in `untrusted`'s markers; null when the item has no name. */
|
|
5782
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5783
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5784
|
+
/** Wrapped in `untrusted`'s markers. */
|
|
5785
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
5786
|
+
/**
|
|
5787
|
+
* Slugs of the bundles that hold the item and that the caller may read — the
|
|
5788
|
+
* argument `pull_context` takes to read the whole document. Never more than
|
|
5789
|
+
* a scoped caller's allowlist reaches.
|
|
5790
|
+
*/
|
|
5791
|
+
readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
5792
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
5793
|
+
/**
|
|
5794
|
+
* Where the item opens on the dashboard. Added by the CLI, which knows the
|
|
5795
|
+
* dashboard's address; the server does not send it.
|
|
5796
|
+
*/
|
|
5797
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5798
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
5799
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
5800
|
+
}, undefined>, undefined>;
|
|
5801
|
+
}, undefined>, v.ObjectSchema<{
|
|
5802
|
+
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
5803
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5804
|
+
}, undefined>], undefined>;
|
|
5805
|
+
export declare const SearchCommentsReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
|
|
5806
|
+
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
5807
|
+
/** Every match in scope, counted past the returned page. */
|
|
5808
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
5809
|
+
readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
|
|
5810
|
+
/** Newest first, at most the request's limit. */
|
|
5811
|
+
readonly hits: v.ArraySchema<v.ObjectSchema<{
|
|
5812
|
+
readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5813
|
+
/** The thread's root; equal to `commentId` for a root comment. */
|
|
5814
|
+
readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5815
|
+
readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
|
|
5816
|
+
readonly subjectKind: v.LiteralSchema<"item", undefined>;
|
|
5817
|
+
readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5818
|
+
/**
|
|
5819
|
+
* The guide the item belongs to, or null for a standalone document. A comment
|
|
5820
|
+
* on a guide sits on its body file, so this is the id the dashboard's guide
|
|
5821
|
+
* page takes; `itemId` is the one a document page takes.
|
|
5822
|
+
*/
|
|
5823
|
+
readonly guideId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
5824
|
+
/** Wrapped in `untrusted`'s markers; null when the item has no name. */
|
|
5825
|
+
readonly itemName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5826
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5827
|
+
/** Wrapped in `untrusted`'s markers. */
|
|
5828
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
5829
|
+
/** Whether the thread has been resolved — a resolved thread is answered, not open. */
|
|
5830
|
+
readonly resolved: v.BooleanSchema<undefined>;
|
|
5831
|
+
/** Whether the item has been edited since the comment was written. */
|
|
5832
|
+
readonly itemChangedSince: v.BooleanSchema<undefined>;
|
|
5833
|
+
/**
|
|
5834
|
+
* Whether the match is in the comment's text or in the replacement it
|
|
5835
|
+
* suggests (Mossbear's drafted edits).
|
|
5836
|
+
*/
|
|
5837
|
+
readonly matchedIn: v.PicklistSchema<["body", "suggestion"], undefined>;
|
|
5838
|
+
/**
|
|
5839
|
+
* A Mossbear suggestion's draft state: whether its owner has handed it to
|
|
5840
|
+
* their agents. Absent on a person's or an agent's comment and on a reply.
|
|
5841
|
+
*/
|
|
5842
|
+
readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
5843
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
5844
|
+
/**
|
|
5845
|
+
* Where the comment's item opens on the dashboard. Added by the CLI, which
|
|
5846
|
+
* knows the dashboard's address; the server does not send it.
|
|
5847
|
+
*/
|
|
5848
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5849
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
5850
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
5851
|
+
}, undefined>, undefined>;
|
|
5852
|
+
}, undefined>, v.ObjectSchema<{
|
|
5853
|
+
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
5854
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5855
|
+
}, undefined>], undefined>;
|
|
5856
|
+
export declare const SearchTurnsReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
|
|
5857
|
+
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
5858
|
+
/** Every match in scope, counted past the returned page. */
|
|
5859
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
5860
|
+
readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
|
|
5861
|
+
/** Newest first, at most the request's limit. */
|
|
5862
|
+
readonly hits: v.ArraySchema<v.ObjectSchema<{
|
|
5863
|
+
/** The agent's own session id — the key a session digest takes. */
|
|
5864
|
+
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5865
|
+
/**
|
|
5866
|
+
* The dashboard's id for the session, which its session page takes. Null when
|
|
5867
|
+
* the session has not been recorded as a run yet.
|
|
5868
|
+
*/
|
|
5869
|
+
readonly sessionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
5870
|
+
/** Which turn of the session this was, counting from 1. */
|
|
5871
|
+
readonly ordinal: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
5872
|
+
/** Null when the classifier has not labelled the turn. */
|
|
5873
|
+
readonly steeringLabel: v.NullableSchema<v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>, undefined>;
|
|
5874
|
+
/** Wrapped in `untrusted`'s markers; null where the session recorded none. */
|
|
5875
|
+
readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5876
|
+
/** Wrapped in `untrusted`'s markers; null where the session recorded none. */
|
|
5877
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5878
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
5879
|
+
/**
|
|
5880
|
+
* Where the session opens on the dashboard. Added by the CLI, which knows the
|
|
5881
|
+
* dashboard's address; the server does not send it.
|
|
5882
|
+
*/
|
|
5883
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5884
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
5885
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
5886
|
+
}, undefined>, undefined>;
|
|
5887
|
+
}, undefined>, v.ObjectSchema<{
|
|
5888
|
+
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
5889
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5304
5890
|
}, undefined>], undefined>;
|
|
5305
5891
|
export type SearchGuidesReport = v.InferOutput<typeof SearchGuidesReportSchema>;
|
|
5306
5892
|
export type SearchVerdictsReport = v.InferOutput<typeof SearchVerdictsReportSchema>;
|
|
5893
|
+
export type SearchContentReport = v.InferOutput<typeof SearchContentReportSchema>;
|
|
5894
|
+
export type SearchCommentsReport = v.InferOutput<typeof SearchCommentsReportSchema>;
|
|
5895
|
+
export type SearchTurnsReport = v.InferOutput<typeof SearchTurnsReportSchema>;
|
|
5307
5896
|
/**
|
|
5308
5897
|
* A search's answer: **a report per corpus, never a bare list.**
|
|
5309
5898
|
*
|
|
@@ -5351,7 +5940,7 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
|
|
|
5351
5940
|
}, undefined>, undefined>;
|
|
5352
5941
|
}, undefined>, v.ObjectSchema<{
|
|
5353
5942
|
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
5354
|
-
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
|
|
5943
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5355
5944
|
}, undefined>], undefined>;
|
|
5356
5945
|
readonly verdicts: v.VariantSchema<"status", [v.ObjectSchema<{
|
|
5357
5946
|
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
@@ -5373,10 +5962,135 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
|
|
|
5373
5962
|
}, undefined>, undefined>;
|
|
5374
5963
|
}, undefined>, v.ObjectSchema<{
|
|
5375
5964
|
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
5376
|
-
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
|
|
5965
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
5377
5966
|
}, undefined>], undefined>;
|
|
5967
|
+
/**
|
|
5968
|
+
* Optional because a server that predates the `content` corpus does not
|
|
5969
|
+
* send it — and then did not search it, which a caller must say rather
|
|
5970
|
+
* than read as zero hits.
|
|
5971
|
+
*/
|
|
5972
|
+
readonly content: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
|
|
5973
|
+
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
5974
|
+
/** Every match in scope, counted past the returned page. */
|
|
5975
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
5976
|
+
readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
|
|
5977
|
+
/** Newest first, at most the request's limit. */
|
|
5978
|
+
readonly hits: v.ArraySchema<v.ObjectSchema<{
|
|
5979
|
+
readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5980
|
+
/** Wrapped in `untrusted`'s markers; null when the item has no name. */
|
|
5981
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5982
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5983
|
+
/** Wrapped in `untrusted`'s markers. */
|
|
5984
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
5985
|
+
/**
|
|
5986
|
+
* Slugs of the bundles that hold the item and that the caller may read — the
|
|
5987
|
+
* argument `pull_context` takes to read the whole document. Never more than
|
|
5988
|
+
* a scoped caller's allowlist reaches.
|
|
5989
|
+
*/
|
|
5990
|
+
readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
5991
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
5992
|
+
/**
|
|
5993
|
+
* Where the item opens on the dashboard. Added by the CLI, which knows the
|
|
5994
|
+
* dashboard's address; the server does not send it.
|
|
5995
|
+
*/
|
|
5996
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
5997
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
5998
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
5999
|
+
}, undefined>, undefined>;
|
|
6000
|
+
}, undefined>, v.ObjectSchema<{
|
|
6001
|
+
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
6002
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
6003
|
+
}, undefined>], undefined>, undefined>;
|
|
6004
|
+
/** Optional for the same reason as `content`. Covers comments on guides and documents only. */
|
|
6005
|
+
readonly comments: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
|
|
6006
|
+
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
6007
|
+
/** Every match in scope, counted past the returned page. */
|
|
6008
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
6009
|
+
readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
|
|
6010
|
+
/** Newest first, at most the request's limit. */
|
|
6011
|
+
readonly hits: v.ArraySchema<v.ObjectSchema<{
|
|
6012
|
+
readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6013
|
+
/** The thread's root; equal to `commentId` for a root comment. */
|
|
6014
|
+
readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6015
|
+
readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
|
|
6016
|
+
readonly subjectKind: v.LiteralSchema<"item", undefined>;
|
|
6017
|
+
readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6018
|
+
/**
|
|
6019
|
+
* The guide the item belongs to, or null for a standalone document. A comment
|
|
6020
|
+
* on a guide sits on its body file, so this is the id the dashboard's guide
|
|
6021
|
+
* page takes; `itemId` is the one a document page takes.
|
|
6022
|
+
*/
|
|
6023
|
+
readonly guideId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
6024
|
+
/** Wrapped in `untrusted`'s markers; null when the item has no name. */
|
|
6025
|
+
readonly itemName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6026
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6027
|
+
/** Wrapped in `untrusted`'s markers. */
|
|
6028
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
6029
|
+
/** Whether the thread has been resolved — a resolved thread is answered, not open. */
|
|
6030
|
+
readonly resolved: v.BooleanSchema<undefined>;
|
|
6031
|
+
/** Whether the item has been edited since the comment was written. */
|
|
6032
|
+
readonly itemChangedSince: v.BooleanSchema<undefined>;
|
|
6033
|
+
/**
|
|
6034
|
+
* Whether the match is in the comment's text or in the replacement it
|
|
6035
|
+
* suggests (Mossbear's drafted edits).
|
|
6036
|
+
*/
|
|
6037
|
+
readonly matchedIn: v.PicklistSchema<["body", "suggestion"], undefined>;
|
|
6038
|
+
/**
|
|
6039
|
+
* A Mossbear suggestion's draft state: whether its owner has handed it to
|
|
6040
|
+
* their agents. Absent on a person's or an agent's comment and on a reply.
|
|
6041
|
+
*/
|
|
6042
|
+
readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
6043
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
6044
|
+
/**
|
|
6045
|
+
* Where the comment's item opens on the dashboard. Added by the CLI, which
|
|
6046
|
+
* knows the dashboard's address; the server does not send it.
|
|
6047
|
+
*/
|
|
6048
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6049
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
6050
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
6051
|
+
}, undefined>, undefined>;
|
|
6052
|
+
}, undefined>, v.ObjectSchema<{
|
|
6053
|
+
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
6054
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
6055
|
+
}, undefined>], undefined>, undefined>;
|
|
6056
|
+
/** Optional for the same reason as `content`. The caller's own turns, never a workspace-mate's. */
|
|
6057
|
+
readonly turns: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
|
|
6058
|
+
readonly status: v.LiteralSchema<"searched", undefined>;
|
|
6059
|
+
/** Every match in scope, counted past the returned page. */
|
|
6060
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
6061
|
+
readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
|
|
6062
|
+
/** Newest first, at most the request's limit. */
|
|
6063
|
+
readonly hits: v.ArraySchema<v.ObjectSchema<{
|
|
6064
|
+
/** The agent's own session id — the key a session digest takes. */
|
|
6065
|
+
readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6066
|
+
/**
|
|
6067
|
+
* The dashboard's id for the session, which its session page takes. Null when
|
|
6068
|
+
* the session has not been recorded as a run yet.
|
|
6069
|
+
*/
|
|
6070
|
+
readonly sessionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
6071
|
+
/** Which turn of the session this was, counting from 1. */
|
|
6072
|
+
readonly ordinal: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
6073
|
+
/** Null when the classifier has not labelled the turn. */
|
|
6074
|
+
readonly steeringLabel: v.NullableSchema<v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>, undefined>;
|
|
6075
|
+
/** Wrapped in `untrusted`'s markers; null where the session recorded none. */
|
|
6076
|
+
readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6077
|
+
/** Wrapped in `untrusted`'s markers; null where the session recorded none. */
|
|
6078
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6079
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
6080
|
+
/**
|
|
6081
|
+
* Where the session opens on the dashboard. Added by the CLI, which knows the
|
|
6082
|
+
* dashboard's address; the server does not send it.
|
|
6083
|
+
*/
|
|
6084
|
+
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6085
|
+
/** A window around the match, wrapped in `untrusted`'s markers. */
|
|
6086
|
+
readonly excerpt: v.StringSchema<undefined>;
|
|
6087
|
+
}, undefined>, undefined>;
|
|
6088
|
+
}, undefined>, v.ObjectSchema<{
|
|
6089
|
+
readonly status: v.LiteralSchema<"skipped", undefined>;
|
|
6090
|
+
readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
|
|
6091
|
+
}, undefined>], undefined>, undefined>;
|
|
5378
6092
|
}, undefined>;
|
|
5379
|
-
readonly notYetSearchable: v.ArraySchema<v.PicklistSchema<
|
|
6093
|
+
readonly notYetSearchable: v.ArraySchema<v.PicklistSchema<["session-comments", "sessions", "actions", "comments", "turns"], undefined>, undefined>;
|
|
5380
6094
|
readonly untrusted: v.ObjectSchema<{
|
|
5381
6095
|
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5382
6096
|
readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -5592,7 +6306,12 @@ export declare function parseContextItem(data: unknown): {
|
|
|
5592
6306
|
} | undefined;
|
|
5593
6307
|
body: string;
|
|
5594
6308
|
suggestion?: string | undefined;
|
|
5595
|
-
|
|
6309
|
+
finding?: {
|
|
6310
|
+
tier: "observed" | "usage" | "practice";
|
|
6311
|
+
tierLine: string;
|
|
6312
|
+
blindSpot: string;
|
|
6313
|
+
prediction: string | null;
|
|
6314
|
+
} | undefined;
|
|
5596
6315
|
approved?: boolean | undefined;
|
|
5597
6316
|
authorName: string | null;
|
|
5598
6317
|
createdAt: string;
|
|
@@ -5642,7 +6361,12 @@ export declare function parseContextItemsResponse(data: unknown): {
|
|
|
5642
6361
|
} | undefined;
|
|
5643
6362
|
body: string;
|
|
5644
6363
|
suggestion?: string | undefined;
|
|
5645
|
-
|
|
6364
|
+
finding?: {
|
|
6365
|
+
tier: "observed" | "usage" | "practice";
|
|
6366
|
+
tierLine: string;
|
|
6367
|
+
blindSpot: string;
|
|
6368
|
+
prediction: string | null;
|
|
6369
|
+
} | undefined;
|
|
5646
6370
|
approved?: boolean | undefined;
|
|
5647
6371
|
authorName: string | null;
|
|
5648
6372
|
createdAt: string;
|
|
@@ -5714,7 +6438,12 @@ export declare function parsePushContextResponse(data: unknown): {
|
|
|
5714
6438
|
} | undefined;
|
|
5715
6439
|
body: string;
|
|
5716
6440
|
suggestion?: string | undefined;
|
|
5717
|
-
|
|
6441
|
+
finding?: {
|
|
6442
|
+
tier: "observed" | "usage" | "practice";
|
|
6443
|
+
tierLine: string;
|
|
6444
|
+
blindSpot: string;
|
|
6445
|
+
prediction: string | null;
|
|
6446
|
+
} | undefined;
|
|
5718
6447
|
approved?: boolean | undefined;
|
|
5719
6448
|
authorName: string | null;
|
|
5720
6449
|
createdAt: string;
|
|
@@ -5781,7 +6510,12 @@ export declare function parseUpdateContextItemResponse(data: unknown): {
|
|
|
5781
6510
|
} | undefined;
|
|
5782
6511
|
body: string;
|
|
5783
6512
|
suggestion?: string | undefined;
|
|
5784
|
-
|
|
6513
|
+
finding?: {
|
|
6514
|
+
tier: "observed" | "usage" | "practice";
|
|
6515
|
+
tierLine: string;
|
|
6516
|
+
blindSpot: string;
|
|
6517
|
+
prediction: string | null;
|
|
6518
|
+
} | undefined;
|
|
5785
6519
|
approved?: boolean | undefined;
|
|
5786
6520
|
authorName: string | null;
|
|
5787
6521
|
createdAt: string;
|
|
@@ -5847,7 +6581,12 @@ export declare function parseContextItemResponse(data: unknown): {
|
|
|
5847
6581
|
} | undefined;
|
|
5848
6582
|
body: string;
|
|
5849
6583
|
suggestion?: string | undefined;
|
|
5850
|
-
|
|
6584
|
+
finding?: {
|
|
6585
|
+
tier: "observed" | "usage" | "practice";
|
|
6586
|
+
tierLine: string;
|
|
6587
|
+
blindSpot: string;
|
|
6588
|
+
prediction: string | null;
|
|
6589
|
+
} | undefined;
|
|
5851
6590
|
approved?: boolean | undefined;
|
|
5852
6591
|
authorName: string | null;
|
|
5853
6592
|
createdAt: string;
|
|
@@ -5899,7 +6638,12 @@ export declare function parseArchiveContextItemResponse(data: unknown): {
|
|
|
5899
6638
|
} | undefined;
|
|
5900
6639
|
body: string;
|
|
5901
6640
|
suggestion?: string | undefined;
|
|
5902
|
-
|
|
6641
|
+
finding?: {
|
|
6642
|
+
tier: "observed" | "usage" | "practice";
|
|
6643
|
+
tierLine: string;
|
|
6644
|
+
blindSpot: string;
|
|
6645
|
+
prediction: string | null;
|
|
6646
|
+
} | undefined;
|
|
5903
6647
|
approved?: boolean | undefined;
|
|
5904
6648
|
authorName: string | null;
|
|
5905
6649
|
createdAt: string;
|
|
@@ -6019,14 +6763,6 @@ export declare function parseDashboardSyncRequest(data: unknown): {
|
|
|
6019
6763
|
})[] | undefined;
|
|
6020
6764
|
status?: "pending" | "accepted" | "dismissed" | undefined;
|
|
6021
6765
|
}[] | undefined;
|
|
6022
|
-
feedbackCandidates?: {
|
|
6023
|
-
id?: string | undefined;
|
|
6024
|
-
signal: string;
|
|
6025
|
-
signalType: "correction" | "approval" | "implied_preference" | "stated_preference" | "skill_suggestion";
|
|
6026
|
-
confidence?: number | undefined;
|
|
6027
|
-
occurrences?: number | undefined;
|
|
6028
|
-
status?: "dismissed" | "inferred" | "confirmed" | undefined;
|
|
6029
|
-
}[] | undefined;
|
|
6030
6766
|
runUsage?: {
|
|
6031
6767
|
sessionId?: string | undefined;
|
|
6032
6768
|
agentSessionId: string;
|
|
@@ -6256,7 +6992,12 @@ export declare function parseItemCommentsResponse(data: unknown): {
|
|
|
6256
6992
|
} | undefined;
|
|
6257
6993
|
body: string;
|
|
6258
6994
|
suggestion?: string | undefined;
|
|
6259
|
-
|
|
6995
|
+
finding?: {
|
|
6996
|
+
tier: "observed" | "usage" | "practice";
|
|
6997
|
+
tierLine: string;
|
|
6998
|
+
blindSpot: string;
|
|
6999
|
+
prediction: string | null;
|
|
7000
|
+
} | undefined;
|
|
6260
7001
|
approved?: boolean | undefined;
|
|
6261
7002
|
authorName: string | null;
|
|
6262
7003
|
createdAt: string;
|
|
@@ -6278,8 +7019,36 @@ export declare function parseCommentEvidenceResponse(data: unknown): {
|
|
|
6278
7019
|
commentId: string;
|
|
6279
7020
|
itemName: string;
|
|
6280
7021
|
itemPath: string | null;
|
|
6281
|
-
|
|
7022
|
+
tier: "observed" | "usage" | "practice";
|
|
7023
|
+
tierLine: string;
|
|
7024
|
+
blindSpot: string;
|
|
7025
|
+
claim: string;
|
|
6282
7026
|
prediction: string | null;
|
|
7027
|
+
usage: {
|
|
7028
|
+
path: string;
|
|
7029
|
+
loads: number;
|
|
7030
|
+
sessions: number;
|
|
7031
|
+
loadsWithRead: number;
|
|
7032
|
+
} | null;
|
|
7033
|
+
practice: {
|
|
7034
|
+
check: {
|
|
7035
|
+
id: string;
|
|
7036
|
+
name: string;
|
|
7037
|
+
};
|
|
7038
|
+
rubricVersion: number;
|
|
7039
|
+
practices: {
|
|
7040
|
+
text: string;
|
|
7041
|
+
source: {
|
|
7042
|
+
title: string;
|
|
7043
|
+
url: string;
|
|
7044
|
+
};
|
|
7045
|
+
}[];
|
|
7046
|
+
facts: string[];
|
|
7047
|
+
answers: {
|
|
7048
|
+
item: string;
|
|
7049
|
+
answer: string;
|
|
7050
|
+
}[];
|
|
7051
|
+
} | null;
|
|
6283
7052
|
citations: {
|
|
6284
7053
|
kind: "verdict" | "turn" | "navigation" | "action";
|
|
6285
7054
|
sessionId: string;
|
|
@@ -6297,6 +7066,7 @@ export declare function parseCommentEvidenceResponse(data: unknown): {
|
|
|
6297
7066
|
export declare function parseRunGradeRequest(data: unknown): {
|
|
6298
7067
|
session?: string | undefined;
|
|
6299
7068
|
agent_session?: string | undefined;
|
|
7069
|
+
detail?: "digest" | undefined;
|
|
6300
7070
|
};
|
|
6301
7071
|
export declare function parseSessionGradeResponse(data: unknown): {
|
|
6302
7072
|
run: {
|
|
@@ -6326,6 +7096,50 @@ export declare function parseSessionGradeResponse(data: unknown): {
|
|
|
6326
7096
|
note: string;
|
|
6327
7097
|
} | null;
|
|
6328
7098
|
};
|
|
7099
|
+
export declare function parseSessionDigestResponse(data: unknown): {
|
|
7100
|
+
run: {
|
|
7101
|
+
id: string;
|
|
7102
|
+
agentSessionId: string;
|
|
7103
|
+
startedAt: string;
|
|
7104
|
+
endedAt: string | null;
|
|
7105
|
+
status: "open" | "closed";
|
|
7106
|
+
};
|
|
7107
|
+
state: "pending" | "graded" | "nothing_to_grade" | "expired";
|
|
7108
|
+
grade: {
|
|
7109
|
+
summary: string | null;
|
|
7110
|
+
gradedAt: string;
|
|
7111
|
+
model: string | null;
|
|
7112
|
+
superseded: boolean;
|
|
7113
|
+
guides: {
|
|
7114
|
+
guideId: string;
|
|
7115
|
+
title: string;
|
|
7116
|
+
verdict: "aligned" | "misaligned" | "not_applicable";
|
|
7117
|
+
reasoning: string;
|
|
7118
|
+
}[];
|
|
7119
|
+
} | null;
|
|
7120
|
+
digest: {
|
|
7121
|
+
selfReport: string | null;
|
|
7122
|
+
turns: {
|
|
7123
|
+
ordinal: number;
|
|
7124
|
+
text: string;
|
|
7125
|
+
steeringLabel: string | null;
|
|
7126
|
+
}[];
|
|
7127
|
+
turnsTotal: number;
|
|
7128
|
+
repoId: string | null;
|
|
7129
|
+
branch: string | null;
|
|
7130
|
+
headSha: string | null;
|
|
7131
|
+
dashboardPath: string;
|
|
7132
|
+
dashboardUrl?: string | undefined;
|
|
7133
|
+
comments: string[];
|
|
7134
|
+
notYetAvailable: ("comments" | "resumeCommand" | "cloudUrl")[];
|
|
7135
|
+
};
|
|
7136
|
+
untrusted: {
|
|
7137
|
+
token: string;
|
|
7138
|
+
startMarker: string;
|
|
7139
|
+
endMarker: string;
|
|
7140
|
+
note: string;
|
|
7141
|
+
};
|
|
7142
|
+
};
|
|
6329
7143
|
export declare function parseSearchResponse(data: unknown): {
|
|
6330
7144
|
corpora: {
|
|
6331
7145
|
guides: {
|
|
@@ -6344,7 +7158,7 @@ export declare function parseSearchResponse(data: unknown): {
|
|
|
6344
7158
|
}[];
|
|
6345
7159
|
} | {
|
|
6346
7160
|
status: "skipped";
|
|
6347
|
-
reason: "excluded-by-caller" | "timed-out" | "not-granted";
|
|
7161
|
+
reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
|
|
6348
7162
|
};
|
|
6349
7163
|
verdicts: {
|
|
6350
7164
|
status: "searched";
|
|
@@ -6360,10 +7174,73 @@ export declare function parseSearchResponse(data: unknown): {
|
|
|
6360
7174
|
}[];
|
|
6361
7175
|
} | {
|
|
6362
7176
|
status: "skipped";
|
|
6363
|
-
reason: "excluded-by-caller" | "timed-out" | "not-granted";
|
|
7177
|
+
reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
|
|
6364
7178
|
};
|
|
7179
|
+
content?: {
|
|
7180
|
+
status: "searched";
|
|
7181
|
+
total: number;
|
|
7182
|
+
narrowedBy: "narrowed-by-bundle-allowlist" | null;
|
|
7183
|
+
hits: {
|
|
7184
|
+
itemId: string;
|
|
7185
|
+
name: string | null;
|
|
7186
|
+
workspaceId: string;
|
|
7187
|
+
workspaceName: string;
|
|
7188
|
+
bundles: string[];
|
|
7189
|
+
updatedAt: string;
|
|
7190
|
+
url?: string | undefined;
|
|
7191
|
+
excerpt: string;
|
|
7192
|
+
}[];
|
|
7193
|
+
} | {
|
|
7194
|
+
status: "skipped";
|
|
7195
|
+
reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
|
|
7196
|
+
} | undefined;
|
|
7197
|
+
comments?: {
|
|
7198
|
+
status: "searched";
|
|
7199
|
+
total: number;
|
|
7200
|
+
narrowedBy: "narrowed-by-bundle-allowlist" | null;
|
|
7201
|
+
hits: {
|
|
7202
|
+
commentId: string;
|
|
7203
|
+
threadId: string;
|
|
7204
|
+
authorKind: "person" | "agent" | "mossbear";
|
|
7205
|
+
subjectKind: "item";
|
|
7206
|
+
itemId: string;
|
|
7207
|
+
guideId: string | null;
|
|
7208
|
+
itemName: string | null;
|
|
7209
|
+
workspaceId: string;
|
|
7210
|
+
workspaceName: string;
|
|
7211
|
+
resolved: boolean;
|
|
7212
|
+
itemChangedSince: boolean;
|
|
7213
|
+
matchedIn: "suggestion" | "body";
|
|
7214
|
+
approved?: boolean | undefined;
|
|
7215
|
+
createdAt: string;
|
|
7216
|
+
url?: string | undefined;
|
|
7217
|
+
excerpt: string;
|
|
7218
|
+
}[];
|
|
7219
|
+
} | {
|
|
7220
|
+
status: "skipped";
|
|
7221
|
+
reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
|
|
7222
|
+
} | undefined;
|
|
7223
|
+
turns?: {
|
|
7224
|
+
status: "searched";
|
|
7225
|
+
total: number;
|
|
7226
|
+
narrowedBy: "narrowed-by-bundle-allowlist" | null;
|
|
7227
|
+
hits: {
|
|
7228
|
+
agentSessionId: string;
|
|
7229
|
+
sessionId: string | null;
|
|
7230
|
+
ordinal: number;
|
|
7231
|
+
steeringLabel: "correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence" | null;
|
|
7232
|
+
projectId: string | null;
|
|
7233
|
+
branch: string | null;
|
|
7234
|
+
createdAt: string;
|
|
7235
|
+
url?: string | undefined;
|
|
7236
|
+
excerpt: string;
|
|
7237
|
+
}[];
|
|
7238
|
+
} | {
|
|
7239
|
+
status: "skipped";
|
|
7240
|
+
reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
|
|
7241
|
+
} | undefined;
|
|
6365
7242
|
};
|
|
6366
|
-
notYetSearchable: ("
|
|
7243
|
+
notYetSearchable: ("comments" | "sessions" | "actions" | "turns" | "session-comments")[];
|
|
6367
7244
|
untrusted: {
|
|
6368
7245
|
token: string;
|
|
6369
7246
|
startMarker: string;
|