@mossbear/protocol 0.1.0-alpha.73 → 0.1.0-alpha.75

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.
Files changed (44) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/publicModelCatalog.d.ts +19 -0
  6. package/dist/publicModelCatalog.d.ts.map +1 -0
  7. package/dist/publicModelCatalog.generated.d.ts +2 -0
  8. package/dist/publicModelCatalog.generated.d.ts.map +1 -0
  9. package/dist/publicModelCatalog.generated.js +469 -0
  10. package/dist/publicModelCatalog.generated.js.map +1 -0
  11. package/dist/publicModelCatalog.js +68 -0
  12. package/dist/publicModelCatalog.js.map +1 -0
  13. package/dist/publicModelCatalog.test.d.ts +2 -0
  14. package/dist/publicModelCatalog.test.d.ts.map +1 -0
  15. package/dist/publicModelCatalog.test.js +88 -0
  16. package/dist/publicModelCatalog.test.js.map +1 -0
  17. package/dist/publicModelNativeAliases.d.ts +5 -0
  18. package/dist/publicModelNativeAliases.d.ts.map +1 -0
  19. package/dist/publicModelNativeAliases.js +8 -0
  20. package/dist/publicModelNativeAliases.js.map +1 -0
  21. package/dist/schemas.d.ts +1567 -131
  22. package/dist/schemas.d.ts.map +1 -1
  23. package/dist/schemas.js +588 -74
  24. package/dist/schemas.js.map +1 -1
  25. package/dist/schemas.test.js +60 -32
  26. package/dist/schemas.test.js.map +1 -1
  27. package/dist/types.d.ts +1 -2
  28. package/dist/types.d.ts.map +1 -1
  29. package/dist/types.js.map +1 -1
  30. package/dist/usageOnly.d.ts +157 -0
  31. package/dist/usageOnly.d.ts.map +1 -0
  32. package/dist/usageOnly.js +47 -0
  33. package/dist/usageOnly.js.map +1 -0
  34. package/dist/usageOnly.test.d.ts +2 -0
  35. package/dist/usageOnly.test.d.ts.map +1 -0
  36. package/dist/usageOnly.test.js +188 -0
  37. package/dist/usageOnly.test.js.map +1 -0
  38. package/dist/whatSyncs.d.ts +1 -1
  39. package/dist/whatSyncs.d.ts.map +1 -1
  40. package/dist/whatSyncs.js +1 -5
  41. package/dist/whatSyncs.js.map +1 -1
  42. package/dist/whatSyncs.test.js +1 -4
  43. package/dist/whatSyncs.test.js.map +1 -1
  44. package/package.json +3 -2
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
- * One line saying what a server-drafted comment was drawn from — counts and
1074
- * dates, never the cited text. Present only on a comment Mossbear drafted.
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 evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
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
- * One line saying what a server-drafted comment was drawn from — counts and
1271
- * dates, never the cited text. Present only on a comment Mossbear drafted.
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 evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
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
- evidence?: string | undefined;
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
- * One line saying what a server-drafted comment was drawn from — counts and
1513
- * dates, never the cited text. Present only on a comment Mossbear drafted.
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 evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
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
- evidence?: string | undefined;
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;
@@ -1741,6 +1800,86 @@ export declare const AnnounceItemCommentsResponseSchema: v.ObjectSchema<{
1741
1800
  readonly announced: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1742
1801
  }, undefined>;
1743
1802
  export type AnnounceItemCommentsResponse = v.InferOutput<typeof AnnounceItemCommentsResponseSchema>;
1803
+ /**
1804
+ * How many comments one agent session may leave on one subject, not counting its
1805
+ * whole-subject comment. Anchored comments and replies share it.
1806
+ */
1807
+ export declare const MAX_AGENT_COMMENTS_PER_SUBJECT = 50;
1808
+ /** The longest an agent comment's text may be, in characters. */
1809
+ export declare const MAX_AGENT_COMMENT_BODY_CHARS = 4000;
1810
+ /**
1811
+ * Why an agent comment was refused, as the `code` on the error body. A caller
1812
+ * branches on these; the message beside one is for a person.
1813
+ */
1814
+ export declare const AGENT_COMMENT_ERROR_CODES: readonly ["agent_session_required", "agent_comment_limit_reached", "agent_comment_text_only", "agent_comment_target_missing", "agent_comment_passage_not_found", "agent_comment_passage_ambiguous", "item_comment_limit_reached"];
1815
+ export declare const AgentCommentErrorCodeSchema: v.PicklistSchema<readonly ["agent_session_required", "agent_comment_limit_reached", "agent_comment_text_only", "agent_comment_target_missing", "agent_comment_passage_not_found", "agent_comment_passage_ambiguous", "item_comment_limit_reached"], undefined>;
1816
+ export type AgentCommentErrorCode = v.InferOutput<typeof AgentCommentErrorCodeSchema>;
1817
+ /**
1818
+ * Leave a comment, or reply to one, as an agent (`POST /api/v1/context/comments`).
1819
+ *
1820
+ * **`target` names what the comment is about, one way.** `item` is the id a
1821
+ * bundle read gave for a guide or document, `session` is an agent session id of
1822
+ * the caller's own (the key a search hit and the session digest hand out), and
1823
+ * `reply` is the id of a comment to answer. A reply joins that comment's thread
1824
+ * and the subject it is about.
1825
+ *
1826
+ * **Who the agent is comes from `agent`, and `sessionId` is the harness's own
1827
+ * id as the CLI read it.** A request without one is refused with
1828
+ * `agent_session_required`, and the CLI and tool offer no way to type one. The
1829
+ * server cannot check it against the harness, so it is a claim by the holder of
1830
+ * the token: the comment is always written under that token's account, and the
1831
+ * handle shown for it names a session only as far as the claim is true.
1832
+ *
1833
+ * **Text only.** There is no replacement-text field, and a request that carries
1834
+ * one is refused with `agent_comment_text_only` rather than having it dropped.
1835
+ */
1836
+ export declare const AgentCommentRequestSchema: v.ObjectSchema<{
1837
+ readonly target: v.VariantSchema<"kind", [v.ObjectSchema<{
1838
+ readonly kind: v.LiteralSchema<"item", undefined>;
1839
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
1840
+ }, undefined>, v.ObjectSchema<{
1841
+ readonly kind: v.LiteralSchema<"session", undefined>;
1842
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
1843
+ }, undefined>, v.ObjectSchema<{
1844
+ readonly kind: v.LiteralSchema<"reply", undefined>;
1845
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
1846
+ }, undefined>], undefined>;
1847
+ readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
1848
+ /**
1849
+ * The passage an item comment is about, as the exact text of one or more whole
1850
+ * lines of the item (a paragraph, a heading, a list). None means the item as a
1851
+ * whole. The server finds the lines; a passage that is not in the item as it is
1852
+ * now is refused with `agent_comment_passage_not_found`.
1853
+ */
1854
+ readonly passage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8000, undefined>]>, undefined>;
1855
+ readonly agent: v.ObjectSchema<{
1856
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
1857
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
1858
+ /** The agent's own statement of its model, when it knows it. */
1859
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
1860
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
1861
+ }, undefined>;
1862
+ }, undefined>;
1863
+ export type AgentCommentRequest = v.InferOutput<typeof AgentCommentRequestSchema>;
1864
+ /**
1865
+ * The comment a create settled on. `created` is false when this agent session
1866
+ * already had a whole-subject comment on the subject: that comment comes back
1867
+ * unchanged and nothing was written.
1868
+ */
1869
+ export declare const AgentCommentResponseSchema: v.ObjectSchema<{
1870
+ readonly created: v.BooleanSchema<undefined>;
1871
+ readonly comment: v.ObjectSchema<{
1872
+ readonly id: v.StringSchema<undefined>;
1873
+ readonly threadId: v.StringSchema<undefined>;
1874
+ readonly subject: v.ObjectSchema<{
1875
+ readonly kind: v.PicklistSchema<["item", "session"], undefined>;
1876
+ readonly id: v.StringSchema<undefined>;
1877
+ }, undefined>;
1878
+ readonly body: v.StringSchema<undefined>;
1879
+ readonly createdAt: v.StringSchema<undefined>;
1880
+ }, undefined>;
1881
+ }, undefined>;
1882
+ export type AgentCommentResponse = v.InferOutput<typeof AgentCommentResponseSchema>;
1744
1883
  /**
1745
1884
  * One comment on the on-demand read, with the item it is about named on the comment.
1746
1885
  *
@@ -1776,10 +1915,19 @@ export declare const ItemCommentWithSubjectSchema: v.ObjectSchema<{
1776
1915
  */
1777
1916
  readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1778
1917
  /**
1779
- * One line saying what a server-drafted comment was drawn from — counts and
1780
- * dates, never the cited text. Present only on a comment Mossbear drafted.
1918
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
1919
+ * Present only on a Mossbear comment. The comment's `body` begins with the
1920
+ * claim (what goes wrong); this carries what the claim rests on.
1781
1921
  */
1782
- readonly evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
1922
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
1923
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
1924
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
1925
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
1926
+ /** What the drafter did not read, fixed per tier. */
1927
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
1928
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
1929
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1930
+ }, undefined>, undefined>;
1783
1931
  /**
1784
1932
  * Whether the person approved a comment Mossbear drafted. Present on every
1785
1933
  * Mossbear comment and absent on a person's or an agent's, which are
@@ -1869,10 +2017,19 @@ export declare const ItemCommentsResponseSchema: v.ObjectSchema<{
1869
2017
  */
1870
2018
  readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1871
2019
  /**
1872
- * One line saying what a server-drafted comment was drawn from — counts and
1873
- * dates, never the cited text. Present only on a comment Mossbear drafted.
2020
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
2021
+ * Present only on a Mossbear comment. The comment's `body` begins with the
2022
+ * claim (what goes wrong); this carries what the claim rests on.
1874
2023
  */
1875
- readonly evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
2024
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
2025
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
2026
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
2027
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
2028
+ /** What the drafter did not read, fixed per tier. */
2029
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
2030
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
2031
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2032
+ }, undefined>, undefined>;
1876
2033
  /**
1877
2034
  * Whether the person approved a comment Mossbear drafted. Present on every
1878
2035
  * Mossbear comment and absent on a person's or an agent's, which are
@@ -1936,32 +2093,31 @@ export declare const ItemCommentsResponseSchema: v.ObjectSchema<{
1936
2093
  }, undefined>;
1937
2094
  export type ItemCommentsResponse = v.InferOutput<typeof ItemCommentsResponseSchema>;
1938
2095
  /**
1939
- * The evidence behind one Mossbear comment an agent was handed
1940
- * (`GET /api/v1/context/comments/evidence`, `drafted-guide-suggestions` slice 7).
2096
+ * The evidence behind one Mossbear finding an agent was handed
2097
+ * (`GET /api/v1/context/comments/evidence`).
1941
2098
  *
1942
- * `list_comments` carries a one-line pointer; this is the envelope it points
1943
- * at: the summary, the observable change the edit predicts, and the cited
1944
- * sessions. Readable only through a comment the comment read itself would
1945
- * deliver to this reader, so another person's edit, one drafted from another
1946
- * repo, or a draft listed only to a newer client has no evidence here either.
1947
- * A draft the reader was listed does: an agent can say why it was suggested
1948
- * before the person approves it.
2099
+ * `list_comments` carries the claim and a one-line tier; this is the finding
2100
+ * in full: the claim, the change it predicts in future sessions, what the
2101
+ * drafter did not read, and the evidence for its tier. Readable only through a
2102
+ * comment the comment read itself would deliver to this reader, so another
2103
+ * person's finding, one drafted from another repo, or a draft listed only to a
2104
+ * newer client has no evidence here either. A draft the reader was listed
2105
+ * does: an agent can say why it was raised before the person approves it.
1949
2106
  *
1950
- * Citations are reduced to what the reader may see: their own sessions, with a
1951
- * date and a short excerpt of the grader's reasoning or of their own redacted
1952
- * correction turn. A `navigation` citation — a skill load counted when a
1953
- * suggestion was drafted from how the skill's files were read — has an empty
1954
- * excerpt: it is dated evidence that a session loaded the skill, and nothing
1955
- * more. `citationsWithheld` counts any that were dropped, so a short
1956
- * list is never mistaken for the whole of it.
2107
+ * Citations (observed and usage findings) are reduced to what the reader may
2108
+ * see: their own sessions, with a date and a short excerpt of the grader's
2109
+ * reasoning or of their own redacted correction turn. A `navigation` citation
2110
+ * has an empty excerpt: it is dated evidence that a session loaded the skill,
2111
+ * and nothing more. `citationsWithheld` counts any that were dropped, so a
2112
+ * short list is never mistaken for the whole of it.
1957
2113
  */
