@mossbear/protocol 0.1.0-alpha.74 → 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 (38) 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 +631 -72
  22. package/dist/schemas.d.ts.map +1 -1
  23. package/dist/schemas.js +278 -44
  24. package/dist/schemas.js.map +1 -1
  25. package/dist/schemas.test.js +55 -1
  26. package/dist/schemas.test.js.map +1 -1
  27. package/dist/usageOnly.d.ts +157 -0
  28. package/dist/usageOnly.d.ts.map +1 -0
  29. package/dist/usageOnly.js +47 -0
  30. package/dist/usageOnly.js.map +1 -0
  31. package/dist/usageOnly.test.d.ts +2 -0
  32. package/dist/usageOnly.test.d.ts.map +1 -0
  33. package/dist/usageOnly.test.js +188 -0
  34. package/dist/usageOnly.test.js.map +1 -0
  35. package/dist/whatSyncs.d.ts +1 -1
  36. package/dist/whatSyncs.js +1 -1
  37. package/dist/whatSyncs.js.map +1 -1
  38. package/package.json +3 -2
package/dist/schemas.d.ts CHANGED
@@ -1800,6 +1800,86 @@ export declare const AnnounceItemCommentsResponseSchema: v.ObjectSchema<{
1800
1800
  readonly announced: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1801
1801
  }, undefined>;
1802
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>;
1803
1883
  /**
1804
1884
  * One comment on the on-demand read, with the item it is about named on the comment.
1805
1885
  *
@@ -2084,6 +2164,26 @@ export declare const CommentEvidencePracticeSchema: v.ObjectSchema<{
2084
2164
  readonly answer: v.StringSchema<undefined>;
2085
2165
  }, undefined>, undefined>, readonly []>;
2086
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>;
2087
2187
  export declare const CommentEvidenceResponseSchema: v.ObjectSchema<{
2088
2188
  /** The comment's full id, even when the request named a prefix. */
2089
2189
  readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -2145,6 +2245,26 @@ export declare const CommentEvidenceResponseSchema: v.ObjectSchema<{
2145
2245
  readonly excerpt: v.StringSchema<undefined>;
2146
2246
  }, undefined>, undefined>;
