@mossbear/protocol 0.1.0-alpha.114 → 0.1.0-alpha.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/bundles.d.ts +662 -0
  2. package/dist/bundles.d.ts.map +1 -0
  3. package/dist/bundles.js +454 -0
  4. package/dist/bundles.js.map +1 -0
  5. package/dist/bundles.test.d.ts +2 -0
  6. package/dist/bundles.test.d.ts.map +1 -0
  7. package/dist/bundles.test.js +61 -0
  8. package/dist/bundles.test.js.map +1 -0
  9. package/dist/comments.d.ts +1405 -0
  10. package/dist/comments.d.ts.map +1 -0
  11. package/dist/comments.js +683 -0
  12. package/dist/comments.js.map +1 -0
  13. package/dist/comments.test.d.ts +2 -0
  14. package/dist/comments.test.d.ts.map +1 -0
  15. package/dist/comments.test.js +64 -0
  16. package/dist/comments.test.js.map +1 -0
  17. package/dist/guideHistory.d.ts +643 -0
  18. package/dist/guideHistory.d.ts.map +1 -0
  19. package/dist/guideHistory.js +343 -0
  20. package/dist/guideHistory.js.map +1 -0
  21. package/dist/guideHistory.test.d.ts +2 -0
  22. package/dist/guideHistory.test.d.ts.map +1 -0
  23. package/dist/guideHistory.test.js +35 -0
  24. package/dist/guideHistory.test.js.map +1 -0
  25. package/dist/guideImport.d.ts +398 -0
  26. package/dist/guideImport.d.ts.map +1 -0
  27. package/dist/guideImport.js +350 -0
  28. package/dist/guideImport.js.map +1 -0
  29. package/dist/guideImport.test.d.ts +2 -0
  30. package/dist/guideImport.test.d.ts.map +1 -0
  31. package/dist/guideImport.test.js +62 -0
  32. package/dist/guideImport.test.js.map +1 -0
  33. package/dist/guideSnapshot.d.ts +105 -0
  34. package/dist/guideSnapshot.d.ts.map +1 -0
  35. package/dist/guideSnapshot.js +101 -0
  36. package/dist/guideSnapshot.js.map +1 -0
  37. package/dist/guideSnapshot.test.d.ts +2 -0
  38. package/dist/guideSnapshot.test.d.ts.map +1 -0
  39. package/dist/guideSnapshot.test.js +49 -0
  40. package/dist/guideSnapshot.test.js.map +1 -0
  41. package/dist/schemas.d.ts +5122 -11710
  42. package/dist/schemas.d.ts.map +1 -1
  43. package/dist/schemas.js +61 -2816
  44. package/dist/schemas.js.map +1 -1
  45. package/dist/search.d.ts +1222 -0
  46. package/dist/search.d.ts.map +1 -0
  47. package/dist/search.js +474 -0
  48. package/dist/search.js.map +1 -0
  49. package/dist/search.test.d.ts +2 -0
  50. package/dist/search.test.d.ts.map +1 -0
  51. package/dist/search.test.js +64 -0
  52. package/dist/search.test.js.map +1 -0
  53. package/dist/sessionContracts.test.d.ts +2 -0
  54. package/dist/sessionContracts.test.d.ts.map +1 -0
  55. package/dist/sessionContracts.test.js +75 -0
  56. package/dist/sessionContracts.test.js.map +1 -0
  57. package/dist/sessionDigest.d.ts +149 -0
  58. package/dist/sessionDigest.d.ts.map +1 -0
  59. package/dist/sessionDigest.js +57 -0
  60. package/dist/sessionDigest.js.map +1 -0
  61. package/dist/sessionGrade.d.ts +184 -0
  62. package/dist/sessionGrade.d.ts.map +1 -0
  63. package/dist/sessionGrade.js +130 -0
  64. package/dist/sessionGrade.js.map +1 -0
  65. package/dist/types.d.ts +4 -27
  66. package/dist/types.d.ts.map +1 -1
  67. package/dist/types.js.map +1 -1
  68. package/dist/usageOnly.d.ts +5 -5
  69. package/dist/wirePrimitives.d.ts +173 -0
  70. package/dist/wirePrimitives.d.ts.map +1 -0
  71. package/dist/wirePrimitives.js +210 -0
  72. package/dist/wirePrimitives.js.map +1 -0
  73. package/package.json +1 -1