1958
2114
  export declare const CommentEvidenceCitationSchema: v.ObjectSchema<{
1959
2115
  /**
1960
- * `navigation` is a skill load whose reads drafted the suggestion. It carries
1961
- * no excerpt (an empty string): it is evidence of how a skill was used, not of
1962
- * a failure. `action` is a recorded step of a workflow repeated across
1963
- * sessions: evidence of a habit, not of a failure. A server sends it only to a
1964
- * client that names a version new enough to parse it.
2116
+ * `navigation` is a skill load counted when a finding was drafted from how
2117
+ * the skill's files were read: evidence of how a skill was used, not of a
2118
+ * failure. `action` is a recorded step of a workflow repeated across
2119
+ * sessions. A server sends it only to a client that names a version new
2120
+ * enough to parse it.
1965
2121
  */
1966
2122
  readonly kind: v.PicklistSchema<["verdict", "turn", "navigation", "action"], undefined>;
1967
2123
  readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -1971,22 +2127,115 @@ export declare const CommentEvidenceCitationSchema: v.ObjectSchema<{
1971
2127
  readonly excerpt: v.StringSchema<undefined>;
1972
2128
  }, undefined>;
1973
2129
  export type CommentEvidenceCitation = v.InferOutput<typeof CommentEvidenceCitationSchema>;
2130
+ /** What a usage finding adds to its citations: the counts for one reference file. */
2131
+ export declare const CommentEvidenceUsageSchema: v.ObjectSchema<{
2132
+ /** The reference's skill-relative path, wrapped in the response's untrusted markers. */
2133
+ readonly path: v.StringSchema<undefined>;
2134
+ /** Eligible loads of the skill. */
2135
+ readonly loads: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2136
+ /** Distinct sessions those loads span. */
2137
+ readonly sessions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2138
+ /** Loads followed by a successful read of the reference. */
2139
+ readonly loadsWithRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2140
+ }, undefined>;
2141
+ /**
2142
+ * What a practice finding adds: the rubric check it answers and the rubric's
2143
+ * version, the practice lines it weighs with their sources, the facts measured
2144
+ * from the file, and the answer to each item of evidence the check asks for.
2145
+ * `answers[].answer` is model-written, so it travels wrapped in the response's
2146
+ * untrusted markers.
2147
+ */
2148
+ export declare const CommentEvidencePracticeSchema: v.ObjectSchema<{
2149
+ readonly check: v.ObjectSchema<{
2150
+ readonly id: v.StringSchema<undefined>;
2151
+ readonly name: v.StringSchema<undefined>;
2152
+ }, undefined>;
2153
+ readonly rubricVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2154
+ readonly practices: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2155
+ readonly text: v.StringSchema<undefined>;
2156
+ readonly source: v.ObjectSchema<{
2157
+ readonly title: v.StringSchema<undefined>;
2158
+ readonly url: v.StringSchema<undefined>;
2159
+ }, undefined>;
2160
+ }, undefined>, undefined>, readonly []>;
2161
+ readonly facts: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
2162
+ readonly answers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2163
+ readonly item: v.StringSchema<undefined>;
2164
+ readonly answer: v.StringSchema<undefined>;
2165
+ }, undefined>, undefined>, readonly []>;
2166
+ }, undefined>;
2167
+ /**
2168
+ * A comment the person (or Mossbear) left on one of the sessions a finding
2169
+ * cites — the person's own account of what the agent should have known, set
2170
+ * beside the grader's excerpt (`guide-findings-plan.md` → Your note on a
2171
+ * session).
2172
+ *
2173
+ * **Reachable only here.** A comment about a session is never listed by
2174
+ * `list_comments` or announced at session start: it is context for a finding,
2175
+ * found by following the finding's citation, not a request.
2176
+ */
2177
+ export declare const CommentEvidenceSessionCommentSchema: v.ObjectSchema<{
2178
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2179
+ /** Only the person's own notes are sent today; `mossbear` is reserved. */
2180
+ readonly authorKind: v.PicklistSchema<["person", "mossbear"], undefined>;
2181
+ /** ISO, when the comment was written. */
2182
+ readonly at: v.StringSchema<undefined>;
2183
+ /** Wrapped in the response's untrusted markers. */
2184
+ readonly body: v.StringSchema<undefined>;
2185
+ }, undefined>;
2186
+ export type CommentEvidenceSessionComment = v.InferOutput<typeof CommentEvidenceSessionCommentSchema>;
1974
2187
  export declare const CommentEvidenceResponseSchema: v.ObjectSchema<{
1975
2188
  /** The comment's full id, even when the request named a prefix. */
1976
2189
  readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1977
2190
  readonly itemName: v.StringSchema<undefined>;
1978
2191
  readonly itemPath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1979
- /** Wrapped in the response's untrusted markers. */
1980
- readonly summary: v.StringSchema<undefined>;
1981
- /** What future sessions should show if the edit works, wrapped; null if none. */
2192
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
2193
+ /** One line saying how the finding is known; server-written, outside the markers. */
2194
+ readonly tierLine: v.StringSchema<undefined>;
2195
+ /** What the drafter did not read; server-written, outside the markers. */
2196
+ readonly blindSpot: v.StringSchema<undefined>;
2197
+ /** What goes wrong, wrapped in the response's untrusted markers. */
2198
+ readonly claim: v.StringSchema<undefined>;
2199
+ /** What future sessions should show if the finding is fixed, wrapped; null if none. */
1982
2200
  readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2201
+ /** A usage finding's counts; null on every other tier. */
2202
+ readonly usage: v.NullableSchema<v.ObjectSchema<{
2203
+ /** The reference's skill-relative path, wrapped in the response's untrusted markers. */
2204
+ readonly path: v.StringSchema<undefined>;
2205
+ /** Eligible loads of the skill. */
2206
+ readonly loads: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2207
+ /** Distinct sessions those loads span. */
2208
+ readonly sessions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2209
+ /** Loads followed by a successful read of the reference. */
2210
+ readonly loadsWithRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2211
+ }, undefined>, undefined>;
2212
+ /** A practice finding's rubric check; null on every other tier. */
2213
+ readonly practice: v.NullableSchema<v.ObjectSchema<{
2214
+ readonly check: v.ObjectSchema<{
2215
+ readonly id: v.StringSchema<undefined>;
2216
+ readonly name: v.StringSchema<undefined>;
2217
+ }, undefined>;
2218
+ readonly rubricVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2219
+ readonly practices: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2220
+ readonly text: v.StringSchema<undefined>;
2221
+ readonly source: v.ObjectSchema<{
2222
+ readonly title: v.StringSchema<undefined>;
2223
+ readonly url: v.StringSchema<undefined>;
2224
+ }, undefined>;
2225
+ }, undefined>, undefined>, readonly []>;
2226
+ readonly facts: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
2227
+ readonly answers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2228
+ readonly item: v.StringSchema<undefined>;
2229
+ readonly answer: v.StringSchema<undefined>;
2230
+ }, undefined>, undefined>, readonly []>;
2231
+ }, undefined>, undefined>;
1983
2232
  readonly citations: v.ArraySchema<v.ObjectSchema<{
1984
2233
  /**
1985
- * `navigation` is a skill load whose reads drafted the suggestion. It carries
1986
- * no excerpt (an empty string): it is evidence of how a skill was used, not of
1987
- * a failure. `action` is a recorded step of a workflow repeated across
1988
- * sessions: evidence of a habit, not of a failure. A server sends it only to a
1989
- * client that names a version new enough to parse it.
2234
+ * `navigation` is a skill load counted when a finding was drafted from how
2235
+ * the skill's files were read: evidence of how a skill was used, not of a
2236
+ * failure. `action` is a recorded step of a workflow repeated across
2237
+ * sessions. A server sends it only to a client that names a version new
2238
+ * enough to parse it.
1990
2239
  */
1991
2240
  readonly kind: v.PicklistSchema<["verdict", "turn", "navigation", "action"], undefined>;
1992
2241
  readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -1996,6 +2245,26 @@ export declare const CommentEvidenceResponseSchema: v.ObjectSchema<{
1996
2245
  readonly excerpt: v.StringSchema<undefined>;
1997
2246
  }, undefined>, undefined>;
1998
2247
  readonly citationsWithheld: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2248
+ /**
2249
+ * Comments on the cited sessions, newest first, wrapped in the untrusted
2250
+ * markers. Defaulted so a response from a server that predates the field
2251
+ * still parses.
2252
+ */
2253
+ readonly sessionComments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2254
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2255
+ /** Only the person's own notes are sent today; `mossbear` is reserved. */
2256
+ readonly authorKind: v.PicklistSchema<["person", "mossbear"], undefined>;
2257
+ /** ISO, when the comment was written. */
2258
+ readonly at: v.StringSchema<undefined>;
2259
+ /** Wrapped in the response's untrusted markers. */
2260
+ readonly body: v.StringSchema<undefined>;
2261
+ }, undefined>, undefined>, readonly []>;
2262
+ /**
2263
+ * Comments on the cited sessions that were left out to keep the response
2264
+ * bounded (the newest few per session are sent), so a short list is never
2265
+ * mistaken for the whole of it. Zero when none were.
2266
+ */
2267
+ readonly sessionCommentsWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, 0>;
1999
2268
  readonly untrusted: v.ObjectSchema<{
2000
2269
  readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2001
2270
  readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -2184,10 +2453,19 @@ export declare const PushContextResponseSchema: v.ObjectSchema<{
2184
2453
  */
2185
2454
  readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2186
2455
  /**
2187
- * One line saying what a server-drafted comment was drawn from — counts and
2188
- * dates, never the cited text. Present only on a comment Mossbear drafted.
2456
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
2457
+ * Present only on a Mossbear comment. The comment's `body` begins with the
2458
+ * claim (what goes wrong); this carries what the claim rests on.
2189
2459
  */
2190
- readonly evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
2460
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
2461
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
2462
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
2463
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
2464
+ /** What the drafter did not read, fixed per tier. */
2465
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
2466
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
2467
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2468
+ }, undefined>, undefined>;
2191
2469
  /**
2192
2470
  * Whether the person approved a comment Mossbear drafted. Present on every
2193
2471
  * Mossbear comment and absent on a person's or an agent's, which are
@@ -2249,7 +2527,12 @@ export declare const PushContextResponseSchema: v.ObjectSchema<{
2249
2527
  } | undefined;
2250
2528
  body: string;
2251
2529
  suggestion?: string | undefined;
2252
- evidence?: string | undefined;
2530
+ finding?: {
2531
+ tier: "observed" | "usage" | "practice";
2532
+ tierLine: string;
2533
+ blindSpot: string;
2534
+ prediction: string | null;
2535
+ } | undefined;
2253
2536
  approved?: boolean | undefined;
2254
2537
  authorName: string | null;
2255
2538
  createdAt: string;
@@ -2515,10 +2798,19 @@ export declare const UpdateContextItemResponseSchema: v.ObjectSchema<{
2515
2798
  */
2516
2799
  readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2517
2800
  /**
2518
- * One line saying what a server-drafted comment was drawn from — counts and
2519
- * dates, never the cited text. Present only on a comment Mossbear drafted.
2801
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
2802
+ * Present only on a Mossbear comment. The comment's `body` begins with the
2803
+ * claim (what goes wrong); this carries what the claim rests on.
2520
2804
  */
2521
- readonly evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
2805
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
2806
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
2807
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
2808
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
2809
+ /** What the drafter did not read, fixed per tier. */
2810
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
2811
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
2812
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2813
+ }, undefined>, undefined>;
2522
2814
  /**
2523
2815
  * Whether the person approved a comment Mossbear drafted. Present on every
2524
2816
  * Mossbear comment and absent on a person's or an agent's, which are
@@ -2580,7 +2872,12 @@ export declare const UpdateContextItemResponseSchema: v.ObjectSchema<{
2580
2872
  } | undefined;
2581
2873
  body: string;
2582
2874
  suggestion?: string | undefined;
2583
- evidence?: string | undefined;
2875
+ finding?: {
2876
+ tier: "observed" | "usage" | "practice";
2877
+ tierLine: string;
2878
+ blindSpot: string;
2879
+ prediction: string | null;
2880
+ } | undefined;
2584
2881
  approved?: boolean | undefined;
2585
2882
  authorName: string | null;
2586
2883
  createdAt: string;
@@ -3007,10 +3304,19 @@ export declare const ContextItemResponseSchema: v.ObjectSchema<{
3007
3304
  */
3008
3305
  readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3009