2147
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>;
2148
2268
  readonly untrusted: v.ObjectSchema<{
2149
2269
  readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2150
2270
  readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -5188,7 +5308,7 @@ export type SessionGradeRequest = v.InferOutput<typeof SessionGradeRequestSchema
5188
5308
  * Which of four states the run's grade is in — a required field rather than
5189
5309
  * something a reader infers from a null `grade`.
5190
5310
  *
5191
- * 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
5192
5312
  * one of them on its own:
5193
5313
  *
5194
5314
  * - `pending` — no grade yet, and the grading sweep can still pick the run
@@ -5201,8 +5321,9 @@ export type SessionGradeRequest = v.InferOutput<typeof SessionGradeRequestSchema
5201
5321
  * - `expired` — no grade, and the run closed too long ago for the sweep to
5202
5322
  * select it. It will never be graded, and telling a reader to wait would
5203
5323
  * promise work the system does not do.
5324
+ * - `grading_off` — only usage was synced; no behavioral grade is requested.
5204
5325
  */
5205
- 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>;
5206
5327
  export type SessionGradeState = v.InferOutput<typeof SessionGradeStateSchema>;
5207
5328
  /**
5208
5329
  * The run-level verdict vocabulary — `aligned | misaligned | not_applicable`.
@@ -5269,7 +5390,7 @@ export declare const SessionGradeResponseSchema: v.ObjectSchema<{
5269
5390
  readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5270
5391
  readonly status: v.PicklistSchema<["open", "closed"], undefined>;
5271
5392
  }, undefined>;
5272
- 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>;
5273
5394
  /** Present exactly when `state` is `graded`. */
5274
5395
  readonly grade: v.NullableSchema<v.ObjectSchema<{
5275
5396
  /** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
@@ -5361,7 +5482,7 @@ export declare const SessionDigestResponseSchema: v.ObjectSchema<{
5361
5482
  readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5362
5483
  readonly status: v.PicklistSchema<["open", "closed"], undefined>;
5363
5484
  }, undefined>;
5364
- readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired"], undefined>;
5485
+ readonly state: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired", "grading_off"], undefined>;
5365
5486
  readonly grade: v.NullableSchema<v.ObjectSchema<{
5366
5487
  /** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
5367
5488
  readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -5432,24 +5553,30 @@ export type SessionDigestResponse = v.InferOutput<typeof SessionDigestResponseSc
5432
5553
  * `guides` is guide bodies and their author-written eval criteria; `verdicts`
5433
5554
  * is the grader's reasoning for why a session did or did not follow a guide;
5434
5555
  * `content` is the name and body of the documents saved in bundles; `comments`
5435
- * is the text of comments left on guides and documents; `turns` is what the
5436
- * caller themself said to their agents, redacted. One registry on the
5437
- * server declares how each is matched and scoped; this list is only what a
5438
- * caller may name.
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.
5439
5562
  */
5440
- export declare const SEARCH_CORPUS_IDS: readonly ["guides", "verdicts", "content", "comments", "turns"];
5441
- export declare const SearchCorpusIdSchema: v.PicklistSchema<readonly ["guides", "verdicts", "content", "comments", "turns"], undefined>;
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>;
5442
5565
  export type SearchCorpusId = v.InferOutput<typeof SearchCorpusIdSchema>;
5443
5566
  /**
5444
- * Every stored text no search reaches yet — comments left on a session (a
5445
- * comment on a guide or document is searched; findings and guide suggestions
5446
- * are comments), the sessions a run records, and the actions and
5447
- * their narration. Every response names them, so "nothing found" can never be read
5448
- * as covering them. (Earlier wordings of a guide are deliberately never
5449
- * searched, which is a different thing from not yet.)
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.
5450
5577
  */
5451
- export declare const SEARCH_UNIMPLEMENTED_CORPORA: readonly ["session-comments", "sessions", "actions"];
5452
- export declare const SearchUnimplementedCorpusSchema: v.PicklistSchema<readonly ["session-comments", "sessions", "actions"], undefined>;
5578
+ export declare const SEARCH_SESSION_COMMENTS_UNSEARCHED: "session-comments";
5579
+ export declare const SearchUnimplementedCorpusSchema: v.PicklistSchema<readonly ["actions"], undefined>;
5453
5580
  /** Hits returned per corpus when the caller does not say. */
5454
5581
  export declare const SEARCH_DEFAULT_LIMIT = 10;
5455
5582
  /** The most hits one corpus returns. Totals are counted past it. */
@@ -5493,10 +5620,9 @@ export declare const SEARCH_COMMENT_AUTHOR_KINDS: readonly ["person", "agent", "
5493
5620
  export declare const SearchCommentAuthorKindSchema: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
5494
5621
  export type SearchCommentAuthorKind = v.InferOutput<typeof SearchCommentAuthorKindSchema>;
5495
5622
  /**
5496
- * What a comment is attached to. `item` is a guide or a document; `session` is
5497
- * accepted so a caller can ask for it, but nothing searches session comments
5498
- * yet, and a request that names only `session` says so rather than returning
5499
- * an empty match.
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.
5500
5626
  */
5501
5627
  export declare const SEARCH_COMMENT_SUBJECT_KINDS: readonly ["item", "session"];
5502
5628
  export declare const SearchCommentSubjectKindSchema: v.PicklistSchema<readonly ["item", "session"], undefined>;
@@ -5508,10 +5634,20 @@ export type SearchCommentSubjectKind = v.InferOutput<typeof SearchCommentSubject
5508
5634
  export declare const SEARCH_STEERING_LABELS: readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"];
5509
5635
  export declare const SearchSteeringLabelSchema: v.PicklistSchema<readonly ["correction", "steering", "new request", "acknowledgement", "insufficient evidence"], undefined>;
5510
5636
  export type SearchSteeringLabel = v.InferOutput<typeof SearchSteeringLabelSchema>;
5511
- export declare const SearchRequestSchema: v.ObjectSchema<{
5512
- readonly q: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 2, "q must be at least 2 characters">, v.MaxLengthAction<string, 200, "q must be at most 200 characters">, v.CheckAction<string, "q must not contain control characters">, v.CheckAction<string, "q must contain at least 2 characters besides * and ?">]>;
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>;
5513
5649
  /** Which corpora to search; every one when absent. */
5514
- readonly corpora: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["guides", "verdicts", "content", "comments", "turns"], undefined>, undefined>, v.MinLengthAction<("content" | "guides" | "comments" | "turns" | "verdicts")[], 1, undefined>]>, undefined>;
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>;
5515
5651
  /**
5516
5652
  * The bundles a scoped caller may read content from — `mossbear mcp
5517
5653
  * --bundles` resolved to ids by the CLI, since the server never sees that
@@ -5540,7 +5676,7 @@ export declare const SearchRequestSchema: v.ObjectSchema<{
5540
5676
  * Restrict the `comments` corpus to comments written by these kinds of
5541
5677
  * author. Does not touch other corpora.
5542
5678
  */
5543
- readonly authorKinds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>, undefined>, v.MinLengthAction<("person" | "agent" | "mossbear")[], 1, undefined>]>, undefined>;
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>;
5544
5680
  /**
5545
5681
  * Restrict the `comments` corpus to comments on these kinds of subject. Does
5546
5682
  * not touch other corpora.
@@ -5551,8 +5687,200 @@ export declare const SearchRequestSchema: v.ObjectSchema<{
5551
5687
  * labels. A turn with no label never matches. Does not touch other corpora.
5552
5688
  */
5553
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>;
5554
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
+ }>>]>;
5555
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'>;
5556
5884
  /**
5557
5885
  * Why a corpus was not searched. Codes, never prose: each caller writes its own
5558
5886
  * sentence, and the dashboard's has to be a translatable one.
@@ -5637,11 +5965,58 @@ export type SearchContentHit = v.InferOutput<typeof SearchContentHitSchema>;
5637
5965
  * A comment on a guide or document that matched. `body` and `itemName` and
5638
5966
  * `workspaceName` are wrapped in `untrusted`'s markers.
5639
5967
  */
