@phosphorco/bb-cross-references 0.1.1 → 0.4.0

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.
@@ -0,0 +1,1608 @@
1
+ /** Pure V2 evidence wire. V1 schemas and projection meanings are independent. */
2
+ import { z } from 'zod';
3
+ export declare const MENTION_V2_LIMITS: Readonly<{
4
+ responseBytes: 1048576;
5
+ inputBytes: 65536;
6
+ pageSize: 100;
7
+ cursorBytes: 4096;
8
+ excerptCodePoints: 320;
9
+ excerptBytes: 1280;
10
+ rowBytes: 131072;
11
+ readMs: 2000;
12
+ callMs: 5000;
13
+ lookupMs: 1500;
14
+ lookupCalls: 8;
15
+ }>;
16
+ export declare const MENTION_V2_METHODS: Readonly<{
17
+ readonly list: "crossReferencesV2ListMentions";
18
+ readonly resolve: "crossReferencesV2ResolveLookup";
19
+ }>;
20
+ /** UTF16 offsets may address only complete code points. No normalization or
21
+ * replacement: a genuine U+FFFD remains ordinary source text. */
22
+ export declare function isUtf16CodePointBoundary(text: string, offset: number): boolean;
23
+ export declare const identityInputV2Schema: z.ZodObject<{
24
+ provider: z.ZodString;
25
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
26
+ }, z.core.$strict>;
27
+ export declare const resourceOutputV2Schema: z.ZodObject<{
28
+ presentation: z.ZodObject<{
29
+ label: z.ZodString;
30
+ url: z.ZodOptional<z.ZodString>;
31
+ detail: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$loose>;
33
+ provider: z.ZodString;
34
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
35
+ }, z.core.$loose>;
36
+ export declare const safeAuthoredHrefSchema: z.ZodString;
37
+ export declare const mentionQueryV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
38
+ kind: z.ZodLiteral<"resource">;
39
+ target: z.ZodObject<{
40
+ provider: z.ZodString;
41
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
42
+ }, z.core.$strict>;
43
+ relation: z.ZodEnum<{
44
+ self: "self";
45
+ "github-pr-family": "github-pr-family";
46
+ }>;
47
+ }, z.core.$strict>, z.ZodObject<{
48
+ kind: z.ZodLiteral<"authored-url">;
49
+ href: z.ZodString;
50
+ }, z.core.$strict>], "kind">;
51
+ export declare const listMentionsInputV2Schema: z.ZodObject<{
52
+ version: z.ZodLiteral<2>;
53
+ query: z.ZodDiscriminatedUnion<[z.ZodObject<{
54
+ kind: z.ZodLiteral<"resource">;
55
+ target: z.ZodObject<{
56
+ provider: z.ZodString;
57
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
58
+ }, z.core.$strict>;
59
+ relation: z.ZodEnum<{
60
+ self: "self";
61
+ "github-pr-family": "github-pr-family";
62
+ }>;
63
+ }, z.core.$strict>, z.ZodObject<{
64
+ kind: z.ZodLiteral<"authored-url">;
65
+ href: z.ZodString;
66
+ }, z.core.$strict>], "kind">;
67
+ source: z.ZodOptional<z.ZodObject<{
68
+ provider: z.ZodString;
69
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
70
+ }, z.core.$strict>>;
71
+ producerPluginId: z.ZodOptional<z.ZodString>;
72
+ pageSize: z.ZodOptional<z.ZodNumber>;
73
+ cursor: z.ZodOptional<z.ZodString>;
74
+ ifSnapshot: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$strict>;
76
+ export declare const spanOutputV2Schema: z.ZodObject<{
77
+ start: z.ZodNumber;
78
+ end: z.ZodNumber;
79
+ }, z.core.$loose>;
80
+ export declare const excerptV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
+ state: z.ZodLiteral<"ready">;
82
+ text: z.ZodString;
83
+ sourceSpan: z.ZodObject<{
84
+ start: z.ZodNumber;
85
+ end: z.ZodNumber;
86
+ }, z.core.$loose>;
87
+ matchSpan: z.ZodObject<{
88
+ start: z.ZodNumber;
89
+ end: z.ZodNumber;
90
+ }, z.core.$loose>;
91
+ clippedBefore: z.ZodBoolean;
92
+ clippedAfter: z.ZodBoolean;
93
+ matchClippedBefore: z.ZodBoolean;
94
+ matchClippedAfter: z.ZodBoolean;
95
+ codecVersion: z.ZodLiteral<1>;
96
+ }, z.core.$loose>, z.ZodObject<{
97
+ state: z.ZodLiteral<"unavailable">;
98
+ reason: z.ZodEnum<{
99
+ "not-materialized": "not-materialized";
100
+ "indivisible-word": "indivisible-word";
101
+ "no-eligible-context": "no-eligible-context";
102
+ }>;
103
+ codecVersion: z.ZodLiteral<1>;
104
+ }, z.core.$loose>], "state">;
105
+ /** Strict internal record; the store validates binding to admitted source bytes. */
106
+ export declare const excerptRecordV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
107
+ sourceSpan: z.ZodObject<{
108
+ start: z.ZodNumber;
109
+ end: z.ZodNumber;
110
+ }, z.core.$strict>;
111
+ matchSpan: z.ZodObject<{
112
+ start: z.ZodNumber;
113
+ end: z.ZodNumber;
114
+ }, z.core.$strict>;
115
+ state: z.ZodLiteral<"ready">;
116
+ text: z.ZodString;
117
+ clippedBefore: z.ZodBoolean;
118
+ clippedAfter: z.ZodBoolean;
119
+ matchClippedBefore: z.ZodBoolean;
120
+ matchClippedAfter: z.ZodBoolean;
121
+ codecVersion: z.ZodLiteral<1>;
122
+ }, z.core.$strict>, z.ZodObject<{
123
+ state: z.ZodLiteral<"unavailable">;
124
+ reason: z.ZodEnum<{
125
+ "indivisible-word": "indivisible-word";
126
+ "no-eligible-context": "no-eligible-context";
127
+ }>;
128
+ codecVersion: z.ZodLiteral<1>;
129
+ }, z.core.$strict>], "state">;
130
+ export declare const locatorOutputV2Schema: z.ZodObject<{
131
+ kind: z.ZodLiteral<"conversation">;
132
+ threadId: z.ZodString;
133
+ messageId: z.ZodString;
134
+ messageSeq: z.ZodNumber;
135
+ anchorSeq: z.ZodNullable<z.ZodNumber>;
136
+ role: z.ZodEnum<{
137
+ user: "user";
138
+ assistant: "assistant";
139
+ }>;
140
+ }, z.core.$loose>;
141
+ /** Future item/locator/excerpt enums occupy a slot; malformed known items still reject. */
142
+ export declare const mentionItemV2Schema: z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
143
+ [x: string]: unknown;
144
+ kind: "brief-occurrence";
145
+ evidenceRevision: number;
146
+ occurrenceKey: string;
147
+ sourceOccurrenceId: string;
148
+ locator: {
149
+ [x: string]: unknown;
150
+ kind: "thread-brief";
151
+ threadId: string;
152
+ sourceContentRevision: string;
153
+ file: {
154
+ [x: string]: unknown;
155
+ kind: "thread-storage";
156
+ threadId: string;
157
+ path: "BRIEF.md";
158
+ };
159
+ section: {
160
+ [x: string]: unknown;
161
+ heading: {
162
+ [x: string]: unknown;
163
+ state: "named";
164
+ text: string;
165
+ } | {
166
+ [x: string]: unknown;
167
+ state: "withheld";
168
+ digest: string;
169
+ display: "Heading withheld";
170
+ cause: "policy" | "unclassified";
171
+ } | null;
172
+ line: number;
173
+ };
174
+ location: {
175
+ [x: string]: unknown;
176
+ kind: "line";
177
+ line: number;
178
+ column: number | null;
179
+ endLine: number | null;
180
+ };
181
+ span?: {
182
+ [x: string]: unknown;
183
+ frame: "file-utf16" | "body-utf16";
184
+ start: number;
185
+ end: number;
186
+ } | undefined;
187
+ };
188
+ sourceContentRevision: string;
189
+ frame: {
190
+ [x: string]: unknown;
191
+ codec: "utf8-fatal-bom-consumed-v1";
192
+ rawBytes: number;
193
+ bomBytes: 0 | 3;
194
+ fileUtf16Length: number;
195
+ bodyBase: {
196
+ [x: string]: unknown;
197
+ startUtf16: number;
198
+ startLine: number;
199
+ utf16Length: number;
200
+ };
201
+ lineMapping: {
202
+ [x: string]: unknown;
203
+ codec: "native-file-lines-v1";
204
+ fileLineCount: number;
205
+ };
206
+ };
207
+ excerpt: {
208
+ [x: string]: unknown;
209
+ state: "unavailable";
210
+ reason: "not-materialized";
211
+ codecVersion: 1;
212
+ };
213
+ provenance: {
214
+ [x: string]: unknown;
215
+ state: "safe";
216
+ value: {
217
+ [x: string]: unknown;
218
+ pluginId: string;
219
+ origin: "builtin" | "contributed";
220
+ confidence: "high" | "medium" | "low";
221
+ source: {
222
+ [x: string]: unknown;
223
+ provider: string;
224
+ id: string;
225
+ kind?: string | undefined;
226
+ };
227
+ recognition: {
228
+ [x: string]: unknown;
229
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
230
+ explanation: string;
231
+ evidence?: {
232
+ [x: string]: unknown;
233
+ link?: number | undefined;
234
+ remote?: string | undefined;
235
+ span?: {
236
+ [x: string]: unknown;
237
+ start: number;
238
+ end: number;
239
+ } | undefined;
240
+ } | undefined;
241
+ };
242
+ authoredHref?: string | undefined;
243
+ verifiedFile?: {
244
+ [x: string]: unknown;
245
+ kind: "workspace";
246
+ environmentId: string;
247
+ path: string;
248
+ } | {
249
+ [x: string]: unknown;
250
+ kind: "thread-storage";
251
+ threadId: string;
252
+ path: string;
253
+ } | undefined;
254
+ };
255
+ } | {
256
+ [x: string]: unknown;
257
+ state: "withheld";
258
+ digest: string;
259
+ display: "Recognition details withheld";
260
+ cause: "policy" | "unclassified";
261
+ summary: {
262
+ [x: string]: unknown;
263
+ pluginId: string;
264
+ origin: "builtin" | "contributed";
265
+ confidence: "high" | "medium" | "low";
266
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
267
+ };
268
+ };
269
+ authoredUrl: {
270
+ [x: string]: unknown;
271
+ state: "exact";
272
+ href: string;
273
+ } | {
274
+ [x: string]: unknown;
275
+ state: "not-url";
276
+ } | {
277
+ [x: string]: unknown;
278
+ state: "unknown";
279
+ } | {
280
+ [x: string]: unknown;
281
+ state: "withheld";
282
+ digest: string;
283
+ display: "Destination withheld";
284
+ cause: "policy" | "unclassified";
285
+ };
286
+ authoredUrlState: "unknown" | "withheld" | "exact" | "not-url";
287
+ confirmation: "producer-attested" | "retained-unconfirmed";
288
+ source: {
289
+ [x: string]: unknown;
290
+ presentation: {
291
+ [x: string]: unknown;
292
+ label: string;
293
+ url?: string | undefined;
294
+ detail?: string | undefined;
295
+ };
296
+ provider: string;
297
+ keys: Record<string, string>;
298
+ };
299
+ target: {
300
+ [x: string]: unknown;
301
+ presentation: {
302
+ [x: string]: unknown;
303
+ label: string;
304
+ url?: string | undefined;
305
+ detail?: string | undefined;
306
+ };
307
+ provider: string;
308
+ keys: Record<string, string>;
309
+ };
310
+ producerPluginId: string;
311
+ graphRevision: number;
312
+ cap: {
313
+ [x: string]: unknown;
314
+ state: "unknown" | "uncapped" | "capped";
315
+ limit: 100 | null;
316
+ sourceHistoryUnknown: boolean | null;
317
+ };
318
+ } | {
319
+ [x: string]: unknown;
320
+ kind: "occurrence";
321
+ evidenceRevision: number;
322
+ occurrenceKey: string;
323
+ locator: {
324
+ [x: string]: unknown;
325
+ kind: "conversation";
326
+ threadId: string;
327
+ messageId: string;
328
+ messageSeq: number;
329
+ anchorSeq: number | null;
330
+ role: "user" | "assistant";
331
+ };
332
+ sourceContentRevision: string;
333
+ span: {
334
+ [x: string]: unknown;
335
+ start: number;
336
+ end: number;
337
+ };
338
+ excerpt: {
339
+ [x: string]: unknown;
340
+ state: "ready";
341
+ text: string;
342
+ sourceSpan: {
343
+ [x: string]: unknown;
344
+ start: number;
345
+ end: number;
346
+ };
347
+ matchSpan: {
348
+ [x: string]: unknown;
349
+ start: number;
350
+ end: number;
351
+ };
352
+ clippedBefore: boolean;
353
+ clippedAfter: boolean;
354
+ matchClippedBefore: boolean;
355
+ matchClippedAfter: boolean;
356
+ codecVersion: 1;
357
+ } | {
358
+ [x: string]: unknown;
359
+ state: "unavailable";
360
+ reason: "not-materialized" | "indivisible-word" | "no-eligible-context";
361
+ codecVersion: 1;
362
+ };
363
+ messageCreatedAt: number;
364
+ observedAt: number;
365
+ confirmation: "retained-unconfirmed" | "observed";
366
+ provenance: {
367
+ [x: string]: unknown;
368
+ pluginId: string;
369
+ origin: "builtin" | "contributed";
370
+ confidence: "high" | "medium" | "low";
371
+ recognition: {
372
+ [x: string]: unknown;
373
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
374
+ explanation: string;
375
+ evidence?: {
376
+ [x: string]: unknown;
377
+ span?: {
378
+ [x: string]: unknown;
379
+ start: number;
380
+ end: number;
381
+ } | undefined;
382
+ link?: number | undefined;
383
+ remote?: string | undefined;
384
+ } | undefined;
385
+ };
386
+ source: {
387
+ [x: string]: unknown;
388
+ provider: string;
389
+ id: string;
390
+ kind?: string | undefined;
391
+ };
392
+ authoredHref?: string | undefined;
393
+ verifiedFile?: {
394
+ [x: string]: unknown;
395
+ kind: "workspace";
396
+ environmentId: string;
397
+ path: string;
398
+ } | {
399
+ [x: string]: unknown;
400
+ kind: "thread-storage";
401
+ threadId: string;
402
+ path: string;
403
+ } | undefined;
404
+ };
405
+ authoredUrlState: "unknown" | "exact" | "not-url";
406
+ source: {
407
+ [x: string]: unknown;
408
+ presentation: {
409
+ [x: string]: unknown;
410
+ label: string;
411
+ url?: string | undefined;
412
+ detail?: string | undefined;
413
+ };
414
+ provider: string;
415
+ keys: Record<string, string>;
416
+ };
417
+ target: {
418
+ [x: string]: unknown;
419
+ presentation: {
420
+ [x: string]: unknown;
421
+ label: string;
422
+ url?: string | undefined;
423
+ detail?: string | undefined;
424
+ };
425
+ provider: string;
426
+ keys: Record<string, string>;
427
+ };
428
+ producerPluginId: string;
429
+ graphRevision: number;
430
+ cap: {
431
+ [x: string]: unknown;
432
+ state: "unknown" | "uncapped" | "capped";
433
+ limit: 100 | null;
434
+ sourceHistoryUnknown: boolean | null;
435
+ };
436
+ } | {
437
+ [x: string]: unknown;
438
+ kind: "claim-without-evidence";
439
+ reason: "legacy" | "producer-no-evidence" | "not-yet-collected";
440
+ matchBasis: "primary-resource" | "primary-url-identity";
441
+ source: {
442
+ [x: string]: unknown;
443
+ presentation: {
444
+ [x: string]: unknown;
445
+ label: string;
446
+ url?: string | undefined;
447
+ detail?: string | undefined;
448
+ };
449
+ provider: string;
450
+ keys: Record<string, string>;
451
+ };
452
+ target: {
453
+ [x: string]: unknown;
454
+ presentation: {
455
+ [x: string]: unknown;
456
+ label: string;
457
+ url?: string | undefined;
458
+ detail?: string | undefined;
459
+ };
460
+ provider: string;
461
+ keys: Record<string, string>;
462
+ };
463
+ producerPluginId: string;
464
+ graphRevision: number;
465
+ cap: {
466
+ [x: string]: unknown;
467
+ state: "unknown" | "uncapped" | "capped";
468
+ limit: 100 | null;
469
+ sourceHistoryUnknown: boolean | null;
470
+ };
471
+ } | {
472
+ [x: string]: unknown;
473
+ kind: "unsupported";
474
+ reason: "unsupported-format";
475
+ source: {
476
+ [x: string]: unknown;
477
+ presentation: {
478
+ [x: string]: unknown;
479
+ label: string;
480
+ url?: string | undefined;
481
+ detail?: string | undefined;
482
+ };
483
+ provider: string;
484
+ keys: Record<string, string>;
485
+ };
486
+ target: {
487
+ [x: string]: unknown;
488
+ presentation: {
489
+ [x: string]: unknown;
490
+ label: string;
491
+ url?: string | undefined;
492
+ detail?: string | undefined;
493
+ };
494
+ provider: string;
495
+ keys: Record<string, string>;
496
+ };
497
+ producerPluginId: string;
498
+ graphRevision: number;
499
+ cap: {
500
+ [x: string]: unknown;
501
+ state: "unknown" | "uncapped" | "capped";
502
+ limit: 100 | null;
503
+ sourceHistoryUnknown: boolean | null;
504
+ };
505
+ }, unknown>>;
506
+ export declare const mentionCountsV2Schema: z.ZodObject<{
507
+ retainedOccurrences: z.ZodNumber;
508
+ confirmedOccurrences: z.ZodNumber;
509
+ unconfirmedOccurrences: z.ZodNumber;
510
+ producerClaims: z.ZodNumber;
511
+ indexedSources: z.ZodNumber;
512
+ claimsWithoutLocations: z.ZodNumber;
513
+ excerptUnavailable: z.ZodNumber;
514
+ }, z.core.$loose>;
515
+ export declare const coverageV2Schema: z.ZodObject<{
516
+ scope: z.ZodLiteral<"known-sources">;
517
+ collectionIncomplete: z.ZodBoolean;
518
+ retentionLimited: z.ZodBoolean;
519
+ capHistoryUnknown: z.ZodBoolean;
520
+ legacyClaimsPresent: z.ZodBoolean;
521
+ evidenceStateUnknown: z.ZodBoolean;
522
+ authoredUrlCoverage: z.ZodObject<{
523
+ state: z.ZodEnum<{
524
+ "complete-for-known-locations": "complete-for-known-locations";
525
+ partial: "partial";
526
+ }>;
527
+ unknownLocations: z.ZodNumber;
528
+ scope: z.ZodLiteral<"known-locations">;
529
+ watermark: z.ZodString;
530
+ }, z.core.$loose>;
531
+ reasons: z.ZodArray<z.ZodString>;
532
+ reasonsClipped: z.ZodBoolean;
533
+ checkedAt: z.ZodNullable<z.ZodNumber>;
534
+ }, z.core.$loose>;
535
+ export declare const listMentionsOutputV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
536
+ version: z.ZodLiteral<2>;
537
+ status: z.ZodLiteral<"page">;
538
+ snapshot: z.ZodString;
539
+ items: z.ZodArray<z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
540
+ [x: string]: unknown;
541
+ kind: "brief-occurrence";
542
+ evidenceRevision: number;
543
+ occurrenceKey: string;
544
+ sourceOccurrenceId: string;
545
+ locator: {
546
+ [x: string]: unknown;
547
+ kind: "thread-brief";
548
+ threadId: string;
549
+ sourceContentRevision: string;
550
+ file: {
551
+ [x: string]: unknown;
552
+ kind: "thread-storage";
553
+ threadId: string;
554
+ path: "BRIEF.md";
555
+ };
556
+ section: {
557
+ [x: string]: unknown;
558
+ heading: {
559
+ [x: string]: unknown;
560
+ state: "named";
561
+ text: string;
562
+ } | {
563
+ [x: string]: unknown;
564
+ state: "withheld";
565
+ digest: string;
566
+ display: "Heading withheld";
567
+ cause: "policy" | "unclassified";
568
+ } | null;
569
+ line: number;
570
+ };
571
+ location: {
572
+ [x: string]: unknown;
573
+ kind: "line";
574
+ line: number;
575
+ column: number | null;
576
+ endLine: number | null;
577
+ };
578
+ span?: {
579
+ [x: string]: unknown;
580
+ frame: "file-utf16" | "body-utf16";
581
+ start: number;
582
+ end: number;
583
+ } | undefined;
584
+ };
585
+ sourceContentRevision: string;
586
+ frame: {
587
+ [x: string]: unknown;
588
+ codec: "utf8-fatal-bom-consumed-v1";
589
+ rawBytes: number;
590
+ bomBytes: 0 | 3;
591
+ fileUtf16Length: number;
592
+ bodyBase: {
593
+ [x: string]: unknown;
594
+ startUtf16: number;
595
+ startLine: number;
596
+ utf16Length: number;
597
+ };
598
+ lineMapping: {
599
+ [x: string]: unknown;
600
+ codec: "native-file-lines-v1";
601
+ fileLineCount: number;
602
+ };
603
+ };
604
+ excerpt: {
605
+ [x: string]: unknown;
606
+ state: "unavailable";
607
+ reason: "not-materialized";
608
+ codecVersion: 1;
609
+ };
610
+ provenance: {
611
+ [x: string]: unknown;
612
+ state: "safe";
613
+ value: {
614
+ [x: string]: unknown;
615
+ pluginId: string;
616
+ origin: "builtin" | "contributed";
617
+ confidence: "high" | "medium" | "low";
618
+ source: {
619
+ [x: string]: unknown;
620
+ provider: string;
621
+ id: string;
622
+ kind?: string | undefined;
623
+ };
624
+ recognition: {
625
+ [x: string]: unknown;
626
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
627
+ explanation: string;
628
+ evidence?: {
629
+ [x: string]: unknown;
630
+ link?: number | undefined;
631
+ remote?: string | undefined;
632
+ span?: {
633
+ [x: string]: unknown;
634
+ start: number;
635
+ end: number;
636
+ } | undefined;
637
+ } | undefined;
638
+ };
639
+ authoredHref?: string | undefined;
640
+ verifiedFile?: {
641
+ [x: string]: unknown;
642
+ kind: "workspace";
643
+ environmentId: string;
644
+ path: string;
645
+ } | {
646
+ [x: string]: unknown;
647
+ kind: "thread-storage";
648
+ threadId: string;
649
+ path: string;
650
+ } | undefined;
651
+ };
652
+ } | {
653
+ [x: string]: unknown;
654
+ state: "withheld";
655
+ digest: string;
656
+ display: "Recognition details withheld";
657
+ cause: "policy" | "unclassified";
658
+ summary: {
659
+ [x: string]: unknown;
660
+ pluginId: string;
661
+ origin: "builtin" | "contributed";
662
+ confidence: "high" | "medium" | "low";
663
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
664
+ };
665
+ };
666
+ authoredUrl: {
667
+ [x: string]: unknown;
668
+ state: "exact";
669
+ href: string;
670
+ } | {
671
+ [x: string]: unknown;
672
+ state: "not-url";
673
+ } | {
674
+ [x: string]: unknown;
675
+ state: "unknown";
676
+ } | {
677
+ [x: string]: unknown;
678
+ state: "withheld";
679
+ digest: string;
680
+ display: "Destination withheld";
681
+ cause: "policy" | "unclassified";
682
+ };
683
+ authoredUrlState: "unknown" | "withheld" | "exact" | "not-url";
684
+ confirmation: "producer-attested" | "retained-unconfirmed";
685
+ source: {
686
+ [x: string]: unknown;
687
+ presentation: {
688
+ [x: string]: unknown;
689
+ label: string;
690
+ url?: string | undefined;
691
+ detail?: string | undefined;
692
+ };
693
+ provider: string;
694
+ keys: Record<string, string>;
695
+ };
696
+ target: {
697
+ [x: string]: unknown;
698
+ presentation: {
699
+ [x: string]: unknown;
700
+ label: string;
701
+ url?: string | undefined;
702
+ detail?: string | undefined;
703
+ };
704
+ provider: string;
705
+ keys: Record<string, string>;
706
+ };
707
+ producerPluginId: string;
708
+ graphRevision: number;
709
+ cap: {
710
+ [x: string]: unknown;
711
+ state: "unknown" | "uncapped" | "capped";
712
+ limit: 100 | null;
713
+ sourceHistoryUnknown: boolean | null;
714
+ };
715
+ } | {
716
+ [x: string]: unknown;
717
+ kind: "occurrence";
718
+ evidenceRevision: number;
719
+ occurrenceKey: string;
720
+ locator: {
721
+ [x: string]: unknown;
722
+ kind: "conversation";
723
+ threadId: string;
724
+ messageId: string;
725
+ messageSeq: number;
726
+ anchorSeq: number | null;
727
+ role: "user" | "assistant";
728
+ };
729
+ sourceContentRevision: string;
730
+ span: {
731
+ [x: string]: unknown;
732
+ start: number;
733
+ end: number;
734
+ };
735
+ excerpt: {
736
+ [x: string]: unknown;
737
+ state: "ready";
738
+ text: string;
739
+ sourceSpan: {
740
+ [x: string]: unknown;
741
+ start: number;
742
+ end: number;
743
+ };
744
+ matchSpan: {
745
+ [x: string]: unknown;
746
+ start: number;
747
+ end: number;
748
+ };
749
+ clippedBefore: boolean;
750
+ clippedAfter: boolean;
751
+ matchClippedBefore: boolean;
752
+ matchClippedAfter: boolean;
753
+ codecVersion: 1;
754
+ } | {
755
+ [x: string]: unknown;
756
+ state: "unavailable";
757
+ reason: "not-materialized" | "indivisible-word" | "no-eligible-context";
758
+ codecVersion: 1;
759
+ };
760
+ messageCreatedAt: number;
761
+ observedAt: number;
762
+ confirmation: "retained-unconfirmed" | "observed";
763
+ provenance: {
764
+ [x: string]: unknown;
765
+ pluginId: string;
766
+ origin: "builtin" | "contributed";
767
+ confidence: "high" | "medium" | "low";
768
+ recognition: {
769
+ [x: string]: unknown;
770
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
771
+ explanation: string;
772
+ evidence?: {
773
+ [x: string]: unknown;
774
+ span?: {
775
+ [x: string]: unknown;
776
+ start: number;
777
+ end: number;
778
+ } | undefined;
779
+ link?: number | undefined;
780
+ remote?: string | undefined;
781
+ } | undefined;
782
+ };
783
+ source: {
784
+ [x: string]: unknown;
785
+ provider: string;
786
+ id: string;
787
+ kind?: string | undefined;
788
+ };
789
+ authoredHref?: string | undefined;
790
+ verifiedFile?: {
791
+ [x: string]: unknown;
792
+ kind: "workspace";
793
+ environmentId: string;
794
+ path: string;
795
+ } | {
796
+ [x: string]: unknown;
797
+ kind: "thread-storage";
798
+ threadId: string;
799
+ path: string;
800
+ } | undefined;
801
+ };
802
+ authoredUrlState: "unknown" | "exact" | "not-url";
803
+ source: {
804
+ [x: string]: unknown;
805
+ presentation: {
806
+ [x: string]: unknown;
807
+ label: string;
808
+ url?: string | undefined;
809
+ detail?: string | undefined;
810
+ };
811
+ provider: string;
812
+ keys: Record<string, string>;
813
+ };
814
+ target: {
815
+ [x: string]: unknown;
816
+ presentation: {
817
+ [x: string]: unknown;
818
+ label: string;
819
+ url?: string | undefined;
820
+ detail?: string | undefined;
821
+ };
822
+ provider: string;
823
+ keys: Record<string, string>;
824
+ };
825
+ producerPluginId: string;
826
+ graphRevision: number;
827
+ cap: {
828
+ [x: string]: unknown;
829
+ state: "unknown" | "uncapped" | "capped";
830
+ limit: 100 | null;
831
+ sourceHistoryUnknown: boolean | null;
832
+ };
833
+ } | {
834
+ [x: string]: unknown;
835
+ kind: "claim-without-evidence";
836
+ reason: "legacy" | "producer-no-evidence" | "not-yet-collected";
837
+ matchBasis: "primary-resource" | "primary-url-identity";
838
+ source: {
839
+ [x: string]: unknown;
840
+ presentation: {
841
+ [x: string]: unknown;
842
+ label: string;
843
+ url?: string | undefined;
844
+ detail?: string | undefined;
845
+ };
846
+ provider: string;
847
+ keys: Record<string, string>;
848
+ };
849
+ target: {
850
+ [x: string]: unknown;
851
+ presentation: {
852
+ [x: string]: unknown;
853
+ label: string;
854
+ url?: string | undefined;
855
+ detail?: string | undefined;
856
+ };
857
+ provider: string;
858
+ keys: Record<string, string>;
859
+ };
860
+ producerPluginId: string;
861
+ graphRevision: number;
862
+ cap: {
863
+ [x: string]: unknown;
864
+ state: "unknown" | "uncapped" | "capped";
865
+ limit: 100 | null;
866
+ sourceHistoryUnknown: boolean | null;
867
+ };
868
+ } | {
869
+ [x: string]: unknown;
870
+ kind: "unsupported";
871
+ reason: "unsupported-format";
872
+ source: {
873
+ [x: string]: unknown;
874
+ presentation: {
875
+ [x: string]: unknown;
876
+ label: string;
877
+ url?: string | undefined;
878
+ detail?: string | undefined;
879
+ };
880
+ provider: string;
881
+ keys: Record<string, string>;
882
+ };
883
+ target: {
884
+ [x: string]: unknown;
885
+ presentation: {
886
+ [x: string]: unknown;
887
+ label: string;
888
+ url?: string | undefined;
889
+ detail?: string | undefined;
890
+ };
891
+ provider: string;
892
+ keys: Record<string, string>;
893
+ };
894
+ producerPluginId: string;
895
+ graphRevision: number;
896
+ cap: {
897
+ [x: string]: unknown;
898
+ state: "unknown" | "uncapped" | "capped";
899
+ limit: 100 | null;
900
+ sourceHistoryUnknown: boolean | null;
901
+ };
902
+ }, unknown>>>;
903
+ counts: z.ZodObject<{
904
+ retainedOccurrences: z.ZodNumber;
905
+ confirmedOccurrences: z.ZodNumber;
906
+ unconfirmedOccurrences: z.ZodNumber;
907
+ producerClaims: z.ZodNumber;
908
+ indexedSources: z.ZodNumber;
909
+ claimsWithoutLocations: z.ZodNumber;
910
+ excerptUnavailable: z.ZodNumber;
911
+ }, z.core.$loose>;
912
+ coverage: z.ZodObject<{
913
+ scope: z.ZodLiteral<"known-sources">;
914
+ collectionIncomplete: z.ZodBoolean;
915
+ retentionLimited: z.ZodBoolean;
916
+ capHistoryUnknown: z.ZodBoolean;
917
+ legacyClaimsPresent: z.ZodBoolean;
918
+ evidenceStateUnknown: z.ZodBoolean;
919
+ authoredUrlCoverage: z.ZodObject<{
920
+ state: z.ZodEnum<{
921
+ "complete-for-known-locations": "complete-for-known-locations";
922
+ partial: "partial";
923
+ }>;
924
+ unknownLocations: z.ZodNumber;
925
+ scope: z.ZodLiteral<"known-locations">;
926
+ watermark: z.ZodString;
927
+ }, z.core.$loose>;
928
+ reasons: z.ZodArray<z.ZodString>;
929
+ reasonsClipped: z.ZodBoolean;
930
+ checkedAt: z.ZodNullable<z.ZodNumber>;
931
+ }, z.core.$loose>;
932
+ nextCursor: z.ZodNullable<z.ZodString>;
933
+ }, z.core.$loose>, z.ZodObject<{
934
+ version: z.ZodLiteral<2>;
935
+ status: z.ZodLiteral<"not-modified">;
936
+ snapshot: z.ZodString;
937
+ coverage: z.ZodObject<{
938
+ scope: z.ZodLiteral<"known-sources">;
939
+ collectionIncomplete: z.ZodBoolean;
940
+ retentionLimited: z.ZodBoolean;
941
+ capHistoryUnknown: z.ZodBoolean;
942
+ legacyClaimsPresent: z.ZodBoolean;
943
+ evidenceStateUnknown: z.ZodBoolean;
944
+ authoredUrlCoverage: z.ZodObject<{
945
+ state: z.ZodEnum<{
946
+ "complete-for-known-locations": "complete-for-known-locations";
947
+ partial: "partial";
948
+ }>;
949
+ unknownLocations: z.ZodNumber;
950
+ scope: z.ZodLiteral<"known-locations">;
951
+ watermark: z.ZodString;
952
+ }, z.core.$loose>;
953
+ reasons: z.ZodArray<z.ZodString>;
954
+ reasonsClipped: z.ZodBoolean;
955
+ checkedAt: z.ZodNullable<z.ZodNumber>;
956
+ }, z.core.$loose>;
957
+ }, z.core.$loose>, z.ZodObject<{
958
+ version: z.ZodLiteral<2>;
959
+ status: z.ZodLiteral<"restart">;
960
+ reason: z.ZodLiteral<"snapshot-changed">;
961
+ snapshot: z.ZodString;
962
+ }, z.core.$loose>, z.ZodObject<{
963
+ version: z.ZodLiteral<2>;
964
+ status: z.ZodLiteral<"unavailable">;
965
+ reason: z.ZodEnum<{
966
+ "index-warming": "index-warming";
967
+ "read-budget": "read-budget";
968
+ }>;
969
+ retryable: z.ZodBoolean;
970
+ }, z.core.$loose>], "status">;
971
+ export declare const lookupContextV2Schema: z.ZodObject<{
972
+ projectId: z.ZodOptional<z.ZodString>;
973
+ threadId: z.ZodOptional<z.ZodString>;
974
+ environmentId: z.ZodOptional<z.ZodString>;
975
+ git: z.ZodOptional<z.ZodObject<{
976
+ branch: z.ZodOptional<z.ZodString>;
977
+ upstream: z.ZodOptional<z.ZodObject<{
978
+ remote: z.ZodString;
979
+ branch: z.ZodString;
980
+ }, z.core.$strict>>;
981
+ remotes: z.ZodArray<z.ZodObject<{
982
+ name: z.ZodString;
983
+ url: z.ZodString;
984
+ }, z.core.$strict>>;
985
+ }, z.core.$strict>>;
986
+ locale: z.ZodOptional<z.ZodString>;
987
+ timeZone: z.ZodOptional<z.ZodString>;
988
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
989
+ href: z.ZodString;
990
+ }, z.core.$strict>>>;
991
+ }, z.core.$strict>;
992
+ export declare const resolveLookupInputV2Schema: z.ZodObject<{
993
+ version: z.ZodLiteral<2>;
994
+ text: z.ZodString;
995
+ mode: z.ZodEnum<{
996
+ recognize: "recognize";
997
+ "exact-url": "exact-url";
998
+ }>;
999
+ context: z.ZodOptional<z.ZodObject<{
1000
+ projectId: z.ZodOptional<z.ZodString>;
1001
+ threadId: z.ZodOptional<z.ZodString>;
1002
+ environmentId: z.ZodOptional<z.ZodString>;
1003
+ git: z.ZodOptional<z.ZodObject<{
1004
+ branch: z.ZodOptional<z.ZodString>;
1005
+ upstream: z.ZodOptional<z.ZodObject<{
1006
+ remote: z.ZodString;
1007
+ branch: z.ZodString;
1008
+ }, z.core.$strict>>;
1009
+ remotes: z.ZodArray<z.ZodObject<{
1010
+ name: z.ZodString;
1011
+ url: z.ZodString;
1012
+ }, z.core.$strict>>;
1013
+ }, z.core.$strict>>;
1014
+ locale: z.ZodOptional<z.ZodString>;
1015
+ timeZone: z.ZodOptional<z.ZodString>;
1016
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
1017
+ href: z.ZodString;
1018
+ }, z.core.$strict>>>;
1019
+ }, z.core.$strict>>;
1020
+ }, z.core.$strict>;
1021
+ export declare const resolveLookupOutputV2Schema: z.ZodObject<{
1022
+ version: z.ZodLiteral<2>;
1023
+ state: z.ZodEnum<{
1024
+ incomplete: "incomplete";
1025
+ ready: "ready";
1026
+ ambiguous: "ambiguous";
1027
+ unrecognized: "unrecognized";
1028
+ }>;
1029
+ options: z.ZodArray<z.ZodObject<{
1030
+ query: z.ZodDiscriminatedUnion<[z.ZodObject<{
1031
+ kind: z.ZodLiteral<"resource">;
1032
+ target: z.ZodObject<{
1033
+ provider: z.ZodString;
1034
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1035
+ }, z.core.$loose>;
1036
+ relation: z.ZodEnum<{
1037
+ self: "self";
1038
+ "github-pr-family": "github-pr-family";
1039
+ }>;
1040
+ }, z.core.$loose>, z.ZodObject<{
1041
+ kind: z.ZodLiteral<"authored-url">;
1042
+ href: z.ZodString;
1043
+ }, z.core.$loose>], "kind">;
1044
+ label: z.ZodString;
1045
+ inputSpan: z.ZodObject<{
1046
+ start: z.ZodNumber;
1047
+ end: z.ZodNumber;
1048
+ }, z.core.$loose>;
1049
+ basis: z.ZodEnum<{
1050
+ supplier: "supplier";
1051
+ native: "native";
1052
+ "stored-codec": "stored-codec";
1053
+ }>;
1054
+ reasons: z.ZodArray<z.ZodString>;
1055
+ }, z.core.$loose>>;
1056
+ reasons: z.ZodArray<z.ZodString>;
1057
+ }, z.core.$loose>;
1058
+ export declare const crossReferencesV2RpcSchemas: {
1059
+ readonly crossReferencesV2ListMentions: {
1060
+ readonly input: z.ZodObject<{
1061
+ version: z.ZodLiteral<2>;
1062
+ query: z.ZodDiscriminatedUnion<[z.ZodObject<{
1063
+ kind: z.ZodLiteral<"resource">;
1064
+ target: z.ZodObject<{
1065
+ provider: z.ZodString;
1066
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1067
+ }, z.core.$strict>;
1068
+ relation: z.ZodEnum<{
1069
+ self: "self";
1070
+ "github-pr-family": "github-pr-family";
1071
+ }>;
1072
+ }, z.core.$strict>, z.ZodObject<{
1073
+ kind: z.ZodLiteral<"authored-url">;
1074
+ href: z.ZodString;
1075
+ }, z.core.$strict>], "kind">;
1076
+ source: z.ZodOptional<z.ZodObject<{
1077
+ provider: z.ZodString;
1078
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1079
+ }, z.core.$strict>>;
1080
+ producerPluginId: z.ZodOptional<z.ZodString>;
1081
+ pageSize: z.ZodOptional<z.ZodNumber>;
1082
+ cursor: z.ZodOptional<z.ZodString>;
1083
+ ifSnapshot: z.ZodOptional<z.ZodString>;
1084
+ }, z.core.$strict>;
1085
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
1086
+ version: z.ZodLiteral<2>;
1087
+ status: z.ZodLiteral<"page">;
1088
+ snapshot: z.ZodString;
1089
+ items: z.ZodArray<z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
1090
+ [x: string]: unknown;
1091
+ kind: "brief-occurrence";
1092
+ evidenceRevision: number;
1093
+ occurrenceKey: string;
1094
+ sourceOccurrenceId: string;
1095
+ locator: {
1096
+ [x: string]: unknown;
1097
+ kind: "thread-brief";
1098
+ threadId: string;
1099
+ sourceContentRevision: string;
1100
+ file: {
1101
+ [x: string]: unknown;
1102
+ kind: "thread-storage";
1103
+ threadId: string;
1104
+ path: "BRIEF.md";
1105
+ };
1106
+ section: {
1107
+ [x: string]: unknown;
1108
+ heading: {
1109
+ [x: string]: unknown;
1110
+ state: "named";
1111
+ text: string;
1112
+ } | {
1113
+ [x: string]: unknown;
1114
+ state: "withheld";
1115
+ digest: string;
1116
+ display: "Heading withheld";
1117
+ cause: "policy" | "unclassified";
1118
+ } | null;
1119
+ line: number;
1120
+ };
1121
+ location: {
1122
+ [x: string]: unknown;
1123
+ kind: "line";
1124
+ line: number;
1125
+ column: number | null;
1126
+ endLine: number | null;
1127
+ };
1128
+ span?: {
1129
+ [x: string]: unknown;
1130
+ frame: "file-utf16" | "body-utf16";
1131
+ start: number;
1132
+ end: number;
1133
+ } | undefined;
1134
+ };
1135
+ sourceContentRevision: string;
1136
+ frame: {
1137
+ [x: string]: unknown;
1138
+ codec: "utf8-fatal-bom-consumed-v1";
1139
+ rawBytes: number;
1140
+ bomBytes: 0 | 3;
1141
+ fileUtf16Length: number;
1142
+ bodyBase: {
1143
+ [x: string]: unknown;
1144
+ startUtf16: number;
1145
+ startLine: number;
1146
+ utf16Length: number;
1147
+ };
1148
+ lineMapping: {
1149
+ [x: string]: unknown;
1150
+ codec: "native-file-lines-v1";
1151
+ fileLineCount: number;
1152
+ };
1153
+ };
1154
+ excerpt: {
1155
+ [x: string]: unknown;
1156
+ state: "unavailable";
1157
+ reason: "not-materialized";
1158
+ codecVersion: 1;
1159
+ };
1160
+ provenance: {
1161
+ [x: string]: unknown;
1162
+ state: "safe";
1163
+ value: {
1164
+ [x: string]: unknown;
1165
+ pluginId: string;
1166
+ origin: "builtin" | "contributed";
1167
+ confidence: "high" | "medium" | "low";
1168
+ source: {
1169
+ [x: string]: unknown;
1170
+ provider: string;
1171
+ id: string;
1172
+ kind?: string | undefined;
1173
+ };
1174
+ recognition: {
1175
+ [x: string]: unknown;
1176
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
1177
+ explanation: string;
1178
+ evidence?: {
1179
+ [x: string]: unknown;
1180
+ link?: number | undefined;
1181
+ remote?: string | undefined;
1182
+ span?: {
1183
+ [x: string]: unknown;
1184
+ start: number;
1185
+ end: number;
1186
+ } | undefined;
1187
+ } | undefined;
1188
+ };
1189
+ authoredHref?: string | undefined;
1190
+ verifiedFile?: {
1191
+ [x: string]: unknown;
1192
+ kind: "workspace";
1193
+ environmentId: string;
1194
+ path: string;
1195
+ } | {
1196
+ [x: string]: unknown;
1197
+ kind: "thread-storage";
1198
+ threadId: string;
1199
+ path: string;
1200
+ } | undefined;
1201
+ };
1202
+ } | {
1203
+ [x: string]: unknown;
1204
+ state: "withheld";
1205
+ digest: string;
1206
+ display: "Recognition details withheld";
1207
+ cause: "policy" | "unclassified";
1208
+ summary: {
1209
+ [x: string]: unknown;
1210
+ pluginId: string;
1211
+ origin: "builtin" | "contributed";
1212
+ confidence: "high" | "medium" | "low";
1213
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
1214
+ };
1215
+ };
1216
+ authoredUrl: {
1217
+ [x: string]: unknown;
1218
+ state: "exact";
1219
+ href: string;
1220
+ } | {
1221
+ [x: string]: unknown;
1222
+ state: "not-url";
1223
+ } | {
1224
+ [x: string]: unknown;
1225
+ state: "unknown";
1226
+ } | {
1227
+ [x: string]: unknown;
1228
+ state: "withheld";
1229
+ digest: string;
1230
+ display: "Destination withheld";
1231
+ cause: "policy" | "unclassified";
1232
+ };
1233
+ authoredUrlState: "unknown" | "withheld" | "exact" | "not-url";
1234
+ confirmation: "producer-attested" | "retained-unconfirmed";
1235
+ source: {
1236
+ [x: string]: unknown;
1237
+ presentation: {
1238
+ [x: string]: unknown;
1239
+ label: string;
1240
+ url?: string | undefined;
1241
+ detail?: string | undefined;
1242
+ };
1243
+ provider: string;
1244
+ keys: Record<string, string>;
1245
+ };
1246
+ target: {
1247
+ [x: string]: unknown;
1248
+ presentation: {
1249
+ [x: string]: unknown;
1250
+ label: string;
1251
+ url?: string | undefined;
1252
+ detail?: string | undefined;
1253
+ };
1254
+ provider: string;
1255
+ keys: Record<string, string>;
1256
+ };
1257
+ producerPluginId: string;
1258
+ graphRevision: number;
1259
+ cap: {
1260
+ [x: string]: unknown;
1261
+ state: "unknown" | "uncapped" | "capped";
1262
+ limit: 100 | null;
1263
+ sourceHistoryUnknown: boolean | null;
1264
+ };
1265
+ } | {
1266
+ [x: string]: unknown;
1267
+ kind: "occurrence";
1268
+ evidenceRevision: number;
1269
+ occurrenceKey: string;
1270
+ locator: {
1271
+ [x: string]: unknown;
1272
+ kind: "conversation";
1273
+ threadId: string;
1274
+ messageId: string;
1275
+ messageSeq: number;
1276
+ anchorSeq: number | null;
1277
+ role: "user" | "assistant";
1278
+ };
1279
+ sourceContentRevision: string;
1280
+ span: {
1281
+ [x: string]: unknown;
1282
+ start: number;
1283
+ end: number;
1284
+ };
1285
+ excerpt: {
1286
+ [x: string]: unknown;
1287
+ state: "ready";
1288
+ text: string;
1289
+ sourceSpan: {
1290
+ [x: string]: unknown;
1291
+ start: number;
1292
+ end: number;
1293
+ };
1294
+ matchSpan: {
1295
+ [x: string]: unknown;
1296
+ start: number;
1297
+ end: number;
1298
+ };
1299
+ clippedBefore: boolean;
1300
+ clippedAfter: boolean;
1301
+ matchClippedBefore: boolean;
1302
+ matchClippedAfter: boolean;
1303
+ codecVersion: 1;
1304
+ } | {
1305
+ [x: string]: unknown;
1306
+ state: "unavailable";
1307
+ reason: "not-materialized" | "indivisible-word" | "no-eligible-context";
1308
+ codecVersion: 1;
1309
+ };
1310
+ messageCreatedAt: number;
1311
+ observedAt: number;
1312
+ confirmation: "retained-unconfirmed" | "observed";
1313
+ provenance: {
1314
+ [x: string]: unknown;
1315
+ pluginId: string;
1316
+ origin: "builtin" | "contributed";
1317
+ confidence: "high" | "medium" | "low";
1318
+ recognition: {
1319
+ [x: string]: unknown;
1320
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
1321
+ explanation: string;
1322
+ evidence?: {
1323
+ [x: string]: unknown;
1324
+ span?: {
1325
+ [x: string]: unknown;
1326
+ start: number;
1327
+ end: number;
1328
+ } | undefined;
1329
+ link?: number | undefined;
1330
+ remote?: string | undefined;
1331
+ } | undefined;
1332
+ };
1333
+ source: {
1334
+ [x: string]: unknown;
1335
+ provider: string;
1336
+ id: string;
1337
+ kind?: string | undefined;
1338
+ };
1339
+ authoredHref?: string | undefined;
1340
+ verifiedFile?: {
1341
+ [x: string]: unknown;
1342
+ kind: "workspace";
1343
+ environmentId: string;
1344
+ path: string;
1345
+ } | {
1346
+ [x: string]: unknown;
1347
+ kind: "thread-storage";
1348
+ threadId: string;
1349
+ path: string;
1350
+ } | undefined;
1351
+ };
1352
+ authoredUrlState: "unknown" | "exact" | "not-url";
1353
+ source: {
1354
+ [x: string]: unknown;
1355
+ presentation: {
1356
+ [x: string]: unknown;
1357
+ label: string;
1358
+ url?: string | undefined;
1359
+ detail?: string | undefined;
1360
+ };
1361
+ provider: string;
1362
+ keys: Record<string, string>;
1363
+ };
1364
+ target: {
1365
+ [x: string]: unknown;
1366
+ presentation: {
1367
+ [x: string]: unknown;
1368
+ label: string;
1369
+ url?: string | undefined;
1370
+ detail?: string | undefined;
1371
+ };
1372
+ provider: string;
1373
+ keys: Record<string, string>;
1374
+ };
1375
+ producerPluginId: string;
1376
+ graphRevision: number;
1377
+ cap: {
1378
+ [x: string]: unknown;
1379
+ state: "unknown" | "uncapped" | "capped";
1380
+ limit: 100 | null;
1381
+ sourceHistoryUnknown: boolean | null;
1382
+ };
1383
+ } | {
1384
+ [x: string]: unknown;
1385
+ kind: "claim-without-evidence";
1386
+ reason: "legacy" | "producer-no-evidence" | "not-yet-collected";
1387
+ matchBasis: "primary-resource" | "primary-url-identity";
1388
+ source: {
1389
+ [x: string]: unknown;
1390
+ presentation: {
1391
+ [x: string]: unknown;
1392
+ label: string;
1393
+ url?: string | undefined;
1394
+ detail?: string | undefined;
1395
+ };
1396
+ provider: string;
1397
+ keys: Record<string, string>;
1398
+ };
1399
+ target: {
1400
+ [x: string]: unknown;
1401
+ presentation: {
1402
+ [x: string]: unknown;
1403
+ label: string;
1404
+ url?: string | undefined;
1405
+ detail?: string | undefined;
1406
+ };
1407
+ provider: string;
1408
+ keys: Record<string, string>;
1409
+ };
1410
+ producerPluginId: string;
1411
+ graphRevision: number;
1412
+ cap: {
1413
+ [x: string]: unknown;
1414
+ state: "unknown" | "uncapped" | "capped";
1415
+ limit: 100 | null;
1416
+ sourceHistoryUnknown: boolean | null;
1417
+ };
1418
+ } | {
1419
+ [x: string]: unknown;
1420
+ kind: "unsupported";
1421
+ reason: "unsupported-format";
1422
+ source: {
1423
+ [x: string]: unknown;
1424
+ presentation: {
1425
+ [x: string]: unknown;
1426
+ label: string;
1427
+ url?: string | undefined;
1428
+ detail?: string | undefined;
1429
+ };
1430
+ provider: string;
1431
+ keys: Record<string, string>;
1432
+ };
1433
+ target: {
1434
+ [x: string]: unknown;
1435
+ presentation: {
1436
+ [x: string]: unknown;
1437
+ label: string;
1438
+ url?: string | undefined;
1439
+ detail?: string | undefined;
1440
+ };
1441
+ provider: string;
1442
+ keys: Record<string, string>;
1443
+ };
1444
+ producerPluginId: string;
1445
+ graphRevision: number;
1446
+ cap: {
1447
+ [x: string]: unknown;
1448
+ state: "unknown" | "uncapped" | "capped";
1449
+ limit: 100 | null;
1450
+ sourceHistoryUnknown: boolean | null;
1451
+ };
1452
+ }, unknown>>>;
1453
+ counts: z.ZodObject<{
1454
+ retainedOccurrences: z.ZodNumber;
1455
+ confirmedOccurrences: z.ZodNumber;
1456
+ unconfirmedOccurrences: z.ZodNumber;
1457
+ producerClaims: z.ZodNumber;
1458
+ indexedSources: z.ZodNumber;
1459
+ claimsWithoutLocations: z.ZodNumber;
1460
+ excerptUnavailable: z.ZodNumber;
1461
+ }, z.core.$loose>;
1462
+ coverage: z.ZodObject<{
1463
+ scope: z.ZodLiteral<"known-sources">;
1464
+ collectionIncomplete: z.ZodBoolean;
1465
+ retentionLimited: z.ZodBoolean;
1466
+ capHistoryUnknown: z.ZodBoolean;
1467
+ legacyClaimsPresent: z.ZodBoolean;
1468
+ evidenceStateUnknown: z.ZodBoolean;
1469
+ authoredUrlCoverage: z.ZodObject<{
1470
+ state: z.ZodEnum<{
1471
+ "complete-for-known-locations": "complete-for-known-locations";
1472
+ partial: "partial";
1473
+ }>;
1474
+ unknownLocations: z.ZodNumber;
1475
+ scope: z.ZodLiteral<"known-locations">;
1476
+ watermark: z.ZodString;
1477
+ }, z.core.$loose>;
1478
+ reasons: z.ZodArray<z.ZodString>;
1479
+ reasonsClipped: z.ZodBoolean;
1480
+ checkedAt: z.ZodNullable<z.ZodNumber>;
1481
+ }, z.core.$loose>;
1482
+ nextCursor: z.ZodNullable<z.ZodString>;
1483
+ }, z.core.$loose>, z.ZodObject<{
1484
+ version: z.ZodLiteral<2>;
1485
+ status: z.ZodLiteral<"not-modified">;
1486
+ snapshot: z.ZodString;
1487
+ coverage: z.ZodObject<{
1488
+ scope: z.ZodLiteral<"known-sources">;
1489
+ collectionIncomplete: z.ZodBoolean;
1490
+ retentionLimited: z.ZodBoolean;
1491
+ capHistoryUnknown: z.ZodBoolean;
1492
+ legacyClaimsPresent: z.ZodBoolean;
1493
+ evidenceStateUnknown: z.ZodBoolean;
1494
+ authoredUrlCoverage: z.ZodObject<{
1495
+ state: z.ZodEnum<{
1496
+ "complete-for-known-locations": "complete-for-known-locations";
1497
+ partial: "partial";
1498
+ }>;
1499
+ unknownLocations: z.ZodNumber;
1500
+ scope: z.ZodLiteral<"known-locations">;
1501
+ watermark: z.ZodString;
1502
+ }, z.core.$loose>;
1503
+ reasons: z.ZodArray<z.ZodString>;
1504
+ reasonsClipped: z.ZodBoolean;
1505
+ checkedAt: z.ZodNullable<z.ZodNumber>;
1506
+ }, z.core.$loose>;
1507
+ }, z.core.$loose>, z.ZodObject<{
1508
+ version: z.ZodLiteral<2>;
1509
+ status: z.ZodLiteral<"restart">;
1510
+ reason: z.ZodLiteral<"snapshot-changed">;
1511
+ snapshot: z.ZodString;
1512
+ }, z.core.$loose>, z.ZodObject<{
1513
+ version: z.ZodLiteral<2>;
1514
+ status: z.ZodLiteral<"unavailable">;
1515
+ reason: z.ZodEnum<{
1516
+ "index-warming": "index-warming";
1517
+ "read-budget": "read-budget";
1518
+ }>;
1519
+ retryable: z.ZodBoolean;
1520
+ }, z.core.$loose>], "status">;
1521
+ };
1522
+ readonly crossReferencesV2ResolveLookup: {
1523
+ readonly input: z.ZodObject<{
1524
+ version: z.ZodLiteral<2>;
1525
+ text: z.ZodString;
1526
+ mode: z.ZodEnum<{
1527
+ recognize: "recognize";
1528
+ "exact-url": "exact-url";
1529
+ }>;
1530
+ context: z.ZodOptional<z.ZodObject<{
1531
+ projectId: z.ZodOptional<z.ZodString>;
1532
+ threadId: z.ZodOptional<z.ZodString>;
1533
+ environmentId: z.ZodOptional<z.ZodString>;
1534
+ git: z.ZodOptional<z.ZodObject<{
1535
+ branch: z.ZodOptional<z.ZodString>;
1536
+ upstream: z.ZodOptional<z.ZodObject<{
1537
+ remote: z.ZodString;
1538
+ branch: z.ZodString;
1539
+ }, z.core.$strict>>;
1540
+ remotes: z.ZodArray<z.ZodObject<{
1541
+ name: z.ZodString;
1542
+ url: z.ZodString;
1543
+ }, z.core.$strict>>;
1544
+ }, z.core.$strict>>;
1545
+ locale: z.ZodOptional<z.ZodString>;
1546
+ timeZone: z.ZodOptional<z.ZodString>;
1547
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
1548
+ href: z.ZodString;
1549
+ }, z.core.$strict>>>;
1550
+ }, z.core.$strict>>;
1551
+ }, z.core.$strict>;
1552
+ readonly output: z.ZodObject<{
1553
+ version: z.ZodLiteral<2>;
1554
+ state: z.ZodEnum<{
1555
+ incomplete: "incomplete";
1556
+ ready: "ready";
1557
+ ambiguous: "ambiguous";
1558
+ unrecognized: "unrecognized";
1559
+ }>;
1560
+ options: z.ZodArray<z.ZodObject<{
1561
+ query: z.ZodDiscriminatedUnion<[z.ZodObject<{
1562
+ kind: z.ZodLiteral<"resource">;
1563
+ target: z.ZodObject<{
1564
+ provider: z.ZodString;
1565
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1566
+ }, z.core.$loose>;
1567
+ relation: z.ZodEnum<{
1568
+ self: "self";
1569
+ "github-pr-family": "github-pr-family";
1570
+ }>;
1571
+ }, z.core.$loose>, z.ZodObject<{
1572
+ kind: z.ZodLiteral<"authored-url">;
1573
+ href: z.ZodString;
1574
+ }, z.core.$loose>], "kind">;
1575
+ label: z.ZodString;
1576
+ inputSpan: z.ZodObject<{
1577
+ start: z.ZodNumber;
1578
+ end: z.ZodNumber;
1579
+ }, z.core.$loose>;
1580
+ basis: z.ZodEnum<{
1581
+ supplier: "supplier";
1582
+ native: "native";
1583
+ "stored-codec": "stored-codec";
1584
+ }>;
1585
+ reasons: z.ZodArray<z.ZodString>;
1586
+ }, z.core.$loose>>;
1587
+ reasons: z.ZodArray<z.ZodString>;
1588
+ }, z.core.$loose>;
1589
+ };
1590
+ };
1591
+ export declare const mentionsChangedV2Schema: z.ZodObject<{
1592
+ version: z.ZodLiteral<2>;
1593
+ producerPluginId: z.ZodString;
1594
+ sourceIdentityDigest: z.ZodString;
1595
+ graphRevision: z.ZodNumber;
1596
+ evidenceRevision: z.ZodNullable<z.ZodNumber>;
1597
+ affectedIdentityDigests: z.ZodArray<z.ZodString>;
1598
+ scopeListClipped: z.ZodBoolean;
1599
+ }, z.core.$loose>;
1600
+ export declare const MENTIONS_V2_CHANNEL = "cross-references-mentions-v2-changed";
1601
+ export type MentionQueryV2 = z.infer<typeof mentionQueryV2Schema>;
1602
+ export type ListMentionsInputV2 = z.infer<typeof listMentionsInputV2Schema>;
1603
+ export type ListMentionsOutputV2 = z.infer<typeof listMentionsOutputV2Schema>;
1604
+ export type ResolveLookupInputV2 = z.infer<typeof resolveLookupInputV2Schema>;
1605
+ export type ResolveLookupOutputV2 = z.infer<typeof resolveLookupOutputV2Schema>;
1606
+ export type ExcerptRecordV2 = z.infer<typeof excerptRecordV2Schema>;
1607
+ export type ExcerptV2 = z.infer<typeof excerptV2Schema>;
1608
+ export type MentionsChangedV2 = z.infer<typeof mentionsChangedV2Schema>;