3306
  /**
3010
- * One line saying what a server-drafted comment was drawn from — counts and
3011
- * dates, never the cited text. Present only on a comment Mossbear drafted.
3307
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
3308
+ * Present only on a Mossbear comment. The comment's `body` begins with the
3309
+ * claim (what goes wrong); this carries what the claim rests on.
3012
3310
  */
3013
- readonly evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
3311
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
3312
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
3313
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
3314
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
3315
+ /** What the drafter did not read, fixed per tier. */
3316
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
3317
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
3318
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3319
+ }, undefined>, undefined>;
3014
3320
  /**
3015
3321
  * Whether the person approved a comment Mossbear drafted. Present on every
3016
3322
  * Mossbear comment and absent on a person's or an agent's, which are
@@ -3072,7 +3378,12 @@ export declare const ContextItemResponseSchema: v.ObjectSchema<{
3072
3378
  } | undefined;
3073
3379
  body: string;
3074
3380
  suggestion?: string | undefined;
3075
- evidence?: string | undefined;
3381
+ finding?: {
3382
+ tier: "observed" | "usage" | "practice";
3383
+ tierLine: string;
3384
+ blindSpot: string;
3385
+ prediction: string | null;
3386
+ } | undefined;
3076
3387
  approved?: boolean | undefined;
3077
3388
  authorName: string | null;
3078
3389
  createdAt: string;
@@ -3251,10 +3562,19 @@ export declare const ArchiveContextItemResponseSchema: v.ObjectSchema<{
3251
3562
  */
3252
3563
  readonly suggestion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3253
3564
  /**
3254
- * One line saying what a server-drafted comment was drawn from — counts and
3255
- * dates, never the cited text. Present only on a comment Mossbear drafted.
3565
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
3566
+ * Present only on a Mossbear comment. The comment's `body` begins with the
3567
+ * claim (what goes wrong); this carries what the claim rests on.
3256
3568
  */
3257
- readonly evidence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
3569
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
3570
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
3571
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
3572
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
3573
+ /** What the drafter did not read, fixed per tier. */
3574
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
3575
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
3576
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3577
+ }, undefined>, undefined>;
3258
3578
  /**
3259
3579
  * Whether the person approved a comment Mossbear drafted. Present on every
3260
3580
  * Mossbear comment and absent on a person's or an agent's, which are
@@ -3316,7 +3636,12 @@ export declare const ArchiveContextItemResponseSchema: v.ObjectSchema<{
3316
3636
  } | undefined;
3317
3637
  body: string;
3318
3638
  suggestion?: string | undefined;
3319
- evidence?: string | undefined;
3639
+ finding?: {
3640
+ tier: "observed" | "usage" | "practice";
3641
+ tierLine: string;
3642
+ blindSpot: string;
3643
+ prediction: string | null;
3644
+ } | undefined;
3320
3645
  approved?: boolean | undefined;
3321
3646
  authorName: string | null;
3322
3647
  createdAt: string;
@@ -3769,17 +4094,9 @@ export declare const DashboardGuideSuggestionSchema: v.ObjectSchema<{
3769
4094
  }, undefined>], undefined>, undefined>, undefined>;
3770
4095
  readonly status: v.OptionalSchema<v.PicklistSchema<["pending", "accepted", "dismissed"], undefined>, undefined>;
3771
4096
  }, 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
4097
  /** Max number of actions accepted in a single `POST /api/sync` request. */
3781
4098
  export declare const MAX_SYNC_ACTIONS_BATCH = 500;
3782
- /** Max number of guideSuggestions/feedbackCandidates/runUsage entries per sync request. */
4099
+ /** Max number of guideSuggestions/runUsage entries per sync request. */
3783
4100
  export declare const MAX_SYNC_AUX_BATCH = 100;
3784
4101
  /**
3785
4102
  * Max rule files one delivery manifest enumerates. Well above what a real repo
@@ -4074,21 +4391,6 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
4074
4391
  })[] | undefined;
4075
4392
  status?: "pending" | "accepted" | "dismissed" | undefined;
4076
4393
  }[], 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
4394
  readonly runUsage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
4093
4395
  readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4094
4396
  readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -4990,16 +5292,23 @@ export type GuideHistoryResponse = v.InferOutput<typeof GuideHistoryResponseSche
4990
5292
  export declare const SessionGradeRequestSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
4991
5293
  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
5294
  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>;
5295
+ /**
5296
+ * Opt in to the session digest: the grade plus the turns, self-report and
5297
+ * git position of the session. Omitted, the small grade payload that
5298
+ * `mossbear sessions` and session start read is unchanged.
5299
+ */
5300
+ readonly detail: v.OptionalSchema<v.LiteralSchema<"digest", undefined>, undefined>;
4993
5301
  }, undefined>, v.CheckAction<{
4994
5302
  session?: string | undefined;
4995
5303
  agent_session?: string | undefined;
5304
+ detail?: "digest" | undefined;
4996
5305
  }, "Pass exactly one of session or agent_session">]>;
4997
5306
  export type SessionGradeRequest = v.InferOutput<typeof SessionGradeRequestSchema>;
4998
5307
  /**
4999
5308
  * Which of four states the run's grade is in — a required field rather than
5000
5309
  * something a reader infers from a null `grade`.
5001
5310
  *
5002
- * The four are four different sentences, and the absence of a grade is never
5311
+ * These states need different sentences, and the absence of a grade is never
5003
5312
  * one of them on its own:
5004
5313
  *
5005
5314
  * - `pending` — no grade yet, and the grading sweep can still pick the run
@@ -5012,8 +5321,9 @@ export type SessionGradeRequest = v.InferOutput<typeof SessionGradeRequestSchema
5012
5321
  * - `expired` — no grade, and the run closed too long ago for the sweep to
5013
5322
  * select it. It will never be graded, and telling a reader to wait would
5014
5323
  * promise work the system does not do.
5324
+ * - `grading_off` — only usage was synced; no behavioral grade is requested.
5015
5325
  */
5016
- export declare const SessionGradeStateSchema: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired"], undefined>;
5326
+ export declare const SessionGradeStateSchema: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired", "grading_off"], undefined>;
5017
5327
  export type SessionGradeState = v.InferOutput<typeof SessionGradeStateSchema>;
5018
5328
  /**
5019
5329
  * The run-level verdict vocabulary — `aligned | misaligned | not_applicable`.
@@ -5080,7 +5390,7 @@ export declare const SessionGradeResponseSchema: v.ObjectSchema<{
5080
5390
  readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5081
5391
  readonly status: v.PicklistSchema<["open", "closed"], undefined>;
5082
5392
  }, undefined>;
5083
- readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired"], undefined>;
5393
+ readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired", "grading_off"], undefined>;
5084
5394
  /** Present exactly when `state` is `graded`. */