@@ -0,0 +1,1405 @@
1
+ /** Comment reads, findings, evidence and agent writes. Depends only on shared wire primitives. */
2
+ import * as v from 'valibot';
3
+ /**
4
+ * How many open comments one item carries on the wire, newest first.
5
+ *
6
+ * A wire bound, not a product limit: the write side refuses the comment that
7
+ * would exceed it *by name* (see the dashboard's note mutator), so this cap is
8
+ * never the thing that silently drops a comment a person left.
9
+ */
10
+ export declare const MAX_ITEM_COMMENTS_ON_WIRE = 20;
11
+ /**
12
+ * How many replies one delivered thread carries, the newest kept. A thread past
13
+ * it says how many it held back (`repliesWithheld`), so a cut is never silent.
14
+ */
15
+ export declare const MAX_REPLIES_PER_THREAD_ON_WIRE = 10;
16
+ /**
17
+ * The most entries one item's `comments` can hold once threads ride it: a
18
+ * person's allowance of roots plus an agent's own, each followed by its replies.
19
+ * A client that does not render threads is sent roots alone, which stay within
20
+ * `MAX_ITEM_COMMENTS_ON_WIRE`.
21
+ */
22
+ export declare const MAX_ITEM_THREAD_ENTRIES_ON_WIRE: number;
23
+ /** What a finding rests on: graded sessions, how loads read a skill, or the rubric alone. */
24
+ export declare const FindingTierSchema: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
25
+ export type FindingTier = v.InferOutput<typeof FindingTierSchema>;
26
+ /**
27
+ * What a Mossbear finding carries on the comment read, besides its claim.
28
+ *
29
+ * `tierLine` and `blindSpot` are written by the server from data it holds —
30
+ * the cited sessions, the load counts, the rubric check — never by a model, so
31
+ * they sit outside the response's untrusted markers. `prediction` is
32
+ * model-authored and arrives inside them. A finding never carries replacement
33
+ * text: the reader's agent has the repository and writes the fix.
34
+ */
35
+ export declare const CommentFindingSchema: v.ObjectSchema<{
36
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
37
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
38
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
39
+ /** What the drafter did not read, fixed per tier. */
40
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
41
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
42
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
43
+ }, undefined>;
44
+ export type CommentFinding = v.InferOutput<typeof CommentFindingSchema>;
45
+ /** Whether an open Mossbear finding is the agent's to act on (`ArtifactComment.findingState`). */
46
+ export declare const CommentFindingStateSchema: v.PicklistSchema<["ready", "waiting"], undefined>;
47
+ export type CommentFindingState = v.InferOutput<typeof CommentFindingStateSchema>;
48
+ /** Where a commented artifact is published from (`ArtifactComment.publishedFrom`). */
49
+ export declare const CommentPublishedFromSchema: v.ObjectSchema<{
50
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
51
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
52
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
53
+ readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
54
+ }, undefined>;
55
+ export type CommentPublishedFrom = v.InferOutput<typeof CommentPublishedFromSchema>;
56
+ /**
57
+ * One comment a **person** left about a context item, riding the item it is about.
58
+ *
59
+ * A comment is not an item: it is not a member, not projected, not versioned and
60
+ * not capturable. It travels on the item so that it inherits every delivery
61
+ * decision the item already went through — workspace scope, the archived drop,
62
+ * the response limit, the subscriber's mute — rather than restating them.
63
+ *
64
+ * **Every `body` here is already wrapped in the response's untrusted markers**
65
+ * (`ContextItemsResponseSchema.untrusted`). A reader emits the bytes as it
66
+ * received them and never re-wraps them: the markers are derived against the
67
+ * bodies the server sent, so a second wrapping cannot claim the same guarantee.
68
+ */
69
+ export declare const ArtifactCommentSchema: v.ObjectSchema<{
70
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
71
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
72
+ /** Current source location of an anchored passage, or its lost quote. */
73
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
74
+ readonly quote: v.StringSchema<undefined>;
75
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
76
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
77
+ readonly start: v.NumberSchema<undefined>;
78
+ readonly end: v.NumberSchema<undefined>;
79
+ }, undefined>, undefined>;
80
+ /**
81
+ * Where the passage sits in an `html` page as the reader saw it: a CSS
82
+ * selector, the tag, and the nearest `aria-label` or heading. Sent when
83
+ * the passage has no source lines, so an agent can find a block the
84
+ * page's script built.
85
+ */
86
+ readonly element: v.OptionalSchema<v.ObjectSchema<{
87
+ readonly selector: v.StringSchema<undefined>;
88
+ readonly tag: v.StringSchema<undefined>;
89
+ readonly label: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
90
+ }, undefined>, undefined>;
91
+ }, undefined>, undefined>;
92
+ /** The comment's text, already wrapped in the response's untrusted markers. */
93
+ readonly body: v.StringSchema<undefined>;
94
+ /**
95
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
96
+ * Present only on a Mossbear comment. The comment's `body` begins with the
97
+ * claim (what goes wrong); this carries what the claim rests on.
98
+ */
99
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
100
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
101
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
102
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
103
+ /** What the drafter did not read, fixed per tier. */
104
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
105
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
106
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
107
+ }, undefined>, undefined>;
108
+ /**
109
+ * Whether the person handed a comment Mossbear drafted to their agent. Nothing
110
+ * hands one over any more, so a current server sends `false` on every Mossbear
111
+ * comment and omits it on a person's or an agent's; the field stays for
112
+ * readers that predate `findingState`. It does not say whether the agent may
113
+ * act: read `findingState` for that, and fall back to `approved: false`
114
+ * meaning "not yet accepted" only when `findingState` is absent, from a server
115
+ * that predates it. Only a client that reports a version able to mark drafts
116
+ * is listed a finding at all, so an older reader that strips this field never
117
+ * receives one it would misread.
118
+ */
119
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
120
+ /**
121
+ * Whether an open Mossbear finding is the agent's to act on. A current server
122
+ * sends `ready` on every open finding: it is the agent's unless the person
123
+ * dismisses it, and a dismissed finding is resolved. `waiting`, sent only by
124
+ * an older server, means it waits on the person: show it to the user and
125
+ * change nothing unless they say so. Present only on an open Mossbear
126
+ * comment. A server that predates the field omits it, and a reader then
127
+ * falls back to `approved`. This is a new name rather than a new meaning for
128
+ * `state`, which already says open or resolved.
129
+ */
130
+ readonly findingState: v.OptionalSchema<v.PicklistSchema<["ready", "waiting"], undefined>, undefined>;
131
+ /**
132
+ * Where the artifact is published from, when Mossbear records one: the
133
+ * committed `project.id` of the repository whose commits own it, and the
134
+ * branch it was published from (null when none was recorded). `thisRepo` is
135
+ * true when that is the repo the read declared, false when it is another repo,
136
+ * and absent when the read declared no repo. The field is absent when Mossbear
137
+ * records no publishing repo, which is not a claim that the artifact is
138
+ * Mossbear-owned.
139
+ */
140
+ readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
141
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
142
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
143
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
144
+ readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
145
+ }, undefined>, undefined>;
146
+ /** The author's display name as the workspace shows it, or null. Never an email. */
147
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
148
+ /**
149
+ * Who wrote it. Optional because a server that predates the field omits it;
150
+ * a reader that meets a reply without it cannot tell whose it is, and a
151
+ * server never sends a reply to a client too old to read this.
152
+ */
153
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
154
+ /** ISO timestamp, machine format. */
155
+ readonly createdAt: v.StringSchema<undefined>;
156
+ /** The item's content version the comment was written against. */
157
+ readonly itemVersion: v.NumberSchema<undefined>;
158
+ /** True when the item's current version is greater than `itemVersion`. */
159
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
160
+ /**
161
+ * How many agent reads were handed this comment **before** this one — so a
162
+ * comment reaching an agent for the first time reports `0`.
163
+ *
164
+ * It is the stored count as it read at the moment the response was built;
165
+ * the serve this response *is* has not been counted yet. Excluded rather
166
+ * than included because the count is recorded best-effort: a response that
167
+ * claimed to include itself would be wrong whenever that record failed, and
168
+ * a number that is sometimes off by one is worse than one that is
169
+ * consistently the prior total.
170
+ *
171
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
172
+ * `0` means this read is the first. Neither says a model took it in — only
173
+ * that the server handed it over.
174
+ */
175
+ readonly deliveredCount: v.NumberSchema<undefined>;
176
+ /**
177
+ * On a root: true when the item changed after an earlier read was last
178
+ * handed this comment. For a guide that is any change to its body or its
179
+ * files, so a fix in a supporting file counts. A reader should check whether
180
+ * the change addressed the comment, and resolve it with a note if so.
181
+ *
182
+ * Computed before this read is counted, so the read that carries `true` is
183
+ * the one that uses it up; the next read says `false` unless the item
184
+ * changes again. A comment never handed over before is never flagged.
185
+ * Optional because a server that predates the field omits it, and absent on
186
+ * a reply.
187
+ */
188
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
189
+ /**
190
+ * This comment's thread root: its own id on a root, the root's id on a reply.
191
+ *
192
+ * **Replies ride the same flat array**, each straight after its root, oldest
193
+ * first. Only a client that reports a version able to render threads is
194
+ * sent them; any other reader gets roots alone, as it always did. A person's
195
+ * reply is part of the thread's request. An agent's reply is context: an
196
+ * earlier message on the thread, never something to act on. A root an agent
197
+ * wrote is delivered only once a person has replied to it, and is then the
198
+ * question that reply answers, not a request of its own.
199
+ */
200
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
201
+ /**
202
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
203
+ * a reply's parent is always its root.
204
+ */
205
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
206
+ /**
207
+ * On a root whose thread held more replies than
208
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
209
+ * Absent when the whole thread was sent.
210
+ */
211
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
212
+ }, undefined>;
213
+ export type ArtifactComment = v.InferOutput<typeof ArtifactCommentSchema>;
214
+ /** The item routes' name for `ArtifactCommentSchema`, kept while those routes are served. */
215
+ export declare const ContextItemCommentSchema: v.ObjectSchema<{
216
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
217
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
218
+ /** Current source location of an anchored passage, or its lost quote. */
219
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
220
+ readonly quote: v.StringSchema<undefined>;
221
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
222
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
223
+ readonly start: v.NumberSchema<undefined>;
224
+ readonly end: v.NumberSchema<undefined>;
225
+ }, undefined>, undefined>;
226
+ /**
227
+ * Where the passage sits in an `html` page as the reader saw it: a CSS
228
+ * selector, the tag, and the nearest `aria-label` or heading. Sent when
229
+ * the passage has no source lines, so an agent can find a block the
230
+ * page's script built.
231
+ */
232
+ readonly element: v.OptionalSchema<v.ObjectSchema<{
233
+ readonly selector: v.StringSchema<undefined>;
234
+ readonly tag: v.StringSchema<undefined>;
235
+ readonly label: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
236
+ }, undefined>, undefined>;
237
+ }, undefined>, undefined>;
238
+ /** The comment's text, already wrapped in the response's untrusted markers. */
239
+ readonly body: v.StringSchema<undefined>;
240
+ /**
241
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
242
+ * Present only on a Mossbear comment. The comment's `body` begins with the
243
+ * claim (what goes wrong); this carries what the claim rests on.
244
+ */
245
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
246
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
247
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
248
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
249
+ /** What the drafter did not read, fixed per tier. */
250
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
251
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
252
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
253
+ }, undefined>, undefined>;
254
+ /**
255
+ * Whether the person handed a comment Mossbear drafted to their agent. Nothing
256
+ * hands one over any more, so a current server sends `false` on every Mossbear
257
+ * comment and omits it on a person's or an agent's; the field stays for
258
+ * readers that predate `findingState`. It does not say whether the agent may
259
+ * act: read `findingState` for that, and fall back to `approved: false`
260
+ * meaning "not yet accepted" only when `findingState` is absent, from a server
261
+ * that predates it. Only a client that reports a version able to mark drafts
262
+ * is listed a finding at all, so an older reader that strips this field never
263
+ * receives one it would misread.
264
+ */
265
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
266
+ /**
267
+ * Whether an open Mossbear finding is the agent's to act on. A current server
268
+ * sends `ready` on every open finding: it is the agent's unless the person
269
+ * dismisses it, and a dismissed finding is resolved. `waiting`, sent only by
270
+ * an older server, means it waits on the person: show it to the user and
271
+ * change nothing unless they say so. Present only on an open Mossbear
272
+ * comment. A server that predates the field omits it, and a reader then
273
+ * falls back to `approved`. This is a new name rather than a new meaning for
274
+ * `state`, which already says open or resolved.
275
+ */
276
+ readonly findingState: v.OptionalSchema<v.PicklistSchema<["ready", "waiting"], undefined>, undefined>;
277
+ /**
278
+ * Where the artifact is published from, when Mossbear records one: the
279
+ * committed `project.id` of the repository whose commits own it, and the
280
+ * branch it was published from (null when none was recorded). `thisRepo` is
281
+ * true when that is the repo the read declared, false when it is another repo,
282
+ * and absent when the read declared no repo. The field is absent when Mossbear
283
+ * records no publishing repo, which is not a claim that the artifact is
284
+ * Mossbear-owned.
285
+ */
286
+ readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
287
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
288
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
289
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
290
+ readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
291
+ }, undefined>, undefined>;
292
+ /** The author's display name as the workspace shows it, or null. Never an email. */
293
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
294
+ /**
295
+ * Who wrote it. Optional because a server that predates the field omits it;
296
+ * a reader that meets a reply without it cannot tell whose it is, and a
297
+ * server never sends a reply to a client too old to read this.
298
+ */
299
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
300
+ /** ISO timestamp, machine format. */
301
+ readonly createdAt: v.StringSchema<undefined>;
302
+ /** The item's content version the comment was written against. */
303
+ readonly itemVersion: v.NumberSchema<undefined>;
304
+ /** True when the item's current version is greater than `itemVersion`. */
305
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
306
+ /**
307
+ * How many agent reads were handed this comment **before** this one — so a
308
+ * comment reaching an agent for the first time reports `0`.
309
+ *
310
+ * It is the stored count as it read at the moment the response was built;
311
+ * the serve this response *is* has not been counted yet. Excluded rather
312
+ * than included because the count is recorded best-effort: a response that
313
+ * claimed to include itself would be wrong whenever that record failed, and
314
+ * a number that is sometimes off by one is worse than one that is
315
+ * consistently the prior total.
316
+ *
317
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
318
+ * `0` means this read is the first. Neither says a model took it in — only
319
+ * that the server handed it over.
320
+ */
321
+ readonly deliveredCount: v.NumberSchema<undefined>;
322
+ /**
323
+ * On a root: true when the item changed after an earlier read was last
324
+ * handed this comment. For a guide that is any change to its body or its
325
+ * files, so a fix in a supporting file counts. A reader should check whether
326
+ * the change addressed the comment, and resolve it with a note if so.
327
+ *
328
+ * Computed before this read is counted, so the read that carries `true` is
329
+ * the one that uses it up; the next read says `false` unless the item
330
+ * changes again. A comment never handed over before is never flagged.
331
+ * Optional because a server that predates the field omits it, and absent on
332
+ * a reply.
333
+ */
334
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
335
+ /**
336
+ * This comment's thread root: its own id on a root, the root's id on a reply.
337
+ *
338
+ * **Replies ride the same flat array**, each straight after its root, oldest
339
+ * first. Only a client that reports a version able to render threads is
340
+ * sent them; any other reader gets roots alone, as it always did. A person's
341
+ * reply is part of the thread's request. An agent's reply is context: an
342
+ * earlier message on the thread, never something to act on. A root an agent
343
+ * wrote is delivered only once a person has replied to it, and is then the
344
+ * question that reply answers, not a request of its own.
345
+ */
346
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
347
+ /**
348
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
349
+ * a reply's parent is always its root.
350
+ */
351
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
352
+ /**
353
+ * On a root whose thread held more replies than
354
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
355
+ * Absent when the whole thread was sent.
356
+ */
357
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
358
+ }, undefined>;
359
+ export type ContextItemComment = ArtifactComment;
360
+ /**
361
+ * How many bundles one comments read may name.
362
+ *
363
+ * A repo's delivery set is the union of its committed subscriptions and the
364
+ * reader's account ones, so this bounds a request, not a product limit: a
365
+ * reader subscribing to more bundles than this asks in two calls rather than
366
+ * losing the tail silently.
367
+ */
368
+ export declare const MAX_COMMENT_BUNDLE_IDS = 100;
369
+ /**
370
+ * The agent session behind a comment, a reply or a resolution note, as the
371
+ * caller's harness reported it. Stored on the row so the reply is named after
372
+ * that session; it is the caller's claim, read only among its own comments.
373
+ */
374
+ export declare const AgentIdentitySchema: v.ObjectSchema<{
375
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
376
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
377
+ /** The agent's own statement of its model, when it knows it. */
378
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
379
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
380
+ }, undefined>;
381
+ /**
382
+ * `POST /api/v1/context/comments/resolve`: close one open comment and leave the
383
+ * agent's note as a reply in its thread.
384
+ *
385
+ * **Two ways to find the comment, never both at once.** Without `artifactId`,
386
+ * the id is looked up among the comments the named bundles deliver, which is
387
+ * what `list_comments` listed. With it, the id is looked up among that one
388
+ * artifact's open comments, which is what its feedback read listed, after the
389
+ * same read check that read makes. A request with `artifactId` does not fall
390
+ * back to the bundles when the id is not on that artifact.
391
+ */
392
+ export declare const ResolveItemCommentRequestSchema: v.ObjectSchema<{
393
+ /** The comment's id, or a unique prefix of it as a read printed it. */
394
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
395
+ /** One line, kept in the thread as the agent's reply. */
396
+ readonly note: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>, v.RegexAction<string, undefined>]>;
397
+ /** The bundles this repo receives. Ignored when `artifactId` is sent. */
398
+ readonly bundleIds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>, readonly []>;
399
+ /** The artifact the comment is on, as its feedback read was asked for it. */
400
+ readonly artifactId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
401
+ /**
402
+ * The reader's repo, as its committed `project.id`. A comment drafted from
403
+ * one repo's corrections is listed only to a read that declares that repo,
404
+ * so it is resolvable only by one that declares it too.
405
+ */
406
+ readonly projectId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>, undefined>;
407
+ /** The CLI's version, so a draft resolves only for a client that marks drafts. */
408
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
409
+ /**
410
+ * The agent session resolving it, stored on the note so the thread names
411
+ * who closed it. Optional: releases before it was sent resolve without one,
412
+ * and their notes read as an unnamed agent.
413
+ */
414
+ readonly agent: v.OptionalSchema<v.ObjectSchema<{
415
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
416
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
417
+ /** The agent's own statement of its model, when it knows it. */
418
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
419
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
420
+ }, undefined>, undefined>;
421
+ }, undefined>;
422
+ export type ResolveItemCommentRequest = v.InferInput<typeof ResolveItemCommentRequestSchema>;
423
+ /** A resolve the server carried out. Every refusal is an error response instead. */
424
+ export declare const ResolveItemCommentResponseSchema: v.ObjectSchema<{
425
+ readonly resolved: v.LiteralSchema<true, undefined>;
426
+ }, undefined>;
427
+ export type ResolveItemCommentResponse = v.InferOutput<typeof ResolveItemCommentResponseSchema>;
428
+ /**
429
+ * How many times one subscriber is told, in one repo, that a given comment is
430
+ * waiting before the hook falls silent about it.
431
+ *
432
+ * **A cap on the interruption, never on the comment.** After it is reached the
433
+ * comment is still open, still on the item page, and still returned in full by
434
+ * the on-demand read — it simply stops being announced in front of the first
435
+ * turn of every session. So silence here means "nothing new to interrupt you
436
+ * about", never "nobody left anything".
437
+ *
438
+ * Three rather than one, for the reason the announcement exists: the first
439
+ * session in a repo is often doing unrelated work, so a one-shot announcement
440
+ * would routinely spend itself on the session least likely to act. Three is a
441
+ * judgement, named so replacing it is one edit — the same discipline the live
442
+ * session window is held to.
443
+ */
444
+ export declare const MAX_COMMENT_ANNOUNCEMENTS_PER_REPO = 3;
445
+ /**
446
+ * Ask which comments are waiting for this reader in this repo, and be counted as
447
+ * told.
448
+ *
449
+ * **A write, because being told is a fact the server has to keep.** The count
450
+ * cannot be `item_comments.delivered_count` — that is one global number across
451
+ * every subscriber and every repo, so one reader's fill of a comment would
452
+ * silence it for everyone — and it cannot live in the checkout, because the
453
+ * disposable environments this exists for rebuild the clone every session and
454
+ * a counter there resets with it, announcing every unresolved comment as new
455
+ * forever.
456
+ */
457
+ export declare const AnnounceItemCommentsRequestSchema: v.ObjectSchema<{
458
+ /**
459
+ * The repo, as its committed config declares it. Required: it is the scope
460
+ * the count is kept under, and a request with nothing to key on could only
461
+ * be answered by an uncapped announcement — which is the repeating broadcast
462
+ * this route exists to end.
463
+ */
464
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>;
465
+ /**
466
+ * The bundles this repo receives — the union the caller already resolved.
467
+ *
468
+ * Sent rather than derived, because only half of it is the server's to know:
469
+ * a repo-scoped subscription lives in the committed config and travels by
470
+ * `git clone`. Declaring a bundle grants nothing: every one of them is still
471
+ * filtered by the caller's own workspace membership.
472
+ */
473
+ readonly bundleIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>;
474
+ /**
475
+ * The release asking. A person's reply on a thread counts as waiting only
476
+ * for a release that renders threads; without it the answer is the roots-only
477
+ * count every older release was given.
478
+ */
479
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
480
+ }, undefined>;
481
+ export type AnnounceItemCommentsRequest = v.InferOutput<typeof AnnounceItemCommentsRequestSchema>;
482
+ /**
483
+ * What an announcement answers: how many comments are waiting, and how many of
484
+ * them this call was counted as announcing.
485
+ *
486
+ * **Two numbers because they answer two questions and a reader needs both.**
487
+ * `open` is the true state of this repo's comments and is what a caller shows a
488
+ * person — a number that is sometimes a subset of the truth would be worse
489
+ * than the silence it replaced. `announced` is how many of those were still
490
+ * under the cap, and it is the one that decides whether to speak at all: zero
491
+ * means this reader has already been told about every one of them as often as
492
+ * the cap allows.
493
+ */
494
+ export declare const AnnounceItemCommentsResponseSchema: v.ObjectSchema<{
495
+ /** Open, unmuted comments about the items these bundles deliver to this reader. */
496
+ readonly open: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
497
+ /** How many of those were under the cap and have now been counted as announced. */
498
+ readonly announced: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
499
+ }, undefined>;
500
+ export type AnnounceItemCommentsResponse = v.InferOutput<typeof AnnounceItemCommentsResponseSchema>;
501
+ /**
502
+ * How many comments one agent session may leave on one subject, not counting its
503
+ * whole-subject comment. Anchored comments and replies share it.
504
+ */
505
+ export declare const MAX_AGENT_COMMENTS_PER_SUBJECT = 50;
506
+ /** The longest an agent comment's text may be, in characters. */
507
+ export declare const MAX_AGENT_COMMENT_BODY_CHARS = 4000;
508
+ /**
509
+ * Why an agent comment was refused, as the `code` on the error body. A caller
510
+ * branches on these; the message beside one is for a person.
511
+ */
512
+ 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"];
513
+ 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>;
514
+ export type AgentCommentErrorCode = v.InferOutput<typeof AgentCommentErrorCodeSchema>;
515
+ /**
516
+ * Leave a comment, or reply to one, as an agent (`POST /api/v1/context/comments`).
517
+ *
518
+ * **`target` names what the comment is about, one way.** `artifact` is the id
519
+ * a bundle read gave for a guide or document, and `item` is its older name for
520
+ * the same thing, accepted until every client sends `artifact`. `session` is an
521
+ * agent session id of the caller's own (the key a search hit and the session digest hand out), and
522
+ * `reply` is the id of a comment to answer. A reply joins that comment's thread
523
+ * and the subject it is about.
524
+ *
525
+ * **Who the agent is comes from `agent`, and `sessionId` is the harness's own
526
+ * id as the CLI read it.** A request without one is refused with
527
+ * `agent_session_required`, and the CLI and tool offer no way to type one. The
528
+ * server cannot check it against the harness, so it is a claim by the holder of
529
+ * the token: the comment is always written under that token's account, and the
530
+ * handle shown for it names a session only as far as the claim is true.
531
+ *
532
+ * **Text only.** There is no replacement-text field, and a request that carries
533
+ * one is refused with `agent_comment_text_only` rather than having it dropped.
534
+ */
535
+ export declare const AgentCommentRequestSchema: v.ObjectSchema<{
536
+ readonly target: v.VariantSchema<"kind", [v.ObjectSchema<{
537
+ readonly kind: v.LiteralSchema<"artifact", undefined>;
538
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
539
+ }, undefined>, v.ObjectSchema<{
540
+ readonly kind: v.LiteralSchema<"session", undefined>;
541
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
542
+ }, undefined>, v.ObjectSchema<{
543
+ readonly kind: v.LiteralSchema<"reply", undefined>;
544
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
545
+ }, undefined>], undefined>;
546
+ readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
547
+ /**
548
+ * The passage an item comment is about, as the exact text of one or more whole
549
+ * lines of the item (a paragraph, a heading, a list). None means the item as a
550
+ * whole. The server finds the lines; a passage that is not in the item as it is
551
+ * now is refused with `agent_comment_passage_not_found`.
552
+ */
553
+ readonly passage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8000, undefined>]>, undefined>;
554
+ readonly agent: v.ObjectSchema<{
555
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
556
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
557
+ /** The agent's own statement of its model, when it knows it. */
558
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
559
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
560
+ }, undefined>;
561
+ /**
562
+ * The reader's repo, as its committed `project.id`. A reply may name a
563
+ * comment by the unique id prefix `list_comments` printed, and a comment
564
+ * drafted from one repo's corrections is listed only to a read that declares
565
+ * that repo, so it is matched only by a reply that declares it too.
566
+ */
567
+ readonly projectId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>, undefined>;
568
+ /**
569
+ * The bundles the reader's `list_comments` was scoped to, so an id prefix
570
+ * printed there is matched among exactly those bundles. Without it the prefix
571
+ * is matched among every bundle the caller can reach.
572
+ */
573
+ readonly bundleIds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>, undefined>;
574
+ }, undefined>;
575
+ export type AgentCommentRequest = v.InferOutput<typeof AgentCommentRequestSchema>;
576
+ /** A batch may cover findings across several guides without one write per finding. */
577
+ export declare const MAX_FINDING_DISMISSALS_PER_REQUEST = 100;
578
+ export declare const FindingDismissalInputSchema: v.ObjectSchema<{
579
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
580
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000, undefined>, v.CheckAction<string, "Use one line for the reason.">]>;
581
+ }, undefined>;
582
+ export declare const FindingDismissalInputsSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
583
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
584
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000, undefined>, v.CheckAction<string, "Use one line for the reason.">]>;
585
+ }, undefined>, undefined>, v.MinLengthAction<{
586
+ id: string;
587
+ reason: string;
588
+ }[], 1, undefined>, v.MaxLengthAction<{
589
+ id: string;
590
+ reason: string;
591
+ }[], 100, undefined>, v.CheckAction<{
592
+ id: string;
593
+ reason: string;
594
+ }[], "Name each finding only once.">]>;
595
+ export declare const SuggestFindingDismissalsRequestSchema: v.ObjectSchema<{
596
+ readonly suggestions: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
597
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
598
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000, undefined>, v.CheckAction<string, "Use one line for the reason.">]>;
599
+ }, undefined>, undefined>, v.MinLengthAction<{
600
+ id: string;
601
+ reason: string;
602
+ }[], 1, undefined>, v.MaxLengthAction<{
603
+ id: string;
604
+ reason: string;
605
+ }[], 100, undefined>, v.CheckAction<{
606
+ id: string;
607
+ reason: string;
608
+ }[], "Name each finding only once.">]>;
609
+ readonly agent: v.ObjectSchema<{
610
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
611
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
612
+ /** The agent's own statement of its model, when it knows it. */
613
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
614
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
615
+ }, undefined>;
616
+ }, undefined>;
617
+ export type SuggestFindingDismissalsRequest = v.InferOutput<typeof SuggestFindingDismissalsRequestSchema>;
618
+ /** Recommendations are separate from the finding's open/resolved state. */
619
+ export declare const FindingDismissalSuggestionSchema: v.ObjectSchema<{
620
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
621
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
622
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
623
+ readonly agent: v.ObjectSchema<{
624
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
625
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
626
+ /** The agent's own statement of its model, when it knows it. */
627
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
628
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
629
+ }, undefined>;
630
+ readonly guideVersion: v.NumberSchema<undefined>;
631
+ readonly createdAt: v.StringSchema<undefined>;
632
+ }, undefined>;
633
+ export type FindingDismissalSuggestion = v.InferOutput<typeof FindingDismissalSuggestionSchema>;
634
+ export declare const SuggestFindingDismissalsResponseSchema: v.ObjectSchema<{
635
+ readonly results: v.ArraySchema<v.ObjectSchema<{
636
+ readonly suggestion: v.ObjectSchema<{
637
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
638
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
639
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
640
+ readonly agent: v.ObjectSchema<{
641
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
642
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
643
+ /** The agent's own statement of its model, when it knows it. */
644
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
645
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
646
+ }, undefined>;
647
+ readonly guideVersion: v.NumberSchema<undefined>;
648
+ readonly createdAt: v.StringSchema<undefined>;
649
+ }, undefined>;
650
+ readonly created: v.BooleanSchema<undefined>;
651
+ readonly valid: v.BooleanSchema<undefined>;
652
+ }, undefined>, undefined>;
653
+ }, undefined>;
654
+ export type SuggestFindingDismissalsResponse = v.InferOutput<typeof SuggestFindingDismissalsResponseSchema>;
655
+ export declare const FindingDismissalSuggestionsCursorSchema: v.ObjectSchema<{
656
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
657
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
658
+ }, undefined>;
659
+ export type FindingDismissalSuggestionsCursor = v.InferOutput<typeof FindingDismissalSuggestionsCursorSchema>;
660
+ export declare const FindingDismissalSuggestionsResponseSchema: v.ObjectSchema<{
661
+ readonly suggestions: v.ArraySchema<v.ObjectSchema<{
662
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
663
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
664
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
665
+ readonly agent: v.ObjectSchema<{
666
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
667
+ readonly harness: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
668
+ /** The agent's own statement of its model, when it knows it. */
669
+ readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
670
+ readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
671
+ }, undefined>;
672
+ readonly guideVersion: v.NumberSchema<undefined>;
673
+ readonly createdAt: v.StringSchema<undefined>;
674
+ }, undefined>, undefined>;
675
+ readonly nextCursor: v.NullableSchema<v.ObjectSchema<{
676
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
677
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
678
+ }, undefined>, undefined>;
679
+ }, undefined>;
680
+ /**
681
+ * The comment a create settled on. `created` is false when this agent session
682
+ * already had a whole-subject comment on the subject: that comment comes back
683
+ * unchanged and nothing was written.
684
+ */
685
+ export declare const AgentCommentResponseSchema: v.ObjectSchema<{
686
+ readonly created: v.BooleanSchema<undefined>;
687
+ readonly comment: v.ObjectSchema<{
688
+ readonly id: v.StringSchema<undefined>;
689
+ readonly threadId: v.StringSchema<undefined>;
690
+ readonly subject: v.ObjectSchema<{
691
+ readonly kind: v.PicklistSchema<["artifact", "session"], undefined>;
692
+ readonly id: v.StringSchema<undefined>;
693
+ }, undefined>;
694
+ readonly body: v.StringSchema<undefined>;
695
+ readonly createdAt: v.StringSchema<undefined>;
696
+ }, undefined>;
697
+ }, undefined>;
698
+ export type AgentCommentResponse = v.InferOutput<typeof AgentCommentResponseSchema>;
699
+ /**
700
+ * One comment on the on-demand read, with the item it is about named on the comment.
701
+ *
702
+ * The item is named here rather than the comments riding an item, because this
703
+ * read answers "what has been left for me" rather than "what is in this
704
+ * bundle": there is no item payload to hang them off, and an agent that has to
705
+ * ask for every item to find out whether one carries a comment is the round trip
706
+ * the announcement exists to avoid.
707
+ */
708
+ export declare const ItemCommentWithSubjectSchema: v.ObjectSchema<{
709
+ /** The item the comment is about, as the wire names it. */
710
+ readonly itemName: v.StringSchema<undefined>;
711
+ /** The item's declared repo-relative path, or null when it has none. */
712
+ readonly itemPath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
713
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
714
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
715
+ /** Current source location of an anchored passage, or its lost quote. */
716
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
717
+ readonly quote: v.StringSchema<undefined>;
718
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
719
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
720
+ readonly start: v.NumberSchema<undefined>;
721
+ readonly end: v.NumberSchema<undefined>;
722
+ }, undefined>, undefined>;
723
+ /**
724
+ * Where the passage sits in an `html` page as the reader saw it: a CSS
725
+ * selector, the tag, and the nearest `aria-label` or heading. Sent when
726
+ * the passage has no source lines, so an agent can find a block the
727
+ * page's script built.
728
+ */
729
+ readonly element: v.OptionalSchema<v.ObjectSchema<{
730
+ readonly selector: v.StringSchema<undefined>;
731
+ readonly tag: v.StringSchema<undefined>;
732
+ readonly label: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
733
+ }, undefined>, undefined>;
734
+ }, undefined>, undefined>;
735
+ /** The comment's text, already wrapped in the response's untrusted markers. */
736
+ readonly body: v.StringSchema<undefined>;
737
+ /**
738
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
739
+ * Present only on a Mossbear comment. The comment's `body` begins with the
740
+ * claim (what goes wrong); this carries what the claim rests on.
741
+ */
742
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
743
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
744
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
745
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
746
+ /** What the drafter did not read, fixed per tier. */
747
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
748
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
749
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
750
+ }, undefined>, undefined>;
751
+ /**
752
+ * Whether the person handed a comment Mossbear drafted to their agent. Nothing
753
+ * hands one over any more, so a current server sends `false` on every Mossbear
754
+ * comment and omits it on a person's or an agent's; the field stays for
755
+ * readers that predate `findingState`. It does not say whether the agent may
756
+ * act: read `findingState` for that, and fall back to `approved: false`
757
+ * meaning "not yet accepted" only when `findingState` is absent, from a server
758
+ * that predates it. Only a client that reports a version able to mark drafts
759
+ * is listed a finding at all, so an older reader that strips this field never
760
+ * receives one it would misread.
761
+ */
762
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
763
+ /**
764
+ * Whether an open Mossbear finding is the agent's to act on. A current server
765
+ * sends `ready` on every open finding: it is the agent's unless the person
766
+ * dismisses it, and a dismissed finding is resolved. `waiting`, sent only by
767
+ * an older server, means it waits on the person: show it to the user and
768
+ * change nothing unless they say so. Present only on an open Mossbear
769
+ * comment. A server that predates the field omits it, and a reader then
770
+ * falls back to `approved`. This is a new name rather than a new meaning for
771
+ * `state`, which already says open or resolved.
772
+ */
773
+ readonly findingState: v.OptionalSchema<v.PicklistSchema<["ready", "waiting"], undefined>, undefined>;
774
+ /**
775
+ * Where the artifact is published from, when Mossbear records one: the
776
+ * committed `project.id` of the repository whose commits own it, and the
777
+ * branch it was published from (null when none was recorded). `thisRepo` is
778
+ * true when that is the repo the read declared, false when it is another repo,
779
+ * and absent when the read declared no repo. The field is absent when Mossbear
780
+ * records no publishing repo, which is not a claim that the artifact is
781
+ * Mossbear-owned.
782
+ */
783
+ readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
784
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
785
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
786
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
787
+ readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
788
+ }, undefined>, undefined>;
789
+ /** The author's display name as the workspace shows it, or null. Never an email. */
790
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
791
+ /**
792
+ * Who wrote it. Optional because a server that predates the field omits it;
793
+ * a reader that meets a reply without it cannot tell whose it is, and a
794
+ * server never sends a reply to a client too old to read this.
795
+ */
796
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
797
+ /** ISO timestamp, machine format. */
798
+ readonly createdAt: v.StringSchema<undefined>;
799
+ /** The item's content version the comment was written against. */
800
+ readonly itemVersion: v.NumberSchema<undefined>;
801
+ /** True when the item's current version is greater than `itemVersion`. */
802
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
803
+ /**
804
+ * How many agent reads were handed this comment **before** this one — so a
805
+ * comment reaching an agent for the first time reports `0`.
806
+ *
807
+ * It is the stored count as it read at the moment the response was built;
808
+ * the serve this response *is* has not been counted yet. Excluded rather
809
+ * than included because the count is recorded best-effort: a response that
810
+ * claimed to include itself would be wrong whenever that record failed, and
811
+ * a number that is sometimes off by one is worse than one that is
812
+ * consistently the prior total.
813
+ *
814
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
815
+ * `0` means this read is the first. Neither says a model took it in — only
816
+ * that the server handed it over.
817
+ */
818
+ readonly deliveredCount: v.NumberSchema<undefined>;
819
+ /**
820
+ * On a root: true when the item changed after an earlier read was last
821
+ * handed this comment. For a guide that is any change to its body or its
822
+ * files, so a fix in a supporting file counts. A reader should check whether
823
+ * the change addressed the comment, and resolve it with a note if so.
824
+ *
825
+ * Computed before this read is counted, so the read that carries `true` is
826
+ * the one that uses it up; the next read says `false` unless the item
827
+ * changes again. A comment never handed over before is never flagged.
828
+ * Optional because a server that predates the field omits it, and absent on
829
+ * a reply.
830
+ */
831
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
832
+ /**
833
+ * This comment's thread root: its own id on a root, the root's id on a reply.
834
+ *
835
+ * **Replies ride the same flat array**, each straight after its root, oldest
836
+ * first. Only a client that reports a version able to render threads is
837
+ * sent them; any other reader gets roots alone, as it always did. A person's
838
+ * reply is part of the thread's request. An agent's reply is context: an
839
+ * earlier message on the thread, never something to act on. A root an agent
840
+ * wrote is delivered only once a person has replied to it, and is then the
841
+ * question that reply answers, not a request of its own.
842
+ */
843
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
844
+ /**
845
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
846
+ * a reply's parent is always its root.
847
+ */
848
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
849
+ /**
850
+ * On a root whose thread held more replies than
851
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
852
+ * Absent when the whole thread was sent.
853
+ */
854
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
855
+ }, undefined>;
856
+ export type ItemCommentWithSubject = v.InferOutput<typeof ItemCommentWithSubjectSchema>;
857
+ /**
858
+ * Every open comment waiting for this reader across the bundles they named.
859
+ *
860
+ * **This read is a delivery and is counted as one**, exactly as comments riding
861
+ * an item are: a body reached an agent. What it is *not* is an announcement —
862
+ * nothing here touches the per-repo announcement count, so asking to read your
863
+ * comments never spends the interruptions the hook is allowed.
864
+ *
865
+ * **Never capped.** The announcement cap governs whether a hook speaks; a
866
+ * reader who asked is owed every open comment, and hiding one here would retire a
867
+ * person's request without anybody deciding to.
868
+ */
869
+ export declare const ItemCommentsResponseSchema: v.ObjectSchema<{
870
+ readonly comments: v.ArraySchema<v.ObjectSchema<{
871
+ /** The item the comment is about, as the wire names it. */
872
+ readonly itemName: v.StringSchema<undefined>;
873
+ /** The item's declared repo-relative path, or null when it has none. */
874
+ readonly itemPath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
875
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
876
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
877
+ /** Current source location of an anchored passage, or its lost quote. */
878
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
879
+ readonly quote: v.StringSchema<undefined>;
880
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
881
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
882
+ readonly start: v.NumberSchema<undefined>;
883
+ readonly end: v.NumberSchema<undefined>;
884
+ }, undefined>, undefined>;
885
+ /**
886
+ * Where the passage sits in an `html` page as the reader saw it: a CSS
887
+ * selector, the tag, and the nearest `aria-label` or heading. Sent when
888
+ * the passage has no source lines, so an agent can find a block the
889
+ * page's script built.
890
+ */
891
+ readonly element: v.OptionalSchema<v.ObjectSchema<{
892
+ readonly selector: v.StringSchema<undefined>;
893
+ readonly tag: v.StringSchema<undefined>;
894
+ readonly label: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
895
+ }, undefined>, undefined>;
896
+ }, undefined>, undefined>;
897
+ /** The comment's text, already wrapped in the response's untrusted markers. */
898
+ readonly body: v.StringSchema<undefined>;
899
+ /**
900
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
901
+ * Present only on a Mossbear comment. The comment's `body` begins with the
902
+ * claim (what goes wrong); this carries what the claim rests on.
903
+ */
904
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
905
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
906
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
907
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
908
+ /** What the drafter did not read, fixed per tier. */
909
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
910
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
911
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
912
+ }, undefined>, undefined>;
913
+ /**
914
+ * Whether the person handed a comment Mossbear drafted to their agent. Nothing
915
+ * hands one over any more, so a current server sends `false` on every Mossbear
916
+ * comment and omits it on a person's or an agent's; the field stays for
917
+ * readers that predate `findingState`. It does not say whether the agent may
918
+ * act: read `findingState` for that, and fall back to `approved: false`
919
+ * meaning "not yet accepted" only when `findingState` is absent, from a server
920
+ * that predates it. Only a client that reports a version able to mark drafts
921
+ * is listed a finding at all, so an older reader that strips this field never
922
+ * receives one it would misread.
923
+ */
924
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
925
+ /**
926
+ * Whether an open Mossbear finding is the agent's to act on. A current server
927
+ * sends `ready` on every open finding: it is the agent's unless the person
928
+ * dismisses it, and a dismissed finding is resolved. `waiting`, sent only by
929
+ * an older server, means it waits on the person: show it to the user and
930
+ * change nothing unless they say so. Present only on an open Mossbear
931
+ * comment. A server that predates the field omits it, and a reader then
932
+ * falls back to `approved`. This is a new name rather than a new meaning for
933
+ * `state`, which already says open or resolved.
934
+ */
935
+ readonly findingState: v.OptionalSchema<v.PicklistSchema<["ready", "waiting"], undefined>, undefined>;
936
+ /**
937
+ * Where the artifact is published from, when Mossbear records one: the
938
+ * committed `project.id` of the repository whose commits own it, and the
939
+ * branch it was published from (null when none was recorded). `thisRepo` is
940
+ * true when that is the repo the read declared, false when it is another repo,
941
+ * and absent when the read declared no repo. The field is absent when Mossbear
942
+ * records no publishing repo, which is not a claim that the artifact is
943
+ * Mossbear-owned.
944
+ */
945
+ readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
946
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
947
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
948
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
949
+ readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
950
+ }, undefined>, undefined>;
951
+ /** The author's display name as the workspace shows it, or null. Never an email. */
952
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
953
+ /**
954
+ * Who wrote it. Optional because a server that predates the field omits it;
955
+ * a reader that meets a reply without it cannot tell whose it is, and a
956
+ * server never sends a reply to a client too old to read this.
957
+ */
958
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
959
+ /** ISO timestamp, machine format. */
960
+ readonly createdAt: v.StringSchema<undefined>;
961
+ /** The item's content version the comment was written against. */
962
+ readonly itemVersion: v.NumberSchema<undefined>;
963
+ /** True when the item's current version is greater than `itemVersion`. */
964
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
965
+ /**
966
+ * How many agent reads were handed this comment **before** this one — so a
967
+ * comment reaching an agent for the first time reports `0`.
968
+ *
969
+ * It is the stored count as it read at the moment the response was built;
970
+ * the serve this response *is* has not been counted yet. Excluded rather
971
+ * than included because the count is recorded best-effort: a response that
972
+ * claimed to include itself would be wrong whenever that record failed, and
973
+ * a number that is sometimes off by one is worse than one that is
974
+ * consistently the prior total.
975
+ *
976
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
977
+ * `0` means this read is the first. Neither says a model took it in — only
978
+ * that the server handed it over.
979
+ */
980
+ readonly deliveredCount: v.NumberSchema<undefined>;
981
+ /**
982
+ * On a root: true when the item changed after an earlier read was last
983
+ * handed this comment. For a guide that is any change to its body or its
984
+ * files, so a fix in a supporting file counts. A reader should check whether
985
+ * the change addressed the comment, and resolve it with a note if so.
986
+ *
987
+ * Computed before this read is counted, so the read that carries `true` is
988
+ * the one that uses it up; the next read says `false` unless the item
989
+ * changes again. A comment never handed over before is never flagged.
990
+ * Optional because a server that predates the field omits it, and absent on
991
+ * a reply.
992
+ */
993
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
994
+ /**
995
+ * This comment's thread root: its own id on a root, the root's id on a reply.
996
+ *
997
+ * **Replies ride the same flat array**, each straight after its root, oldest
998
+ * first. Only a client that reports a version able to render threads is
999
+ * sent them; any other reader gets roots alone, as it always did. A person's
1000
+ * reply is part of the thread's request. An agent's reply is context: an
1001
+ * earlier message on the thread, never something to act on. A root an agent
1002
+ * wrote is delivered only once a person has replied to it, and is then the
1003
+ * question that reply answers, not a request of its own.
1004
+ */
1005
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1006
+ /**
1007
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
1008
+ * a reply's parent is always its root.
1009
+ */
1010
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
1011
+ /**
1012
+ * On a root whose thread held more replies than
1013
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
1014
+ * Absent when the whole thread was sent.
1015
+ */
1016
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
1017
+ }, undefined>, undefined>;
1018
+ readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1019
+ /**
1020
+ * The markers every `body` above is wrapped in, plus a statement of what
1021
+ * they mean. Present exactly when at least one comment came back.
1022
+ */
1023
+ readonly untrusted: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
1024
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1025
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1026
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1027
+ readonly note: v.StringSchema<undefined>;
1028
+ }, undefined>, undefined>, undefined>;
1029
+ }, undefined>;
1030
+ export type ItemCommentsResponse = v.InferOutput<typeof ItemCommentsResponseSchema>;
1031
+ /**
1032
+ * The evidence behind one Mossbear finding an agent was handed
1033
+ * (`GET /api/v1/context/comments/evidence`).
1034
+ *
1035
+ * `list_comments` carries the claim and a one-line tier; this is the finding
1036
+ * in full: the claim, the change it predicts in future sessions, what the
1037
+ * drafter did not read, and the evidence for its tier. Readable only through a
1038
+ * comment the comment read itself would deliver to this reader, so another
1039
+ * person's finding, one drafted from another repo, or a draft listed only to a
1040
+ * newer client has no evidence here either. A draft the reader was listed
1041
+ * does: an agent can say why it was raised before the person approves it.
1042
+ *
1043
+ * Citations (observed and usage findings) are reduced to what the reader may
1044
+ * see: their own sessions, with a date and a short excerpt of the grader's
1045
+ * reasoning or of their own redacted correction turn. A `navigation` citation
1046
+ * has an empty excerpt: it is dated evidence that a session loaded the skill,
1047
+ * and nothing more. `citationsWithheld` counts any that were dropped, so a
1048
+ * short list is never mistaken for the whole of it.
1049
+ */
1050
+ export declare const CommentEvidenceCitationSchema: v.ObjectSchema<{
1051
+ /**
1052
+ * `navigation` is a skill load counted when a finding was drafted from how
1053
+ * the skill's files were read: evidence of how a skill was used, not of a
1054
+ * failure. `action` is a recorded step of a workflow repeated across
1055
+ * sessions. `discrepancy` is a grader's note that a session's closing report
1056
+ * contradicted its recorded actions; its excerpt is the agent's quoted claim
1057
+ * and the record. `artifact_comment` is a person's comment on an artifact the
1058
+ * cited session wrote; its excerpt is the comment. A server sends `action`,
1059
+ * `discrepancy` and `artifact_comment` only to a client that names a version
1060
+ * new enough to parse them.
1061
+ */
1062
+ readonly kind: v.PicklistSchema<["verdict", "turn", "navigation", "action", "discrepancy", "artifact_comment"], undefined>;
1063
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1064
+ /** ISO, when the verdict was graded, the turn was said, the skill loaded, or the action was recorded. */
1065
+ readonly at: v.StringSchema<undefined>;
1066
+ /** Wrapped in the response's untrusted markers. */
1067
+ readonly excerpt: v.StringSchema<undefined>;
1068
+ }, undefined>;
1069
+ export type CommentEvidenceCitation = v.InferOutput<typeof CommentEvidenceCitationSchema>;
1070
+ /** What a usage finding adds to its citations: the counts for one reference file. */
1071
+ export declare const CommentEvidenceUsageSchema: v.ObjectSchema<{
1072
+ /** The reference's skill-relative path, wrapped in the response's untrusted markers. */
1073
+ readonly path: v.StringSchema<undefined>;
1074
+ /** Eligible loads of the skill. */
1075
+ readonly loads: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1076
+ /** Distinct sessions those loads span. */
1077
+ readonly sessions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1078
+ /** Loads followed by a successful read of the reference. */
1079
+ readonly loadsWithRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1080
+ }, undefined>;
1081
+ /**
1082
+ * What a practice finding adds: the rubric check it answers and the rubric's
1083
+ * version, the practice lines it weighs with their sources, the facts measured
1084
+ * from the file, and the answer to each item of evidence the check asks for.
1085
+ * `answers[].answer` is model-written, so it travels wrapped in the response's
1086
+ * untrusted markers.
1087
+ */
1088
+ export declare const CommentEvidencePracticeSchema: v.ObjectSchema<{
1089
+ readonly check: v.ObjectSchema<{
1090
+ readonly id: v.StringSchema<undefined>;
1091
+ readonly name: v.StringSchema<undefined>;
1092
+ }, undefined>;
1093
+ readonly rubricVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1094
+ readonly practices: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1095
+ readonly text: v.StringSchema<undefined>;
1096
+ readonly source: v.ObjectSchema<{
1097
+ readonly title: v.StringSchema<undefined>;
1098
+ readonly url: v.StringSchema<undefined>;
1099
+ }, undefined>;
1100
+ }, undefined>, undefined>, readonly []>;
1101
+ readonly facts: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
1102
+ readonly answers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1103
+ readonly item: v.StringSchema<undefined>;
1104
+ readonly answer: v.StringSchema<undefined>;
1105
+ }, undefined>, undefined>, readonly []>;
1106
+ }, undefined>;
1107
+ /**
1108
+ * A comment the person (or Mossbear) left on one of the sessions a finding
1109
+ * cites — the person's own account of what the agent should have known, set
1110
+ * beside the grader's excerpt (`guide-findings-plan.md` → Your note on a
1111
+ * session).
1112
+ *
1113
+ * **Reachable only here.** A comment about a session is never listed by
1114
+ * `list_comments` or announced at session start: it is context for a finding,
1115
+ * found by following the finding's citation, not a request.
1116
+ */
1117
+ export declare const CommentEvidenceSessionCommentSchema: v.ObjectSchema<{
1118
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1119
+ /** Only the person's own notes are sent today; `mossbear` is reserved. */
1120
+ readonly authorKind: v.PicklistSchema<["person", "mossbear"], undefined>;
1121
+ /** ISO, when the comment was written. */
1122
+ readonly at: v.StringSchema<undefined>;
1123
+ /** Wrapped in the response's untrusted markers. */
1124
+ readonly body: v.StringSchema<undefined>;
1125
+ }, undefined>;
1126
+ export type CommentEvidenceSessionComment = v.InferOutput<typeof CommentEvidenceSessionCommentSchema>;
1127
+ export declare const CommentEvidenceResponseSchema: v.ObjectSchema<{
1128
+ /** The comment's full id, even when the request named a prefix. */
1129
+ readonly commentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1130
+ readonly itemName: v.StringSchema<undefined>;
1131
+ readonly itemPath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1132
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
1133
+ /** One line saying how the finding is known; server-written, outside the markers. */
1134
+ readonly tierLine: v.StringSchema<undefined>;
1135
+ /** What the drafter did not read; server-written, outside the markers. */
1136
+ readonly blindSpot: v.StringSchema<undefined>;
1137
+ /** What goes wrong, wrapped in the response's untrusted markers. */
1138
+ readonly claim: v.StringSchema<undefined>;
1139
+ /** What future sessions should show if the finding is fixed, wrapped; null if none. */
1140
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1141
+ /** A usage finding's counts; null on every other tier. */
1142
+ readonly usage: v.NullableSchema<v.ObjectSchema<{
1143
+ /** The reference's skill-relative path, wrapped in the response's untrusted markers. */
1144
+ readonly path: v.StringSchema<undefined>;
1145
+ /** Eligible loads of the skill. */
1146
+ readonly loads: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1147
+ /** Distinct sessions those loads span. */
1148
+ readonly sessions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1149
+ /** Loads followed by a successful read of the reference. */
1150
+ readonly loadsWithRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1151
+ }, undefined>, undefined>;
1152
+ /** A practice finding's rubric check; null on every other tier. */
1153
+ readonly practice: v.NullableSchema<v.ObjectSchema<{
1154
+ readonly check: v.ObjectSchema<{
1155
+ readonly id: v.StringSchema<undefined>;
1156
+ readonly name: v.StringSchema<undefined>;
1157
+ }, undefined>;
1158
+ readonly rubricVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1159
+ readonly practices: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1160
+ readonly text: v.StringSchema<undefined>;
1161
+ readonly source: v.ObjectSchema<{
1162
+ readonly title: v.StringSchema<undefined>;
1163
+ readonly url: v.StringSchema<undefined>;
1164
+ }, undefined>;
1165
+ }, undefined>, undefined>, readonly []>;
1166
+ readonly facts: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
1167
+ readonly answers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1168
+ readonly item: v.StringSchema<undefined>;
1169
+ readonly answer: v.StringSchema<undefined>;
1170
+ }, undefined>, undefined>, readonly []>;
1171
+ }, undefined>, undefined>;
1172
+ readonly citations: v.ArraySchema<v.ObjectSchema<{
1173
+ /**
1174
+ * `navigation` is a skill load counted when a finding was drafted from how
1175
+ * the skill's files were read: evidence of how a skill was used, not of a
1176
+ * failure. `action` is a recorded step of a workflow repeated across
1177
+ * sessions. `discrepancy` is a grader's note that a session's closing report
1178
+ * contradicted its recorded actions; its excerpt is the agent's quoted claim
1179
+ * and the record. `artifact_comment` is a person's comment on an artifact the
1180
+ * cited session wrote; its excerpt is the comment. A server sends `action`,
1181
+ * `discrepancy` and `artifact_comment` only to a client that names a version
1182
+ * new enough to parse them.
1183
+ */
1184
+ readonly kind: v.PicklistSchema<["verdict", "turn", "navigation", "action", "discrepancy", "artifact_comment"], undefined>;
1185
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1186
+ /** ISO, when the verdict was graded, the turn was said, the skill loaded, or the action was recorded. */
1187
+ readonly at: v.StringSchema<undefined>;
1188
+ /** Wrapped in the response's untrusted markers. */
1189
+ readonly excerpt: v.StringSchema<undefined>;
1190
+ }, undefined>, undefined>;
1191
+ readonly citationsWithheld: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1192
+ /**
1193
+ * Comments on the cited sessions, newest first, wrapped in the untrusted
1194
+ * markers. Defaulted so a response from a server that predates the field
1195
+ * still parses.
1196
+ */
1197
+ readonly sessionComments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1198
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1199
+ /** Only the person's own notes are sent today; `mossbear` is reserved. */
1200
+ readonly authorKind: v.PicklistSchema<["person", "mossbear"], undefined>;
1201
+ /** ISO, when the comment was written. */
1202
+ readonly at: v.StringSchema<undefined>;
1203
+ /** Wrapped in the response's untrusted markers. */
1204
+ readonly body: v.StringSchema<undefined>;
1205
+ }, undefined>, undefined>, readonly []>;
1206
+ /**
1207
+ * Comments on the cited sessions that were left out to keep the response
1208
+ * bounded (the newest few per session are sent), so a short list is never
1209
+ * mistaken for the whole of it. Zero when none were.
1210
+ */
1211
+ readonly sessionCommentsWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, 0>;
1212
+ readonly untrusted: v.ObjectSchema<{
1213
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1214
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1215
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1216
+ readonly note: v.StringSchema<undefined>;
1217
+ }, undefined>;
1218
+ }, undefined>;
1219
+ export type CommentEvidenceResponse = v.InferOutput<typeof CommentEvidenceResponseSchema>;
1220
+ /**
1221
+ * How many artifacts one prompt-time announcement names. The rest are counted
1222
+ * in one line and named on a later prompt, so a session that wrote many
1223
+ * artifacts prints a few lines in front of a turn rather than a list.
1224
+ */
1225
+ export declare const MAX_SESSION_COMMENT_ANNOUNCEMENT_ARTIFACTS = 5;
1226
+ /**
1227
+ * Ask which artifacts this agent session wrote carry open comments, and which
1228
+ * (`agent-hears-new-artifact-comments` slice 3).
1229
+ *
1230
+ * **A read, not a write.** Which of those comments the session has already been
1231
+ * told about is kept beside the session, by comment id. Not by creation time:
1232
+ * a comment can become readable long after it was created (a finding its owner
1233
+ * approves, an artifact restored from the Trash), and a time cursor would have
1234
+ * passed it by. The session-start announcement's per-repo count is a different
1235
+ * question and is not touched.
1236
+ */
1237
+ export declare const AnnounceSessionCommentsRequestSchema: v.ObjectSchema<{
1238
+ /**
1239
+ * The harness's own id for the session, as artifact writes record it in a
1240
+ * version's metadata. Matched only against versions the caller's account
1241
+ * wrote, so naming another account's session finds nothing.
1242
+ */
1243
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>]>;
1244
+ /** The repo asking, as its committed config declares it, for repo-scoped findings. */
1245
+ readonly projectId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>, undefined>;
1246
+ }, undefined>;
1247
+ export type AnnounceSessionCommentsRequest = v.InferOutput<typeof AnnounceSessionCommentsRequestSchema>;
1248
+ export declare const AnnounceSessionCommentsResponseSchema: v.ObjectSchema<{
1249
+ /**
1250
+ * The session's artifacts that carry open comments, most recently commented
1251
+ * first; at most as many as one batch feedback read takes.
1252
+ */
1253
+ readonly artifacts: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1254
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1255
+ readonly name: v.StringSchema<undefined>;
1256
+ /** Its open comments, newest first, at most one wire allowance of them. */
1257
+ readonly commentIds: 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[], 20, undefined>]>;
1258
+ }, undefined>, undefined>, v.MaxLengthAction<{
1259
+ id: string;
1260
+ name: string;
1261
+ commentIds: string[];
1262
+ }[], 25, undefined>]>;
1263
+ }, undefined>;
1264
+ export type AnnounceSessionCommentsResponse = v.InferOutput<typeof AnnounceSessionCommentsResponseSchema>;
1265
+ export declare function parseAnnounceItemCommentsRequest(data: unknown): {
1266
+ projectId: string;
1267
+ bundleIds: string[];
1268
+ cliVersion?: string | undefined;
1269
+ };
1270
+ export declare function parseResolveItemCommentResponse(data: unknown): {
1271
+ resolved: true;
1272
+ };
1273
+ export declare function parseAnnounceItemCommentsResponse(data: unknown): {
1274
+ open: number;
1275
+ announced: number;
1276
+ };
1277
+ export declare function parseAnnounceSessionCommentsResponse(data: unknown): {
1278
+ artifacts: {
1279
+ id: string;
1280
+ name: string;
1281
+ commentIds: string[];
1282
+ }[];
1283
+ };
1284
+ export declare function parseAgentCommentResponse(data: unknown): {
1285
+ created: boolean;
1286
+ comment: {
1287
+ id: string;
1288
+ threadId: string;
1289
+ subject: {
1290
+ kind: "artifact" | "session";
1291
+ id: string;
1292
+ };
1293
+ body: string;
1294
+ createdAt: string;
1295
+ };
1296
+ };
1297
+ export declare function parseItemCommentsResponse(data: unknown): {
1298
+ comments: {
1299
+ itemName: string;
1300
+ itemPath: string | null;
1301
+ id: string;
1302
+ state?: "open" | "resolved" | undefined;
1303
+ passage?: {
1304
+ quote: string;
1305
+ status: "located" | "changed" | "orphaned";
1306
+ lines: {
1307
+ start: number;
1308
+ end: number;
1309
+ } | null;
1310
+ element?: {
1311
+ selector: string;
1312
+ tag: string;
1313
+ label?: string | undefined;
1314
+ } | undefined;
1315
+ } | undefined;
1316
+ body: string;
1317
+ finding?: {
1318
+ tier: "observed" | "usage" | "practice";
1319
+ tierLine: string;
1320
+ blindSpot: string;
1321
+ prediction: string | null;
1322
+ } | undefined;
1323
+ approved?: boolean | undefined;
1324
+ findingState?: "ready" | "waiting" | undefined;
1325
+ publishedFrom?: {
1326
+ repository?: string | undefined;
1327
+ projectId: string;
1328
+ branch: string | null;
1329
+ thisRepo?: boolean | undefined;
1330
+ } | undefined;
1331
+ authorName: string | null;
1332
+ authorKind?: "person" | "agent" | "mossbear" | undefined;
1333
+ createdAt: string;
1334
+ itemVersion: number;
1335
+ itemChangedSince: boolean;
1336
+ deliveredCount: number;
1337
+ guideChangedSinceRead?: boolean | undefined;
1338
+ threadId: string;
1339
+ replyToId: string | null;
1340
+ repliesWithheld?: number | undefined;
1341
+ }[];
1342
+ cursor?: string | undefined;
1343
+ untrusted?: {
1344
+ token: string;
1345
+ startMarker: string;
1346
+ endMarker: string;
1347
+ note: string;
1348
+ } | null | undefined;
1349
+ };
1350
+ export declare function parseCommentEvidenceResponse(data: unknown): {
1351
+ commentId: string;
1352
+ itemName: string;
1353
+ itemPath: string | null;
1354
+ tier: "observed" | "usage" | "practice";
1355
+ tierLine: string;
1356
+ blindSpot: string;
1357
+ claim: string;
1358
+ prediction: string | null;
1359
+ usage: {
1360
+ path: string;
1361
+ loads: number;
1362
+ sessions: number;
1363
+ loadsWithRead: number;
1364
+ } | null;
1365
+ practice: {
1366
+ check: {
1367
+ id: string;
1368
+ name: string;
1369
+ };
1370
+ rubricVersion: number;
1371
+ practices: {
1372
+ text: string;
1373
+ source: {
1374
+ title: string;
1375
+ url: string;
1376
+ };
1377
+ }[];
1378
+ facts: string[];
1379
+ answers: {
1380
+ item: string;
1381
+ answer: string;
1382
+ }[];
1383
+ } | null;
1384
+ citations: {
1385
+ kind: "verdict" | "turn" | "navigation" | "action" | "discrepancy" | "artifact_comment";
1386
+ sessionId: string;
1387
+ at: string;
1388
+ excerpt: string;
1389
+ }[];
1390
+ citationsWithheld: number;
1391
+ sessionComments: {
1392
+ sessionId: string;
1393
+ authorKind: "person" | "mossbear";
1394
+ at: string;
1395
+ body: string;
1396
+ }[];
1397
+ sessionCommentsWithheld: number;
1398
+ untrusted: {
1399
+ token: string;
1400
+ startMarker: string;
1401
+ endMarker: string;
1402
+ note: string;
1403
+ };
1404
+ };
1405
+ //# sourceMappingURL=comments.d.ts.map