@phosphorco/bb-cross-references 0.3.0 → 0.4.1

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.
@@ -1,5 +1,6 @@
1
1
  import type { BbPluginApi, StandardSchemaV1 } from "@get-bb/plugin-sdk";
2
2
  import type { PluginBrowserBbSdk } from "@get-bb/plugin-sdk/app";
3
+ import { z } from "zod";
3
4
  import { CROSS_REFERENCES_PROTOCOL, type ApplyProjectionInput, type ApplyProjectionResponse, type GetProjectionInput, type GetProjectionResponse, type ListBacklinksInput, type ListBacklinksResponse, type ListForwardReferencesInput, type ListForwardReferencesResponse, type CheckForwardReferencesInput, type ForwardReferenceStatus } from "./index.js";
4
5
  export type CrossReferencesSdk = Pick<BbPluginApi["sdk"], "plugins"> | Pick<PluginBrowserBbSdk, "plugins">;
5
6
  export interface CrossReferencesDescription {
@@ -161,6 +162,182 @@ export declare const crossReferencesV2RpcContract: {
161
162
  status: "page";
162
163
  snapshot: string;
163
164
  items: ({
165
+ [x: string]: unknown;
166
+ kind: "brief-occurrence";
167
+ evidenceRevision: number;
168
+ occurrenceKey: string;
169
+ sourceOccurrenceId: string;
170
+ locator: {
171
+ [x: string]: unknown;
172
+ kind: "thread-brief";
173
+ threadId: string;
174
+ sourceContentRevision: string;
175
+ file: {
176
+ [x: string]: unknown;
177
+ kind: "thread-storage";
178
+ threadId: string;
179
+ path: "BRIEF.md";
180
+ };
181
+ section: {
182
+ [x: string]: unknown;
183
+ heading: {
184
+ [x: string]: unknown;
185
+ state: "named";
186
+ text: string;
187
+ } | {
188
+ [x: string]: unknown;
189
+ state: "withheld";
190
+ digest: string;
191
+ display: "Heading withheld";
192
+ cause: "policy" | "unclassified";
193
+ } | null;
194
+ line: number;
195
+ };
196
+ location: {
197
+ [x: string]: unknown;
198
+ kind: "line";
199
+ line: number;
200
+ column: number | null;
201
+ endLine: number | null;
202
+ };
203
+ span?: {
204
+ [x: string]: unknown;
205
+ frame: "file-utf16" | "body-utf16";
206
+ start: number;
207
+ end: number;
208
+ } | undefined;
209
+ };
210
+ sourceContentRevision: string;
211
+ frame: {
212
+ [x: string]: unknown;
213
+ codec: "utf8-fatal-bom-consumed-v1";
214
+ rawBytes: number;
215
+ bomBytes: 0 | 3;
216
+ fileUtf16Length: number;
217
+ bodyBase: {
218
+ [x: string]: unknown;
219
+ startUtf16: number;
220
+ startLine: number;
221
+ utf16Length: number;
222
+ };
223
+ lineMapping: {
224
+ [x: string]: unknown;
225
+ codec: "native-file-lines-v1";
226
+ fileLineCount: number;
227
+ };
228
+ };
229
+ excerpt: {
230
+ [x: string]: unknown;
231
+ state: "unavailable";
232
+ reason: "not-materialized";
233
+ codecVersion: 1;
234
+ };
235
+ provenance: {
236
+ [x: string]: unknown;
237
+ state: "safe";
238
+ value: {
239
+ [x: string]: unknown;
240
+ pluginId: string;
241
+ origin: "builtin" | "contributed";
242
+ confidence: "high" | "medium" | "low";
243
+ source: {
244
+ [x: string]: unknown;
245
+ provider: string;
246
+ id: string;
247
+ kind?: string | undefined;
248
+ };
249
+ recognition: {
250
+ [x: string]: unknown;
251
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
252
+ explanation: string;
253
+ evidence?: {
254
+ [x: string]: unknown;
255
+ link?: number | undefined;
256
+ remote?: string | undefined;
257
+ span?: {
258
+ [x: string]: unknown;
259
+ start: number;
260
+ end: number;
261
+ } | undefined;
262
+ } | undefined;
263
+ };
264
+ authoredHref?: string | undefined;
265
+ verifiedFile?: {
266
+ [x: string]: unknown;
267
+ kind: "workspace";
268
+ environmentId: string;
269
+ path: string;
270
+ } | {
271
+ [x: string]: unknown;
272
+ kind: "thread-storage";
273
+ threadId: string;
274
+ path: string;
275
+ } | undefined;
276
+ };
277
+ } | {
278
+ [x: string]: unknown;
279
+ state: "withheld";
280
+ digest: string;
281
+ display: "Recognition details withheld";
282
+ cause: "policy" | "unclassified";
283
+ summary: {
284
+ [x: string]: unknown;
285
+ pluginId: string;
286
+ origin: "builtin" | "contributed";
287
+ confidence: "high" | "medium" | "low";
288
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
289
+ };
290
+ };
291
+ authoredUrl: {
292
+ [x: string]: unknown;
293
+ state: "exact";
294
+ href: string;
295
+ } | {
296
+ [x: string]: unknown;
297
+ state: "not-url";
298
+ } | {
299
+ [x: string]: unknown;
300
+ state: "unknown";
301
+ } | {
302
+ [x: string]: unknown;
303
+ state: "withheld";
304
+ digest: string;
305
+ display: "Destination withheld";
306
+ cause: "policy" | "unclassified";
307
+ };
308
+ authoredUrlState: "unknown" | "withheld" | "exact" | "not-url";
309
+ confirmation: "producer-attested" | "retained-unconfirmed";
310
+ source: {
311
+ [x: string]: unknown;
312
+ presentation: {
313
+ [x: string]: unknown;
314
+ label: string;
315
+ url?: string | undefined;
316
+ detail?: string | undefined;
317
+ };
318
+ provider: string;
319
+ keys: Record<string, string>;
320
+ };
321
+ target: {
322
+ [x: string]: unknown;
323
+ presentation: {
324
+ [x: string]: unknown;
325
+ label: string;
326
+ url?: string | undefined;
327
+ detail?: string | undefined;
328
+ };
329
+ provider: string;
330
+ keys: Record<string, string>;
331
+ };
332
+ producerPluginId: string;
333
+ graphRevision: number;
334
+ cap: {
335
+ [x: string]: unknown;
336
+ state: "unknown" | "uncapped" | "capped";
337
+ limit: 100 | null;
338
+ sourceHistoryUnknown: boolean | null;
339
+ };
340
+ } | {
164
341
  [x: string]: unknown;
165
342
  kind: "occurrence";
166
343
  evidenceRevision: number;
@@ -207,7 +384,7 @@ export declare const crossReferencesV2RpcContract: {
207
384
  };
208
385
  messageCreatedAt: number;
209
386
  observedAt: number;
210
- confirmation: "observed" | "retained-unconfirmed";
387
+ confirmation: "retained-unconfirmed" | "observed";
211
388
  provenance: {
212
389
  [x: string]: unknown;
213
390
  pluginId: string;
@@ -471,7 +648,7 @@ export declare const crossReferencesV2RpcContract: {
471
648
  readonly output: StandardSchemaV1<{
472
649
  [x: string]: unknown;
473
650
  version: 2;
474
- state: "ready" | "ambiguous" | "unrecognized" | "incomplete";
651
+ state: "incomplete" | "ready" | "ambiguous" | "unrecognized";
475
652
  options: {
476
653
  [x: string]: unknown;
477
654
  query: {
@@ -501,7 +678,7 @@ export declare const crossReferencesV2RpcContract: {
501
678
  }, {
502
679
  [x: string]: unknown;
503
680
  version: 2;
504
- state: "ready" | "ambiguous" | "unrecognized" | "incomplete";
681
+ state: "incomplete" | "ready" | "ambiguous" | "unrecognized";
505
682
  options: {
506
683
  [x: string]: unknown;
507
684
  query: {
@@ -535,3 +712,2587 @@ export declare function registerCrossReferencesV2(bb: Pick<BbPluginApi, 'rpc'>,
535
712
  crossReferencesV2ListMentions: (input: import('./evidence-v2.js').ListMentionsInputV2) => import('./evidence-v2.js').ListMentionsOutputV2 | Promise<import('./evidence-v2.js').ListMentionsOutputV2>;
536
713
  crossReferencesV2ResolveLookup: (input: import('./evidence-v2.js').ResolveLookupInputV2) => import('./evidence-v2.js').ResolveLookupOutputV2 | Promise<import('./evidence-v2.js').ResolveLookupOutputV2>;
537
714
  }): void;
715
+ import { type ProducerGetStateInput, type ProducerState, type ProducerApplyInput, type ProducerApplyOutput, type ProducerReportStatusInput, type ProducerReportStatusOutput, type BriefNavigationInput, type BriefNavigationOutput } from './index.js';
716
+ declare const ps: {
717
+ readonly "crossReferencesProducer.describe": {
718
+ readonly input: z.ZodNull;
719
+ readonly output: z.ZodObject<{
720
+ protocol: z.ZodLiteral<"cross-references-producer">;
721
+ versions: z.ZodArray<z.ZodNumber>;
722
+ sourceKinds: z.ZodArray<z.ZodLiteral<"thread-brief">>;
723
+ limits: z.ZodObject<{
724
+ inputBytes: z.ZodNumber;
725
+ statusBytes: z.ZodNumber;
726
+ locations: z.ZodNumber;
727
+ perTarget: z.ZodNumber;
728
+ headingBytes: z.ZodNumber;
729
+ limitCodes: z.ZodArray<z.ZodString>;
730
+ }, z.core.$loose>;
731
+ }, z.core.$loose>;
732
+ };
733
+ readonly crossReferencesProducerV1GetState: {
734
+ readonly input: z.ZodObject<{
735
+ version: z.ZodLiteral<1>;
736
+ producerPluginId: z.ZodLiteral<"thread-brief">;
737
+ source: z.ZodObject<{
738
+ provider: z.ZodString;
739
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
740
+ }, z.core.$strict>;
741
+ }, z.core.$strict>;
742
+ readonly output: z.ZodObject<{
743
+ version: z.ZodLiteral<1>;
744
+ projection: z.ZodNullable<z.ZodObject<{
745
+ producerPluginId: z.ZodString;
746
+ source: z.ZodObject<{
747
+ provider: z.ZodString;
748
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
749
+ presentation: z.ZodObject<{
750
+ label: z.ZodString;
751
+ detail: z.ZodOptional<z.ZodString>;
752
+ url: z.ZodOptional<z.ZodString>;
753
+ }, z.core.$loose>;
754
+ }, z.core.$loose>;
755
+ revision: z.ZodNumber;
756
+ mutationId: z.ZodString;
757
+ payloadDigest: z.ZodString;
758
+ tombstone: z.ZodBoolean;
759
+ targets: z.ZodArray<z.ZodObject<{
760
+ provider: z.ZodString;
761
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
762
+ presentation: z.ZodObject<{
763
+ label: z.ZodString;
764
+ detail: z.ZodOptional<z.ZodString>;
765
+ url: z.ZodOptional<z.ZodString>;
766
+ }, z.core.$loose>;
767
+ }, z.core.$loose>>;
768
+ }, z.core.$loose>>;
769
+ evidence: z.ZodNullable<z.ZodObject<{
770
+ kind: z.ZodLiteral<"thread-brief">;
771
+ graphRevision: z.ZodNumber;
772
+ graphPayloadDigest: z.ZodString;
773
+ evidenceDigest: z.ZodString;
774
+ sourceContentRevision: z.ZodNullable<z.ZodString>;
775
+ state: z.ZodEnum<{
776
+ bound: "bound";
777
+ unconfirmed: "unconfirmed";
778
+ }>;
779
+ sourceState: z.ZodEnum<{
780
+ present: "present";
781
+ absent: "absent";
782
+ empty: "empty";
783
+ }>;
784
+ occurrenceCount: z.ZodNumber;
785
+ }, z.core.$loose>>;
786
+ status: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
787
+ state: z.ZodLiteral<"over-limit">;
788
+ sourceContentRevision: z.ZodString;
789
+ limits: z.ZodArray<z.ZodEnum<{
790
+ "target-count": "target-count";
791
+ "projection-bytes": "projection-bytes";
792
+ "occurrence-count": "occurrence-count";
793
+ "per-target-occurrences": "per-target-occurrences";
794
+ "heading-bytes": "heading-bytes";
795
+ "envelope-bytes": "envelope-bytes";
796
+ "presentation-label-bytes": "presentation-label-bytes";
797
+ "presentation-detail-bytes": "presentation-detail-bytes";
798
+ "presentation-url-bytes": "presentation-url-bytes";
799
+ "presentation-bytes": "presentation-bytes";
800
+ }>>;
801
+ attemptRevision: z.ZodNumber;
802
+ statusDigest: z.ZodString;
803
+ sourceFile: z.ZodObject<{
804
+ kind: z.ZodLiteral<"thread-storage">;
805
+ threadId: z.ZodString;
806
+ path: z.ZodLiteral<"BRIEF.md">;
807
+ }, z.core.$loose>;
808
+ applicability: z.ZodEnum<{
809
+ current: "current";
810
+ "superseded-by-graph": "superseded-by-graph";
811
+ }>;
812
+ }, z.core.$loose>, z.ZodObject<{
813
+ state: z.ZodLiteral<"identity-unrepresentable">;
814
+ sourceContentRevision: z.ZodString;
815
+ identityReasons: z.ZodArray<z.ZodEnum<{
816
+ "unsafe-required-identity": "unsafe-required-identity";
817
+ "unsupported-required-codec": "unsupported-required-codec";
818
+ "required-identity-bound": "required-identity-bound";
819
+ }>>;
820
+ limits: z.ZodArray<z.ZodEnum<{
821
+ "target-count": "target-count";
822
+ "projection-bytes": "projection-bytes";
823
+ "occurrence-count": "occurrence-count";
824
+ "per-target-occurrences": "per-target-occurrences";
825
+ "heading-bytes": "heading-bytes";
826
+ "envelope-bytes": "envelope-bytes";
827
+ "presentation-label-bytes": "presentation-label-bytes";
828
+ "presentation-detail-bytes": "presentation-detail-bytes";
829
+ "presentation-url-bytes": "presentation-url-bytes";
830
+ "presentation-bytes": "presentation-bytes";
831
+ }>>;
832
+ attemptRevision: z.ZodNumber;
833
+ statusDigest: z.ZodString;
834
+ sourceFile: z.ZodObject<{
835
+ kind: z.ZodLiteral<"thread-storage">;
836
+ threadId: z.ZodString;
837
+ path: z.ZodLiteral<"BRIEF.md">;
838
+ }, z.core.$loose>;
839
+ applicability: z.ZodEnum<{
840
+ current: "current";
841
+ "superseded-by-graph": "superseded-by-graph";
842
+ }>;
843
+ }, z.core.$loose>]>>;
844
+ revisionHighWater: z.ZodNumber;
845
+ }, z.core.$loose>;
846
+ };
847
+ readonly crossReferencesProducerV1Apply: {
848
+ readonly input: z.ZodObject<{
849
+ version: z.ZodLiteral<1>;
850
+ projection: z.ZodPipe<z.ZodObject<{
851
+ protocolVersion: z.ZodLiteral<1>;
852
+ producerPluginId: z.ZodString;
853
+ mutationId: z.ZodString;
854
+ source: z.ZodObject<{
855
+ provider: z.ZodString;
856
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
857
+ presentation: z.ZodObject<{
858
+ label: z.ZodString;
859
+ detail: z.ZodOptional<z.ZodString>;
860
+ url: z.ZodOptional<z.ZodString>;
861
+ }, z.core.$strict>;
862
+ }, z.core.$strict>;
863
+ revision: z.ZodNumber;
864
+ expectedRevision: z.ZodNumber;
865
+ payloadDigest: z.ZodString;
866
+ tombstone: z.ZodBoolean;
867
+ targets: z.ZodArray<z.ZodObject<{
868
+ provider: z.ZodString;
869
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
870
+ presentation: z.ZodObject<{
871
+ label: z.ZodString;
872
+ detail: z.ZodOptional<z.ZodString>;
873
+ url: z.ZodOptional<z.ZodString>;
874
+ }, z.core.$strict>;
875
+ }, z.core.$strict>>;
876
+ }, z.core.$strict>, z.ZodTransform<ApplyProjectionInput, {
877
+ protocolVersion: 1;
878
+ producerPluginId: string;
879
+ mutationId: string;
880
+ source: {
881
+ provider: string;
882
+ keys: Record<string, string>;
883
+ presentation: {
884
+ label: string;
885
+ detail?: string | undefined;
886
+ url?: string | undefined;
887
+ };
888
+ };
889
+ revision: number;
890
+ expectedRevision: number;
891
+ payloadDigest: string;
892
+ tombstone: boolean;
893
+ targets: {
894
+ provider: string;
895
+ keys: Record<string, string>;
896
+ presentation: {
897
+ label: string;
898
+ detail?: string | undefined;
899
+ url?: string | undefined;
900
+ };
901
+ }[];
902
+ }>>;
903
+ evidence: z.ZodObject<{
904
+ kind: z.ZodLiteral<"thread-brief">;
905
+ sourceFile: z.ZodObject<{
906
+ kind: z.ZodLiteral<"thread-storage">;
907
+ threadId: z.ZodString;
908
+ path: z.ZodLiteral<"BRIEF.md">;
909
+ }, z.core.$strict>;
910
+ sourceState: z.ZodEnum<{
911
+ present: "present";
912
+ absent: "absent";
913
+ empty: "empty";
914
+ }>;
915
+ sourceContentRevision: z.ZodNullable<z.ZodString>;
916
+ completeness: z.ZodObject<{
917
+ state: z.ZodLiteral<"complete">;
918
+ codecVersion: z.ZodLiteral<1>;
919
+ }, z.core.$strict>;
920
+ metadataPolicyVersion: z.ZodLiteral<1>;
921
+ frame: z.ZodNullable<z.ZodObject<{
922
+ codec: z.ZodLiteral<"utf8-fatal-bom-consumed-v1">;
923
+ rawBytes: z.ZodNumber;
924
+ bomBytes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<3>]>;
925
+ fileUtf16Length: z.ZodNumber;
926
+ bodyBase: z.ZodObject<{
927
+ startUtf16: z.ZodNumber;
928
+ startLine: z.ZodNumber;
929
+ utf16Length: z.ZodNumber;
930
+ }, z.core.$strict>;
931
+ lineMapping: z.ZodObject<{
932
+ codec: z.ZodLiteral<"native-file-lines-v1">;
933
+ fileLineCount: z.ZodNumber;
934
+ }, z.core.$strict>;
935
+ }, z.core.$strict>>;
936
+ sourcePresentation: z.ZodObject<{
937
+ label: z.ZodUnion<readonly [z.ZodObject<{
938
+ state: z.ZodLiteral<"safe">;
939
+ text: z.ZodString;
940
+ }, z.core.$strict>, z.ZodObject<{
941
+ state: z.ZodLiteral<"withheld">;
942
+ digest: z.ZodString;
943
+ display: z.ZodLiteral<"Brief">;
944
+ cause: z.ZodEnum<{
945
+ policy: "policy";
946
+ unclassified: "unclassified";
947
+ }>;
948
+ }, z.core.$strict>]>;
949
+ detail: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
950
+ state: z.ZodLiteral<"safe">;
951
+ text: z.ZodString;
952
+ }, z.core.$strict>, z.ZodObject<{
953
+ state: z.ZodLiteral<"withheld">;
954
+ digest: z.ZodString;
955
+ display: z.ZodLiteral<"Details withheld">;
956
+ cause: z.ZodEnum<{
957
+ policy: "policy";
958
+ unclassified: "unclassified";
959
+ }>;
960
+ }, z.core.$strict>]>;
961
+ url: z.ZodUnion<readonly [z.ZodObject<{
962
+ state: z.ZodLiteral<"absent">;
963
+ }, z.core.$strict>, z.ZodObject<{
964
+ state: z.ZodLiteral<"exact">;
965
+ href: z.ZodString;
966
+ }, z.core.$strict>, z.ZodObject<{
967
+ state: z.ZodLiteral<"withheld">;
968
+ digest: z.ZodString;
969
+ display: z.ZodLiteral<"Destination withheld">;
970
+ cause: z.ZodEnum<{
971
+ policy: "policy";
972
+ unclassified: "unclassified";
973
+ }>;
974
+ }, z.core.$strict>]>;
975
+ }, z.core.$strict>;
976
+ targetDescriptors: z.ZodArray<z.ZodObject<{
977
+ target: z.ZodObject<{
978
+ provider: z.ZodString;
979
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
980
+ }, z.core.$strict>;
981
+ presentation: z.ZodObject<{
982
+ label: z.ZodUnion<readonly [z.ZodObject<{
983
+ state: z.ZodLiteral<"safe">;
984
+ text: z.ZodString;
985
+ }, z.core.$strict>, z.ZodObject<{
986
+ state: z.ZodLiteral<"withheld">;
987
+ digest: z.ZodString;
988
+ display: z.ZodLiteral<"Reference">;
989
+ cause: z.ZodEnum<{
990
+ policy: "policy";
991
+ unclassified: "unclassified";
992
+ }>;
993
+ }, z.core.$strict>]>;
994
+ detail: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
995
+ state: z.ZodLiteral<"safe">;
996
+ text: z.ZodString;
997
+ }, z.core.$strict>, z.ZodObject<{
998
+ state: z.ZodLiteral<"withheld">;
999
+ digest: z.ZodString;
1000
+ display: z.ZodLiteral<"Details withheld">;
1001
+ cause: z.ZodEnum<{
1002
+ policy: "policy";
1003
+ unclassified: "unclassified";
1004
+ }>;
1005
+ }, z.core.$strict>]>;
1006
+ url: z.ZodUnion<readonly [z.ZodObject<{
1007
+ state: z.ZodLiteral<"absent">;
1008
+ }, z.core.$strict>, z.ZodObject<{
1009
+ state: z.ZodLiteral<"exact">;
1010
+ href: z.ZodString;
1011
+ }, z.core.$strict>, z.ZodObject<{
1012
+ state: z.ZodLiteral<"withheld">;
1013
+ digest: z.ZodString;
1014
+ display: z.ZodLiteral<"Destination withheld">;
1015
+ cause: z.ZodEnum<{
1016
+ policy: "policy";
1017
+ unclassified: "unclassified";
1018
+ }>;
1019
+ }, z.core.$strict>]>;
1020
+ }, z.core.$strict>;
1021
+ codec: z.ZodUnion<readonly [z.ZodObject<{
1022
+ state: z.ZodLiteral<"available">;
1023
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
1024
+ kind: z.ZodLiteral<"recognition">;
1025
+ source: z.ZodObject<{
1026
+ provider: z.ZodString;
1027
+ id: z.ZodString;
1028
+ kind: z.ZodOptional<z.ZodString>;
1029
+ }, z.core.$strict>;
1030
+ }, z.core.$strict>, z.ZodObject<{
1031
+ kind: z.ZodLiteral<"thread">;
1032
+ source: z.ZodObject<{
1033
+ provider: z.ZodString;
1034
+ id: z.ZodString;
1035
+ kind: z.ZodOptional<z.ZodString>;
1036
+ }, z.core.$strict>;
1037
+ verified: z.ZodObject<{
1038
+ id: z.ZodString;
1039
+ projectId: z.ZodString;
1040
+ }, z.core.$strict>;
1041
+ }, z.core.$strict>, z.ZodObject<{
1042
+ kind: z.ZodLiteral<"file">;
1043
+ verified: z.ZodDiscriminatedUnion<[z.ZodObject<{
1044
+ kind: z.ZodLiteral<"workspace">;
1045
+ environmentId: z.ZodString;
1046
+ path: z.ZodString;
1047
+ }, z.core.$strict>, z.ZodObject<{
1048
+ kind: z.ZodLiteral<"thread-storage">;
1049
+ threadId: z.ZodString;
1050
+ path: z.ZodString;
1051
+ }, z.core.$strict>], "kind">;
1052
+ }, z.core.$strict>, z.ZodObject<{
1053
+ kind: z.ZodLiteral<"url">;
1054
+ href: z.ZodString;
1055
+ }, z.core.$strict>], "kind">;
1056
+ }, z.core.$strict>, z.ZodObject<{
1057
+ state: z.ZodLiteral<"withheld">;
1058
+ digest: z.ZodString;
1059
+ display: z.ZodLiteral<"Identity metadata withheld">;
1060
+ cause: z.ZodEnum<{
1061
+ policy: "policy";
1062
+ unclassified: "unclassified";
1063
+ }>;
1064
+ }, z.core.$strict>]>;
1065
+ }, z.core.$strict>>;
1066
+ occurrences: z.ZodArray<z.ZodObject<{
1067
+ occurrenceKey: z.ZodString;
1068
+ sourceOccurrenceId: z.ZodString;
1069
+ target: z.ZodObject<{
1070
+ provider: z.ZodString;
1071
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1072
+ }, z.core.$strict>;
1073
+ locator: z.ZodObject<{
1074
+ kind: z.ZodLiteral<"thread-brief">;
1075
+ threadId: z.ZodString;
1076
+ file: z.ZodObject<{
1077
+ kind: z.ZodLiteral<"thread-storage">;
1078
+ threadId: z.ZodString;
1079
+ path: z.ZodLiteral<"BRIEF.md">;
1080
+ }, z.core.$strict>;
1081
+ sourceContentRevision: z.ZodString;
1082
+ section: z.ZodObject<{
1083
+ heading: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1084
+ state: z.ZodLiteral<"named">;
1085
+ text: z.ZodString;
1086
+ }, z.core.$strict>, z.ZodObject<{
1087
+ state: z.ZodLiteral<"withheld">;
1088
+ digest: z.ZodString;
1089
+ display: z.ZodLiteral<"Heading withheld">;
1090
+ cause: z.ZodEnum<{
1091
+ policy: "policy";
1092
+ unclassified: "unclassified";
1093
+ }>;
1094
+ }, z.core.$strict>]>;
1095
+ line: z.ZodNumber;
1096
+ }, z.core.$strict>;
1097
+ location: z.ZodObject<{
1098
+ kind: z.ZodLiteral<"line">;
1099
+ line: z.ZodNumber;
1100
+ column: z.ZodNullable<z.ZodNumber>;
1101
+ endLine: z.ZodNullable<z.ZodNumber>;
1102
+ }, z.core.$strict>;
1103
+ span: z.ZodOptional<z.ZodObject<{
1104
+ frame: z.ZodEnum<{
1105
+ "file-utf16": "file-utf16";
1106
+ "body-utf16": "body-utf16";
1107
+ }>;
1108
+ start: z.ZodNumber;
1109
+ end: z.ZodNumber;
1110
+ }, z.core.$strict>>;
1111
+ }, z.core.$strict>;
1112
+ provenance: z.ZodUnion<readonly [z.ZodObject<{
1113
+ state: z.ZodLiteral<"safe">;
1114
+ value: z.ZodObject<{
1115
+ pluginId: z.ZodString;
1116
+ origin: z.ZodEnum<{
1117
+ builtin: "builtin";
1118
+ contributed: "contributed";
1119
+ }>;
1120
+ confidence: z.ZodEnum<{
1121
+ high: "high";
1122
+ medium: "medium";
1123
+ low: "low";
1124
+ }>;
1125
+ recognition: z.ZodObject<{
1126
+ basis: z.ZodEnum<{
1127
+ explicit: "explicit";
1128
+ "text-url": "text-url";
1129
+ "existing-link": "existing-link";
1130
+ "git-remote": "git-remote";
1131
+ context: "context";
1132
+ }>;
1133
+ explanation: z.ZodString;
1134
+ evidence: z.ZodOptional<z.ZodObject<{
1135
+ span: z.ZodOptional<z.ZodObject<{
1136
+ start: z.ZodNumber;
1137
+ end: z.ZodNumber;
1138
+ }, z.core.$strict>>;
1139
+ link: z.ZodOptional<z.ZodNumber>;
1140
+ remote: z.ZodOptional<z.ZodString>;
1141
+ }, z.core.$strict>>;
1142
+ }, z.core.$strict>;
1143
+ source: z.ZodObject<{
1144
+ provider: z.ZodString;
1145
+ id: z.ZodString;
1146
+ kind: z.ZodOptional<z.ZodString>;
1147
+ }, z.core.$strict>;
1148
+ authoredHref: z.ZodOptional<z.ZodString>;
1149
+ verifiedFile: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1150
+ kind: z.ZodLiteral<"workspace">;
1151
+ environmentId: z.ZodString;
1152
+ path: z.ZodString;
1153
+ }, z.core.$strict>, z.ZodObject<{
1154
+ kind: z.ZodLiteral<"thread-storage">;
1155
+ threadId: z.ZodString;
1156
+ path: z.ZodString;
1157
+ }, z.core.$strict>], "kind">>;
1158
+ }, z.core.$strict>;
1159
+ }, z.core.$strict>, z.ZodObject<{
1160
+ state: z.ZodLiteral<"withheld">;
1161
+ digest: z.ZodString;
1162
+ display: z.ZodLiteral<"Recognition details withheld">;
1163
+ cause: z.ZodEnum<{
1164
+ policy: "policy";
1165
+ unclassified: "unclassified";
1166
+ }>;
1167
+ summary: z.ZodObject<{
1168
+ pluginId: z.ZodString;
1169
+ origin: z.ZodEnum<{
1170
+ builtin: "builtin";
1171
+ contributed: "contributed";
1172
+ }>;
1173
+ confidence: z.ZodEnum<{
1174
+ high: "high";
1175
+ medium: "medium";
1176
+ low: "low";
1177
+ }>;
1178
+ basis: z.ZodEnum<{
1179
+ explicit: "explicit";
1180
+ "text-url": "text-url";
1181
+ "existing-link": "existing-link";
1182
+ "git-remote": "git-remote";
1183
+ context: "context";
1184
+ }>;
1185
+ }, z.core.$strict>;
1186
+ }, z.core.$strict>]>;
1187
+ authoredUrl: z.ZodUnion<readonly [z.ZodObject<{
1188
+ state: z.ZodLiteral<"exact">;
1189
+ href: z.ZodString;
1190
+ }, z.core.$strict>, z.ZodObject<{
1191
+ state: z.ZodLiteral<"not-url">;
1192
+ }, z.core.$strict>, z.ZodObject<{
1193
+ state: z.ZodLiteral<"unknown">;
1194
+ }, z.core.$strict>, z.ZodObject<{
1195
+ state: z.ZodLiteral<"withheld">;
1196
+ digest: z.ZodString;
1197
+ display: z.ZodLiteral<"Destination withheld">;
1198
+ cause: z.ZodEnum<{
1199
+ policy: "policy";
1200
+ unclassified: "unclassified";
1201
+ }>;
1202
+ }, z.core.$strict>]>;
1203
+ }, z.core.$strict>>;
1204
+ }, z.core.$strict>;
1205
+ evidenceDigest: z.ZodString;
1206
+ }, z.core.$strict>;
1207
+ readonly output: z.ZodObject<{
1208
+ version: z.ZodLiteral<1>;
1209
+ outcome: z.ZodEnum<{
1210
+ applied: "applied";
1211
+ duplicate: "duplicate";
1212
+ equal: "equal";
1213
+ stale: "stale";
1214
+ conflict: "conflict";
1215
+ "cas-mismatch": "cas-mismatch";
1216
+ }>;
1217
+ currentRevision: z.ZodNumber;
1218
+ currentDigest: z.ZodNullable<z.ZodString>;
1219
+ evidenceDisposition: z.ZodEnum<{
1220
+ conflict: "conflict";
1221
+ installed: "installed";
1222
+ replayed: "replayed";
1223
+ "not-applied": "not-applied";
1224
+ }>;
1225
+ state: z.ZodObject<{
1226
+ version: z.ZodLiteral<1>;
1227
+ projection: z.ZodNullable<z.ZodObject<{
1228
+ producerPluginId: z.ZodString;
1229
+ source: z.ZodObject<{
1230
+ provider: z.ZodString;
1231
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1232
+ presentation: z.ZodObject<{
1233
+ label: z.ZodString;
1234
+ detail: z.ZodOptional<z.ZodString>;
1235
+ url: z.ZodOptional<z.ZodString>;
1236
+ }, z.core.$loose>;
1237
+ }, z.core.$loose>;
1238
+ revision: z.ZodNumber;
1239
+ mutationId: z.ZodString;
1240
+ payloadDigest: z.ZodString;
1241
+ tombstone: z.ZodBoolean;
1242
+ targets: z.ZodArray<z.ZodObject<{
1243
+ provider: z.ZodString;
1244
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1245
+ presentation: z.ZodObject<{
1246
+ label: z.ZodString;
1247
+ detail: z.ZodOptional<z.ZodString>;
1248
+ url: z.ZodOptional<z.ZodString>;
1249
+ }, z.core.$loose>;
1250
+ }, z.core.$loose>>;
1251
+ }, z.core.$loose>>;
1252
+ evidence: z.ZodNullable<z.ZodObject<{
1253
+ kind: z.ZodLiteral<"thread-brief">;
1254
+ graphRevision: z.ZodNumber;
1255
+ graphPayloadDigest: z.ZodString;
1256
+ evidenceDigest: z.ZodString;
1257
+ sourceContentRevision: z.ZodNullable<z.ZodString>;
1258
+ state: z.ZodEnum<{
1259
+ bound: "bound";
1260
+ unconfirmed: "unconfirmed";
1261
+ }>;
1262
+ sourceState: z.ZodEnum<{
1263
+ present: "present";
1264
+ absent: "absent";
1265
+ empty: "empty";
1266
+ }>;
1267
+ occurrenceCount: z.ZodNumber;
1268
+ }, z.core.$loose>>;
1269
+ status: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
1270
+ state: z.ZodLiteral<"over-limit">;
1271
+ sourceContentRevision: z.ZodString;
1272
+ limits: z.ZodArray<z.ZodEnum<{
1273
+ "target-count": "target-count";
1274
+ "projection-bytes": "projection-bytes";
1275
+ "occurrence-count": "occurrence-count";
1276
+ "per-target-occurrences": "per-target-occurrences";
1277
+ "heading-bytes": "heading-bytes";
1278
+ "envelope-bytes": "envelope-bytes";
1279
+ "presentation-label-bytes": "presentation-label-bytes";
1280
+ "presentation-detail-bytes": "presentation-detail-bytes";
1281
+ "presentation-url-bytes": "presentation-url-bytes";
1282
+ "presentation-bytes": "presentation-bytes";
1283
+ }>>;
1284
+ attemptRevision: z.ZodNumber;
1285
+ statusDigest: z.ZodString;
1286
+ sourceFile: z.ZodObject<{
1287
+ kind: z.ZodLiteral<"thread-storage">;
1288
+ threadId: z.ZodString;
1289
+ path: z.ZodLiteral<"BRIEF.md">;
1290
+ }, z.core.$loose>;
1291
+ applicability: z.ZodEnum<{
1292
+ current: "current";
1293
+ "superseded-by-graph": "superseded-by-graph";
1294
+ }>;
1295
+ }, z.core.$loose>, z.ZodObject<{
1296
+ state: z.ZodLiteral<"identity-unrepresentable">;
1297
+ sourceContentRevision: z.ZodString;
1298
+ identityReasons: z.ZodArray<z.ZodEnum<{
1299
+ "unsafe-required-identity": "unsafe-required-identity";
1300
+ "unsupported-required-codec": "unsupported-required-codec";
1301
+ "required-identity-bound": "required-identity-bound";
1302
+ }>>;
1303
+ limits: z.ZodArray<z.ZodEnum<{
1304
+ "target-count": "target-count";
1305
+ "projection-bytes": "projection-bytes";
1306
+ "occurrence-count": "occurrence-count";
1307
+ "per-target-occurrences": "per-target-occurrences";
1308
+ "heading-bytes": "heading-bytes";
1309
+ "envelope-bytes": "envelope-bytes";
1310
+ "presentation-label-bytes": "presentation-label-bytes";
1311
+ "presentation-detail-bytes": "presentation-detail-bytes";
1312
+ "presentation-url-bytes": "presentation-url-bytes";
1313
+ "presentation-bytes": "presentation-bytes";
1314
+ }>>;
1315
+ attemptRevision: z.ZodNumber;
1316
+ statusDigest: z.ZodString;
1317
+ sourceFile: z.ZodObject<{
1318
+ kind: z.ZodLiteral<"thread-storage">;
1319
+ threadId: z.ZodString;
1320
+ path: z.ZodLiteral<"BRIEF.md">;
1321
+ }, z.core.$loose>;
1322
+ applicability: z.ZodEnum<{
1323
+ current: "current";
1324
+ "superseded-by-graph": "superseded-by-graph";
1325
+ }>;
1326
+ }, z.core.$loose>]>>;
1327
+ revisionHighWater: z.ZodNumber;
1328
+ }, z.core.$loose>;
1329
+ }, z.core.$loose>;
1330
+ };
1331
+ readonly crossReferencesProducerV1ReportStatus: {
1332
+ readonly input: z.ZodObject<{
1333
+ version: z.ZodLiteral<1>;
1334
+ producerPluginId: z.ZodLiteral<"thread-brief">;
1335
+ source: z.ZodObject<{
1336
+ provider: z.ZodString;
1337
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1338
+ }, z.core.$strict>;
1339
+ sourceFile: z.ZodObject<{
1340
+ kind: z.ZodLiteral<"thread-storage">;
1341
+ threadId: z.ZodString;
1342
+ path: z.ZodLiteral<"BRIEF.md">;
1343
+ }, z.core.$strict>;
1344
+ attemptRevision: z.ZodNumber;
1345
+ expectedRevision: z.ZodNumber;
1346
+ statusDigest: z.ZodString;
1347
+ status: z.ZodDiscriminatedUnion<[z.ZodObject<{
1348
+ state: z.ZodLiteral<"over-limit">;
1349
+ sourceContentRevision: z.ZodString;
1350
+ limits: z.ZodArray<z.ZodEnum<{
1351
+ "target-count": "target-count";
1352
+ "projection-bytes": "projection-bytes";
1353
+ "occurrence-count": "occurrence-count";
1354
+ "per-target-occurrences": "per-target-occurrences";
1355
+ "heading-bytes": "heading-bytes";
1356
+ "envelope-bytes": "envelope-bytes";
1357
+ "presentation-label-bytes": "presentation-label-bytes";
1358
+ "presentation-detail-bytes": "presentation-detail-bytes";
1359
+ "presentation-url-bytes": "presentation-url-bytes";
1360
+ "presentation-bytes": "presentation-bytes";
1361
+ }>>;
1362
+ }, z.core.$strict>, z.ZodObject<{
1363
+ state: z.ZodLiteral<"identity-unrepresentable">;
1364
+ sourceContentRevision: z.ZodString;
1365
+ identityReasons: z.ZodArray<z.ZodEnum<{
1366
+ "unsafe-required-identity": "unsafe-required-identity";
1367
+ "unsupported-required-codec": "unsupported-required-codec";
1368
+ "required-identity-bound": "required-identity-bound";
1369
+ }>>;
1370
+ limits: z.ZodArray<z.ZodEnum<{
1371
+ "target-count": "target-count";
1372
+ "projection-bytes": "projection-bytes";
1373
+ "occurrence-count": "occurrence-count";
1374
+ "per-target-occurrences": "per-target-occurrences";
1375
+ "heading-bytes": "heading-bytes";
1376
+ "envelope-bytes": "envelope-bytes";
1377
+ "presentation-label-bytes": "presentation-label-bytes";
1378
+ "presentation-detail-bytes": "presentation-detail-bytes";
1379
+ "presentation-url-bytes": "presentation-url-bytes";
1380
+ "presentation-bytes": "presentation-bytes";
1381
+ }>>;
1382
+ }, z.core.$strict>], "state">;
1383
+ }, z.core.$strict>;
1384
+ readonly output: z.ZodObject<{
1385
+ version: z.ZodLiteral<1>;
1386
+ outcome: z.ZodEnum<{
1387
+ duplicate: "duplicate";
1388
+ stale: "stale";
1389
+ conflict: "conflict";
1390
+ "cas-mismatch": "cas-mismatch";
1391
+ recorded: "recorded";
1392
+ }>;
1393
+ state: z.ZodObject<{
1394
+ version: z.ZodLiteral<1>;
1395
+ projection: z.ZodNullable<z.ZodObject<{
1396
+ producerPluginId: z.ZodString;
1397
+ source: z.ZodObject<{
1398
+ provider: z.ZodString;
1399
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1400
+ presentation: z.ZodObject<{
1401
+ label: z.ZodString;
1402
+ detail: z.ZodOptional<z.ZodString>;
1403
+ url: z.ZodOptional<z.ZodString>;
1404
+ }, z.core.$loose>;
1405
+ }, z.core.$loose>;
1406
+ revision: z.ZodNumber;
1407
+ mutationId: z.ZodString;
1408
+ payloadDigest: z.ZodString;
1409
+ tombstone: z.ZodBoolean;
1410
+ targets: z.ZodArray<z.ZodObject<{
1411
+ provider: z.ZodString;
1412
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
1413
+ presentation: z.ZodObject<{
1414
+ label: z.ZodString;
1415
+ detail: z.ZodOptional<z.ZodString>;
1416
+ url: z.ZodOptional<z.ZodString>;
1417
+ }, z.core.$loose>;
1418
+ }, z.core.$loose>>;
1419
+ }, z.core.$loose>>;
1420
+ evidence: z.ZodNullable<z.ZodObject<{
1421
+ kind: z.ZodLiteral<"thread-brief">;
1422
+ graphRevision: z.ZodNumber;
1423
+ graphPayloadDigest: z.ZodString;
1424
+ evidenceDigest: z.ZodString;
1425
+ sourceContentRevision: z.ZodNullable<z.ZodString>;
1426
+ state: z.ZodEnum<{
1427
+ bound: "bound";
1428
+ unconfirmed: "unconfirmed";
1429
+ }>;
1430
+ sourceState: z.ZodEnum<{
1431
+ present: "present";
1432
+ absent: "absent";
1433
+ empty: "empty";
1434
+ }>;
1435
+ occurrenceCount: z.ZodNumber;
1436
+ }, z.core.$loose>>;
1437
+ status: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
1438
+ state: z.ZodLiteral<"over-limit">;
1439
+ sourceContentRevision: z.ZodString;
1440
+ limits: z.ZodArray<z.ZodEnum<{
1441
+ "target-count": "target-count";
1442
+ "projection-bytes": "projection-bytes";
1443
+ "occurrence-count": "occurrence-count";
1444
+ "per-target-occurrences": "per-target-occurrences";
1445
+ "heading-bytes": "heading-bytes";
1446
+ "envelope-bytes": "envelope-bytes";
1447
+ "presentation-label-bytes": "presentation-label-bytes";
1448
+ "presentation-detail-bytes": "presentation-detail-bytes";
1449
+ "presentation-url-bytes": "presentation-url-bytes";
1450
+ "presentation-bytes": "presentation-bytes";
1451
+ }>>;
1452
+ attemptRevision: z.ZodNumber;
1453
+ statusDigest: z.ZodString;
1454
+ sourceFile: z.ZodObject<{
1455
+ kind: z.ZodLiteral<"thread-storage">;
1456
+ threadId: z.ZodString;
1457
+ path: z.ZodLiteral<"BRIEF.md">;
1458
+ }, z.core.$loose>;
1459
+ applicability: z.ZodEnum<{
1460
+ current: "current";
1461
+ "superseded-by-graph": "superseded-by-graph";
1462
+ }>;
1463
+ }, z.core.$loose>, z.ZodObject<{
1464
+ state: z.ZodLiteral<"identity-unrepresentable">;
1465
+ sourceContentRevision: z.ZodString;
1466
+ identityReasons: z.ZodArray<z.ZodEnum<{
1467
+ "unsafe-required-identity": "unsafe-required-identity";
1468
+ "unsupported-required-codec": "unsupported-required-codec";
1469
+ "required-identity-bound": "required-identity-bound";
1470
+ }>>;
1471
+ limits: z.ZodArray<z.ZodEnum<{
1472
+ "target-count": "target-count";
1473
+ "projection-bytes": "projection-bytes";
1474
+ "occurrence-count": "occurrence-count";
1475
+ "per-target-occurrences": "per-target-occurrences";
1476
+ "heading-bytes": "heading-bytes";
1477
+ "envelope-bytes": "envelope-bytes";
1478
+ "presentation-label-bytes": "presentation-label-bytes";
1479
+ "presentation-detail-bytes": "presentation-detail-bytes";
1480
+ "presentation-url-bytes": "presentation-url-bytes";
1481
+ "presentation-bytes": "presentation-bytes";
1482
+ }>>;
1483
+ attemptRevision: z.ZodNumber;
1484
+ statusDigest: z.ZodString;
1485
+ sourceFile: z.ZodObject<{
1486
+ kind: z.ZodLiteral<"thread-storage">;
1487
+ threadId: z.ZodString;
1488
+ path: z.ZodLiteral<"BRIEF.md">;
1489
+ }, z.core.$loose>;
1490
+ applicability: z.ZodEnum<{
1491
+ current: "current";
1492
+ "superseded-by-graph": "superseded-by-graph";
1493
+ }>;
1494
+ }, z.core.$loose>]>>;
1495
+ revisionHighWater: z.ZodNumber;
1496
+ }, z.core.$loose>;
1497
+ }, z.core.$loose>;
1498
+ };
1499
+ }, ns: {
1500
+ readonly "threadBriefNavigation.describe": {
1501
+ readonly input: z.ZodNull;
1502
+ readonly output: z.ZodObject<{
1503
+ protocol: z.ZodLiteral<"thread-brief-navigation">;
1504
+ versions: z.ZodArray<z.ZodNumber>;
1505
+ renderedReaderVersions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1506
+ }, z.core.$loose>;
1507
+ };
1508
+ readonly threadBriefNavigationV1ResolveHeading: {
1509
+ readonly input: z.ZodObject<{
1510
+ version: z.ZodLiteral<1>;
1511
+ sourceFile: z.ZodObject<{
1512
+ kind: z.ZodLiteral<"thread-storage">;
1513
+ threadId: z.ZodString;
1514
+ path: z.ZodLiteral<"BRIEF.md">;
1515
+ }, z.core.$strict>;
1516
+ sourceContentRevision: z.ZodString;
1517
+ frame: z.ZodObject<{
1518
+ codec: z.ZodLiteral<"utf8-fatal-bom-consumed-v1">;
1519
+ rawBytes: z.ZodNumber;
1520
+ bomBytes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<3>]>;
1521
+ fileUtf16Length: z.ZodNumber;
1522
+ bodyBase: z.ZodObject<{
1523
+ startUtf16: z.ZodNumber;
1524
+ startLine: z.ZodNumber;
1525
+ utf16Length: z.ZodNumber;
1526
+ }, z.core.$strict>;
1527
+ lineMapping: z.ZodObject<{
1528
+ codec: z.ZodLiteral<"native-file-lines-v1">;
1529
+ fileLineCount: z.ZodNumber;
1530
+ }, z.core.$strict>;
1531
+ }, z.core.$strict>;
1532
+ section: z.ZodObject<{
1533
+ heading: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1534
+ state: z.ZodLiteral<"named">;
1535
+ text: z.ZodString;
1536
+ }, z.core.$strict>, z.ZodObject<{
1537
+ state: z.ZodLiteral<"withheld">;
1538
+ digest: z.ZodString;
1539
+ display: z.ZodLiteral<"Heading withheld">;
1540
+ cause: z.ZodEnum<{
1541
+ policy: "policy";
1542
+ unclassified: "unclassified";
1543
+ }>;
1544
+ }, z.core.$strict>]>;
1545
+ originalLine: z.ZodNumber;
1546
+ }, z.core.$strict>;
1547
+ }, z.core.$strict>;
1548
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
1549
+ version: z.ZodLiteral<1>;
1550
+ state: z.ZodLiteral<"ready">;
1551
+ sourceFile: z.ZodObject<{
1552
+ kind: z.ZodLiteral<"thread-storage">;
1553
+ threadId: z.ZodString;
1554
+ path: z.ZodLiteral<"BRIEF.md">;
1555
+ }, z.core.$loose>;
1556
+ sourceContentRevision: z.ZodString;
1557
+ location: z.ZodObject<{
1558
+ kind: z.ZodLiteral<"line">;
1559
+ line: z.ZodNumber;
1560
+ column: z.ZodNull;
1561
+ }, z.core.$loose>;
1562
+ proof: z.ZodObject<{
1563
+ kind: z.ZodLiteral<"accepted-revision-revalidated">;
1564
+ acceptedRevision: z.ZodString;
1565
+ selection: z.ZodLiteral<"same-revision">;
1566
+ frame: z.ZodObject<{
1567
+ codec: z.ZodLiteral<"utf8-fatal-bom-consumed-v1">;
1568
+ rawBytes: z.ZodNumber;
1569
+ bomBytes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<3>]>;
1570
+ fileUtf16Length: z.ZodNumber;
1571
+ bodyBase: z.ZodObject<{
1572
+ startUtf16: z.ZodNumber;
1573
+ startLine: z.ZodNumber;
1574
+ utf16Length: z.ZodNumber;
1575
+ }, z.core.$loose>;
1576
+ lineMapping: z.ZodObject<{
1577
+ codec: z.ZodLiteral<"native-file-lines-v1">;
1578
+ fileLineCount: z.ZodNumber;
1579
+ }, z.core.$loose>;
1580
+ }, z.core.$loose>;
1581
+ }, z.core.$loose>;
1582
+ reader: z.ZodOptional<z.ZodObject<{
1583
+ kind: z.ZodLiteral<"thread-brief-reader">;
1584
+ version: z.ZodLiteral<1>;
1585
+ owner: z.ZodLiteral<"thread-brief">;
1586
+ path: z.ZodLiteral<"reveal">;
1587
+ threadId: z.ZodString;
1588
+ token: z.ZodString;
1589
+ }, z.core.$loose>>;
1590
+ }, z.core.$loose>, z.ZodObject<{
1591
+ version: z.ZodLiteral<1>;
1592
+ state: z.ZodLiteral<"fallback">;
1593
+ sourceFile: z.ZodObject<{
1594
+ kind: z.ZodLiteral<"thread-storage">;
1595
+ threadId: z.ZodString;
1596
+ path: z.ZodLiteral<"BRIEF.md">;
1597
+ }, z.core.$loose>;
1598
+ location: z.ZodNull;
1599
+ reason: z.ZodEnum<{
1600
+ stale: "stale";
1601
+ "over-limit": "over-limit";
1602
+ "no-accepted-document": "no-accepted-document";
1603
+ ambiguous: "ambiguous";
1604
+ "heading-unavailable": "heading-unavailable";
1605
+ "source-unavailable": "source-unavailable";
1606
+ }>;
1607
+ reader: z.ZodOptional<z.ZodObject<{
1608
+ kind: z.ZodLiteral<"thread-brief-reader">;
1609
+ version: z.ZodLiteral<1>;
1610
+ owner: z.ZodLiteral<"thread-brief">;
1611
+ path: z.ZodLiteral<"reveal">;
1612
+ threadId: z.ZodString;
1613
+ token: z.ZodString;
1614
+ }, z.core.$loose>>;
1615
+ }, z.core.$loose>], "state">;
1616
+ };
1617
+ };
1618
+ export declare const crossReferencesProducerRpcContract: {
1619
+ readonly "crossReferencesProducer.describe": {
1620
+ readonly input: StandardSchemaV1<null, null>;
1621
+ readonly output: StandardSchemaV1<{
1622
+ [x: string]: unknown;
1623
+ protocol: "cross-references-producer";
1624
+ versions: number[];
1625
+ sourceKinds: "thread-brief"[];
1626
+ limits: {
1627
+ [x: string]: unknown;
1628
+ inputBytes: number;
1629
+ statusBytes: number;
1630
+ locations: number;
1631
+ perTarget: number;
1632
+ headingBytes: number;
1633
+ limitCodes: string[];
1634
+ };
1635
+ }, {
1636
+ [x: string]: unknown;
1637
+ protocol: "cross-references-producer";
1638
+ versions: number[];
1639
+ sourceKinds: "thread-brief"[];
1640
+ limits: {
1641
+ [x: string]: unknown;
1642
+ inputBytes: number;
1643
+ statusBytes: number;
1644
+ locations: number;
1645
+ perTarget: number;
1646
+ headingBytes: number;
1647
+ limitCodes: string[];
1648
+ };
1649
+ }>;
1650
+ };
1651
+ readonly crossReferencesProducerV1GetState: {
1652
+ readonly input: StandardSchemaV1<{
1653
+ version: 1;
1654
+ producerPluginId: "thread-brief";
1655
+ source: {
1656
+ provider: string;
1657
+ keys: Record<string, string>;
1658
+ };
1659
+ }, {
1660
+ version: 1;
1661
+ producerPluginId: "thread-brief";
1662
+ source: {
1663
+ provider: string;
1664
+ keys: Record<string, string>;
1665
+ };
1666
+ }>;
1667
+ readonly output: StandardSchemaV1<{
1668
+ [x: string]: unknown;
1669
+ version: 1;
1670
+ projection: {
1671
+ [x: string]: unknown;
1672
+ producerPluginId: string;
1673
+ source: {
1674
+ [x: string]: unknown;
1675
+ provider: string;
1676
+ keys: Record<string, string>;
1677
+ presentation: {
1678
+ [x: string]: unknown;
1679
+ label: string;
1680
+ detail?: string | undefined;
1681
+ url?: string | undefined;
1682
+ };
1683
+ };
1684
+ revision: number;
1685
+ mutationId: string;
1686
+ payloadDigest: string;
1687
+ tombstone: boolean;
1688
+ targets: {
1689
+ [x: string]: unknown;
1690
+ provider: string;
1691
+ keys: Record<string, string>;
1692
+ presentation: {
1693
+ [x: string]: unknown;
1694
+ label: string;
1695
+ detail?: string | undefined;
1696
+ url?: string | undefined;
1697
+ };
1698
+ }[];
1699
+ } | null;
1700
+ evidence: {
1701
+ [x: string]: unknown;
1702
+ kind: "thread-brief";
1703
+ graphRevision: number;
1704
+ graphPayloadDigest: string;
1705
+ evidenceDigest: string;
1706
+ sourceContentRevision: string | null;
1707
+ state: "bound" | "unconfirmed";
1708
+ sourceState: "present" | "absent" | "empty";
1709
+ occurrenceCount: number;
1710
+ } | null;
1711
+ status: {
1712
+ [x: string]: unknown;
1713
+ state: "over-limit";
1714
+ sourceContentRevision: string;
1715
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
1716
+ attemptRevision: number;
1717
+ statusDigest: string;
1718
+ sourceFile: {
1719
+ [x: string]: unknown;
1720
+ kind: "thread-storage";
1721
+ threadId: string;
1722
+ path: "BRIEF.md";
1723
+ };
1724
+ applicability: "current" | "superseded-by-graph";
1725
+ } | {
1726
+ [x: string]: unknown;
1727
+ state: "identity-unrepresentable";
1728
+ sourceContentRevision: string;
1729
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
1730
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
1731
+ attemptRevision: number;
1732
+ statusDigest: string;
1733
+ sourceFile: {
1734
+ [x: string]: unknown;
1735
+ kind: "thread-storage";
1736
+ threadId: string;
1737
+ path: "BRIEF.md";
1738
+ };
1739
+ applicability: "current" | "superseded-by-graph";
1740
+ } | null;
1741
+ revisionHighWater: number;
1742
+ }, {
1743
+ [x: string]: unknown;
1744
+ version: 1;
1745
+ projection: {
1746
+ [x: string]: unknown;
1747
+ producerPluginId: string;
1748
+ source: {
1749
+ [x: string]: unknown;
1750
+ provider: string;
1751
+ keys: Record<string, string>;
1752
+ presentation: {
1753
+ [x: string]: unknown;
1754
+ label: string;
1755
+ detail?: string | undefined;
1756
+ url?: string | undefined;
1757
+ };
1758
+ };
1759
+ revision: number;
1760
+ mutationId: string;
1761
+ payloadDigest: string;
1762
+ tombstone: boolean;
1763
+ targets: {
1764
+ [x: string]: unknown;
1765
+ provider: string;
1766
+ keys: Record<string, string>;
1767
+ presentation: {
1768
+ [x: string]: unknown;
1769
+ label: string;
1770
+ detail?: string | undefined;
1771
+ url?: string | undefined;
1772
+ };
1773
+ }[];
1774
+ } | null;
1775
+ evidence: {
1776
+ [x: string]: unknown;
1777
+ kind: "thread-brief";
1778
+ graphRevision: number;
1779
+ graphPayloadDigest: string;
1780
+ evidenceDigest: string;
1781
+ sourceContentRevision: string | null;
1782
+ state: "bound" | "unconfirmed";
1783
+ sourceState: "present" | "absent" | "empty";
1784
+ occurrenceCount: number;
1785
+ } | null;
1786
+ status: {
1787
+ [x: string]: unknown;
1788
+ state: "over-limit";
1789
+ sourceContentRevision: string;
1790
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
1791
+ attemptRevision: number;
1792
+ statusDigest: string;
1793
+ sourceFile: {
1794
+ [x: string]: unknown;
1795
+ kind: "thread-storage";
1796
+ threadId: string;
1797
+ path: "BRIEF.md";
1798
+ };
1799
+ applicability: "current" | "superseded-by-graph";
1800
+ } | {
1801
+ [x: string]: unknown;
1802
+ state: "identity-unrepresentable";
1803
+ sourceContentRevision: string;
1804
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
1805
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
1806
+ attemptRevision: number;
1807
+ statusDigest: string;
1808
+ sourceFile: {
1809
+ [x: string]: unknown;
1810
+ kind: "thread-storage";
1811
+ threadId: string;
1812
+ path: "BRIEF.md";
1813
+ };
1814
+ applicability: "current" | "superseded-by-graph";
1815
+ } | null;
1816
+ revisionHighWater: number;
1817
+ }>;
1818
+ };
1819
+ readonly crossReferencesProducerV1Apply: {
1820
+ readonly input: StandardSchemaV1<{
1821
+ version: 1;
1822
+ projection: {
1823
+ protocolVersion: 1;
1824
+ producerPluginId: string;
1825
+ mutationId: string;
1826
+ source: {
1827
+ provider: string;
1828
+ keys: Record<string, string>;
1829
+ presentation: {
1830
+ label: string;
1831
+ detail?: string | undefined;
1832
+ url?: string | undefined;
1833
+ };
1834
+ };
1835
+ revision: number;
1836
+ expectedRevision: number;
1837
+ payloadDigest: string;
1838
+ tombstone: boolean;
1839
+ targets: {
1840
+ provider: string;
1841
+ keys: Record<string, string>;
1842
+ presentation: {
1843
+ label: string;
1844
+ detail?: string | undefined;
1845
+ url?: string | undefined;
1846
+ };
1847
+ }[];
1848
+ };
1849
+ evidence: {
1850
+ kind: "thread-brief";
1851
+ sourceFile: {
1852
+ kind: "thread-storage";
1853
+ threadId: string;
1854
+ path: "BRIEF.md";
1855
+ };
1856
+ sourceState: "present" | "absent" | "empty";
1857
+ sourceContentRevision: string | null;
1858
+ completeness: {
1859
+ state: "complete";
1860
+ codecVersion: 1;
1861
+ };
1862
+ metadataPolicyVersion: 1;
1863
+ frame: {
1864
+ codec: "utf8-fatal-bom-consumed-v1";
1865
+ rawBytes: number;
1866
+ bomBytes: 0 | 3;
1867
+ fileUtf16Length: number;
1868
+ bodyBase: {
1869
+ startUtf16: number;
1870
+ startLine: number;
1871
+ utf16Length: number;
1872
+ };
1873
+ lineMapping: {
1874
+ codec: "native-file-lines-v1";
1875
+ fileLineCount: number;
1876
+ };
1877
+ } | null;
1878
+ sourcePresentation: {
1879
+ label: {
1880
+ state: "safe";
1881
+ text: string;
1882
+ } | {
1883
+ state: "withheld";
1884
+ digest: string;
1885
+ display: "Brief";
1886
+ cause: "policy" | "unclassified";
1887
+ };
1888
+ detail: {
1889
+ state: "safe";
1890
+ text: string;
1891
+ } | {
1892
+ state: "withheld";
1893
+ digest: string;
1894
+ display: "Details withheld";
1895
+ cause: "policy" | "unclassified";
1896
+ } | null;
1897
+ url: {
1898
+ state: "absent";
1899
+ } | {
1900
+ state: "exact";
1901
+ href: string;
1902
+ } | {
1903
+ state: "withheld";
1904
+ digest: string;
1905
+ display: "Destination withheld";
1906
+ cause: "policy" | "unclassified";
1907
+ };
1908
+ };
1909
+ targetDescriptors: {
1910
+ target: {
1911
+ provider: string;
1912
+ keys: Record<string, string>;
1913
+ };
1914
+ presentation: {
1915
+ label: {
1916
+ state: "safe";
1917
+ text: string;
1918
+ } | {
1919
+ state: "withheld";
1920
+ digest: string;
1921
+ display: "Reference";
1922
+ cause: "policy" | "unclassified";
1923
+ };
1924
+ detail: {
1925
+ state: "safe";
1926
+ text: string;
1927
+ } | {
1928
+ state: "withheld";
1929
+ digest: string;
1930
+ display: "Details withheld";
1931
+ cause: "policy" | "unclassified";
1932
+ } | null;
1933
+ url: {
1934
+ state: "absent";
1935
+ } | {
1936
+ state: "exact";
1937
+ href: string;
1938
+ } | {
1939
+ state: "withheld";
1940
+ digest: string;
1941
+ display: "Destination withheld";
1942
+ cause: "policy" | "unclassified";
1943
+ };
1944
+ };
1945
+ codec: {
1946
+ state: "available";
1947
+ value: {
1948
+ kind: "recognition";
1949
+ source: {
1950
+ provider: string;
1951
+ id: string;
1952
+ kind?: string | undefined;
1953
+ };
1954
+ } | {
1955
+ kind: "thread";
1956
+ source: {
1957
+ provider: string;
1958
+ id: string;
1959
+ kind?: string | undefined;
1960
+ };
1961
+ verified: {
1962
+ id: string;
1963
+ projectId: string;
1964
+ };
1965
+ } | {
1966
+ kind: "file";
1967
+ verified: {
1968
+ kind: "workspace";
1969
+ environmentId: string;
1970
+ path: string;
1971
+ } | {
1972
+ kind: "thread-storage";
1973
+ threadId: string;
1974
+ path: string;
1975
+ };
1976
+ } | {
1977
+ kind: "url";
1978
+ href: string;
1979
+ };
1980
+ } | {
1981
+ state: "withheld";
1982
+ digest: string;
1983
+ display: "Identity metadata withheld";
1984
+ cause: "policy" | "unclassified";
1985
+ };
1986
+ }[];
1987
+ occurrences: {
1988
+ occurrenceKey: string;
1989
+ sourceOccurrenceId: string;
1990
+ target: {
1991
+ provider: string;
1992
+ keys: Record<string, string>;
1993
+ };
1994
+ locator: {
1995
+ kind: "thread-brief";
1996
+ threadId: string;
1997
+ file: {
1998
+ kind: "thread-storage";
1999
+ threadId: string;
2000
+ path: "BRIEF.md";
2001
+ };
2002
+ sourceContentRevision: string;
2003
+ section: {
2004
+ heading: {
2005
+ state: "named";
2006
+ text: string;
2007
+ } | {
2008
+ state: "withheld";
2009
+ digest: string;
2010
+ display: "Heading withheld";
2011
+ cause: "policy" | "unclassified";
2012
+ } | null;
2013
+ line: number;
2014
+ };
2015
+ location: {
2016
+ kind: "line";
2017
+ line: number;
2018
+ column: number | null;
2019
+ endLine: number | null;
2020
+ };
2021
+ span?: {
2022
+ frame: "file-utf16" | "body-utf16";
2023
+ start: number;
2024
+ end: number;
2025
+ } | undefined;
2026
+ };
2027
+ provenance: {
2028
+ state: "safe";
2029
+ value: {
2030
+ pluginId: string;
2031
+ origin: "builtin" | "contributed";
2032
+ confidence: "high" | "medium" | "low";
2033
+ recognition: {
2034
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2035
+ explanation: string;
2036
+ evidence?: {
2037
+ span?: {
2038
+ start: number;
2039
+ end: number;
2040
+ } | undefined;
2041
+ link?: number | undefined;
2042
+ remote?: string | undefined;
2043
+ } | undefined;
2044
+ };
2045
+ source: {
2046
+ provider: string;
2047
+ id: string;
2048
+ kind?: string | undefined;
2049
+ };
2050
+ authoredHref?: string | undefined;
2051
+ verifiedFile?: {
2052
+ kind: "workspace";
2053
+ environmentId: string;
2054
+ path: string;
2055
+ } | {
2056
+ kind: "thread-storage";
2057
+ threadId: string;
2058
+ path: string;
2059
+ } | undefined;
2060
+ };
2061
+ } | {
2062
+ state: "withheld";
2063
+ digest: string;
2064
+ display: "Recognition details withheld";
2065
+ cause: "policy" | "unclassified";
2066
+ summary: {
2067
+ pluginId: string;
2068
+ origin: "builtin" | "contributed";
2069
+ confidence: "high" | "medium" | "low";
2070
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2071
+ };
2072
+ };
2073
+ authoredUrl: {
2074
+ state: "withheld";
2075
+ digest: string;
2076
+ display: "Destination withheld";
2077
+ cause: "policy" | "unclassified";
2078
+ } | {
2079
+ state: "exact";
2080
+ href: string;
2081
+ } | {
2082
+ state: "not-url";
2083
+ } | {
2084
+ state: "unknown";
2085
+ };
2086
+ }[];
2087
+ };
2088
+ evidenceDigest: string;
2089
+ }, {
2090
+ version: 1;
2091
+ projection: ApplyProjectionInput;
2092
+ evidence: {
2093
+ kind: "thread-brief";
2094
+ sourceFile: {
2095
+ kind: "thread-storage";
2096
+ threadId: string;
2097
+ path: "BRIEF.md";
2098
+ };
2099
+ sourceState: "present" | "absent" | "empty";
2100
+ sourceContentRevision: string | null;
2101
+ completeness: {
2102
+ state: "complete";
2103
+ codecVersion: 1;
2104
+ };
2105
+ metadataPolicyVersion: 1;
2106
+ frame: {
2107
+ codec: "utf8-fatal-bom-consumed-v1";
2108
+ rawBytes: number;
2109
+ bomBytes: 0 | 3;
2110
+ fileUtf16Length: number;
2111
+ bodyBase: {
2112
+ startUtf16: number;
2113
+ startLine: number;
2114
+ utf16Length: number;
2115
+ };
2116
+ lineMapping: {
2117
+ codec: "native-file-lines-v1";
2118
+ fileLineCount: number;
2119
+ };
2120
+ } | null;
2121
+ sourcePresentation: {
2122
+ label: {
2123
+ state: "safe";
2124
+ text: string;
2125
+ } | {
2126
+ state: "withheld";
2127
+ digest: string;
2128
+ display: "Brief";
2129
+ cause: "policy" | "unclassified";
2130
+ };
2131
+ detail: {
2132
+ state: "safe";
2133
+ text: string;
2134
+ } | {
2135
+ state: "withheld";
2136
+ digest: string;
2137
+ display: "Details withheld";
2138
+ cause: "policy" | "unclassified";
2139
+ } | null;
2140
+ url: {
2141
+ state: "withheld";
2142
+ digest: string;
2143
+ display: "Destination withheld";
2144
+ cause: "policy" | "unclassified";
2145
+ } | {
2146
+ state: "absent";
2147
+ } | {
2148
+ state: "exact";
2149
+ href: string;
2150
+ };
2151
+ };
2152
+ targetDescriptors: {
2153
+ target: {
2154
+ provider: string;
2155
+ keys: Record<string, string>;
2156
+ };
2157
+ presentation: {
2158
+ label: {
2159
+ state: "safe";
2160
+ text: string;
2161
+ } | {
2162
+ state: "withheld";
2163
+ digest: string;
2164
+ display: "Reference";
2165
+ cause: "policy" | "unclassified";
2166
+ };
2167
+ detail: {
2168
+ state: "safe";
2169
+ text: string;
2170
+ } | {
2171
+ state: "withheld";
2172
+ digest: string;
2173
+ display: "Details withheld";
2174
+ cause: "policy" | "unclassified";
2175
+ } | null;
2176
+ url: {
2177
+ state: "withheld";
2178
+ digest: string;
2179
+ display: "Destination withheld";
2180
+ cause: "policy" | "unclassified";
2181
+ } | {
2182
+ state: "absent";
2183
+ } | {
2184
+ state: "exact";
2185
+ href: string;
2186
+ };
2187
+ };
2188
+ codec: {
2189
+ state: "available";
2190
+ value: {
2191
+ kind: "recognition";
2192
+ source: {
2193
+ provider: string;
2194
+ id: string;
2195
+ kind?: string | undefined;
2196
+ };
2197
+ } | {
2198
+ kind: "thread";
2199
+ source: {
2200
+ provider: string;
2201
+ id: string;
2202
+ kind?: string | undefined;
2203
+ };
2204
+ verified: {
2205
+ id: string;
2206
+ projectId: string;
2207
+ };
2208
+ } | {
2209
+ kind: "file";
2210
+ verified: {
2211
+ kind: "workspace";
2212
+ environmentId: string;
2213
+ path: string;
2214
+ } | {
2215
+ kind: "thread-storage";
2216
+ threadId: string;
2217
+ path: string;
2218
+ };
2219
+ } | {
2220
+ kind: "url";
2221
+ href: string;
2222
+ };
2223
+ } | {
2224
+ state: "withheld";
2225
+ digest: string;
2226
+ display: "Identity metadata withheld";
2227
+ cause: "policy" | "unclassified";
2228
+ };
2229
+ }[];
2230
+ occurrences: {
2231
+ occurrenceKey: string;
2232
+ sourceOccurrenceId: string;
2233
+ target: {
2234
+ provider: string;
2235
+ keys: Record<string, string>;
2236
+ };
2237
+ locator: {
2238
+ kind: "thread-brief";
2239
+ threadId: string;
2240
+ file: {
2241
+ kind: "thread-storage";
2242
+ threadId: string;
2243
+ path: "BRIEF.md";
2244
+ };
2245
+ sourceContentRevision: string;
2246
+ section: {
2247
+ heading: {
2248
+ state: "named";
2249
+ text: string;
2250
+ } | {
2251
+ state: "withheld";
2252
+ digest: string;
2253
+ display: "Heading withheld";
2254
+ cause: "policy" | "unclassified";
2255
+ } | null;
2256
+ line: number;
2257
+ };
2258
+ location: {
2259
+ kind: "line";
2260
+ line: number;
2261
+ column: number | null;
2262
+ endLine: number | null;
2263
+ };
2264
+ span?: {
2265
+ frame: "file-utf16" | "body-utf16";
2266
+ start: number;
2267
+ end: number;
2268
+ } | undefined;
2269
+ };
2270
+ provenance: {
2271
+ state: "safe";
2272
+ value: {
2273
+ pluginId: string;
2274
+ origin: "builtin" | "contributed";
2275
+ confidence: "high" | "medium" | "low";
2276
+ recognition: {
2277
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2278
+ explanation: string;
2279
+ evidence?: {
2280
+ span?: {
2281
+ start: number;
2282
+ end: number;
2283
+ } | undefined;
2284
+ link?: number | undefined;
2285
+ remote?: string | undefined;
2286
+ } | undefined;
2287
+ };
2288
+ source: {
2289
+ provider: string;
2290
+ id: string;
2291
+ kind?: string | undefined;
2292
+ };
2293
+ authoredHref?: string | undefined;
2294
+ verifiedFile?: {
2295
+ kind: "workspace";
2296
+ environmentId: string;
2297
+ path: string;
2298
+ } | {
2299
+ kind: "thread-storage";
2300
+ threadId: string;
2301
+ path: string;
2302
+ } | undefined;
2303
+ };
2304
+ } | {
2305
+ state: "withheld";
2306
+ digest: string;
2307
+ display: "Recognition details withheld";
2308
+ cause: "policy" | "unclassified";
2309
+ summary: {
2310
+ pluginId: string;
2311
+ origin: "builtin" | "contributed";
2312
+ confidence: "high" | "medium" | "low";
2313
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2314
+ };
2315
+ };
2316
+ authoredUrl: {
2317
+ state: "withheld";
2318
+ digest: string;
2319
+ display: "Destination withheld";
2320
+ cause: "policy" | "unclassified";
2321
+ } | {
2322
+ state: "exact";
2323
+ href: string;
2324
+ } | {
2325
+ state: "not-url";
2326
+ } | {
2327
+ state: "unknown";
2328
+ };
2329
+ }[];
2330
+ };
2331
+ evidenceDigest: string;
2332
+ }>;
2333
+ readonly output: StandardSchemaV1<{
2334
+ [x: string]: unknown;
2335
+ version: 1;
2336
+ outcome: "applied" | "duplicate" | "equal" | "stale" | "conflict" | "cas-mismatch";
2337
+ currentRevision: number;
2338
+ currentDigest: string | null;
2339
+ evidenceDisposition: "conflict" | "installed" | "replayed" | "not-applied";
2340
+ state: {
2341
+ [x: string]: unknown;
2342
+ version: 1;
2343
+ projection: {
2344
+ [x: string]: unknown;
2345
+ producerPluginId: string;
2346
+ source: {
2347
+ [x: string]: unknown;
2348
+ provider: string;
2349
+ keys: Record<string, string>;
2350
+ presentation: {
2351
+ [x: string]: unknown;
2352
+ label: string;
2353
+ detail?: string | undefined;
2354
+ url?: string | undefined;
2355
+ };
2356
+ };
2357
+ revision: number;
2358
+ mutationId: string;
2359
+ payloadDigest: string;
2360
+ tombstone: boolean;
2361
+ targets: {
2362
+ [x: string]: unknown;
2363
+ provider: string;
2364
+ keys: Record<string, string>;
2365
+ presentation: {
2366
+ [x: string]: unknown;
2367
+ label: string;
2368
+ detail?: string | undefined;
2369
+ url?: string | undefined;
2370
+ };
2371
+ }[];
2372
+ } | null;
2373
+ evidence: {
2374
+ [x: string]: unknown;
2375
+ kind: "thread-brief";
2376
+ graphRevision: number;
2377
+ graphPayloadDigest: string;
2378
+ evidenceDigest: string;
2379
+ sourceContentRevision: string | null;
2380
+ state: "bound" | "unconfirmed";
2381
+ sourceState: "present" | "absent" | "empty";
2382
+ occurrenceCount: number;
2383
+ } | null;
2384
+ status: {
2385
+ [x: string]: unknown;
2386
+ state: "over-limit";
2387
+ sourceContentRevision: string;
2388
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2389
+ attemptRevision: number;
2390
+ statusDigest: string;
2391
+ sourceFile: {
2392
+ [x: string]: unknown;
2393
+ kind: "thread-storage";
2394
+ threadId: string;
2395
+ path: "BRIEF.md";
2396
+ };
2397
+ applicability: "current" | "superseded-by-graph";
2398
+ } | {
2399
+ [x: string]: unknown;
2400
+ state: "identity-unrepresentable";
2401
+ sourceContentRevision: string;
2402
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2403
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2404
+ attemptRevision: number;
2405
+ statusDigest: string;
2406
+ sourceFile: {
2407
+ [x: string]: unknown;
2408
+ kind: "thread-storage";
2409
+ threadId: string;
2410
+ path: "BRIEF.md";
2411
+ };
2412
+ applicability: "current" | "superseded-by-graph";
2413
+ } | null;
2414
+ revisionHighWater: number;
2415
+ };
2416
+ }, {
2417
+ [x: string]: unknown;
2418
+ version: 1;
2419
+ outcome: "applied" | "duplicate" | "equal" | "stale" | "conflict" | "cas-mismatch";
2420
+ currentRevision: number;
2421
+ currentDigest: string | null;
2422
+ evidenceDisposition: "conflict" | "installed" | "replayed" | "not-applied";
2423
+ state: {
2424
+ [x: string]: unknown;
2425
+ version: 1;
2426
+ projection: {
2427
+ [x: string]: unknown;
2428
+ producerPluginId: string;
2429
+ source: {
2430
+ [x: string]: unknown;
2431
+ provider: string;
2432
+ keys: Record<string, string>;
2433
+ presentation: {
2434
+ [x: string]: unknown;
2435
+ label: string;
2436
+ detail?: string | undefined;
2437
+ url?: string | undefined;
2438
+ };
2439
+ };
2440
+ revision: number;
2441
+ mutationId: string;
2442
+ payloadDigest: string;
2443
+ tombstone: boolean;
2444
+ targets: {
2445
+ [x: string]: unknown;
2446
+ provider: string;
2447
+ keys: Record<string, string>;
2448
+ presentation: {
2449
+ [x: string]: unknown;
2450
+ label: string;
2451
+ detail?: string | undefined;
2452
+ url?: string | undefined;
2453
+ };
2454
+ }[];
2455
+ } | null;
2456
+ evidence: {
2457
+ [x: string]: unknown;
2458
+ kind: "thread-brief";
2459
+ graphRevision: number;
2460
+ graphPayloadDigest: string;
2461
+ evidenceDigest: string;
2462
+ sourceContentRevision: string | null;
2463
+ state: "bound" | "unconfirmed";
2464
+ sourceState: "present" | "absent" | "empty";
2465
+ occurrenceCount: number;
2466
+ } | null;
2467
+ status: {
2468
+ [x: string]: unknown;
2469
+ state: "over-limit";
2470
+ sourceContentRevision: string;
2471
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2472
+ attemptRevision: number;
2473
+ statusDigest: string;
2474
+ sourceFile: {
2475
+ [x: string]: unknown;
2476
+ kind: "thread-storage";
2477
+ threadId: string;
2478
+ path: "BRIEF.md";
2479
+ };
2480
+ applicability: "current" | "superseded-by-graph";
2481
+ } | {
2482
+ [x: string]: unknown;
2483
+ state: "identity-unrepresentable";
2484
+ sourceContentRevision: string;
2485
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2486
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2487
+ attemptRevision: number;
2488
+ statusDigest: string;
2489
+ sourceFile: {
2490
+ [x: string]: unknown;
2491
+ kind: "thread-storage";
2492
+ threadId: string;
2493
+ path: "BRIEF.md";
2494
+ };
2495
+ applicability: "current" | "superseded-by-graph";
2496
+ } | null;
2497
+ revisionHighWater: number;
2498
+ };
2499
+ }>;
2500
+ };
2501
+ readonly crossReferencesProducerV1ReportStatus: {
2502
+ readonly input: StandardSchemaV1<{
2503
+ version: 1;
2504
+ producerPluginId: "thread-brief";
2505
+ source: {
2506
+ provider: string;
2507
+ keys: Record<string, string>;
2508
+ };
2509
+ sourceFile: {
2510
+ kind: "thread-storage";
2511
+ threadId: string;
2512
+ path: "BRIEF.md";
2513
+ };
2514
+ attemptRevision: number;
2515
+ expectedRevision: number;
2516
+ statusDigest: string;
2517
+ status: {
2518
+ state: "over-limit";
2519
+ sourceContentRevision: string;
2520
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2521
+ } | {
2522
+ state: "identity-unrepresentable";
2523
+ sourceContentRevision: string;
2524
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2525
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2526
+ };
2527
+ }, {
2528
+ version: 1;
2529
+ producerPluginId: "thread-brief";
2530
+ source: {
2531
+ provider: string;
2532
+ keys: Record<string, string>;
2533
+ };
2534
+ sourceFile: {
2535
+ kind: "thread-storage";
2536
+ threadId: string;
2537
+ path: "BRIEF.md";
2538
+ };
2539
+ attemptRevision: number;
2540
+ expectedRevision: number;
2541
+ statusDigest: string;
2542
+ status: {
2543
+ state: "over-limit";
2544
+ sourceContentRevision: string;
2545
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2546
+ } | {
2547
+ state: "identity-unrepresentable";
2548
+ sourceContentRevision: string;
2549
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2550
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2551
+ };
2552
+ }>;
2553
+ readonly output: StandardSchemaV1<{
2554
+ [x: string]: unknown;
2555
+ version: 1;
2556
+ outcome: "duplicate" | "stale" | "conflict" | "cas-mismatch" | "recorded";
2557
+ state: {
2558
+ [x: string]: unknown;
2559
+ version: 1;
2560
+ projection: {
2561
+ [x: string]: unknown;
2562
+ producerPluginId: string;
2563
+ source: {
2564
+ [x: string]: unknown;
2565
+ provider: string;
2566
+ keys: Record<string, string>;
2567
+ presentation: {
2568
+ [x: string]: unknown;
2569
+ label: string;
2570
+ detail?: string | undefined;
2571
+ url?: string | undefined;
2572
+ };
2573
+ };
2574
+ revision: number;
2575
+ mutationId: string;
2576
+ payloadDigest: string;
2577
+ tombstone: boolean;
2578
+ targets: {
2579
+ [x: string]: unknown;
2580
+ provider: string;
2581
+ keys: Record<string, string>;
2582
+ presentation: {
2583
+ [x: string]: unknown;
2584
+ label: string;
2585
+ detail?: string | undefined;
2586
+ url?: string | undefined;
2587
+ };
2588
+ }[];
2589
+ } | null;
2590
+ evidence: {
2591
+ [x: string]: unknown;
2592
+ kind: "thread-brief";
2593
+ graphRevision: number;
2594
+ graphPayloadDigest: string;
2595
+ evidenceDigest: string;
2596
+ sourceContentRevision: string | null;
2597
+ state: "bound" | "unconfirmed";
2598
+ sourceState: "present" | "absent" | "empty";
2599
+ occurrenceCount: number;
2600
+ } | null;
2601
+ status: {
2602
+ [x: string]: unknown;
2603
+ state: "over-limit";
2604
+ sourceContentRevision: string;
2605
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2606
+ attemptRevision: number;
2607
+ statusDigest: string;
2608
+ sourceFile: {
2609
+ [x: string]: unknown;
2610
+ kind: "thread-storage";
2611
+ threadId: string;
2612
+ path: "BRIEF.md";
2613
+ };
2614
+ applicability: "current" | "superseded-by-graph";
2615
+ } | {
2616
+ [x: string]: unknown;
2617
+ state: "identity-unrepresentable";
2618
+ sourceContentRevision: string;
2619
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2620
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2621
+ attemptRevision: number;
2622
+ statusDigest: string;
2623
+ sourceFile: {
2624
+ [x: string]: unknown;
2625
+ kind: "thread-storage";
2626
+ threadId: string;
2627
+ path: "BRIEF.md";
2628
+ };
2629
+ applicability: "current" | "superseded-by-graph";
2630
+ } | null;
2631
+ revisionHighWater: number;
2632
+ };
2633
+ }, {
2634
+ [x: string]: unknown;
2635
+ version: 1;
2636
+ outcome: "duplicate" | "stale" | "conflict" | "cas-mismatch" | "recorded";
2637
+ state: {
2638
+ [x: string]: unknown;
2639
+ version: 1;
2640
+ projection: {
2641
+ [x: string]: unknown;
2642
+ producerPluginId: string;
2643
+ source: {
2644
+ [x: string]: unknown;
2645
+ provider: string;
2646
+ keys: Record<string, string>;
2647
+ presentation: {
2648
+ [x: string]: unknown;
2649
+ label: string;
2650
+ detail?: string | undefined;
2651
+ url?: string | undefined;
2652
+ };
2653
+ };
2654
+ revision: number;
2655
+ mutationId: string;
2656
+ payloadDigest: string;
2657
+ tombstone: boolean;
2658
+ targets: {
2659
+ [x: string]: unknown;
2660
+ provider: string;
2661
+ keys: Record<string, string>;
2662
+ presentation: {
2663
+ [x: string]: unknown;
2664
+ label: string;
2665
+ detail?: string | undefined;
2666
+ url?: string | undefined;
2667
+ };
2668
+ }[];
2669
+ } | null;
2670
+ evidence: {
2671
+ [x: string]: unknown;
2672
+ kind: "thread-brief";
2673
+ graphRevision: number;
2674
+ graphPayloadDigest: string;
2675
+ evidenceDigest: string;
2676
+ sourceContentRevision: string | null;
2677
+ state: "bound" | "unconfirmed";
2678
+ sourceState: "present" | "absent" | "empty";
2679
+ occurrenceCount: number;
2680
+ } | null;
2681
+ status: {
2682
+ [x: string]: unknown;
2683
+ state: "over-limit";
2684
+ sourceContentRevision: string;
2685
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2686
+ attemptRevision: number;
2687
+ statusDigest: string;
2688
+ sourceFile: {
2689
+ [x: string]: unknown;
2690
+ kind: "thread-storage";
2691
+ threadId: string;
2692
+ path: "BRIEF.md";
2693
+ };
2694
+ applicability: "current" | "superseded-by-graph";
2695
+ } | {
2696
+ [x: string]: unknown;
2697
+ state: "identity-unrepresentable";
2698
+ sourceContentRevision: string;
2699
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2700
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
2701
+ attemptRevision: number;
2702
+ statusDigest: string;
2703
+ sourceFile: {
2704
+ [x: string]: unknown;
2705
+ kind: "thread-storage";
2706
+ threadId: string;
2707
+ path: "BRIEF.md";
2708
+ };
2709
+ applicability: "current" | "superseded-by-graph";
2710
+ } | null;
2711
+ revisionHighWater: number;
2712
+ };
2713
+ }>;
2714
+ };
2715
+ };
2716
+ export declare function registerCrossReferencesProducer(bb: Pick<BbPluginApi, 'rpc'>, handlers: {
2717
+ 'crossReferencesProducer.describe': () => z.output<typeof ps['crossReferencesProducer.describe']['output']>;
2718
+ crossReferencesProducerV1GetState: (input: ProducerGetStateInput) => ProducerState | Promise<ProducerState>;
2719
+ crossReferencesProducerV1Apply: (input: ProducerApplyInput) => ProducerApplyOutput | Promise<ProducerApplyOutput>;
2720
+ crossReferencesProducerV1ReportStatus: (input: ProducerReportStatusInput) => ProducerReportStatusOutput | Promise<ProducerReportStatusOutput>;
2721
+ }): void;
2722
+ export declare const briefNavigationRpcContract: {
2723
+ readonly "threadBriefNavigation.describe": {
2724
+ readonly input: StandardSchemaV1<null, null>;
2725
+ readonly output: StandardSchemaV1<{
2726
+ [x: string]: unknown;
2727
+ protocol: "thread-brief-navigation";
2728
+ versions: number[];
2729
+ renderedReaderVersions?: number[] | undefined;
2730
+ }, {
2731
+ [x: string]: unknown;
2732
+ protocol: "thread-brief-navigation";
2733
+ versions: number[];
2734
+ renderedReaderVersions?: number[] | undefined;
2735
+ }>;
2736
+ };
2737
+ readonly threadBriefNavigationV1ResolveHeading: {
2738
+ readonly input: StandardSchemaV1<{
2739
+ version: 1;
2740
+ sourceFile: {
2741
+ kind: "thread-storage";
2742
+ threadId: string;
2743
+ path: "BRIEF.md";
2744
+ };
2745
+ sourceContentRevision: string;
2746
+ frame: {
2747
+ codec: "utf8-fatal-bom-consumed-v1";
2748
+ rawBytes: number;
2749
+ bomBytes: 0 | 3;
2750
+ fileUtf16Length: number;
2751
+ bodyBase: {
2752
+ startUtf16: number;
2753
+ startLine: number;
2754
+ utf16Length: number;
2755
+ };
2756
+ lineMapping: {
2757
+ codec: "native-file-lines-v1";
2758
+ fileLineCount: number;
2759
+ };
2760
+ };
2761
+ section: {
2762
+ heading: {
2763
+ state: "named";
2764
+ text: string;
2765
+ } | {
2766
+ state: "withheld";
2767
+ digest: string;
2768
+ display: "Heading withheld";
2769
+ cause: "policy" | "unclassified";
2770
+ } | null;
2771
+ originalLine: number;
2772
+ };
2773
+ }, {
2774
+ version: 1;
2775
+ sourceFile: {
2776
+ kind: "thread-storage";
2777
+ threadId: string;
2778
+ path: "BRIEF.md";
2779
+ };
2780
+ sourceContentRevision: string;
2781
+ frame: {
2782
+ codec: "utf8-fatal-bom-consumed-v1";
2783
+ rawBytes: number;
2784
+ bomBytes: 0 | 3;
2785
+ fileUtf16Length: number;
2786
+ bodyBase: {
2787
+ startUtf16: number;
2788
+ startLine: number;
2789
+ utf16Length: number;
2790
+ };
2791
+ lineMapping: {
2792
+ codec: "native-file-lines-v1";
2793
+ fileLineCount: number;
2794
+ };
2795
+ };
2796
+ section: {
2797
+ heading: {
2798
+ state: "named";
2799
+ text: string;
2800
+ } | {
2801
+ state: "withheld";
2802
+ digest: string;
2803
+ display: "Heading withheld";
2804
+ cause: "policy" | "unclassified";
2805
+ } | null;
2806
+ originalLine: number;
2807
+ };
2808
+ }>;
2809
+ readonly output: StandardSchemaV1<{
2810
+ [x: string]: unknown;
2811
+ version: 1;
2812
+ state: "ready";
2813
+ sourceFile: {
2814
+ [x: string]: unknown;
2815
+ kind: "thread-storage";
2816
+ threadId: string;
2817
+ path: "BRIEF.md";
2818
+ };
2819
+ sourceContentRevision: string;
2820
+ location: {
2821
+ [x: string]: unknown;
2822
+ kind: "line";
2823
+ line: number;
2824
+ column: null;
2825
+ };
2826
+ proof: {
2827
+ [x: string]: unknown;
2828
+ kind: "accepted-revision-revalidated";
2829
+ acceptedRevision: string;
2830
+ selection: "same-revision";
2831
+ frame: {
2832
+ [x: string]: unknown;
2833
+ codec: "utf8-fatal-bom-consumed-v1";
2834
+ rawBytes: number;
2835
+ bomBytes: 0 | 3;
2836
+ fileUtf16Length: number;
2837
+ bodyBase: {
2838
+ [x: string]: unknown;
2839
+ startUtf16: number;
2840
+ startLine: number;
2841
+ utf16Length: number;
2842
+ };
2843
+ lineMapping: {
2844
+ [x: string]: unknown;
2845
+ codec: "native-file-lines-v1";
2846
+ fileLineCount: number;
2847
+ };
2848
+ };
2849
+ };
2850
+ reader?: {
2851
+ [x: string]: unknown;
2852
+ kind: "thread-brief-reader";
2853
+ version: 1;
2854
+ owner: "thread-brief";
2855
+ path: "reveal";
2856
+ threadId: string;
2857
+ token: string;
2858
+ } | undefined;
2859
+ } | {
2860
+ [x: string]: unknown;
2861
+ version: 1;
2862
+ state: "fallback";
2863
+ sourceFile: {
2864
+ [x: string]: unknown;
2865
+ kind: "thread-storage";
2866
+ threadId: string;
2867
+ path: "BRIEF.md";
2868
+ };
2869
+ location: null;
2870
+ reason: "stale" | "over-limit" | "no-accepted-document" | "ambiguous" | "heading-unavailable" | "source-unavailable";
2871
+ reader?: {
2872
+ [x: string]: unknown;
2873
+ kind: "thread-brief-reader";
2874
+ version: 1;
2875
+ owner: "thread-brief";
2876
+ path: "reveal";
2877
+ threadId: string;
2878
+ token: string;
2879
+ } | undefined;
2880
+ }, {
2881
+ [x: string]: unknown;
2882
+ version: 1;
2883
+ state: "ready";
2884
+ sourceFile: {
2885
+ [x: string]: unknown;
2886
+ kind: "thread-storage";
2887
+ threadId: string;
2888
+ path: "BRIEF.md";
2889
+ };
2890
+ sourceContentRevision: string;
2891
+ location: {
2892
+ [x: string]: unknown;
2893
+ kind: "line";
2894
+ line: number;
2895
+ column: null;
2896
+ };
2897
+ proof: {
2898
+ [x: string]: unknown;
2899
+ kind: "accepted-revision-revalidated";
2900
+ acceptedRevision: string;
2901
+ selection: "same-revision";
2902
+ frame: {
2903
+ [x: string]: unknown;
2904
+ codec: "utf8-fatal-bom-consumed-v1";
2905
+ rawBytes: number;
2906
+ bomBytes: 0 | 3;
2907
+ fileUtf16Length: number;
2908
+ bodyBase: {
2909
+ [x: string]: unknown;
2910
+ startUtf16: number;
2911
+ startLine: number;
2912
+ utf16Length: number;
2913
+ };
2914
+ lineMapping: {
2915
+ [x: string]: unknown;
2916
+ codec: "native-file-lines-v1";
2917
+ fileLineCount: number;
2918
+ };
2919
+ };
2920
+ };
2921
+ reader?: {
2922
+ [x: string]: unknown;
2923
+ kind: "thread-brief-reader";
2924
+ version: 1;
2925
+ owner: "thread-brief";
2926
+ path: "reveal";
2927
+ threadId: string;
2928
+ token: string;
2929
+ } | undefined;
2930
+ } | {
2931
+ [x: string]: unknown;
2932
+ version: 1;
2933
+ state: "fallback";
2934
+ sourceFile: {
2935
+ [x: string]: unknown;
2936
+ kind: "thread-storage";
2937
+ threadId: string;
2938
+ path: "BRIEF.md";
2939
+ };
2940
+ location: null;
2941
+ reason: "stale" | "over-limit" | "no-accepted-document" | "ambiguous" | "heading-unavailable" | "source-unavailable";
2942
+ reader?: {
2943
+ [x: string]: unknown;
2944
+ kind: "thread-brief-reader";
2945
+ version: 1;
2946
+ owner: "thread-brief";
2947
+ path: "reveal";
2948
+ threadId: string;
2949
+ token: string;
2950
+ } | undefined;
2951
+ }>;
2952
+ };
2953
+ };
2954
+ export declare function registerBriefNavigation(bb: Pick<BbPluginApi, 'rpc'>, handlers: {
2955
+ 'threadBriefNavigation.describe': () => z.output<typeof ns['threadBriefNavigation.describe']['output']>;
2956
+ threadBriefNavigationV1ResolveHeading: (input: BriefNavigationInput) => BriefNavigationOutput | Promise<BriefNavigationOutput>;
2957
+ }): void;
2958
+ export declare function createCrossReferencesProducerClient(sdk: CrossReferencesSdk, pluginId?: string, options?: CrossReferencesClientOptions): {
2959
+ pluginId: string;
2960
+ describe(signal?: AbortSignal): Promise<{
2961
+ [x: string]: unknown;
2962
+ protocol: "cross-references-producer";
2963
+ versions: number[];
2964
+ sourceKinds: "thread-brief"[];
2965
+ limits: {
2966
+ [x: string]: unknown;
2967
+ inputBytes: number;
2968
+ statusBytes: number;
2969
+ locations: number;
2970
+ perTarget: number;
2971
+ headingBytes: number;
2972
+ limitCodes: string[];
2973
+ };
2974
+ }>;
2975
+ getState: (input: ProducerGetStateInput, signal?: AbortSignal) => Promise<{
2976
+ [x: string]: unknown;
2977
+ version: 1;
2978
+ projection: {
2979
+ [x: string]: unknown;
2980
+ producerPluginId: string;
2981
+ source: {
2982
+ [x: string]: unknown;
2983
+ provider: string;
2984
+ keys: Record<string, string>;
2985
+ presentation: {
2986
+ [x: string]: unknown;
2987
+ label: string;
2988
+ detail?: string | undefined;
2989
+ url?: string | undefined;
2990
+ };
2991
+ };
2992
+ revision: number;
2993
+ mutationId: string;
2994
+ payloadDigest: string;
2995
+ tombstone: boolean;
2996
+ targets: {
2997
+ [x: string]: unknown;
2998
+ provider: string;
2999
+ keys: Record<string, string>;
3000
+ presentation: {
3001
+ [x: string]: unknown;
3002
+ label: string;
3003
+ detail?: string | undefined;
3004
+ url?: string | undefined;
3005
+ };
3006
+ }[];
3007
+ } | null;
3008
+ evidence: {
3009
+ [x: string]: unknown;
3010
+ kind: "thread-brief";
3011
+ graphRevision: number;
3012
+ graphPayloadDigest: string;
3013
+ evidenceDigest: string;
3014
+ sourceContentRevision: string | null;
3015
+ state: "bound" | "unconfirmed";
3016
+ sourceState: "present" | "absent" | "empty";
3017
+ occurrenceCount: number;
3018
+ } | null;
3019
+ status: {
3020
+ [x: string]: unknown;
3021
+ state: "over-limit";
3022
+ sourceContentRevision: string;
3023
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
3024
+ attemptRevision: number;
3025
+ statusDigest: string;
3026
+ sourceFile: {
3027
+ [x: string]: unknown;
3028
+ kind: "thread-storage";
3029
+ threadId: string;
3030
+ path: "BRIEF.md";
3031
+ };
3032
+ applicability: "current" | "superseded-by-graph";
3033
+ } | {
3034
+ [x: string]: unknown;
3035
+ state: "identity-unrepresentable";
3036
+ sourceContentRevision: string;
3037
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
3038
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
3039
+ attemptRevision: number;
3040
+ statusDigest: string;
3041
+ sourceFile: {
3042
+ [x: string]: unknown;
3043
+ kind: "thread-storage";
3044
+ threadId: string;
3045
+ path: "BRIEF.md";
3046
+ };
3047
+ applicability: "current" | "superseded-by-graph";
3048
+ } | null;
3049
+ revisionHighWater: number;
3050
+ }>;
3051
+ apply(input: ProducerApplyInput, signal?: AbortSignal): Promise<{
3052
+ [x: string]: unknown;
3053
+ version: 1;
3054
+ outcome: "applied" | "duplicate" | "equal" | "stale" | "conflict" | "cas-mismatch";
3055
+ currentRevision: number;
3056
+ currentDigest: string | null;
3057
+ evidenceDisposition: "conflict" | "installed" | "replayed" | "not-applied";
3058
+ state: {
3059
+ [x: string]: unknown;
3060
+ version: 1;
3061
+ projection: {
3062
+ [x: string]: unknown;
3063
+ producerPluginId: string;
3064
+ source: {
3065
+ [x: string]: unknown;
3066
+ provider: string;
3067
+ keys: Record<string, string>;
3068
+ presentation: {
3069
+ [x: string]: unknown;
3070
+ label: string;
3071
+ detail?: string | undefined;
3072
+ url?: string | undefined;
3073
+ };
3074
+ };
3075
+ revision: number;
3076
+ mutationId: string;
3077
+ payloadDigest: string;
3078
+ tombstone: boolean;
3079
+ targets: {
3080
+ [x: string]: unknown;
3081
+ provider: string;
3082
+ keys: Record<string, string>;
3083
+ presentation: {
3084
+ [x: string]: unknown;
3085
+ label: string;
3086
+ detail?: string | undefined;
3087
+ url?: string | undefined;
3088
+ };
3089
+ }[];
3090
+ } | null;
3091
+ evidence: {
3092
+ [x: string]: unknown;
3093
+ kind: "thread-brief";
3094
+ graphRevision: number;
3095
+ graphPayloadDigest: string;
3096
+ evidenceDigest: string;
3097
+ sourceContentRevision: string | null;
3098
+ state: "bound" | "unconfirmed";
3099
+ sourceState: "present" | "absent" | "empty";
3100
+ occurrenceCount: number;
3101
+ } | null;
3102
+ status: {
3103
+ [x: string]: unknown;
3104
+ state: "over-limit";
3105
+ sourceContentRevision: string;
3106
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
3107
+ attemptRevision: number;
3108
+ statusDigest: string;
3109
+ sourceFile: {
3110
+ [x: string]: unknown;
3111
+ kind: "thread-storage";
3112
+ threadId: string;
3113
+ path: "BRIEF.md";
3114
+ };
3115
+ applicability: "current" | "superseded-by-graph";
3116
+ } | {
3117
+ [x: string]: unknown;
3118
+ state: "identity-unrepresentable";
3119
+ sourceContentRevision: string;
3120
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
3121
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
3122
+ attemptRevision: number;
3123
+ statusDigest: string;
3124
+ sourceFile: {
3125
+ [x: string]: unknown;
3126
+ kind: "thread-storage";
3127
+ threadId: string;
3128
+ path: "BRIEF.md";
3129
+ };
3130
+ applicability: "current" | "superseded-by-graph";
3131
+ } | null;
3132
+ revisionHighWater: number;
3133
+ };
3134
+ }>;
3135
+ reportStatus: (input: ProducerReportStatusInput, signal?: AbortSignal) => Promise<{
3136
+ [x: string]: unknown;
3137
+ version: 1;
3138
+ outcome: "duplicate" | "stale" | "conflict" | "cas-mismatch" | "recorded";
3139
+ state: {
3140
+ [x: string]: unknown;
3141
+ version: 1;
3142
+ projection: {
3143
+ [x: string]: unknown;
3144
+ producerPluginId: string;
3145
+ source: {
3146
+ [x: string]: unknown;
3147
+ provider: string;
3148
+ keys: Record<string, string>;
3149
+ presentation: {
3150
+ [x: string]: unknown;
3151
+ label: string;
3152
+ detail?: string | undefined;
3153
+ url?: string | undefined;
3154
+ };
3155
+ };
3156
+ revision: number;
3157
+ mutationId: string;
3158
+ payloadDigest: string;
3159
+ tombstone: boolean;
3160
+ targets: {
3161
+ [x: string]: unknown;
3162
+ provider: string;
3163
+ keys: Record<string, string>;
3164
+ presentation: {
3165
+ [x: string]: unknown;
3166
+ label: string;
3167
+ detail?: string | undefined;
3168
+ url?: string | undefined;
3169
+ };
3170
+ }[];
3171
+ } | null;
3172
+ evidence: {
3173
+ [x: string]: unknown;
3174
+ kind: "thread-brief";
3175
+ graphRevision: number;
3176
+ graphPayloadDigest: string;
3177
+ evidenceDigest: string;
3178
+ sourceContentRevision: string | null;
3179
+ state: "bound" | "unconfirmed";
3180
+ sourceState: "present" | "absent" | "empty";
3181
+ occurrenceCount: number;
3182
+ } | null;
3183
+ status: {
3184
+ [x: string]: unknown;
3185
+ state: "over-limit";
3186
+ sourceContentRevision: string;
3187
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
3188
+ attemptRevision: number;
3189
+ statusDigest: string;
3190
+ sourceFile: {
3191
+ [x: string]: unknown;
3192
+ kind: "thread-storage";
3193
+ threadId: string;
3194
+ path: "BRIEF.md";
3195
+ };
3196
+ applicability: "current" | "superseded-by-graph";
3197
+ } | {
3198
+ [x: string]: unknown;
3199
+ state: "identity-unrepresentable";
3200
+ sourceContentRevision: string;
3201
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
3202
+ limits: ("target-count" | "projection-bytes" | "occurrence-count" | "per-target-occurrences" | "heading-bytes" | "envelope-bytes" | "presentation-label-bytes" | "presentation-detail-bytes" | "presentation-url-bytes" | "presentation-bytes")[];
3203
+ attemptRevision: number;
3204
+ statusDigest: string;
3205
+ sourceFile: {
3206
+ [x: string]: unknown;
3207
+ kind: "thread-storage";
3208
+ threadId: string;
3209
+ path: "BRIEF.md";
3210
+ };
3211
+ applicability: "current" | "superseded-by-graph";
3212
+ } | null;
3213
+ revisionHighWater: number;
3214
+ };
3215
+ }>;
3216
+ };
3217
+ export type CrossReferencesProducerClient = ReturnType<typeof createCrossReferencesProducerClient>;
3218
+ export declare function createBriefNavigationClient(sdk: CrossReferencesSdk, options?: CrossReferencesClientOptions): {
3219
+ describe(signal?: AbortSignal): Promise<{
3220
+ [x: string]: unknown;
3221
+ protocol: "thread-brief-navigation";
3222
+ versions: number[];
3223
+ renderedReaderVersions?: number[] | undefined;
3224
+ }>;
3225
+ resolve(input: BriefNavigationInput, signal?: AbortSignal): Promise<{
3226
+ [x: string]: unknown;
3227
+ version: 1;
3228
+ state: "ready";
3229
+ sourceFile: {
3230
+ [x: string]: unknown;
3231
+ kind: "thread-storage";
3232
+ threadId: string;
3233
+ path: "BRIEF.md";
3234
+ };
3235
+ sourceContentRevision: string;
3236
+ location: {
3237
+ [x: string]: unknown;
3238
+ kind: "line";
3239
+ line: number;
3240
+ column: null;
3241
+ };
3242
+ proof: {
3243
+ [x: string]: unknown;
3244
+ kind: "accepted-revision-revalidated";
3245
+ acceptedRevision: string;
3246
+ selection: "same-revision";
3247
+ frame: {
3248
+ [x: string]: unknown;
3249
+ codec: "utf8-fatal-bom-consumed-v1";
3250
+ rawBytes: number;
3251
+ bomBytes: 0 | 3;
3252
+ fileUtf16Length: number;
3253
+ bodyBase: {
3254
+ [x: string]: unknown;
3255
+ startUtf16: number;
3256
+ startLine: number;
3257
+ utf16Length: number;
3258
+ };
3259
+ lineMapping: {
3260
+ [x: string]: unknown;
3261
+ codec: "native-file-lines-v1";
3262
+ fileLineCount: number;
3263
+ };
3264
+ };
3265
+ };
3266
+ reader?: {
3267
+ [x: string]: unknown;
3268
+ kind: "thread-brief-reader";
3269
+ version: 1;
3270
+ owner: "thread-brief";
3271
+ path: "reveal";
3272
+ threadId: string;
3273
+ token: string;
3274
+ } | undefined;
3275
+ } | {
3276
+ [x: string]: unknown;
3277
+ version: 1;
3278
+ state: "fallback";
3279
+ sourceFile: {
3280
+ [x: string]: unknown;
3281
+ kind: "thread-storage";
3282
+ threadId: string;
3283
+ path: "BRIEF.md";
3284
+ };
3285
+ location: null;
3286
+ reason: "stale" | "over-limit" | "no-accepted-document" | "ambiguous" | "heading-unavailable" | "source-unavailable";
3287
+ reader?: {
3288
+ [x: string]: unknown;
3289
+ kind: "thread-brief-reader";
3290
+ version: 1;
3291
+ owner: "thread-brief";
3292
+ path: "reveal";
3293
+ threadId: string;
3294
+ token: string;
3295
+ } | undefined;
3296
+ }>;
3297
+ };
3298
+ export {};