5085
5395
  readonly grade: v.NullableSchema<v.ObjectSchema<{
5086
5396
  /** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
@@ -5121,26 +5431,152 @@ export declare const SessionGradeResponseSchema: v.ObjectSchema<{
5121
5431
  }, undefined>, undefined>;
5122
5432
  }, undefined>;
5123
5433
  export type SessionGradeResponse = v.InferOutput<typeof SessionGradeResponseSchema>;
5434
+ /** Most turns one digest returns; `turnsTotal` says how many the session has. */
5435
+ export declare const SESSION_DIGEST_MAX_TURNS = 50;
5436
+ /** What the digest cannot carry yet, named so an absence is never read as "none". */
5437
+ export declare const SESSION_DIGEST_UNAVAILABLE: readonly ["comments", "resumeCommand", "cloudUrl"];
5438
+ export declare const SessionDigestUnavailableSchema: v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>;
5439
+ export type SessionDigestUnavailable = v.InferOutput<typeof SessionDigestUnavailableSchema>;
5440
+ export declare const SessionDigestTurnSchema: v.ObjectSchema<{
5441
+ readonly ordinal: v.NumberSchema<undefined>;
5442
+ /** What the user said, **wrapped in the response's untrusted markers** and bounded. */
5443
+ readonly text: v.StringSchema<undefined>;
5444
+ /** The steering classifier's label, or null when the turn was never classified. */
5445
+ readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5446
+ }, undefined>;
5447
+ export type SessionDigestTurn = v.InferOutput<typeof SessionDigestTurnSchema>;
5448
+ export declare const SessionDigestSchema: v.ObjectSchema<{
5449
+ /** The agent's own closing account of the session, wrapped and bounded; null when it gave none. */
5450
+ readonly selfReport: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5451
+ /** The user's turns in order, at most `SESSION_DIGEST_MAX_TURNS`. */
5452
+ readonly turns: v.ArraySchema<v.ObjectSchema<{
5453
+ readonly ordinal: v.NumberSchema<undefined>;
5454
+ /** What the user said, **wrapped in the response's untrusted markers** and bounded. */
5455
+ readonly text: v.StringSchema<undefined>;
5456
+ /** The steering classifier's label, or null when the turn was never classified. */
5457
+ readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5458
+ }, undefined>, undefined>;
5459
+ /** Every turn the session recorded, so a cut list is not read as the whole. */
5460
+ readonly turnsTotal: v.NumberSchema<undefined>;
5461
+ /** The repository's identity digest, or null when the session recorded none. */
5462
+ readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5463
+ /** The branch observed at close, wrapped like any text taken from the repo; null when unrecorded. */
5464
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5465
+ /** The head commit observed at close, or null. A commit made mid-session is not it. */
5466
+ readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5467
+ /** The session's page on the dashboard, as a path; the client prefixes the dashboard address. */
5468
+ readonly dashboardPath: v.StringSchema<undefined>;
5469
+ /** Absolute dashboard link, added by the client that knows the address. */
5470
+ readonly dashboardUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5471
+ /** Comments on this session, wrapped; empty until sessions can be commented on. */
5472
+ readonly comments: v.ArraySchema<v.StringSchema<undefined>, undefined>;
5473
+ /** The parts of a digest no session carries yet. */
5474
+ readonly notYetAvailable: v.ArraySchema<v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>, undefined>;
5475
+ }, undefined>;
5476
+ export type SessionDigest = v.InferOutput<typeof SessionDigestSchema>;
5477
+ export declare const SessionDigestResponseSchema: v.ObjectSchema<{
5478
+ readonly run: v.ObjectSchema<{
5479
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5480
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5481
+ readonly startedAt: v.StringSchema<undefined>;
5482
+ readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5483
+ readonly status: v.PicklistSchema<["open", "closed"], undefined>;
5484
+ }, undefined>;
5485
+ readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired", "grading_off"], undefined>;
5486
+ readonly grade: v.NullableSchema<v.ObjectSchema<{
5487
+ /** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
5488
+ readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5489
+ /** ISO timestamp, machine format — display formatting is the reader's job. */
5490
+ readonly gradedAt: v.StringSchema<undefined>;
5491
+ /** The model that produced the judgment, or null when the record does not say. */
5492
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5493
+ /**
5494
+ * True when the run grew after this grade was written — a later sync
5495
+ * attached more actions — so the judgment describes a smaller run than the
5496
+ * one on record. A superseded grade is real and is still reported; it is
5497
+ * labelled rather than hidden.
5498
+ */
5499
+ readonly superseded: v.BooleanSchema<undefined>;
5500
+ readonly guides: v.ArraySchema<v.ObjectSchema<{
5501
+ readonly guideId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5502
+ readonly title: v.StringSchema<undefined>;
5503
+ readonly verdict: v.PicklistSchema<["aligned", "misaligned", "not_applicable"], undefined>;
5504
+ /**
5505
+ * The grader's reasoning, **already wrapped in the response's untrusted
5506
+ * markers** — model-authored text derived from a transcript, delimited at the
5507
+ * source so a consumer cannot skip the markers. Empty between the markers
5508
+ * when the row recorded none.
5509
+ */
5510
+ readonly reasoning: v.StringSchema<undefined>;
5511
+ }, undefined>, undefined>;
5512
+ }, undefined>, undefined>;
5513
+ readonly digest: v.ObjectSchema<{
5514
+ /** The agent's own closing account of the session, wrapped and bounded; null when it gave none. */
5515
+ readonly selfReport: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5516
+ /** The user's turns in order, at most `SESSION_DIGEST_MAX_TURNS`. */
5517
+ readonly turns: v.ArraySchema<v.ObjectSchema<{
5518
+ readonly ordinal: v.NumberSchema<undefined>;
5519
+ /** What the user said, **wrapped in the response's untrusted markers** and bounded. */
5520
+ readonly text: v.StringSchema<undefined>;
5521
+ /** The steering classifier's label, or null when the turn was never classified. */
5522
+ readonly steeringLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5523
+ }, undefined>, undefined>;
5524
+ /** Every turn the session recorded, so a cut list is not read as the whole. */
5525
+ readonly turnsTotal: v.NumberSchema<undefined>;
5526
+ /** The repository's identity digest, or null when the session recorded none. */
5527
+ readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5528
+ /** The branch observed at close, wrapped like any text taken from the repo; null when unrecorded. */
5529
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5530
+ /** The head commit observed at close, or null. A commit made mid-session is not it. */
5531
+ readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5532
+ /** The session's page on the dashboard, as a path; the client prefixes the dashboard address. */
5533
+ readonly dashboardPath: v.StringSchema<undefined>;
5534
+ /** Absolute dashboard link, added by the client that knows the address. */
5535
+ readonly dashboardUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5536
+ /** Comments on this session, wrapped; empty until sessions can be commented on. */
5537
+ readonly comments: v.ArraySchema<v.StringSchema<undefined>, undefined>;
5538
+ /** The parts of a digest no session carries yet. */
5539
+ readonly notYetAvailable: v.ArraySchema<v.PicklistSchema<readonly ["comments", "resumeCommand", "cloudUrl"], undefined>, undefined>;
5540
+ }, undefined>;
5541
+ /** One marker pair over every wrapped block in the response, present always. */
5542
+ readonly untrusted: v.ObjectSchema<{
5543
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5544
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5545
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5546
+ readonly note: v.StringSchema<undefined>;
5547
+ }, undefined>;
5548
+ }, undefined>;
5549
+ export type SessionDigestResponse = v.InferOutput<typeof SessionDigestResponseSchema>;
5124
5550
  /**
5125
- * The corpora a search can reach today (`universal-search`, deliverable 1).
5551
+ * The corpora a search can reach today.
5126
5552
  *
5127
5553
  * `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
- * One registry on the server declares how each is matched and scoped; this
5130
- * list is only what a caller may name.
5554
+ * is the grader's reasoning for why a session did or did not follow a guide;
5555
+ * `content` is the name and body of the documents saved in bundles; `comments`
5556
+ * is the text of comments left on guides and documents and, for a caller that
5557
+ * reads them (`SearchRequest.sessionComments`), on its own sessions; `turns` is what the
5558
+ * caller themself said to their agents, redacted; `sessions` is the grader's
5559
+ * summary of the caller's own sessions and the agent's closing report. One
5560
+ * registry on the server declares how each is matched and scoped; this list is
5561
+ * only what a caller may name.
5131
5562
  */
5132
- export declare const SEARCH_CORPUS_IDS: readonly ["guides", "verdicts"];
5133
- export declare const SearchCorpusIdSchema: v.PicklistSchema<readonly ["guides", "verdicts"], undefined>;
5563
+ export declare const SEARCH_CORPUS_IDS: readonly ["guides", "verdicts", "content", "comments", "turns", "sessions"];
5564
+ export declare const SearchCorpusIdSchema: v.PicklistSchema<readonly ["guides", "verdicts", "content", "comments", "turns", "sessions"], undefined>;
5134
5565
  export type SearchCorpusId = v.InferOutput<typeof SearchCorpusIdSchema>;
5135
5566
  /**
5136
- * Every stored text no search reaches yet — session findings, actions and
5137
- * their narration, guide suggestions, and feedback candidates. Every response
5138
- * names them, so "nothing found" can never be read as covering them. (Earlier
5139
- * wordings of a guide are deliberately never searched, which is a different
5140
- * thing from not yet.)
5567
+ * Every stored text no search reaches yet — the actions and their narration.
5568
+ * Every response names them, so "nothing found" can never be read as covering
5569
+ * them. (Earlier wordings of a guide are deliberately never searched, which is a
5570
+ * different thing from not yet.)
5571
+ */
5572
+ export declare const SEARCH_UNIMPLEMENTED_CORPORA: readonly ["actions"];
5573
+ /**
5574
+ * What a response still names as not searched for a caller that did not say it
5575
+ * reads session comments (`SearchRequest.sessionComments`): they were left out
5576
+ * of its `comments`, so saying otherwise would read a zero as covering them.
5141
5577
  */
5142
- export declare const SEARCH_UNIMPLEMENTED_CORPORA: readonly ["findings", "actions", "suggestions", "feedback-candidates"];
5143
- export declare const SearchUnimplementedCorpusSchema: v.PicklistSchema<readonly ["findings", "actions", "suggestions", "feedback-candidates"], undefined>;
5578
+ export declare const SEARCH_SESSION_COMMENTS_UNSEARCHED: "session-comments";
5579
+ export declare const SearchUnimplementedCorpusSchema: v.PicklistSchema<readonly ["actions"], undefined>;
5144
5580
  /** Hits returned per corpus when the caller does not say. */
5145
5581
  export declare const SEARCH_DEFAULT_LIMIT = 10;
5146
5582
  /** The most hits one corpus returns. Totals are counted past it. */
@@ -5167,10 +5603,51 @@ export declare const SearchTermSchema: v.SchemaWithPipe<readonly [v.StringSchema
5167
5603
  export declare const SEARCH_DETAILS: readonly ["excerpt", "section"];
5168
5604
  export declare const SearchDetailSchema: v.PicklistSchema<readonly ["excerpt", "section"], undefined>;
5169
5605
  export type SearchDetail = v.InferOutput<typeof SearchDetailSchema>;
5170
- export declare const SearchRequestSchema: v.ObjectSchema<{
5171
- 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 ?">]>;
5606
+ /** Frontmatter filters a `content` search accepts at once. */
5607
+ export declare const SEARCH_MAX_FRONTMATTER_FILTERS = 3;
5608
+ /**
5609
+ * One top-level frontmatter field a `content` item must carry, by exact scalar
5610
+ * value (`type: recipe`). The key is a plain YAML key so it can be matched
5611
+ * without being interpreted; the value is literal text, compared
5612
+ * case-insensitively.
5613
+ */
5614
+ 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<{
5615
+ [x: string]: string;
5616
+ }, "frontmatter takes between 1 and 3 fields">]>;
5617
+ export type SearchFrontmatter = v.InferOutput<typeof SearchFrontmatterSchema>;
5618
+ /** Who wrote a comment: a person, an agent, or Mossbear itself. */
5619
+ export declare const SEARCH_COMMENT_AUTHOR_KINDS: readonly ["person", "agent", "mossbear"];
5620
+ export declare const SearchCommentAuthorKindSchema: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
5621
+ export type SearchCommentAuthorKind = v.InferOutput<typeof SearchCommentAuthorKindSchema>;
5622
+ /**
5623
+ * What a comment is attached to. `item` is a guide or a document; `session` is a
5624
+ * run the caller made. Session comments are the caller's own and never reach a
5625
+ * workspace-mate.
5626
+ */
5627
+ export declare const SEARCH_COMMENT_SUBJECT_KINDS: readonly ["item", "session"];
5628
+ export declare const SearchCommentSubjectKindSchema: v.PicklistSchema<readonly ["item", "session"], undefined>;
5629
+ export type SearchCommentSubjectKind = v.InferOutput<typeof SearchCommentSubjectKindSchema>;
5630
+ /**
5631
+ * What a user turn was, as the session classifier labels it. The same
5632
+ * vocabulary the classifier writes; a `turns` search may keep only some.
5633
+ */
5634
+ export declare const SEARCH_STEERING_LABELS: readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"];
5635
+ export declare const SearchSteeringLabelSchema: v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>;
5636
+ export type SearchSteeringLabel = v.InferOutput<typeof SearchSteeringLabelSchema>;
5637
+ /**
5638
+ * One exact value a `sessions` search filters on — a head sha, a branch name or
5639
+ * a repo digest. Compared as written, so it is trimmed and bounded but never
5640
+ * case-folded or treated as a pattern.
5641
+ */
5642
+ export declare const SearchSessionFilterValueSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a session filter must not be empty">, v.MaxLengthAction<string, 200, "a session filter must be at most 200 characters">, v.CheckAction<string, "a session filter must not contain control characters">]>;
5643
+ export declare const SearchRequestObjectSchema: v.ObjectSchema<{
5644
+ /**
5645
+ * The term. Optional only for a `sessions` search that names a filter (`headSha`,
5646
+ * `branch` or `repoId`): "which session ended at this commit" has no words to match.
5647
+ */
5648
+ readonly q: v.OptionalSchema<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 ?">]>, undefined>;
5172
5649
  /** 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>;
5650
+ readonly corpora: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["guides", "verdicts", "content", "comments", "turns", "sessions"], undefined>, undefined>, v.MinLengthAction<("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[], 1, undefined>]>, undefined>;
5174
5651
  /**
5175
5652
  * The bundles a scoped caller may read content from — `mossbear mcp
5176
5653
  * --bundles` resolved to ids by the CLI, since the server never sees that
@@ -5188,13 +5665,227 @@ export declare const SearchRequestSchema: v.ObjectSchema<{
5188
5665
  * id the caller cannot read matches nothing. Does not touch other corpora.
5189
5666
  */
5190
5667
  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>;
5668
+ /**
5669
+ * Restrict the `content` corpus to items whose frontmatter carries every one
5670
+ * of these fields. Does not touch other corpora.
5671
+ */
5672
+ 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<{
5673
+ [x: string]: string;
5674
+ }, "frontmatter takes between 1 and 3 fields">]>, undefined>;
5675
+ /**
5676
+ * Restrict the `comments` corpus to comments written by these kinds of
5677
+ * author. Does not touch other corpora.
5678
+ */
5679
+ readonly authorKinds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>, undefined>, v.MinLengthAction<("agent" | "person" | "mossbear")[], 1, undefined>]>, undefined>;
5680
+ /**
5681
+ * Restrict the `comments` corpus to comments on these kinds of subject. Does
5682
+ * not touch other corpora.
5683
+ */
5684
+ readonly subjectKinds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["item", "session"], undefined>, undefined>, v.MinLengthAction<("item" | "session")[], 1, undefined>]>, undefined>;
5685
+ /**
5686
+ * Restrict the `turns` corpus to turns the classifier gave one of these
5687
+ * labels. A turn with no label never matches. Does not touch other corpora.
5688
+ */
5689
+ 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>;
5690
+ /**
5691
+ * Restrict the `sessions` corpus to sessions whose recorded head was exactly
5692
+ * this commit when they closed. A commit made mid-session matches nothing:
5693
+ * the head is the one observed at close. Does not touch other corpora.
5694
+ */
5695
+ readonly headSha: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a session filter must not be empty">, v.MaxLengthAction<string, 200, "a session filter must be at most 200 characters">, v.CheckAction<string, "a session filter must not contain control characters">]>, undefined>;
5696
+ /** Restrict the `sessions` corpus to sessions that closed on exactly this branch. Does not touch other corpora. */
5697
+ readonly branch: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a session filter must not be empty">, v.MaxLengthAction<string, 200, "a session filter must be at most 200 characters">, v.CheckAction<string, "a session filter must not contain control characters">]>, undefined>;
5698
+ /** Restrict the `sessions` corpus to sessions recorded under exactly this repo id. Does not touch other corpora. */
5699
+ readonly repoId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a session filter must not be empty">, v.MaxLengthAction<string, 200, "a session filter must be at most 200 characters">, v.CheckAction<string, "a session filter must not contain control characters">]>, undefined>;
5700
+ /**
5701
+ * Whether the caller can read a `comments` hit on a session. A client from
5702
+ * before session comments were searchable validates the whole response
5703
+ * strictly and would reject one, so the server returns them only to a caller
5704
+ * that says it can, and tells every other caller they were not searched.
5705
+ * Absent means it cannot.
5706
+ */
5707
+ readonly sessionComments: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5191
5708
  }, undefined>;