5640
- export declare const SearchCommentHitSchema: v.ObjectSchema<{
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>;
5641
6011
  readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5642
- /** The thread's root; equal to `commentId` for a root comment. */
5643
6012
  readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5644
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<{
5645
6020
  readonly subjectKind: v.LiteralSchema<"item", undefined>;
5646
6021
  readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5647
6022
  /**
@@ -5655,8 +6030,6 @@ export declare const SearchCommentHitSchema: v.ObjectSchema<{
5655
6030
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5656
6031
  /** Wrapped in `untrusted`'s markers. */
5657
6032
  readonly workspaceName: v.StringSchema<undefined>;
5658
- /** Whether the thread has been resolved — a resolved thread is answered, not open. */
5659
- readonly resolved: v.BooleanSchema<undefined>;
5660
6033
  /** Whether the item has been edited since the comment was written. */
5661
6034
  readonly itemChangedSince: v.BooleanSchema<undefined>;
5662
6035
  /**
@@ -5669,15 +6042,27 @@ export declare const SearchCommentHitSchema: v.ObjectSchema<{
5669
6042
  * their agents. Absent on a person's or an agent's comment and on a reply.
5670
6043
  */
5671
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>;
5672
6049
  readonly createdAt: v.StringSchema<undefined>;
5673
- /**
5674
- * Where the comment's item opens on the dashboard. Added by the CLI, which
5675
- * knows the dashboard's address; the server does not send it.
5676
- */
5677
6050
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5678
- /** A window around the match, wrapped in `untrusted`'s markers. */
5679
6051
  readonly excerpt: v.StringSchema<undefined>;
5680
- }, 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>;
5681
6066
  export type SearchCommentHit = v.InferOutput<typeof SearchCommentHitSchema>;
5682
6067
  /**
5683
6068
  * One thing the caller said to an agent, redacted at the source. `excerpt` and
@@ -5710,6 +6095,45 @@ export declare const SearchTurnHitSchema: v.ObjectSchema<{
5710
6095
  readonly excerpt: v.StringSchema<undefined>;
5711
6096
  }, undefined>;
5712
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>;
5713
6137
  export declare const SearchGuidesReportSchema: v.VariantSchema<"status", [v.ObjectSchema<{
5714
6138
  readonly status: v.LiteralSchema<"searched", undefined>;
5715
6139
  /** Every match in scope, counted past the returned page. */
@@ -5808,11 +6232,7 @@ export declare const SearchCommentsReportSchema: v.VariantSchema<"status", [v.Ob
5808
6232
  readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
5809
6233
  readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
5810
6234
  /** Newest first, at most the request's limit. */
5811
- readonly hits: v.ArraySchema<v.ObjectSchema<{
5812
- readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5813
- /** The thread's root; equal to `commentId` for a root comment. */
5814
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5815
- readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6235
+ readonly hits: v.ArraySchema<v.VariantSchema<"subjectKind", [v.ObjectSchema<{
5816
6236
  readonly subjectKind: v.LiteralSchema<"item", undefined>;
5817
6237
  readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5818
6238
  /**
@@ -5826,8 +6246,6 @@ export declare const SearchCommentsReportSchema: v.VariantSchema<"status", [v.Ob
5826
6246
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5827
6247
  /** Wrapped in `untrusted`'s markers. */
5828
6248
  readonly workspaceName: v.StringSchema<undefined>;
5829
- /** Whether the thread has been resolved — a resolved thread is answered, not open. */
5830
- readonly resolved: v.BooleanSchema<undefined>;
5831
6249
  /** Whether the item has been edited since the comment was written. */
5832
6250
  readonly itemChangedSince: v.BooleanSchema<undefined>;
5833
6251
  /**
@@ -5840,15 +6258,25 @@ export declare const SearchCommentsReportSchema: v.VariantSchema<"status", [v.Ob
5840
6258
  * their agents. Absent on a person's or an agent's comment and on a reply.
5841
6259
  */
5842
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>;
5843
6265
  readonly createdAt: v.StringSchema<undefined>;
5844
- /**
5845
- * Where the comment's item opens on the dashboard. Added by the CLI, which
5846
- * knows the dashboard's address; the server does not send it.
5847
- */
5848
6266
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5849
- /** A window around the match, wrapped in `untrusted`'s markers. */
5850
6267
  readonly excerpt: v.StringSchema<undefined>;
5851
- }, undefined>, 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>;
5852
6280
  }, undefined>, v.ObjectSchema<{
5853
6281
  readonly status: v.LiteralSchema<"skipped", undefined>;
5854
6282
  readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
@@ -5888,11 +6316,49 @@ export declare const SearchTurnsReportSchema: v.VariantSchema<"status", [v.Objec
5888
6316
  readonly status: v.LiteralSchema<"skipped", undefined>;
5889
6317
  readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
5890
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>;
6355
+ }, undefined>], undefined>;
5891
6356
  export type SearchGuidesReport = v.InferOutput<typeof SearchGuidesReportSchema>;
5892
6357
  export type SearchVerdictsReport = v.InferOutput<typeof SearchVerdictsReportSchema>;
5893
6358
  export type SearchContentReport = v.InferOutput<typeof SearchContentReportSchema>;
5894
6359
  export type SearchCommentsReport = v.InferOutput<typeof SearchCommentsReportSchema>;
5895
6360
  export type SearchTurnsReport = v.InferOutput<typeof SearchTurnsReportSchema>;
6361
+ export type SearchSessionsReport = v.InferOutput<typeof SearchSessionsReportSchema>;
5896
6362
  /**
5897
6363
  * A search's answer: **a report per corpus, never a bare list.**
5898
6364
  *
@@ -6001,18 +6467,14 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
6001
6467
  readonly status: v.LiteralSchema<"skipped", undefined>;
6002
6468
  readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6003
6469
  }, undefined>], undefined>, undefined>;
6004
- /** Optional for the same reason as `content`. Covers comments on guides and documents only. */
6470
+ /** Optional for the same reason as `content`. Covers comments on guides and documents, and the caller's own comments on their sessions. */
6005
6471
  readonly comments: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
6006
6472
  readonly status: v.LiteralSchema<"searched", undefined>;
6007
6473
  /** Every match in scope, counted past the returned page. */
6008
6474
  readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6009
6475
  readonly narrowedBy: v.NullableSchema<v.PicklistSchema<["narrowed-by-bundle-allowlist"], undefined>, undefined>;
6010
6476
  /** Newest first, at most the request's limit. */
6011
- readonly hits: v.ArraySchema<v.ObjectSchema<{
6012
- readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6013
- /** The thread's root; equal to `commentId` for a root comment. */
6014
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6015
- readonly authorKind: v.PicklistSchema<readonly ["person", "agent", "mossbear"], undefined>;
6477
+ readonly hits: v.ArraySchema<v.VariantSchema<"subjectKind", [v.ObjectSchema<{
6016
6478
  readonly subjectKind: v.LiteralSchema<"item", undefined>;
6017
6479
  readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6018
6480
  /**
@@ -6026,8 +6488,6 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
6026
6488
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6027
6489
  /** Wrapped in `untrusted`'s markers. */
6028
6490
  readonly workspaceName: v.StringSchema<undefined>;
6029
- /** Whether the thread has been resolved — a resolved thread is answered, not open. */
6030
- readonly resolved: v.BooleanSchema<undefined>;
6031
6491
  /** Whether the item has been edited since the comment was written. */
6032
6492
  readonly itemChangedSince: v.BooleanSchema<undefined>;
6033
6493
  /**
@@ -6040,15 +6500,25 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
6040
6500
  * their agents. Absent on a person's or an agent's comment and on a reply.
6041
6501
  */
6042
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>;
6043
6507
  readonly createdAt: v.StringSchema<undefined>;
6044
- /**
6045
- * Where the comment's item opens on the dashboard. Added by the CLI, which
6046
- * knows the dashboard's address; the server does not send it.
6047
- */
6048
6508
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6049
- /** A window around the match, wrapped in `untrusted`'s markers. */
6050
6509
  readonly excerpt: v.StringSchema<undefined>;
6051
- }, undefined>, 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>;
6052
6522
  }, undefined>, v.ObjectSchema<{
6053
6523
  readonly status: v.LiteralSchema<"skipped", undefined>;
6054
6524
  readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
@@ -6089,8 +6559,46 @@ export declare const SearchResponseSchema: v.ObjectSchema<{
6089
6559
  readonly status: v.LiteralSchema<"skipped", undefined>;
6090
6560
  readonly reason: v.PicklistSchema<["excluded-by-caller", "timed-out", "not-granted", "not-yet-searchable"], undefined>;
6091
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>;
6092
6600
  }, undefined>;
6093
- readonly notYetSearchable: v.ArraySchema<v.PicklistSchema<["session-comments", "sessions", "actions", "comments", "turns"], undefined>, undefined>;
6601
+ readonly notYetSearchable: v.ArraySchema<v.PicklistSchema<["actions", "comments", "session-comments", "turns", "sessions"], undefined>, undefined>;
6094
6602
  readonly untrusted: v.ObjectSchema<{
6095
6603
  readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6096
6604
  readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -6976,6 +7484,19 @@ export declare function parseAnnounceItemCommentsResponse(data: unknown): {
6976
7484
  open: number;
6977
7485
  announced: number;
6978
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
+ };
6979
7500
  export declare function parseItemCommentsResponse(data: unknown): {
6980
7501
  comments: {
6981
7502
  itemName: string;
@@ -7056,6 +7577,13 @@ export declare function parseCommentEvidenceResponse(data: unknown): {
7056
7577
  excerpt: string;
7057
7578
  }[];
7058
7579
  citationsWithheld: number;
7580
+ sessionComments: {
7581
+ sessionId: string;
7582
+ authorKind: "person" | "mossbear";
7583
+ at: string;
7584
+ body: string;
7585
+ }[];
7586
+ sessionCommentsWithheld: number;
7059
7587
  untrusted: {
7060
7588
  token: string;
7061
7589
  startMarker: string;
@@ -7076,7 +7604,7 @@ export declare function parseSessionGradeResponse(data: unknown): {
7076
7604
  endedAt: string | null;
7077
7605
  status: "open" | "closed";
7078
7606
  };
7079
- state: "pending" | "graded" | "nothing_to_grade" | "expired";
7607
+ state: "pending" | "graded" | "nothing_to_grade" | "expired" | "grading_off";
7080
7608
  grade: {
7081
7609
  summary: string | null;
7082
7610
  gradedAt: string;
@@ -7104,7 +7632,7 @@ export declare function parseSessionDigestResponse(data: unknown): {
7104
7632
  endedAt: string | null;
7105
7633
  status: "open" | "closed";
7106
7634
  };
7107
- state: "pending" | "graded" | "nothing_to_grade" | "expired";
7635
+ state: "pending" | "graded" | "nothing_to_grade" | "expired" | "grading_off";
7108
7636
  grade: {
7109
7637
  summary: string | null;
7110
7638
  gradedAt: string;
@@ -7198,24 +7726,35 @@ export declare function parseSearchResponse(data: unknown): {
7198
7726
  status: "searched";
7199
7727
  total: number;
7200
7728
  narrowedBy: "narrowed-by-bundle-allowlist" | null;
7201
- hits: {
7202
- commentId: string;
7203
- threadId: string;
7204
- authorKind: "person" | "agent" | "mossbear";
7729
+ hits: ({
7205
7730
  subjectKind: "item";
7206
7731
  itemId: string;
7207
7732
  guideId: string | null;
7208
7733
  itemName: string | null;
7209
7734
  workspaceId: string;
7210
7735
  workspaceName: string;
7211
- resolved: boolean;
7212
7736
  itemChangedSince: boolean;
7213
7737
  matchedIn: "suggestion" | "body";
7214
7738
  approved?: boolean | undefined;
7739
+ commentId: string;
7740
+ threadId: string;
7741
+ authorKind: "agent" | "person" | "mossbear";
7742
+ resolved: boolean;
7215
7743
  createdAt: string;
7216
7744
  url?: string | undefined;
7217
7745
  excerpt: string;
7218
- }[];
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
+ })[];
7219
7758
  } | {
7220
7759
  status: "skipped";
7221
7760
  reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
@@ -7239,6 +7778,26 @@ export declare function parseSearchResponse(data: unknown): {
7239
7778
  status: "skipped";
7240
7779
  reason: "excluded-by-caller" | "timed-out" | "not-granted" | "not-yet-searchable";
7241
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;
7242
7801
  };
7243
7802
  notYetSearchable: ("comments" | "sessions" | "actions" | "turns" | "session-comments")[];
7244
7803
  untrusted: {