5709
+ /**
5710
+ * A request with no term searches the caller's sessions by filter alone, so it
5711
+ * must name one, and must not name another corpus (which has nothing to match).
5712
+ */
5713
+ export declare const SearchRequestSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
5714
+ /**
5715
+ * The term. Optional only for a `sessions` search that names a filter (`headSha`,
5716
+ * `branch` or `repoId`): "which session ended at this commit" has no words to match.
5717
+ */
5718
+ readonly q: v.OptionalSchema<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 ?">]>, undefined>;
5719
+ /** Which corpora to search; every one when absent. */
5720
+ readonly corpora: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["guides", "verdicts", "content", "comments", "turns", "sessions"], undefined>, undefined>, v.MinLengthAction<("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[], 1, undefined>]>, undefined>;
5721
+ /**
5722
+ * The bundles a scoped caller may read content from — `mossbear mcp
5723
+ * --bundles` resolved to ids by the CLI, since the server never sees that
5724
+ * flag. **Present means narrowed**, even when empty: an allowlist that
5725
+ * reaches no bundle narrows the content corpora to nothing, never to
5726
+ * everything. Absent means the caller is not bundle-scoped.
5727
+ */
5728
+ readonly bundleIds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MaxLengthAction<string[], 200, undefined>]>, undefined>;
5729
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 25, undefined>]>, undefined>;
5730
+ /** How much of each guide hit to return; `excerpt` when absent. */
5731
+ readonly detail: v.OptionalSchema<v.PicklistSchema<readonly ["excerpt", "section"], undefined>, undefined>;
5732
+ /**
5733
+ * Restrict the guides corpus to these guide files — the `fileId`s of earlier
5734
+ * hits, to expand them. Narrows within the caller's scope, never past it: an
5735
+ * id the caller cannot read matches nothing. Does not touch other corpora.
5736
+ */
5737
+ 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>;
5738
+ /**
5739
+ * Restrict the `content` corpus to items whose frontmatter carries every one
5740
+ * of these fields. Does not touch other corpora.
5741
+ */
5742
+ 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<{
5743
+ [x: string]: string;
5744
+ }, "frontmatter takes between 1 and 3 fields">]>, undefined>;
5745
+ /**
5746
+ * Restrict the `comments` corpus to comments written by these kinds of
5747
+ * author. Does not touch other corpora.
5748
+ */
5749
+ readonly authorKinds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>, undefined>, v.MinLengthAction<("agent" | "person" | "mossbear")[], 1, undefined>]>, undefined>;
5750
+ /**
5751
+ * Restrict the `comments` corpus to comments on these kinds of subject. Does
5752
+ * not touch other corpora.
5753
+ */
5754
+ readonly subjectKinds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["item", "session"], undefined>, undefined>, v.MinLengthAction<("item" | "session")[], 1, undefined>]>, undefined>;
5755
+ /**
5756
+ * Restrict the `turns` corpus to turns the classifier gave one of these
5757
+ * labels. A turn with no label never matches. Does not touch other corpora.
5758
+ */
5759
+ 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>;
5760
+ /**
5761
+ * Restrict the `sessions` corpus to sessions whose recorded head was exactly
5762
+ * this commit when they closed. A commit made mid-session matches nothing:
5763
+ * the head is the one observed at close. Does not touch other corpora.
5764
+ */
5765
+ readonly headSha: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a session filter must not be empty">, v.MaxLengthAction<string, 200, "a session filter must be at most 200 characters">, v.CheckAction<string, "a session filter must not contain control characters">]>, undefined>;
5766
+ /** Restrict the `sessions` corpus to sessions that closed on exactly this branch. Does not touch other corpora. */
5767
+ readonly branch: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a session filter must not be empty">, v.MaxLengthAction<string, 200, "a session filter must be at most 200 characters">, v.CheckAction<string, "a session filter must not contain control characters">]>, undefined>;
5768
+ /** Restrict the `sessions` corpus to sessions recorded under exactly this repo id. Does not touch other corpora. */
5769
+ readonly repoId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "a session filter must not be empty">, v.MaxLengthAction<string, 200, "a session filter must be at most 200 characters">, v.CheckAction<string, "a session filter must not contain control characters">]>, undefined>;
5770
+ /**
5771
+ * Whether the caller can read a `comments` hit on a session. A client from
5772
+ * before session comments were searchable validates the whole response
5773
+ * strictly and would reject one, so the server returns them only to a caller
5774
+ * that says it can, and tells every other caller they were not searched.
5775
+ * Absent means it cannot.
5776
+ */
5777
+ readonly sessionComments: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5778
+ }, undefined>, v.BaseValidation<{
5779
+ q?: string | undefined;
5780
+ corpora?: ("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[] | undefined;
5781
+ bundleIds?: string[] | undefined;
5782
+ limit?: number | undefined;
5783
+ detail?: "excerpt" | "section" | undefined;
5784
+ fileIds?: string[] | undefined;
5785
+ frontmatter?: {
5786
+ [x: string]: string;
5787
+ } | undefined;
5788
+ authorKinds?: ("agent" | "person" | "mossbear")[] | undefined;
5789
+ subjectKinds?: ("item" | "session")[] | undefined;
5790
+ steeringLabels?: ("correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence")[] | undefined;
5791
+ headSha?: string | undefined;
5792
+ branch?: string | undefined;
5793
+ repoId?: string | undefined;
5794
+ sessionComments?: boolean | undefined;
5795
+ }, {
5796
+ q?: string | undefined;
5797
+ corpora?: ("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[] | undefined;
5798
+ bundleIds?: string[] | undefined;
5799
+ limit?: number | undefined;
5800
+ detail?: "excerpt" | "section" | undefined;
5801
+ fileIds?: string[] | undefined;
5802
+ frontmatter?: {
5803
+ [x: string]: string;
5804
+ } | undefined;
5805
+ authorKinds?: ("agent" | "person" | "mossbear")[] | undefined;
5806
+ subjectKinds?: ("item" | "session")[] | undefined;
5807
+ steeringLabels?: ("correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence")[] | undefined;
5808
+ headSha?: string | undefined;
5809
+ branch?: string | undefined;
5810
+ repoId?: string | undefined;
5811
+ sessionComments?: boolean | undefined;
5812
+ }, v.CheckIssue<{
5813
+ q?: string | undefined;
5814
+ corpora?: ("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[] | undefined;
5815
+ bundleIds?: string[] | undefined;
5816
+ limit?: number | undefined;
5817
+ detail?: "excerpt" | "section" | undefined;
5818
+ fileIds?: string[] | undefined;
5819
+ frontmatter?: {
5820
+ [x: string]: string;
5821
+ } | undefined;
5822
+ authorKinds?: ("agent" | "person" | "mossbear")[] | undefined;
5823
+ subjectKinds?: ("item" | "session")[] | undefined;
5824
+ steeringLabels?: ("correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence")[] | undefined;
5825
+ headSha?: string | undefined;
5826
+ branch?: string | undefined;
5827
+ repoId?: string | undefined;
5828
+ sessionComments?: boolean | undefined;
5829
+ }>>, v.BaseValidation<{
5830
+ q?: string | undefined;
5831
+ corpora?: ("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[] | undefined;
5832
+ bundleIds?: string[] | undefined;
5833
+ limit?: number | undefined;
5834
+ detail?: "excerpt" | "section" | undefined;
5835
+ fileIds?: string[] | undefined;
5836
+ frontmatter?: {
5837
+ [x: string]: string;
5838
+ } | undefined;
5839
+ authorKinds?: ("agent" | "person" | "mossbear")[] | undefined;
5840
+ subjectKinds?: ("item" | "session")[] | undefined;
5841
+ steeringLabels?: ("correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence")[] | undefined;
5842
+ headSha?: string | undefined;
5843
+ branch?: string | undefined;
5844
+ repoId?: string | undefined;
5845
+ sessionComments?: boolean | undefined;
5846
+ }, {
5847
+ q?: string | undefined;
5848
+ corpora?: ("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[] | undefined;
5849
+ bundleIds?: string[] | undefined;
5850
+ limit?: number | undefined;
5851
+ detail?: "excerpt" | "section" | undefined;
5852
+ fileIds?: string[] | undefined;
5853
+ frontmatter?: {
5854
+ [x: string]: string;
5855
+ } | undefined;
5856
+ authorKinds?: ("agent" | "person" | "mossbear")[] | undefined;
5857
+ subjectKinds?: ("item" | "session")[] | undefined;
5858
+ steeringLabels?: ("correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence")[] | undefined;
5859
+ headSha?: string | undefined;
5860
+ branch?: string | undefined;
5861
+ repoId?: string | undefined;
5862
+ sessionComments?: boolean | undefined;
5863
+ }, v.CheckIssue<{
5864
+ q?: string | undefined;
5865
+ corpora?: ("content" | "guides" | "comments" | "sessions" | "turns" | "verdicts")[] | undefined;
5866
+ bundleIds?: string[] | undefined;
5867
+ limit?: number | undefined;
5868
+ detail?: "excerpt" | "section" | undefined;
5869
+ fileIds?: string[] | undefined;
5870
+ frontmatter?: {
5871
+ [x: string]: string;
5872
+ } | undefined;
5873
+ authorKinds?: ("agent" | "person" | "mossbear")[] | undefined;
5874
+ subjectKinds?: ("item" | "session")[] | undefined;
5875
+ steeringLabels?: ("correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence")[] | undefined;
5876
+ headSha?: string | undefined;
5877
+ branch?: string | undefined;
5878
+ repoId?: string | undefined;
5879
+ sessionComments?: boolean | undefined;
5880
+ }>>]>;
5192
5881
  export type SearchRequest = v.InferOutput<typeof SearchRequestSchema>;
5882
+ /** The exact-match filters a `sessions` search accepts, as the server hands them to the corpus. */
5883
+ export type SearchSessionFilters = Pick<SearchRequest, 'headSha' | 'branch' | 'repoId'>;
5193
5884
  /**
5194
5885
  * Why a corpus was not searched. Codes, never prose: each caller writes its own
5195
5886
  * sentence, and the dashboard's has to be a translatable one.
5196
5887
  */
5197
- export declare const SearchSkipReasonSchema: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
5888
+ export declare const SearchSkipReasonSchema: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
5198
5889
  export type SearchSkipReason = v.InferOutput<typeof SearchSkipReasonSchema>;
5199
5890
  /** Why a searched corpus covered less than the caller's whole scope. */
5200
5891
  export declare const SearchNarrowingSchema: v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>;
@@ -5242,6 +5933,207 @@ export declare const SearchVerdictHitSchema: v.ObjectSchema<{
5242
5933
  readonly reasoning: v.StringSchema<undefined>;
5243
5934
  }, undefined>;
5244
5935
  export type SearchVerdictHit = v.InferOutput<typeof SearchVerdictHitSchema>;
5936
+ /**
5937
+ * A saved document whose name or body matched — an item `pull_context` returns
5938
+ * as `type: content`. The name, workspace name and excerpt are wrapped in
5939
+ * `untrusted`'s markers.
5940
+ */
5941
+ export declare const SearchContentHitSchema: v.ObjectSchema<{
5942
+ readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5943
+ /** Wrapped in `untrusted`'s markers; null when the item has no name. */
5944
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5945
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5946
+ /** Wrapped in `untrusted`'s markers. */
5947
+ readonly workspaceName: v.StringSchema<undefined>;
5948
+ /**
5949
+ * Slugs of the bundles that hold the item and that the caller may read — the
5950
+ * argument `pull_context` takes to read the whole document. Never more than
5951
+ * a scoped caller's allowlist reaches.
5952
+ */
5953
+ readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
5954
+ readonly updatedAt: v.StringSchema<undefined>;
5955
+ /**
5956
+ * Where the item opens on the dashboard. Added by the CLI, which knows the
5957
+ * dashboard's address; the server does not send it.
5958
+ */
5959
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5960
+ /** A window around the match, wrapped in `untrusted`'s markers. */
5961
+ readonly excerpt: v.StringSchema<undefined>;
5962
+ }, undefined>;
5963
+ export type SearchContentHit = v.InferOutput<typeof SearchContentHitSchema>;
5964
+ /**
5965
+ * A comment on a guide or document that matched. `body` and `itemName` and
5966
+ * `workspaceName` are wrapped in `untrusted`'s markers.
5967
+ */
5968
+ export declare const SearchItemCommentHitSchema: v.ObjectSchema<{
5969
+ readonly subjectKind: v.LiteralSchema<"item", undefined>;
5970
+ readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5971
+ /**
5972
+ * The guide the item belongs to, or null for a standalone document. A comment
5973
+ * on a guide sits on its body file, so this is the id the dashboard's guide
5974
+ * page takes; `itemId` is the one a document page takes.
5975
+ */
5976
+ readonly guideId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
5977
+ /** Wrapped in `untrusted`'s markers; null when the item has no name. */
5978
+ readonly itemName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5979
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5980
+ /** Wrapped in `untrusted`'s markers. */
5981
+ readonly workspaceName: v.StringSchema<undefined>;
5982
+ /** Whether the item has been edited since the comment was written. */
5983
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
5984
+ /**
5985
+ * Whether the match is in the comment's text or in the replacement it
5986
+ * suggests (Mossbear's drafted edits).
5987
+ */
5988
+ readonly matchedIn: v.PicklistSchema<["body", "suggestion"], undefined>;
5989
+ /**
5990
+ * A Mossbear suggestion's draft state: whether its owner has handed it to
5991
+ * their agents. Absent on a person's or an agent's comment and on a reply.
5992
+ */
5993
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5994
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5995
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5996
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
5997
+ readonly resolved: v.BooleanSchema<undefined>;
5998
+ readonly createdAt: v.StringSchema<undefined>;
5999
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6000
+ readonly excerpt: v.StringSchema<undefined>;
6001
+ }, undefined>;
6002
+ /**
6003
+ * A comment on one of the caller's own sessions that matched. It has no
6004
+ * workspace and no item: `sessionId` is the id the dashboard's session page
6005
+ * takes. The excerpt is wrapped in `untrusted`'s markers.
6006
+ */
6007
+ export declare const SearchSessionCommentHitSchema: v.ObjectSchema<{
6008
+ readonly subjectKind: v.LiteralSchema<"session", undefined>;
6009
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6010
+ readonly matchedIn: v.LiteralSchema<"body", undefined>;
6011
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6012
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6013
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6014
+ readonly resolved: v.BooleanSchema<undefined>;
6015
+ readonly createdAt: v.StringSchema<undefined>;
6016
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6017
+ readonly excerpt: v.StringSchema<undefined>;
6018
+ }, undefined>;
6019
+ export declare const SearchCommentHitSchema: v.VariantSchema<"subjectKind", [v.ObjectSchema<{
6020
+ readonly subjectKind: v.LiteralSchema<"item", undefined>;
6021
+ readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6022
+ /**
6023
+ * The guide the item belongs to, or null for a standalone document. A comment
6024
+ * on a guide sits on its body file, so this is the id the dashboard's guide
6025
+ * page takes; `itemId` is the one a document page takes.
6026
+ */
6027
+ readonly guideId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6028
+ /** Wrapped in `untrusted`'s markers; null when the item has no name. */
6029
+ readonly itemName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6030
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6031
+ /** Wrapped in `untrusted`'s markers. */
6032
+ readonly workspaceName: v.StringSchema<undefined>;
6033
+ /** Whether the item has been edited since the comment was written. */
6034
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
6035
+ /**
6036
+ * Whether the match is in the comment's text or in the replacement it
6037
+ * suggests (Mossbear's drafted edits).
6038
+ */
6039
+ readonly matchedIn: v.PicklistSchema<["body", "suggestion"], undefined>;
6040
+ /**
6041
+ * A Mossbear suggestion's draft state: whether its owner has handed it to
6042
+ * their agents. Absent on a person's or an agent's comment and on a reply.
6043
+ */
6044
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
6045
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6046
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6047
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6048
+ readonly resolved: v.BooleanSchema<undefined>;
6049
+ readonly createdAt: v.StringSchema<undefined>;
6050
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6051
+ readonly excerpt: v.StringSchema<undefined>;
6052
+ }, undefined>, v.ObjectSchema<{
6053
+ readonly subjectKind: v.LiteralSchema<"session", undefined>;
6054
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6055
+ readonly matchedIn: v.LiteralSchema<"body", undefined>;
6056
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6057
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6058
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6059
+ readonly resolved: v.BooleanSchema<undefined>;
6060
+ readonly createdAt: v.StringSchema<undefined>;
6061
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6062
+ readonly excerpt: v.StringSchema<undefined>;
6063
+ }, undefined>], undefined>;
6064
+ export type SearchItemCommentHit = v.InferOutput<typeof SearchItemCommentHitSchema>;
6065
+ export type SearchSessionCommentHit = v.InferOutput<typeof SearchSessionCommentHitSchema>;
6066
+ export type SearchCommentHit = v.InferOutput<typeof SearchCommentHitSchema>;
6067
+ /**
6068
+ * One thing the caller said to an agent, redacted at the source. `excerpt` and
6069
+ * `projectId` and `branch` are wrapped in `untrusted`'s markers: a turn is text a
6070
+ * person typed (or pasted) and a branch name is whatever git was told.
6071
+ */
6072
+ export declare const SearchTurnHitSchema: v.ObjectSchema<{
6073
+ /** The agent's own session id — the key a session digest takes. */
6074
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6075
+ /**
6076
+ * The dashboard's id for the session, which its session page takes. Null when
6077
+ * the session has not been recorded as a run yet.
6078
+ */
6079
+ readonly sessionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6080
+ /** Which turn of the session this was, counting from 1. */
6081
+ readonly ordinal: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
6082
+ /** Null when the classifier has not labelled the turn. */
6083
+ readonly steeringLabel: v.NullableSchema<v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>, undefined>;
6084
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6085
+ readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6086
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6087
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6088
+ readonly createdAt: v.StringSchema<undefined>;
6089
+ /**
6090
+ * Where the session opens on the dashboard. Added by the CLI, which knows the
6091
+ * dashboard's address; the server does not send it.
6092
+ */
6093
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6094
+ /** A window around the match, wrapped in `untrusted`'s markers. */
6095
+ readonly excerpt: v.StringSchema<undefined>;
6096
+ }, undefined>;
6097
+ export type SearchTurnHit = v.InferOutput<typeof SearchTurnHitSchema>;
6098
+ /** Which of a session's stored texts a `sessions` hit matched. */
6099
+ export declare const SEARCH_SESSION_MATCH_FIELDS: readonly ["grade", "self_report"];
6100
+ export declare const SearchSessionMatchFieldSchema: v.PicklistSchema<readonly ["grade", "self_report"], undefined>;
6101
+ export type SearchSessionMatchField = v.InferOutput<typeof SearchSessionMatchFieldSchema>;
6102
+ /**
6103
+ * One of the caller's own sessions, found by what the grader said about it or
6104
+ * what the agent reported at the end. `repoId`, `projectId`, `branch`,
6105
+ * `headSha` and `excerpt` are wrapped in `untrusted`'s markers: the first four
6106
+ * are whatever a checkout reported, and the excerpt is model-authored or
6107
+ * written by an agent.
6108
+ */
6109
+ export declare const SearchSessionHitSchema: v.ObjectSchema<{
6110
+ /** The agent's own session id — the key a session digest takes. */
6111
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6112
+ /** The dashboard's id for the session, which its session page takes. */
6113
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6114
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6115
+ readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6116
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6117
+ readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6118
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6119
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6120
+ /**
6121
+ * The head observed when the session closed, wrapped in `untrusted`'s
6122
+ * markers; null where none was observed. A commit made mid-session is not it.
6123
+ */
6124
+ readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6125
+ readonly startedAt: v.StringSchema<undefined>;
6126
+ /** Null when the search named no term, only filters. */
6127
+ readonly matchedIn: v.NullableSchema<v.PicklistSchema<readonly ["grade", "self_report"], undefined>, undefined>;
6128
+ /**
6129
+ * Where the session opens on the dashboard. Added by the CLI, which knows the
6130
+ * dashboard's address; the server does not send it.
6131
+ */
6132
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6133
+ /** A window around the match, wrapped in `untrusted`'s markers; null when the search named no term. */
6134
+ readonly excerpt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6135
+ }, undefined>;
6136
+ export type SearchSessionHit = v.InferOutput<typeof SearchSessionHitSchema>;
5245
6137
  export declare const SearchGuidesReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
5246
6138
  readonly status: v.LiteralSchema<"searched", undefined>;
5247
6139
  /** Every match in scope, counted past the returned page. */
@@ -5278,7 +6170,7 @@ export declare const SearchGuidesReportSchema: v.VariantSchema<"status", [v.Obje
5278
6170
  }, undefined>, undefined>;
5279
6171
  }, undefined>, v.ObjectSchema<{
5280
6172
  readonly status: v.LiteralSchema<"skipped", undefined>;
5281
- readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
6173
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
5282
6174
  }, undefined>], undefined>;
5283
6175
  export declare const SearchVerdictsReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
5284
6176
  readonly status: v.LiteralSchema<"searched", undefined>;
@@ -5300,10 +6192,173 @@ export declare const SearchVerdictsReportSchema: v.VariantSchema<"status", [v.Ob
5300
6192
  }, undefined>, undefined>;
5301
6193
  }, undefined>, v.ObjectSchema<{
5302
6194
  readonly status: v.LiteralSchema<"skipped", undefined>;
5303
- readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
6195
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6196
+ }, undefined>], undefined>;
6197
+ export declare const SearchContentReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
6198
+ readonly status: v.LiteralSchema<"searched", undefined>;
6199
+ /** Every match in scope, counted past the returned page. */
6200
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6201
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6202
+ /** Newest first, at most the request's limit. */
6203
+ readonly hits: v.ArraySchema<v.ObjectSchema<{
6204
+ readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6205
+ /** Wrapped in `untrusted`'s markers; null when the item has no name. */
6206
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6207
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6208
+ /** Wrapped in `untrusted`'s markers. */
6209
+ readonly workspaceName: v.StringSchema<undefined>;
6210
+ /**
6211
+ * Slugs of the bundles that hold the item and that the caller may read — the
6212
+ * argument `pull_context` takes to read the whole document. Never more than
6213
+ * a scoped caller's allowlist reaches.
6214
+ */
6215
+ readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
6216
+ readonly updatedAt: v.StringSchema<undefined>;
6217
+ /**
6218
+ * Where the item opens on the dashboard. Added by the CLI, which knows the
6219
+ * dashboard's address; the server does not send it.
6220
+ */
6221
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6222
+ /** A window around the match, wrapped in `untrusted`'s markers. */
6223
+ readonly excerpt: v.StringSchema<undefined>;
6224
+ }, undefined>, undefined>;
6225
+ }, undefined>, v.ObjectSchema<{
6226
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6227
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6228
+ }, undefined>], undefined>;
6229
+ export declare const SearchCommentsReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
6230
+ readonly status: v.LiteralSchema<"searched", undefined>;
6231
+ /** Every match in scope, counted past the returned page. */
6232
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6233
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6234
+ /** Newest first, at most the request's limit. */
6235
+ readonly hits: v.ArraySchema<v.VariantSchema<"subjectKind", [v.ObjectSchema<{
6236
+ readonly subjectKind: v.LiteralSchema<"item", undefined>;
6237
+ readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6238
+ /**
6239
+ * The guide the item belongs to, or null for a standalone document. A comment
6240
+ * on a guide sits on its body file, so this is the id the dashboard's guide
6241
+ * page takes; `itemId` is the one a document page takes.
6242
+ */
6243
+ readonly guideId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6244
+ /** Wrapped in `untrusted`'s markers; null when the item has no name. */
6245
+ readonly itemName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6246
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6247
+ /** Wrapped in `untrusted`'s markers. */
6248
+ readonly workspaceName: v.StringSchema<undefined>;
6249
+ /** Whether the item has been edited since the comment was written. */
6250
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
6251
+ /**
6252
+ * Whether the match is in the comment's text or in the replacement it
6253
+ * suggests (Mossbear's drafted edits).
6254
+ */
6255
+ readonly matchedIn: v.PicklistSchema<["body", "suggestion"], undefined>;
6256
+ /**
6257
+ * A Mossbear suggestion's draft state: whether its owner has handed it to
6258
+ * their agents. Absent on a person's or an agent's comment and on a reply.
6259
+ */
6260
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
6261
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6262
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6263
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6264
+ readonly resolved: v.BooleanSchema<undefined>;
6265
+ readonly createdAt: v.StringSchema<undefined>;
6266
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6267
+ readonly excerpt: v.StringSchema<undefined>;
6268
+ }, undefined>, v.ObjectSchema<{
6269
+ readonly subjectKind: v.LiteralSchema<"session", undefined>;
6270
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6271
+ readonly matchedIn: v.LiteralSchema<"body", undefined>;
6272
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6273
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6274
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6275
+ readonly resolved: v.BooleanSchema<undefined>;
6276
+ readonly createdAt: v.StringSchema<undefined>;
6277
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6278
+ readonly excerpt: v.StringSchema<undefined>;
6279
+ }, undefined>], undefined>, undefined>;
6280
+ }, undefined>, v.ObjectSchema<{
6281
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6282
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6283
+ }, undefined>], undefined>;
6284
+ export declare const SearchTurnsReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
6285
+ readonly status: v.LiteralSchema<"searched", undefined>;
6286
+ /** Every match in scope, counted past the returned page. */
6287
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6288
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6289
+ /** Newest first, at most the request's limit. */
6290
+ readonly hits: v.ArraySchema<v.ObjectSchema<{
6291
+ /** The agent's own session id — the key a session digest takes. */
6292
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6293
+ /**
6294
+ * The dashboard's id for the session, which its session page takes. Null when
6295
+ * the session has not been recorded as a run yet.
6296
+ */
6297
+ readonly sessionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6298
+ /** Which turn of the session this was, counting from 1. */
6299
+ readonly ordinal: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
6300
+ /** Null when the classifier has not labelled the turn. */
6301
+ readonly steeringLabel: v.NullableSchema<v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>, undefined>;
6302
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6303
+ readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6304
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6305
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6306
+ readonly createdAt: v.StringSchema<undefined>;
6307
+ /**
6308
+ * Where the session opens on the dashboard. Added by the CLI, which knows the
6309
+ * dashboard's address; the server does not send it.
6310
+ */
6311
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6312
+ /** A window around the match, wrapped in `untrusted`'s markers. */
6313
+ readonly excerpt: v.StringSchema<undefined>;
6314
+ }, undefined>, undefined>;
6315
+ }, undefined>, v.ObjectSchema<{
6316
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6317
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6318
+ }, undefined>], undefined>;
6319
+ export declare const SearchSessionsReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
6320
+ readonly status: v.LiteralSchema<"searched", undefined>;
6321
+ /** Every match in scope, counted past the returned page. */
6322
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6323
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6324
+ /** Newest first, at most the request's limit. */
6325
+ readonly hits: v.ArraySchema<v.ObjectSchema<{
6326
+ /** The agent's own session id — the key a session digest takes. */
6327
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6328
+ /** The dashboard's id for the session, which its session page takes. */
6329
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6330
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6331
+ readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6332
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6333
+ readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6334
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6335
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6336
+ /**
6337
+ * The head observed when the session closed, wrapped in `untrusted`'s
6338
+ * markers; null where none was observed. A commit made mid-session is not it.
6339
+ */
6340
+ readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6341
+ readonly startedAt: v.StringSchema<undefined>;
6342
+ /** Null when the search named no term, only filters. */
6343
+ readonly matchedIn: v.NullableSchema<v.PicklistSchema<readonly ["grade", "self_report"], undefined>, undefined>;
6344
+ /**
6345
+ * Where the session opens on the dashboard. Added by the CLI, which knows the
6346
+ * dashboard's address; the server does not send it.
6347
+ */
6348
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6349
+ /** A window around the match, wrapped in `untrusted`'s markers; null when the search named no term. */
6350
+ readonly excerpt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6351
+ }, undefined>, undefined>;
6352
+ }, undefined>, v.ObjectSchema<{
6353
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6354
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
5304
6355
  }, undefined>], undefined>;
5305
6356
  export type SearchGuidesReport = v.InferOutput<typeof SearchGuidesReportSchema>;
5306
6357
  export type SearchVerdictsReport = v.InferOutput<typeof SearchVerdictsReportSchema>;
6358
+ export type SearchContentReport = v.InferOutput<typeof SearchContentReportSchema>;
6359
+ export type SearchCommentsReport = v.InferOutput<typeof SearchCommentsReportSchema>;
6360
+ export type SearchTurnsReport = v.InferOutput<typeof SearchTurnsReportSchema>;
6361
+ export type SearchSessionsReport = v.InferOutput<typeof SearchSessionsReportSchema>;
5307
6362
  /**
5308
6363
  * A search's answer: **a report per corpus, never a bare list.**
5309
6364
  *
@@ -5351,7 +6406,7 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
5351
6406
  }, undefined>, undefined>;
5352
6407
  }, undefined>, v.ObjectSchema<{
5353
6408
  readonly status: v.LiteralSchema<"skipped", undefined>;
5354
- readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
6409
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
5355
6410
  }, undefined>], undefined>;
5356
6411
  readonly verdicts: v.VariantSchema<"status", [v.ObjectSchema<{
5357
6412
  readonly status: v.LiteralSchema<"searched", undefined>;
@@ -5373,10 +6428,177 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
5373
6428
  }, undefined>, undefined>;
5374
6429
  }, undefined>, v.ObjectSchema<{
5375
6430
  readonly status: v.LiteralSchema<"skipped", undefined>;
5376
- readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted"], undefined>;
6431
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
5377
6432
  }, undefined>], undefined>;
6433
+ /**
6434
+ * Optional because a server that predates the `content` corpus does not
6435
+ * send it — and then did not search it, which a caller must say rather
6436
+ * than read as zero hits.
6437
+ */
6438
+ readonly content: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
6439
+ readonly status: v.LiteralSchema<"searched", undefined>;
6440
+ /** Every match in scope, counted past the returned page. */
6441
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6442
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6443
+ /** Newest first, at most the request's limit. */
6444
+ readonly hits: v.ArraySchema<v.ObjectSchema<{
6445
+ readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6446
+ /** Wrapped in `untrusted`'s markers; null when the item has no name. */
6447
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6448
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6449
+ /** Wrapped in `untrusted`'s markers. */
6450
+ readonly workspaceName: v.StringSchema<undefined>;
6451
+ /**
6452
+ * Slugs of the bundles that hold the item and that the caller may read — the
6453
+ * argument `pull_context` takes to read the whole document. Never more than
6454
+ * a scoped caller's allowlist reaches.
6455
+ */
6456
+ readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
6457
+ readonly updatedAt: v.StringSchema<undefined>;
6458
+ /**
6459
+ * Where the item opens on the dashboard. Added by the CLI, which knows the
6460
+ * dashboard's address; the server does not send it.
6461
+ */
6462
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6463
+ /** A window around the match, wrapped in `untrusted`'s markers. */
6464
+ readonly excerpt: v.StringSchema<undefined>;
6465
+ }, undefined>, undefined>;
6466
+ }, undefined>, v.ObjectSchema<{
6467
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6468
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6469
+ }, undefined>], undefined>, undefined>;
6470
+ /** Optional for the same reason as `content`. Covers comments on guides and documents, and the caller's own comments on their sessions. */
6471
+ readonly comments: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
6472
+ readonly status: v.LiteralSchema<"searched", undefined>;
6473
+ /** Every match in scope, counted past the returned page. */
6474
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6475
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6476
+ /** Newest first, at most the request's limit. */
6477
+ readonly hits: v.ArraySchema<v.VariantSchema<"subjectKind", [v.ObjectSchema<{
6478
+ readonly subjectKind: v.LiteralSchema<"item", undefined>;
6479
+ readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6480
+ /**
6481
+ * The guide the item belongs to, or null for a standalone document. A comment
6482
+ * on a guide sits on its body file, so this is the id the dashboard's guide
6483
+ * page takes; `itemId` is the one a document page takes.
6484
+ */
6485
+ readonly guideId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6486
+ /** Wrapped in `untrusted`'s markers; null when the item has no name. */
6487
+ readonly itemName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6488
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6489
+ /** Wrapped in `untrusted`'s markers. */
6490
+ readonly workspaceName: v.StringSchema<undefined>;
6491
+ /** Whether the item has been edited since the comment was written. */
6492
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
6493
+ /**
6494
+ * Whether the match is in the comment's text or in the replacement it
6495
+ * suggests (Mossbear's drafted edits).
6496
+ */
6497
+ readonly matchedIn: v.PicklistSchema<["body", "suggestion"], undefined>;
6498
+ /**
6499
+ * A Mossbear suggestion's draft state: whether its owner has handed it to
6500
+ * their agents. Absent on a person's or an agent's comment and on a reply.
6501
+ */
6502
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
6503
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6504
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6505
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6506
+ readonly resolved: v.BooleanSchema<undefined>;
6507
+ readonly createdAt: v.StringSchema<undefined>;
6508
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6509
+ readonly excerpt: v.StringSchema<undefined>;
6510
+ }, undefined>, v.ObjectSchema<{
6511
+ readonly subjectKind: v.LiteralSchema<"session", undefined>;
6512
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6513
+ readonly matchedIn: v.LiteralSchema<"body", undefined>;
6514
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6515
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6516
+ readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6517
+ readonly resolved: v.BooleanSchema<undefined>;
6518
+ readonly createdAt: v.StringSchema<undefined>;
6519
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6520
+ readonly excerpt: v.StringSchema<undefined>;
6521
+ }, undefined>], undefined>, undefined>;
6522
+ }, undefined>, v.ObjectSchema<{
6523
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6524
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6525
+ }, undefined>], undefined>, undefined>;
6526
+ /** Optional for the same reason as `content`. The caller's own turns, never a workspace-mate's. */
6527
+ readonly turns: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
6528
+ readonly status: v.LiteralSchema<"searched", undefined>;
6529
+ /** Every match in scope, counted past the returned page. */
6530
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6531
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6532
+ /** Newest first, at most the request's limit. */
6533
+ readonly hits: v.ArraySchema<v.ObjectSchema<{
6534
+ /** The agent's own session id — the key a session digest takes. */
6535
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6536
+ /**
6537
+ * The dashboard's id for the session, which its session page takes. Null when
6538
+ * the session has not been recorded as a run yet.
6539
+ */
6540
+ readonly sessionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6541
+ /** Which turn of the session this was, counting from 1. */
6542
+ readonly ordinal: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
6543
+ /** Null when the classifier has not labelled the turn. */
6544
+ readonly steeringLabel: v.NullableSchema<v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>, undefined>;
6545
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6546
+ readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6547
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6548
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6549
+ readonly createdAt: v.StringSchema<undefined>;
6550
+ /**
6551
+ * Where the session opens on the dashboard. Added by the CLI, which knows the
6552
+ * dashboard's address; the server does not send it.
6553
+ */
6554
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6555
+ /** A window around the match, wrapped in `untrusted`'s markers. */
6556
+ readonly excerpt: v.StringSchema<undefined>;
6557
+ }, undefined>, undefined>;
6558
+ }, undefined>, v.ObjectSchema<{
6559
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6560
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6561
+ }, undefined>], undefined>, undefined>;
6562
+ /** Optional for the same reason as `content`. The caller's own sessions, never a workspace-mate's. */
6563
+ readonly sessions: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
6564
+ readonly status: v.LiteralSchema<"searched", undefined>;
6565
+ /** Every match in scope, counted past the returned page. */
6566
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6567
+ readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6568
+ /** Newest first, at most the request's limit. */
6569
+ readonly hits: v.ArraySchema<v.ObjectSchema<{
6570
+ /** The agent's own session id — the key a session digest takes. */
6571
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6572
+ /** The dashboard's id for the session, which its session page takes. */
6573
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6574
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6575
+ readonly repoId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6576
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6577
+ readonly projectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6578
+ /** Wrapped in `untrusted`'s markers; null where the session recorded none. */
6579
+ readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6580
+ /**
6581
+ * The head observed when the session closed, wrapped in `untrusted`'s
6582
+ * markers; null where none was observed. A commit made mid-session is not it.
6583
+ */
6584
+ readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6585
+ readonly startedAt: v.StringSchema<undefined>;
6586
+ /** Null when the search named no term, only filters. */
6587
+ readonly matchedIn: v.NullableSchema<v.PicklistSchema<readonly ["grade", "self_report"], undefined>, undefined>;
6588
+ /**
6589
+ * Where the session opens on the dashboard. Added by the CLI, which knows the
6590
+ * dashboard's address; the server does not send it.
6591
+ */
6592
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6593
+ /** A window around the match, wrapped in `untrusted`'s markers; null when the search named no term. */
6594
+ readonly excerpt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6595
+ }, undefined>, undefined>;
6596
+ }, undefined>, v.ObjectSchema<{
6597
+ readonly status: v.LiteralSchema<"skipped", undefined>;
6598
+ readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6599
+ }, undefined>], undefined>, undefined>;
5378
6600
  }, undefined>;
5379
- readonly notYetSearchable: v.ArraySchema<v.PicklistSchema<readonly ["findings", "actions", "suggestions", "feedback-candidates"], undefined>, undefined>;
6601
+ readonly notYetSearchable: v.ArraySchema<v.PicklistSchema<["actions", "comments", "session-comments", "turns", "sessions"], undefined>, undefined>;
5380
6602
  readonly untrusted: v.ObjectSchema<{
5381
6603
  readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5382
6604
  readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -5592,7 +6814,12 @@ export declare function parseContextItem(data: unknown): {
5592
6814
  } | undefined;
5593
6815
  body: string;
5594
6816
  suggestion?: string | undefined;
5595
- evidence?: string | undefined;
6817
+ finding?: {
6818
+ tier: "observed" | "usage" | "practice";
6819
+ tierLine: string;
6820
+ blindSpot: string;
6821
+ prediction: string | null;
6822
+ } | undefined;
5596
6823
  approved?: boolean | undefined;
5597
6824
  authorName: string | null;
5598
6825
  createdAt: string;
@@ -5642,7 +6869,12 @@ export declare function parseContextItemsResponse(data: unknown): {
5642
6869
  } | undefined;
5643
6870
  body: string;
5644
6871
  suggestion?: string | undefined;
5645
- evidence?: string | undefined;
6872
+ finding?: {
6873
+ tier: "observed" | "usage" | "practice";
6874
+ tierLine: string;
6875
+ blindSpot: string;
6876
+ prediction: string | null;
6877
+ } | undefined;
5646
6878
  approved?: boolean | undefined;
5647
6879
  authorName: string | null;
5648
6880
  createdAt: string;
@@ -5714,7 +6946,12 @@ export declare function parsePushContextResponse(data: unknown): {
5714
6946
  } | undefined;
5715
6947
  body: string;
5716
6948
  suggestion?: string | undefined;
5717
- evidence?: string | undefined;
6949
+ finding?: {
6950
+ tier: "observed" | "usage" | "practice";
6951
+ tierLine: string;
6952
+ blindSpot: string;
6953
+ prediction: string | null;
6954
+ } | undefined;
5718
6955
  approved?: boolean | undefined;
5719
6956
  authorName: string | null;
5720
6957
  createdAt: string;
@@ -5781,7 +7018,12 @@ export declare function parseUpdateContextItemResponse(data: unknown): {
5781
7018
  } | undefined;
5782
7019
  body: string;
5783
7020
  suggestion?: string | undefined;
5784
- evidence?: string | undefined;
7021
+ finding?: {
7022
+ tier: "observed" | "usage" | "practice";
7023
+ tierLine: string;
7024
+ blindSpot: string;
7025
+ prediction: string | null;
7026
+ } | undefined;
5785
7027
  approved?: boolean | undefined;
5786
7028
  authorName: string | null;
5787
7029
  createdAt: string;
@@ -5847,7 +7089,12 @@ export declare function parseContextItemResponse(data: unknown): {
5847
7089
  } | undefined;
5848
7090
  body: string;
5849
7091
  suggestion?: string | undefined;
5850
- evidence?: string | undefined;
7092
+ finding?: {
7093
+ tier: "observed" | "usage" | "practice";
7094
+ tierLine: string;
7095
+ blindSpot: string;
7096
+ prediction: string | null;
7097
+ } | undefined;
5851
7098
  approved?: boolean | undefined;
5852
7099
  authorName: string | null;
5853
7100
  createdAt: string;
@@ -5899,7 +7146,12 @@ export declare function parseArchiveContextItemResponse(data: unknown): {
5899
7146
  } | undefined;
5900
7147
  body: string;
5901
7148
  suggestion?: string | undefined;
5902
- evidence?: string | undefined;
7149
+ finding?: {
7150
+ tier: "observed" | "usage" | "practice";
7151
+ tierLine: string;
7152
+ blindSpot: string;
7153
+ prediction: string | null;
7154
+ } | undefined;
5903
7155
  approved?: boolean | undefined;
5904
7156
  authorName: string | null;
5905
7157
  createdAt: string;
@@ -6019,14 +7271,6 @@ export declare function parseDashboardSyncRequest(data: unknown): {
6019
7271
  })[] | undefined;
6020
7272
  status?: "pending" | "accepted" | "dismissed" | undefined;
6021
7273
  }[] | 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
7274
  runUsage?: {
6031
7275
  sessionId?: string | undefined;
6032
7276
  agentSessionId: string;
@@ -6240,6 +7484,19 @@ export declare function parseAnnounceItemCommentsResponse(data: unknown): {
6240
7484
  open: number;
6241
7485
  announced: number;
6242
7486
  };
7487
+ export declare function parseAgentCommentResponse(data: unknown): {
7488
+ created: boolean;
7489
+ comment: {
7490
+ id: string;
7491
+ threadId: string;
7492
+ subject: {
7493
+ kind: "item" | "session";
7494
+ id: string;
7495
+ };
7496
+ body: string;
7497
+ createdAt: string;
7498
+ };
7499
+ };
6243
7500
  export declare function parseItemCommentsResponse(data: unknown): {
6244
7501
  comments: {
6245
7502
  itemName: string;
@@ -6256,7 +7513,12 @@ export declare function parseItemCommentsResponse(data: unknown): {
6256
7513
  } | undefined;
6257
7514
  body: string;
6258
7515
  suggestion?: string | undefined;
6259
- evidence?: string | undefined;
7516
+ finding?: {
7517
+ tier: "observed" | "usage" | "practice";
7518
+ tierLine: string;
7519
+ blindSpot: string;
7520
+ prediction: string | null;
7521
+ } | undefined;
6260
7522
  approved?: boolean | undefined;
6261
7523
  authorName: string | null;
6262
7524
  createdAt: string;
@@ -6278,8 +7540,36 @@ export declare function parseCommentEvidenceResponse(data: unknown): {
6278
7540
  commentId: string;
6279
7541
  itemName: string;
6280
7542
  itemPath: string | null;
6281
- summary: string;
7543
+ tier: "observed" | "usage" | "practice";
7544
+ tierLine: string;
7545
+ blindSpot: string;
7546
+ claim: string;
6282
7547
  prediction: string | null;
7548
+ usage: {
7549
+ path: string;
7550
+ loads: number;
7551
+ sessions: number;
7552
+ loadsWithRead: number;
7553
+ } | null;
7554
+ practice: {
7555
+ check: {
7556
+ id: string;
7557
+ name: string;
7558
+ };
7559
+ rubricVersion: number;
7560
+ practices: {
7561
+ text: string;
7562
+ source: {
7563
+ title: string;
7564
+ url: string;
7565
+ };
7566
+ }[];
7567
+ facts: string[];
7568
+ answers: {
7569
+ item: string;
7570
+ answer: string;
7571
+ }[];
7572
+ } | null;
6283
7573
  citations: {
6284
7574
  kind: "verdict" | "turn" | "navigation" | "action";
6285
7575
  sessionId: string;
@@ -6287,6 +7577,13 @@ export declare function parseCommentEvidenceResponse(data: unknown): {
6287
7577
  excerpt: string;
6288
7578
  }[];
6289
7579
  citationsWithheld: number;
7580
+ sessionComments: {
7581
+ sessionId: string;
7582
+ authorKind: "person" | "mossbear";
7583
+ at: string;
7584
+ body: string;
7585
+ }[];
7586
+ sessionCommentsWithheld: number;
6290
7587
  untrusted: {
6291
7588
  token: string;
6292
7589
  startMarker: string;
@@ -6297,6 +7594,7 @@ export declare function parseCommentEvidenceResponse(data: unknown): {
6297
7594
  export declare function parseRunGradeRequest(data: unknown): {
6298
7595
  session?: string | undefined;
6299
7596
  agent_session?: string | undefined;
7597
+ detail?: "digest" | undefined;
6300
7598
  };
6301
7599
  export declare function parseSessionGradeResponse(data: unknown): {
6302
7600
  run: {
@@ -6306,7 +7604,7 @@ export declare function parseSessionGradeResponse(data: unknown): {
6306
7604
  endedAt: string | null;
6307
7605
  status: "open" | "closed";
6308
7606
  };
6309
- state: "pending" | "graded" | "nothing_to_grade" | "expired";
7607
+ state: "pending" | "graded" | "nothing_to_grade" | "expired" | "grading_off";
6310
7608
  grade: {
6311
7609
  summary: string | null;
6312
7610
  gradedAt: string;
@@ -6326,6 +7624,50 @@ export declare function parseSessionGradeResponse(data: unknown): {
6326
7624
  note: string;
6327
7625
  } | null;
6328
7626
  };
7627
+ export declare function parseSessionDigestResponse(data: unknown): {
7628
+ run: {
7629
+ id: string;
7630
+ agentSessionId: string;
7631
+ startedAt: string;
7632
+ endedAt: string | null;
7633
+ status: "open" | "closed";
7634
+ };
7635
+ state: "pending" | "graded" | "nothing_to_grade" | "expired" | "grading_off";
7636
+ grade: {
7637
+ summary: string | null;
7638
+ gradedAt: string;
7639
+ model: string | null;
7640
+ superseded: boolean;
7641
+ guides: {
7642
+ guideId: string;
7643
+ title: string;
7644
+ verdict: "aligned" | "misaligned" | "not_applicable";
7645
+ reasoning: string;
7646
+ }[];
7647
+ } | null;
7648
+ digest: {
7649
+ selfReport: string | null;
7650
+ turns: {
7651
+ ordinal: number;
7652
+ text: string;
7653
+ steeringLabel: string | null;
7654
+ }[];
7655
+ turnsTotal: number;
7656
+ repoId: string | null;
7657
+ branch: string | null;
7658
+ headSha: string | null;
7659
+ dashboardPath: string;
7660
+ dashboardUrl?: string | undefined;
7661
+ comments: string[];
7662
+ notYetAvailable: ("comments" | "resumeCommand" | "cloudUrl")[];
7663
+ };
7664
+ untrusted: {
7665
+ token: string;
7666
+ startMarker: string;
7667
+ endMarker: string;
7668
+ note: string;
7669
+ };
7670
+ };
6329
7671
  export declare function parseSearchResponse(data: unknown): {
6330
7672
  corpora: {
6331
7673
  guides: {
@@ -6344,7 +7686,7 @@ export declare function parseSearchResponse(data: unknown): {
6344
7686
  }[];
6345
7687
  } | {
6346
7688
  status: "skipped";
6347
- reason: "excluded-by-caller" | "timed-out" | "not-granted";
7689
+ reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
6348
7690
  };
6349
7691
  verdicts: {
6350
7692
  status: "searched";
@@ -6360,10 +7702,104 @@ export declare function parseSearchResponse(data: unknown): {
6360
7702
  }[];
6361
7703
  } | {
6362
7704
  status: "skipped";
6363
- reason: "excluded-by-caller" | "timed-out" | "not-granted";
7705
+ reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
6364
7706
  };
7707
+ content?: {
7708
+ status: "searched";
7709
+ total: number;
7710
+ narrowedBy: "narrowed-by-bundle-allowlist" | null;
7711
+ hits: {
7712
+ itemId: string;
7713
+ name: string | null;
7714
+ workspaceId: string;
7715
+ workspaceName: string;
7716
+ bundles: string[];
7717
+ updatedAt: string;
7718
+ url?: string | undefined;
7719
+ excerpt: string;
7720
+ }[];
7721
+ } | {
7722
+ status: "skipped";
7723
+ reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
7724
+ } | undefined;
7725
+ comments?: {
7726
+ status: "searched";
7727
+ total: number;
7728
+ narrowedBy: "narrowed-by-bundle-allowlist" | null;
7729
+ hits: ({
7730
+ subjectKind: "item";
7731
+ itemId: string;
7732
+ guideId: string | null;
7733
+ itemName: string | null;
7734
+ workspaceId: string;
7735
+ workspaceName: string;
7736
+ itemChangedSince: boolean;
7737
+ matchedIn: "suggestion" | "body";
7738
+ approved?: boolean | undefined;
7739
+ commentId: string;
7740
+ threadId: string;
7741
+ authorKind: "agent" | "person" | "mossbear";
7742
+ resolved: boolean;
7743
+ createdAt: string;
7744
+ url?: string | undefined;
7745
+ excerpt: string;
7746
+ } | {
7747
+ subjectKind: "session";
7748
+ sessionId: string;
7749
+ matchedIn: "body";
7750
+ commentId: string;
7751
+ threadId: string;
7752
+ authorKind: "agent" | "person" | "mossbear";
7753
+ resolved: boolean;
7754
+ createdAt: string;
7755
+ url?: string | undefined;
7756
+ excerpt: string;
7757
+ })[];
7758
+ } | {
7759
+ status: "skipped";
7760
+ reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
7761
+ } | undefined;
7762
+ turns?: {
7763
+ status: "searched";
7764
+ total: number;
7765
+ narrowedBy: "narrowed-by-bundle-allowlist" | null;
7766
+ hits: {
7767
+ agentSessionId: string;
7768
+ sessionId: string | null;
7769
+ ordinal: number;
7770
+ steeringLabel: "correction" | "steering" | "new request" | "acknowledgement" | "insufficient evidence" | null;
7771
+ projectId: string | null;
7772
+ branch: string | null;
7773
+ createdAt: string;
7774
+ url?: string | undefined;
7775
+ excerpt: string;
7776
+ }[];
7777
+ } | {
7778
+ status: "skipped";
7779
+ reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
7780
+ } | undefined;
7781
+ sessions?: {
7782
+ status: "searched";
7783
+ total: number;
7784
+ narrowedBy: "narrowed-by-bundle-allowlist" | null;
7785
+ hits: {
7786
+ agentSessionId: string;
7787
+ sessionId: string;
7788
+ repoId: string | null;
7789
+ projectId: string | null;
7790
+ branch: string | null;
7791
+ headSha: string | null;
7792
+ startedAt: string;
7793
+ matchedIn: "grade" | "self_report" | null;
7794
+ url?: string | undefined;
7795
+ excerpt: string | null;
7796
+ }[];
7797
+ } | {
7798
+ status: "skipped";
7799
+ reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
7800
+ } | undefined;
6365
7801
  };
6366
- notYetSearchable: ("actions" | "findings" | "suggestions" | "feedback-candidates")[];
7802
+ notYetSearchable: ("comments" | "sessions" | "actions" | "turns" | "session-comments")[];
6367
7803
  untrusted: {
6368
7804
  token: string;
6369
7805
  startMarker: string;