@phosphorco/bb-cross-references 0.3.0 → 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.
@@ -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,2513 @@ 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
+ }, z.core.$loose>;
1506
+ };
1507
+ readonly threadBriefNavigationV1ResolveHeading: {
1508
+ readonly input: z.ZodObject<{
1509
+ version: z.ZodLiteral<1>;
1510
+ sourceFile: z.ZodObject<{
1511
+ kind: z.ZodLiteral<"thread-storage">;
1512
+ threadId: z.ZodString;
1513
+ path: z.ZodLiteral<"BRIEF.md">;
1514
+ }, z.core.$strict>;
1515
+ sourceContentRevision: z.ZodString;
1516
+ frame: z.ZodObject<{
1517
+ codec: z.ZodLiteral<"utf8-fatal-bom-consumed-v1">;
1518
+ rawBytes: z.ZodNumber;
1519
+ bomBytes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<3>]>;
1520
+ fileUtf16Length: z.ZodNumber;
1521
+ bodyBase: z.ZodObject<{
1522
+ startUtf16: z.ZodNumber;
1523
+ startLine: z.ZodNumber;
1524
+ utf16Length: z.ZodNumber;
1525
+ }, z.core.$strict>;
1526
+ lineMapping: z.ZodObject<{
1527
+ codec: z.ZodLiteral<"native-file-lines-v1">;
1528
+ fileLineCount: z.ZodNumber;
1529
+ }, z.core.$strict>;
1530
+ }, z.core.$strict>;
1531
+ section: z.ZodObject<{
1532
+ heading: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1533
+ state: z.ZodLiteral<"named">;
1534
+ text: z.ZodString;
1535
+ }, z.core.$strict>, z.ZodObject<{
1536
+ state: z.ZodLiteral<"withheld">;
1537
+ digest: z.ZodString;
1538
+ display: z.ZodLiteral<"Heading withheld">;
1539
+ cause: z.ZodEnum<{
1540
+ policy: "policy";
1541
+ unclassified: "unclassified";
1542
+ }>;
1543
+ }, z.core.$strict>]>;
1544
+ originalLine: z.ZodNumber;
1545
+ }, z.core.$strict>;
1546
+ }, z.core.$strict>;
1547
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
1548
+ version: z.ZodLiteral<1>;
1549
+ state: z.ZodLiteral<"ready">;
1550
+ sourceFile: z.ZodObject<{
1551
+ kind: z.ZodLiteral<"thread-storage">;
1552
+ threadId: z.ZodString;
1553
+ path: z.ZodLiteral<"BRIEF.md">;
1554
+ }, z.core.$loose>;
1555
+ sourceContentRevision: z.ZodString;
1556
+ location: z.ZodObject<{
1557
+ kind: z.ZodLiteral<"line">;
1558
+ line: z.ZodNumber;
1559
+ column: z.ZodNull;
1560
+ }, z.core.$loose>;
1561
+ proof: z.ZodObject<{
1562
+ kind: z.ZodLiteral<"accepted-revision-revalidated">;
1563
+ acceptedRevision: z.ZodString;
1564
+ selection: z.ZodLiteral<"same-revision">;
1565
+ frame: z.ZodObject<{
1566
+ codec: z.ZodLiteral<"utf8-fatal-bom-consumed-v1">;
1567
+ rawBytes: z.ZodNumber;
1568
+ bomBytes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<3>]>;
1569
+ fileUtf16Length: z.ZodNumber;
1570
+ bodyBase: z.ZodObject<{
1571
+ startUtf16: z.ZodNumber;
1572
+ startLine: z.ZodNumber;
1573
+ utf16Length: z.ZodNumber;
1574
+ }, z.core.$loose>;
1575
+ lineMapping: z.ZodObject<{
1576
+ codec: z.ZodLiteral<"native-file-lines-v1">;
1577
+ fileLineCount: z.ZodNumber;
1578
+ }, z.core.$loose>;
1579
+ }, z.core.$loose>;
1580
+ }, z.core.$loose>;
1581
+ }, z.core.$loose>, z.ZodObject<{
1582
+ version: z.ZodLiteral<1>;
1583
+ state: z.ZodLiteral<"fallback">;
1584
+ sourceFile: z.ZodObject<{
1585
+ kind: z.ZodLiteral<"thread-storage">;
1586
+ threadId: z.ZodString;
1587
+ path: z.ZodLiteral<"BRIEF.md">;
1588
+ }, z.core.$loose>;
1589
+ location: z.ZodNull;
1590
+ reason: z.ZodEnum<{
1591
+ stale: "stale";
1592
+ "over-limit": "over-limit";
1593
+ "no-accepted-document": "no-accepted-document";
1594
+ ambiguous: "ambiguous";
1595
+ "heading-unavailable": "heading-unavailable";
1596
+ "source-unavailable": "source-unavailable";
1597
+ }>;
1598
+ }, z.core.$loose>], "state">;
1599
+ };
1600
+ };
1601
+ export declare const crossReferencesProducerRpcContract: {
1602
+ readonly "crossReferencesProducer.describe": {
1603
+ readonly input: StandardSchemaV1<null, null>;
1604
+ readonly output: StandardSchemaV1<{
1605
+ [x: string]: unknown;
1606
+ protocol: "cross-references-producer";
1607
+ versions: number[];
1608
+ sourceKinds: "thread-brief"[];
1609
+ limits: {
1610
+ [x: string]: unknown;
1611
+ inputBytes: number;
1612
+ statusBytes: number;
1613
+ locations: number;
1614
+ perTarget: number;
1615
+ headingBytes: number;
1616
+ limitCodes: string[];
1617
+ };
1618
+ }, {
1619
+ [x: string]: unknown;
1620
+ protocol: "cross-references-producer";
1621
+ versions: number[];
1622
+ sourceKinds: "thread-brief"[];
1623
+ limits: {
1624
+ [x: string]: unknown;
1625
+ inputBytes: number;
1626
+ statusBytes: number;
1627
+ locations: number;
1628
+ perTarget: number;
1629
+ headingBytes: number;
1630
+ limitCodes: string[];
1631
+ };
1632
+ }>;
1633
+ };
1634
+ readonly crossReferencesProducerV1GetState: {
1635
+ readonly input: StandardSchemaV1<{
1636
+ version: 1;
1637
+ producerPluginId: "thread-brief";
1638
+ source: {
1639
+ provider: string;
1640
+ keys: Record<string, string>;
1641
+ };
1642
+ }, {
1643
+ version: 1;
1644
+ producerPluginId: "thread-brief";
1645
+ source: {
1646
+ provider: string;
1647
+ keys: Record<string, string>;
1648
+ };
1649
+ }>;
1650
+ readonly output: StandardSchemaV1<{
1651
+ [x: string]: unknown;
1652
+ version: 1;
1653
+ projection: {
1654
+ [x: string]: unknown;
1655
+ producerPluginId: string;
1656
+ source: {
1657
+ [x: string]: unknown;
1658
+ provider: string;
1659
+ keys: Record<string, string>;
1660
+ presentation: {
1661
+ [x: string]: unknown;
1662
+ label: string;
1663
+ detail?: string | undefined;
1664
+ url?: string | undefined;
1665
+ };
1666
+ };
1667
+ revision: number;
1668
+ mutationId: string;
1669
+ payloadDigest: string;
1670
+ tombstone: boolean;
1671
+ targets: {
1672
+ [x: string]: unknown;
1673
+ provider: string;
1674
+ keys: Record<string, string>;
1675
+ presentation: {
1676
+ [x: string]: unknown;
1677
+ label: string;
1678
+ detail?: string | undefined;
1679
+ url?: string | undefined;
1680
+ };
1681
+ }[];
1682
+ } | null;
1683
+ evidence: {
1684
+ [x: string]: unknown;
1685
+ kind: "thread-brief";
1686
+ graphRevision: number;
1687
+ graphPayloadDigest: string;
1688
+ evidenceDigest: string;
1689
+ sourceContentRevision: string | null;
1690
+ state: "bound" | "unconfirmed";
1691
+ sourceState: "present" | "absent" | "empty";
1692
+ occurrenceCount: number;
1693
+ } | null;
1694
+ status: {
1695
+ [x: string]: unknown;
1696
+ state: "over-limit";
1697
+ sourceContentRevision: string;
1698
+ 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")[];
1699
+ attemptRevision: number;
1700
+ statusDigest: string;
1701
+ sourceFile: {
1702
+ [x: string]: unknown;
1703
+ kind: "thread-storage";
1704
+ threadId: string;
1705
+ path: "BRIEF.md";
1706
+ };
1707
+ applicability: "current" | "superseded-by-graph";
1708
+ } | {
1709
+ [x: string]: unknown;
1710
+ state: "identity-unrepresentable";
1711
+ sourceContentRevision: string;
1712
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
1713
+ 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")[];
1714
+ attemptRevision: number;
1715
+ statusDigest: string;
1716
+ sourceFile: {
1717
+ [x: string]: unknown;
1718
+ kind: "thread-storage";
1719
+ threadId: string;
1720
+ path: "BRIEF.md";
1721
+ };
1722
+ applicability: "current" | "superseded-by-graph";
1723
+ } | null;
1724
+ revisionHighWater: number;
1725
+ }, {
1726
+ [x: string]: unknown;
1727
+ version: 1;
1728
+ projection: {
1729
+ [x: string]: unknown;
1730
+ producerPluginId: string;
1731
+ source: {
1732
+ [x: string]: unknown;
1733
+ provider: string;
1734
+ keys: Record<string, string>;
1735
+ presentation: {
1736
+ [x: string]: unknown;
1737
+ label: string;
1738
+ detail?: string | undefined;
1739
+ url?: string | undefined;
1740
+ };
1741
+ };
1742
+ revision: number;
1743
+ mutationId: string;
1744
+ payloadDigest: string;
1745
+ tombstone: boolean;
1746
+ targets: {
1747
+ [x: string]: unknown;
1748
+ provider: string;
1749
+ keys: Record<string, string>;
1750
+ presentation: {
1751
+ [x: string]: unknown;
1752
+ label: string;
1753
+ detail?: string | undefined;
1754
+ url?: string | undefined;
1755
+ };
1756
+ }[];
1757
+ } | null;
1758
+ evidence: {
1759
+ [x: string]: unknown;
1760
+ kind: "thread-brief";
1761
+ graphRevision: number;
1762
+ graphPayloadDigest: string;
1763
+ evidenceDigest: string;
1764
+ sourceContentRevision: string | null;
1765
+ state: "bound" | "unconfirmed";
1766
+ sourceState: "present" | "absent" | "empty";
1767
+ occurrenceCount: number;
1768
+ } | null;
1769
+ status: {
1770
+ [x: string]: unknown;
1771
+ state: "over-limit";
1772
+ sourceContentRevision: string;
1773
+ 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")[];
1774
+ attemptRevision: number;
1775
+ statusDigest: string;
1776
+ sourceFile: {
1777
+ [x: string]: unknown;
1778
+ kind: "thread-storage";
1779
+ threadId: string;
1780
+ path: "BRIEF.md";
1781
+ };
1782
+ applicability: "current" | "superseded-by-graph";
1783
+ } | {
1784
+ [x: string]: unknown;
1785
+ state: "identity-unrepresentable";
1786
+ sourceContentRevision: string;
1787
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
1788
+ 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")[];
1789
+ attemptRevision: number;
1790
+ statusDigest: string;
1791
+ sourceFile: {
1792
+ [x: string]: unknown;
1793
+ kind: "thread-storage";
1794
+ threadId: string;
1795
+ path: "BRIEF.md";
1796
+ };
1797
+ applicability: "current" | "superseded-by-graph";
1798
+ } | null;
1799
+ revisionHighWater: number;
1800
+ }>;
1801
+ };
1802
+ readonly crossReferencesProducerV1Apply: {
1803
+ readonly input: StandardSchemaV1<{
1804
+ version: 1;
1805
+ projection: {
1806
+ protocolVersion: 1;
1807
+ producerPluginId: string;
1808
+ mutationId: string;
1809
+ source: {
1810
+ provider: string;
1811
+ keys: Record<string, string>;
1812
+ presentation: {
1813
+ label: string;
1814
+ detail?: string | undefined;
1815
+ url?: string | undefined;
1816
+ };
1817
+ };
1818
+ revision: number;
1819
+ expectedRevision: number;
1820
+ payloadDigest: string;
1821
+ tombstone: boolean;
1822
+ targets: {
1823
+ provider: string;
1824
+ keys: Record<string, string>;
1825
+ presentation: {
1826
+ label: string;
1827
+ detail?: string | undefined;
1828
+ url?: string | undefined;
1829
+ };
1830
+ }[];
1831
+ };
1832
+ evidence: {
1833
+ kind: "thread-brief";
1834
+ sourceFile: {
1835
+ kind: "thread-storage";
1836
+ threadId: string;
1837
+ path: "BRIEF.md";
1838
+ };
1839
+ sourceState: "present" | "absent" | "empty";
1840
+ sourceContentRevision: string | null;
1841
+ completeness: {
1842
+ state: "complete";
1843
+ codecVersion: 1;
1844
+ };
1845
+ metadataPolicyVersion: 1;
1846
+ frame: {
1847
+ codec: "utf8-fatal-bom-consumed-v1";
1848
+ rawBytes: number;
1849
+ bomBytes: 0 | 3;
1850
+ fileUtf16Length: number;
1851
+ bodyBase: {
1852
+ startUtf16: number;
1853
+ startLine: number;
1854
+ utf16Length: number;
1855
+ };
1856
+ lineMapping: {
1857
+ codec: "native-file-lines-v1";
1858
+ fileLineCount: number;
1859
+ };
1860
+ } | null;
1861
+ sourcePresentation: {
1862
+ label: {
1863
+ state: "safe";
1864
+ text: string;
1865
+ } | {
1866
+ state: "withheld";
1867
+ digest: string;
1868
+ display: "Brief";
1869
+ cause: "policy" | "unclassified";
1870
+ };
1871
+ detail: {
1872
+ state: "safe";
1873
+ text: string;
1874
+ } | {
1875
+ state: "withheld";
1876
+ digest: string;
1877
+ display: "Details withheld";
1878
+ cause: "policy" | "unclassified";
1879
+ } | null;
1880
+ url: {
1881
+ state: "absent";
1882
+ } | {
1883
+ state: "exact";
1884
+ href: string;
1885
+ } | {
1886
+ state: "withheld";
1887
+ digest: string;
1888
+ display: "Destination withheld";
1889
+ cause: "policy" | "unclassified";
1890
+ };
1891
+ };
1892
+ targetDescriptors: {
1893
+ target: {
1894
+ provider: string;
1895
+ keys: Record<string, string>;
1896
+ };
1897
+ presentation: {
1898
+ label: {
1899
+ state: "safe";
1900
+ text: string;
1901
+ } | {
1902
+ state: "withheld";
1903
+ digest: string;
1904
+ display: "Reference";
1905
+ cause: "policy" | "unclassified";
1906
+ };
1907
+ detail: {
1908
+ state: "safe";
1909
+ text: string;
1910
+ } | {
1911
+ state: "withheld";
1912
+ digest: string;
1913
+ display: "Details withheld";
1914
+ cause: "policy" | "unclassified";
1915
+ } | null;
1916
+ url: {
1917
+ state: "absent";
1918
+ } | {
1919
+ state: "exact";
1920
+ href: string;
1921
+ } | {
1922
+ state: "withheld";
1923
+ digest: string;
1924
+ display: "Destination withheld";
1925
+ cause: "policy" | "unclassified";
1926
+ };
1927
+ };
1928
+ codec: {
1929
+ state: "available";
1930
+ value: {
1931
+ kind: "recognition";
1932
+ source: {
1933
+ provider: string;
1934
+ id: string;
1935
+ kind?: string | undefined;
1936
+ };
1937
+ } | {
1938
+ kind: "thread";
1939
+ source: {
1940
+ provider: string;
1941
+ id: string;
1942
+ kind?: string | undefined;
1943
+ };
1944
+ verified: {
1945
+ id: string;
1946
+ projectId: string;
1947
+ };
1948
+ } | {
1949
+ kind: "file";
1950
+ verified: {
1951
+ kind: "workspace";
1952
+ environmentId: string;
1953
+ path: string;
1954
+ } | {
1955
+ kind: "thread-storage";
1956
+ threadId: string;
1957
+ path: string;
1958
+ };
1959
+ } | {
1960
+ kind: "url";
1961
+ href: string;
1962
+ };
1963
+ } | {
1964
+ state: "withheld";
1965
+ digest: string;
1966
+ display: "Identity metadata withheld";
1967
+ cause: "policy" | "unclassified";
1968
+ };
1969
+ }[];
1970
+ occurrences: {
1971
+ occurrenceKey: string;
1972
+ sourceOccurrenceId: string;
1973
+ target: {
1974
+ provider: string;
1975
+ keys: Record<string, string>;
1976
+ };
1977
+ locator: {
1978
+ kind: "thread-brief";
1979
+ threadId: string;
1980
+ file: {
1981
+ kind: "thread-storage";
1982
+ threadId: string;
1983
+ path: "BRIEF.md";
1984
+ };
1985
+ sourceContentRevision: string;
1986
+ section: {
1987
+ heading: {
1988
+ state: "named";
1989
+ text: string;
1990
+ } | {
1991
+ state: "withheld";
1992
+ digest: string;
1993
+ display: "Heading withheld";
1994
+ cause: "policy" | "unclassified";
1995
+ } | null;
1996
+ line: number;
1997
+ };
1998
+ location: {
1999
+ kind: "line";
2000
+ line: number;
2001
+ column: number | null;
2002
+ endLine: number | null;
2003
+ };
2004
+ span?: {
2005
+ frame: "file-utf16" | "body-utf16";
2006
+ start: number;
2007
+ end: number;
2008
+ } | undefined;
2009
+ };
2010
+ provenance: {
2011
+ state: "safe";
2012
+ value: {
2013
+ pluginId: string;
2014
+ origin: "builtin" | "contributed";
2015
+ confidence: "high" | "medium" | "low";
2016
+ recognition: {
2017
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2018
+ explanation: string;
2019
+ evidence?: {
2020
+ span?: {
2021
+ start: number;
2022
+ end: number;
2023
+ } | undefined;
2024
+ link?: number | undefined;
2025
+ remote?: string | undefined;
2026
+ } | undefined;
2027
+ };
2028
+ source: {
2029
+ provider: string;
2030
+ id: string;
2031
+ kind?: string | undefined;
2032
+ };
2033
+ authoredHref?: string | undefined;
2034
+ verifiedFile?: {
2035
+ kind: "workspace";
2036
+ environmentId: string;
2037
+ path: string;
2038
+ } | {
2039
+ kind: "thread-storage";
2040
+ threadId: string;
2041
+ path: string;
2042
+ } | undefined;
2043
+ };
2044
+ } | {
2045
+ state: "withheld";
2046
+ digest: string;
2047
+ display: "Recognition details withheld";
2048
+ cause: "policy" | "unclassified";
2049
+ summary: {
2050
+ pluginId: string;
2051
+ origin: "builtin" | "contributed";
2052
+ confidence: "high" | "medium" | "low";
2053
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2054
+ };
2055
+ };
2056
+ authoredUrl: {
2057
+ state: "withheld";
2058
+ digest: string;
2059
+ display: "Destination withheld";
2060
+ cause: "policy" | "unclassified";
2061
+ } | {
2062
+ state: "exact";
2063
+ href: string;
2064
+ } | {
2065
+ state: "not-url";
2066
+ } | {
2067
+ state: "unknown";
2068
+ };
2069
+ }[];
2070
+ };
2071
+ evidenceDigest: string;
2072
+ }, {
2073
+ version: 1;
2074
+ projection: ApplyProjectionInput;
2075
+ evidence: {
2076
+ kind: "thread-brief";
2077
+ sourceFile: {
2078
+ kind: "thread-storage";
2079
+ threadId: string;
2080
+ path: "BRIEF.md";
2081
+ };
2082
+ sourceState: "present" | "absent" | "empty";
2083
+ sourceContentRevision: string | null;
2084
+ completeness: {
2085
+ state: "complete";
2086
+ codecVersion: 1;
2087
+ };
2088
+ metadataPolicyVersion: 1;
2089
+ frame: {
2090
+ codec: "utf8-fatal-bom-consumed-v1";
2091
+ rawBytes: number;
2092
+ bomBytes: 0 | 3;
2093
+ fileUtf16Length: number;
2094
+ bodyBase: {
2095
+ startUtf16: number;
2096
+ startLine: number;
2097
+ utf16Length: number;
2098
+ };
2099
+ lineMapping: {
2100
+ codec: "native-file-lines-v1";
2101
+ fileLineCount: number;
2102
+ };
2103
+ } | null;
2104
+ sourcePresentation: {
2105
+ label: {
2106
+ state: "safe";
2107
+ text: string;
2108
+ } | {
2109
+ state: "withheld";
2110
+ digest: string;
2111
+ display: "Brief";
2112
+ cause: "policy" | "unclassified";
2113
+ };
2114
+ detail: {
2115
+ state: "safe";
2116
+ text: string;
2117
+ } | {
2118
+ state: "withheld";
2119
+ digest: string;
2120
+ display: "Details withheld";
2121
+ cause: "policy" | "unclassified";
2122
+ } | null;
2123
+ url: {
2124
+ state: "withheld";
2125
+ digest: string;
2126
+ display: "Destination withheld";
2127
+ cause: "policy" | "unclassified";
2128
+ } | {
2129
+ state: "absent";
2130
+ } | {
2131
+ state: "exact";
2132
+ href: string;
2133
+ };
2134
+ };
2135
+ targetDescriptors: {
2136
+ target: {
2137
+ provider: string;
2138
+ keys: Record<string, string>;
2139
+ };
2140
+ presentation: {
2141
+ label: {
2142
+ state: "safe";
2143
+ text: string;
2144
+ } | {
2145
+ state: "withheld";
2146
+ digest: string;
2147
+ display: "Reference";
2148
+ cause: "policy" | "unclassified";
2149
+ };
2150
+ detail: {
2151
+ state: "safe";
2152
+ text: string;
2153
+ } | {
2154
+ state: "withheld";
2155
+ digest: string;
2156
+ display: "Details withheld";
2157
+ cause: "policy" | "unclassified";
2158
+ } | null;
2159
+ url: {
2160
+ state: "withheld";
2161
+ digest: string;
2162
+ display: "Destination withheld";
2163
+ cause: "policy" | "unclassified";
2164
+ } | {
2165
+ state: "absent";
2166
+ } | {
2167
+ state: "exact";
2168
+ href: string;
2169
+ };
2170
+ };
2171
+ codec: {
2172
+ state: "available";
2173
+ value: {
2174
+ kind: "recognition";
2175
+ source: {
2176
+ provider: string;
2177
+ id: string;
2178
+ kind?: string | undefined;
2179
+ };
2180
+ } | {
2181
+ kind: "thread";
2182
+ source: {
2183
+ provider: string;
2184
+ id: string;
2185
+ kind?: string | undefined;
2186
+ };
2187
+ verified: {
2188
+ id: string;
2189
+ projectId: string;
2190
+ };
2191
+ } | {
2192
+ kind: "file";
2193
+ verified: {
2194
+ kind: "workspace";
2195
+ environmentId: string;
2196
+ path: string;
2197
+ } | {
2198
+ kind: "thread-storage";
2199
+ threadId: string;
2200
+ path: string;
2201
+ };
2202
+ } | {
2203
+ kind: "url";
2204
+ href: string;
2205
+ };
2206
+ } | {
2207
+ state: "withheld";
2208
+ digest: string;
2209
+ display: "Identity metadata withheld";
2210
+ cause: "policy" | "unclassified";
2211
+ };
2212
+ }[];
2213
+ occurrences: {
2214
+ occurrenceKey: string;
2215
+ sourceOccurrenceId: string;
2216
+ target: {
2217
+ provider: string;
2218
+ keys: Record<string, string>;
2219
+ };
2220
+ locator: {
2221
+ kind: "thread-brief";
2222
+ threadId: string;
2223
+ file: {
2224
+ kind: "thread-storage";
2225
+ threadId: string;
2226
+ path: "BRIEF.md";
2227
+ };
2228
+ sourceContentRevision: string;
2229
+ section: {
2230
+ heading: {
2231
+ state: "named";
2232
+ text: string;
2233
+ } | {
2234
+ state: "withheld";
2235
+ digest: string;
2236
+ display: "Heading withheld";
2237
+ cause: "policy" | "unclassified";
2238
+ } | null;
2239
+ line: number;
2240
+ };
2241
+ location: {
2242
+ kind: "line";
2243
+ line: number;
2244
+ column: number | null;
2245
+ endLine: number | null;
2246
+ };
2247
+ span?: {
2248
+ frame: "file-utf16" | "body-utf16";
2249
+ start: number;
2250
+ end: number;
2251
+ } | undefined;
2252
+ };
2253
+ provenance: {
2254
+ state: "safe";
2255
+ value: {
2256
+ pluginId: string;
2257
+ origin: "builtin" | "contributed";
2258
+ confidence: "high" | "medium" | "low";
2259
+ recognition: {
2260
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2261
+ explanation: string;
2262
+ evidence?: {
2263
+ span?: {
2264
+ start: number;
2265
+ end: number;
2266
+ } | undefined;
2267
+ link?: number | undefined;
2268
+ remote?: string | undefined;
2269
+ } | undefined;
2270
+ };
2271
+ source: {
2272
+ provider: string;
2273
+ id: string;
2274
+ kind?: string | undefined;
2275
+ };
2276
+ authoredHref?: string | undefined;
2277
+ verifiedFile?: {
2278
+ kind: "workspace";
2279
+ environmentId: string;
2280
+ path: string;
2281
+ } | {
2282
+ kind: "thread-storage";
2283
+ threadId: string;
2284
+ path: string;
2285
+ } | undefined;
2286
+ };
2287
+ } | {
2288
+ state: "withheld";
2289
+ digest: string;
2290
+ display: "Recognition details withheld";
2291
+ cause: "policy" | "unclassified";
2292
+ summary: {
2293
+ pluginId: string;
2294
+ origin: "builtin" | "contributed";
2295
+ confidence: "high" | "medium" | "low";
2296
+ basis: "explicit" | "text-url" | "existing-link" | "git-remote" | "context";
2297
+ };
2298
+ };
2299
+ authoredUrl: {
2300
+ state: "withheld";
2301
+ digest: string;
2302
+ display: "Destination withheld";
2303
+ cause: "policy" | "unclassified";
2304
+ } | {
2305
+ state: "exact";
2306
+ href: string;
2307
+ } | {
2308
+ state: "not-url";
2309
+ } | {
2310
+ state: "unknown";
2311
+ };
2312
+ }[];
2313
+ };
2314
+ evidenceDigest: string;
2315
+ }>;
2316
+ readonly output: StandardSchemaV1<{
2317
+ [x: string]: unknown;
2318
+ version: 1;
2319
+ outcome: "applied" | "duplicate" | "equal" | "stale" | "conflict" | "cas-mismatch";
2320
+ currentRevision: number;
2321
+ currentDigest: string | null;
2322
+ evidenceDisposition: "conflict" | "installed" | "replayed" | "not-applied";
2323
+ state: {
2324
+ [x: string]: unknown;
2325
+ version: 1;
2326
+ projection: {
2327
+ [x: string]: unknown;
2328
+ producerPluginId: string;
2329
+ source: {
2330
+ [x: string]: unknown;
2331
+ provider: string;
2332
+ keys: Record<string, string>;
2333
+ presentation: {
2334
+ [x: string]: unknown;
2335
+ label: string;
2336
+ detail?: string | undefined;
2337
+ url?: string | undefined;
2338
+ };
2339
+ };
2340
+ revision: number;
2341
+ mutationId: string;
2342
+ payloadDigest: string;
2343
+ tombstone: boolean;
2344
+ targets: {
2345
+ [x: string]: unknown;
2346
+ provider: string;
2347
+ keys: Record<string, string>;
2348
+ presentation: {
2349
+ [x: string]: unknown;
2350
+ label: string;
2351
+ detail?: string | undefined;
2352
+ url?: string | undefined;
2353
+ };
2354
+ }[];
2355
+ } | null;
2356
+ evidence: {
2357
+ [x: string]: unknown;
2358
+ kind: "thread-brief";
2359
+ graphRevision: number;
2360
+ graphPayloadDigest: string;
2361
+ evidenceDigest: string;
2362
+ sourceContentRevision: string | null;
2363
+ state: "bound" | "unconfirmed";
2364
+ sourceState: "present" | "absent" | "empty";
2365
+ occurrenceCount: number;
2366
+ } | null;
2367
+ status: {
2368
+ [x: string]: unknown;
2369
+ state: "over-limit";
2370
+ sourceContentRevision: string;
2371
+ 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")[];
2372
+ attemptRevision: number;
2373
+ statusDigest: string;
2374
+ sourceFile: {
2375
+ [x: string]: unknown;
2376
+ kind: "thread-storage";
2377
+ threadId: string;
2378
+ path: "BRIEF.md";
2379
+ };
2380
+ applicability: "current" | "superseded-by-graph";
2381
+ } | {
2382
+ [x: string]: unknown;
2383
+ state: "identity-unrepresentable";
2384
+ sourceContentRevision: string;
2385
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2386
+ 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")[];
2387
+ attemptRevision: number;
2388
+ statusDigest: string;
2389
+ sourceFile: {
2390
+ [x: string]: unknown;
2391
+ kind: "thread-storage";
2392
+ threadId: string;
2393
+ path: "BRIEF.md";
2394
+ };
2395
+ applicability: "current" | "superseded-by-graph";
2396
+ } | null;
2397
+ revisionHighWater: number;
2398
+ };
2399
+ }, {
2400
+ [x: string]: unknown;
2401
+ version: 1;
2402
+ outcome: "applied" | "duplicate" | "equal" | "stale" | "conflict" | "cas-mismatch";
2403
+ currentRevision: number;
2404
+ currentDigest: string | null;
2405
+ evidenceDisposition: "conflict" | "installed" | "replayed" | "not-applied";
2406
+ state: {
2407
+ [x: string]: unknown;
2408
+ version: 1;
2409
+ projection: {
2410
+ [x: string]: unknown;
2411
+ producerPluginId: string;
2412
+ source: {
2413
+ [x: string]: unknown;
2414
+ provider: string;
2415
+ keys: Record<string, string>;
2416
+ presentation: {
2417
+ [x: string]: unknown;
2418
+ label: string;
2419
+ detail?: string | undefined;
2420
+ url?: string | undefined;
2421
+ };
2422
+ };
2423
+ revision: number;
2424
+ mutationId: string;
2425
+ payloadDigest: string;
2426
+ tombstone: boolean;
2427
+ targets: {
2428
+ [x: string]: unknown;
2429
+ provider: string;
2430
+ keys: Record<string, string>;
2431
+ presentation: {
2432
+ [x: string]: unknown;
2433
+ label: string;
2434
+ detail?: string | undefined;
2435
+ url?: string | undefined;
2436
+ };
2437
+ }[];
2438
+ } | null;
2439
+ evidence: {
2440
+ [x: string]: unknown;
2441
+ kind: "thread-brief";
2442
+ graphRevision: number;
2443
+ graphPayloadDigest: string;
2444
+ evidenceDigest: string;
2445
+ sourceContentRevision: string | null;
2446
+ state: "bound" | "unconfirmed";
2447
+ sourceState: "present" | "absent" | "empty";
2448
+ occurrenceCount: number;
2449
+ } | null;
2450
+ status: {
2451
+ [x: string]: unknown;
2452
+ state: "over-limit";
2453
+ sourceContentRevision: string;
2454
+ 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")[];
2455
+ attemptRevision: number;
2456
+ statusDigest: string;
2457
+ sourceFile: {
2458
+ [x: string]: unknown;
2459
+ kind: "thread-storage";
2460
+ threadId: string;
2461
+ path: "BRIEF.md";
2462
+ };
2463
+ applicability: "current" | "superseded-by-graph";
2464
+ } | {
2465
+ [x: string]: unknown;
2466
+ state: "identity-unrepresentable";
2467
+ sourceContentRevision: string;
2468
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2469
+ 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")[];
2470
+ attemptRevision: number;
2471
+ statusDigest: string;
2472
+ sourceFile: {
2473
+ [x: string]: unknown;
2474
+ kind: "thread-storage";
2475
+ threadId: string;
2476
+ path: "BRIEF.md";
2477
+ };
2478
+ applicability: "current" | "superseded-by-graph";
2479
+ } | null;
2480
+ revisionHighWater: number;
2481
+ };
2482
+ }>;
2483
+ };
2484
+ readonly crossReferencesProducerV1ReportStatus: {
2485
+ readonly input: StandardSchemaV1<{
2486
+ version: 1;
2487
+ producerPluginId: "thread-brief";
2488
+ source: {
2489
+ provider: string;
2490
+ keys: Record<string, string>;
2491
+ };
2492
+ sourceFile: {
2493
+ kind: "thread-storage";
2494
+ threadId: string;
2495
+ path: "BRIEF.md";
2496
+ };
2497
+ attemptRevision: number;
2498
+ expectedRevision: number;
2499
+ statusDigest: string;
2500
+ status: {
2501
+ state: "over-limit";
2502
+ sourceContentRevision: string;
2503
+ 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")[];
2504
+ } | {
2505
+ state: "identity-unrepresentable";
2506
+ sourceContentRevision: string;
2507
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2508
+ 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")[];
2509
+ };
2510
+ }, {
2511
+ version: 1;
2512
+ producerPluginId: "thread-brief";
2513
+ source: {
2514
+ provider: string;
2515
+ keys: Record<string, string>;
2516
+ };
2517
+ sourceFile: {
2518
+ kind: "thread-storage";
2519
+ threadId: string;
2520
+ path: "BRIEF.md";
2521
+ };
2522
+ attemptRevision: number;
2523
+ expectedRevision: number;
2524
+ statusDigest: string;
2525
+ status: {
2526
+ state: "over-limit";
2527
+ sourceContentRevision: string;
2528
+ 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")[];
2529
+ } | {
2530
+ state: "identity-unrepresentable";
2531
+ sourceContentRevision: string;
2532
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2533
+ 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")[];
2534
+ };
2535
+ }>;
2536
+ readonly output: StandardSchemaV1<{
2537
+ [x: string]: unknown;
2538
+ version: 1;
2539
+ outcome: "duplicate" | "stale" | "conflict" | "cas-mismatch" | "recorded";
2540
+ state: {
2541
+ [x: string]: unknown;
2542
+ version: 1;
2543
+ projection: {
2544
+ [x: string]: unknown;
2545
+ producerPluginId: string;
2546
+ source: {
2547
+ [x: string]: unknown;
2548
+ provider: string;
2549
+ keys: Record<string, string>;
2550
+ presentation: {
2551
+ [x: string]: unknown;
2552
+ label: string;
2553
+ detail?: string | undefined;
2554
+ url?: string | undefined;
2555
+ };
2556
+ };
2557
+ revision: number;
2558
+ mutationId: string;
2559
+ payloadDigest: string;
2560
+ tombstone: boolean;
2561
+ targets: {
2562
+ [x: string]: unknown;
2563
+ provider: string;
2564
+ keys: Record<string, string>;
2565
+ presentation: {
2566
+ [x: string]: unknown;
2567
+ label: string;
2568
+ detail?: string | undefined;
2569
+ url?: string | undefined;
2570
+ };
2571
+ }[];
2572
+ } | null;
2573
+ evidence: {
2574
+ [x: string]: unknown;
2575
+ kind: "thread-brief";
2576
+ graphRevision: number;
2577
+ graphPayloadDigest: string;
2578
+ evidenceDigest: string;
2579
+ sourceContentRevision: string | null;
2580
+ state: "bound" | "unconfirmed";
2581
+ sourceState: "present" | "absent" | "empty";
2582
+ occurrenceCount: number;
2583
+ } | null;
2584
+ status: {
2585
+ [x: string]: unknown;
2586
+ state: "over-limit";
2587
+ sourceContentRevision: string;
2588
+ 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")[];
2589
+ attemptRevision: number;
2590
+ statusDigest: string;
2591
+ sourceFile: {
2592
+ [x: string]: unknown;
2593
+ kind: "thread-storage";
2594
+ threadId: string;
2595
+ path: "BRIEF.md";
2596
+ };
2597
+ applicability: "current" | "superseded-by-graph";
2598
+ } | {
2599
+ [x: string]: unknown;
2600
+ state: "identity-unrepresentable";
2601
+ sourceContentRevision: string;
2602
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2603
+ 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")[];
2604
+ attemptRevision: number;
2605
+ statusDigest: string;
2606
+ sourceFile: {
2607
+ [x: string]: unknown;
2608
+ kind: "thread-storage";
2609
+ threadId: string;
2610
+ path: "BRIEF.md";
2611
+ };
2612
+ applicability: "current" | "superseded-by-graph";
2613
+ } | null;
2614
+ revisionHighWater: number;
2615
+ };
2616
+ }, {
2617
+ [x: string]: unknown;
2618
+ version: 1;
2619
+ outcome: "duplicate" | "stale" | "conflict" | "cas-mismatch" | "recorded";
2620
+ state: {
2621
+ [x: string]: unknown;
2622
+ version: 1;
2623
+ projection: {
2624
+ [x: string]: unknown;
2625
+ producerPluginId: string;
2626
+ source: {
2627
+ [x: string]: unknown;
2628
+ provider: string;
2629
+ keys: Record<string, string>;
2630
+ presentation: {
2631
+ [x: string]: unknown;
2632
+ label: string;
2633
+ detail?: string | undefined;
2634
+ url?: string | undefined;
2635
+ };
2636
+ };
2637
+ revision: number;
2638
+ mutationId: string;
2639
+ payloadDigest: string;
2640
+ tombstone: boolean;
2641
+ targets: {
2642
+ [x: string]: unknown;
2643
+ provider: string;
2644
+ keys: Record<string, string>;
2645
+ presentation: {
2646
+ [x: string]: unknown;
2647
+ label: string;
2648
+ detail?: string | undefined;
2649
+ url?: string | undefined;
2650
+ };
2651
+ }[];
2652
+ } | null;
2653
+ evidence: {
2654
+ [x: string]: unknown;
2655
+ kind: "thread-brief";
2656
+ graphRevision: number;
2657
+ graphPayloadDigest: string;
2658
+ evidenceDigest: string;
2659
+ sourceContentRevision: string | null;
2660
+ state: "bound" | "unconfirmed";
2661
+ sourceState: "present" | "absent" | "empty";
2662
+ occurrenceCount: number;
2663
+ } | null;
2664
+ status: {
2665
+ [x: string]: unknown;
2666
+ state: "over-limit";
2667
+ sourceContentRevision: string;
2668
+ 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")[];
2669
+ attemptRevision: number;
2670
+ statusDigest: string;
2671
+ sourceFile: {
2672
+ [x: string]: unknown;
2673
+ kind: "thread-storage";
2674
+ threadId: string;
2675
+ path: "BRIEF.md";
2676
+ };
2677
+ applicability: "current" | "superseded-by-graph";
2678
+ } | {
2679
+ [x: string]: unknown;
2680
+ state: "identity-unrepresentable";
2681
+ sourceContentRevision: string;
2682
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2683
+ 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")[];
2684
+ attemptRevision: number;
2685
+ statusDigest: string;
2686
+ sourceFile: {
2687
+ [x: string]: unknown;
2688
+ kind: "thread-storage";
2689
+ threadId: string;
2690
+ path: "BRIEF.md";
2691
+ };
2692
+ applicability: "current" | "superseded-by-graph";
2693
+ } | null;
2694
+ revisionHighWater: number;
2695
+ };
2696
+ }>;
2697
+ };
2698
+ };
2699
+ export declare function registerCrossReferencesProducer(bb: Pick<BbPluginApi, 'rpc'>, handlers: {
2700
+ 'crossReferencesProducer.describe': () => z.output<typeof ps['crossReferencesProducer.describe']['output']>;
2701
+ crossReferencesProducerV1GetState: (input: ProducerGetStateInput) => ProducerState | Promise<ProducerState>;
2702
+ crossReferencesProducerV1Apply: (input: ProducerApplyInput) => ProducerApplyOutput | Promise<ProducerApplyOutput>;
2703
+ crossReferencesProducerV1ReportStatus: (input: ProducerReportStatusInput) => ProducerReportStatusOutput | Promise<ProducerReportStatusOutput>;
2704
+ }): void;
2705
+ export declare const briefNavigationRpcContract: {
2706
+ readonly "threadBriefNavigation.describe": {
2707
+ readonly input: StandardSchemaV1<null, null>;
2708
+ readonly output: StandardSchemaV1<{
2709
+ [x: string]: unknown;
2710
+ protocol: "thread-brief-navigation";
2711
+ versions: number[];
2712
+ }, {
2713
+ [x: string]: unknown;
2714
+ protocol: "thread-brief-navigation";
2715
+ versions: number[];
2716
+ }>;
2717
+ };
2718
+ readonly threadBriefNavigationV1ResolveHeading: {
2719
+ readonly input: StandardSchemaV1<{
2720
+ version: 1;
2721
+ sourceFile: {
2722
+ kind: "thread-storage";
2723
+ threadId: string;
2724
+ path: "BRIEF.md";
2725
+ };
2726
+ sourceContentRevision: string;
2727
+ frame: {
2728
+ codec: "utf8-fatal-bom-consumed-v1";
2729
+ rawBytes: number;
2730
+ bomBytes: 0 | 3;
2731
+ fileUtf16Length: number;
2732
+ bodyBase: {
2733
+ startUtf16: number;
2734
+ startLine: number;
2735
+ utf16Length: number;
2736
+ };
2737
+ lineMapping: {
2738
+ codec: "native-file-lines-v1";
2739
+ fileLineCount: number;
2740
+ };
2741
+ };
2742
+ section: {
2743
+ heading: {
2744
+ state: "named";
2745
+ text: string;
2746
+ } | {
2747
+ state: "withheld";
2748
+ digest: string;
2749
+ display: "Heading withheld";
2750
+ cause: "policy" | "unclassified";
2751
+ } | null;
2752
+ originalLine: number;
2753
+ };
2754
+ }, {
2755
+ version: 1;
2756
+ sourceFile: {
2757
+ kind: "thread-storage";
2758
+ threadId: string;
2759
+ path: "BRIEF.md";
2760
+ };
2761
+ sourceContentRevision: string;
2762
+ frame: {
2763
+ codec: "utf8-fatal-bom-consumed-v1";
2764
+ rawBytes: number;
2765
+ bomBytes: 0 | 3;
2766
+ fileUtf16Length: number;
2767
+ bodyBase: {
2768
+ startUtf16: number;
2769
+ startLine: number;
2770
+ utf16Length: number;
2771
+ };
2772
+ lineMapping: {
2773
+ codec: "native-file-lines-v1";
2774
+ fileLineCount: number;
2775
+ };
2776
+ };
2777
+ section: {
2778
+ heading: {
2779
+ state: "named";
2780
+ text: string;
2781
+ } | {
2782
+ state: "withheld";
2783
+ digest: string;
2784
+ display: "Heading withheld";
2785
+ cause: "policy" | "unclassified";
2786
+ } | null;
2787
+ originalLine: number;
2788
+ };
2789
+ }>;
2790
+ readonly output: StandardSchemaV1<{
2791
+ [x: string]: unknown;
2792
+ version: 1;
2793
+ state: "ready";
2794
+ sourceFile: {
2795
+ [x: string]: unknown;
2796
+ kind: "thread-storage";
2797
+ threadId: string;
2798
+ path: "BRIEF.md";
2799
+ };
2800
+ sourceContentRevision: string;
2801
+ location: {
2802
+ [x: string]: unknown;
2803
+ kind: "line";
2804
+ line: number;
2805
+ column: null;
2806
+ };
2807
+ proof: {
2808
+ [x: string]: unknown;
2809
+ kind: "accepted-revision-revalidated";
2810
+ acceptedRevision: string;
2811
+ selection: "same-revision";
2812
+ frame: {
2813
+ [x: string]: unknown;
2814
+ codec: "utf8-fatal-bom-consumed-v1";
2815
+ rawBytes: number;
2816
+ bomBytes: 0 | 3;
2817
+ fileUtf16Length: number;
2818
+ bodyBase: {
2819
+ [x: string]: unknown;
2820
+ startUtf16: number;
2821
+ startLine: number;
2822
+ utf16Length: number;
2823
+ };
2824
+ lineMapping: {
2825
+ [x: string]: unknown;
2826
+ codec: "native-file-lines-v1";
2827
+ fileLineCount: number;
2828
+ };
2829
+ };
2830
+ };
2831
+ } | {
2832
+ [x: string]: unknown;
2833
+ version: 1;
2834
+ state: "fallback";
2835
+ sourceFile: {
2836
+ [x: string]: unknown;
2837
+ kind: "thread-storage";
2838
+ threadId: string;
2839
+ path: "BRIEF.md";
2840
+ };
2841
+ location: null;
2842
+ reason: "stale" | "over-limit" | "no-accepted-document" | "ambiguous" | "heading-unavailable" | "source-unavailable";
2843
+ }, {
2844
+ [x: string]: unknown;
2845
+ version: 1;
2846
+ state: "ready";
2847
+ sourceFile: {
2848
+ [x: string]: unknown;
2849
+ kind: "thread-storage";
2850
+ threadId: string;
2851
+ path: "BRIEF.md";
2852
+ };
2853
+ sourceContentRevision: string;
2854
+ location: {
2855
+ [x: string]: unknown;
2856
+ kind: "line";
2857
+ line: number;
2858
+ column: null;
2859
+ };
2860
+ proof: {
2861
+ [x: string]: unknown;
2862
+ kind: "accepted-revision-revalidated";
2863
+ acceptedRevision: string;
2864
+ selection: "same-revision";
2865
+ frame: {
2866
+ [x: string]: unknown;
2867
+ codec: "utf8-fatal-bom-consumed-v1";
2868
+ rawBytes: number;
2869
+ bomBytes: 0 | 3;
2870
+ fileUtf16Length: number;
2871
+ bodyBase: {
2872
+ [x: string]: unknown;
2873
+ startUtf16: number;
2874
+ startLine: number;
2875
+ utf16Length: number;
2876
+ };
2877
+ lineMapping: {
2878
+ [x: string]: unknown;
2879
+ codec: "native-file-lines-v1";
2880
+ fileLineCount: number;
2881
+ };
2882
+ };
2883
+ };
2884
+ } | {
2885
+ [x: string]: unknown;
2886
+ version: 1;
2887
+ state: "fallback";
2888
+ sourceFile: {
2889
+ [x: string]: unknown;
2890
+ kind: "thread-storage";
2891
+ threadId: string;
2892
+ path: "BRIEF.md";
2893
+ };
2894
+ location: null;
2895
+ reason: "stale" | "over-limit" | "no-accepted-document" | "ambiguous" | "heading-unavailable" | "source-unavailable";
2896
+ }>;
2897
+ };
2898
+ };
2899
+ export declare function registerBriefNavigation(bb: Pick<BbPluginApi, 'rpc'>, handlers: {
2900
+ 'threadBriefNavigation.describe': () => z.output<typeof ns['threadBriefNavigation.describe']['output']>;
2901
+ threadBriefNavigationV1ResolveHeading: (input: BriefNavigationInput) => BriefNavigationOutput | Promise<BriefNavigationOutput>;
2902
+ }): void;
2903
+ export declare function createCrossReferencesProducerClient(sdk: CrossReferencesSdk, pluginId?: string, options?: CrossReferencesClientOptions): {
2904
+ pluginId: string;
2905
+ describe(signal?: AbortSignal): Promise<{
2906
+ [x: string]: unknown;
2907
+ protocol: "cross-references-producer";
2908
+ versions: number[];
2909
+ sourceKinds: "thread-brief"[];
2910
+ limits: {
2911
+ [x: string]: unknown;
2912
+ inputBytes: number;
2913
+ statusBytes: number;
2914
+ locations: number;
2915
+ perTarget: number;
2916
+ headingBytes: number;
2917
+ limitCodes: string[];
2918
+ };
2919
+ }>;
2920
+ getState: (input: ProducerGetStateInput, signal?: AbortSignal) => Promise<{
2921
+ [x: string]: unknown;
2922
+ version: 1;
2923
+ projection: {
2924
+ [x: string]: unknown;
2925
+ producerPluginId: string;
2926
+ source: {
2927
+ [x: string]: unknown;
2928
+ provider: string;
2929
+ keys: Record<string, string>;
2930
+ presentation: {
2931
+ [x: string]: unknown;
2932
+ label: string;
2933
+ detail?: string | undefined;
2934
+ url?: string | undefined;
2935
+ };
2936
+ };
2937
+ revision: number;
2938
+ mutationId: string;
2939
+ payloadDigest: string;
2940
+ tombstone: boolean;
2941
+ targets: {
2942
+ [x: string]: unknown;
2943
+ provider: string;
2944
+ keys: Record<string, string>;
2945
+ presentation: {
2946
+ [x: string]: unknown;
2947
+ label: string;
2948
+ detail?: string | undefined;
2949
+ url?: string | undefined;
2950
+ };
2951
+ }[];
2952
+ } | null;
2953
+ evidence: {
2954
+ [x: string]: unknown;
2955
+ kind: "thread-brief";
2956
+ graphRevision: number;
2957
+ graphPayloadDigest: string;
2958
+ evidenceDigest: string;
2959
+ sourceContentRevision: string | null;
2960
+ state: "bound" | "unconfirmed";
2961
+ sourceState: "present" | "absent" | "empty";
2962
+ occurrenceCount: number;
2963
+ } | null;
2964
+ status: {
2965
+ [x: string]: unknown;
2966
+ state: "over-limit";
2967
+ sourceContentRevision: string;
2968
+ 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")[];
2969
+ attemptRevision: number;
2970
+ statusDigest: string;
2971
+ sourceFile: {
2972
+ [x: string]: unknown;
2973
+ kind: "thread-storage";
2974
+ threadId: string;
2975
+ path: "BRIEF.md";
2976
+ };
2977
+ applicability: "current" | "superseded-by-graph";
2978
+ } | {
2979
+ [x: string]: unknown;
2980
+ state: "identity-unrepresentable";
2981
+ sourceContentRevision: string;
2982
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
2983
+ 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")[];
2984
+ attemptRevision: number;
2985
+ statusDigest: string;
2986
+ sourceFile: {
2987
+ [x: string]: unknown;
2988
+ kind: "thread-storage";
2989
+ threadId: string;
2990
+ path: "BRIEF.md";
2991
+ };
2992
+ applicability: "current" | "superseded-by-graph";
2993
+ } | null;
2994
+ revisionHighWater: number;
2995
+ }>;
2996
+ apply(input: ProducerApplyInput, signal?: AbortSignal): Promise<{
2997
+ [x: string]: unknown;
2998
+ version: 1;
2999
+ outcome: "applied" | "duplicate" | "equal" | "stale" | "conflict" | "cas-mismatch";
3000
+ currentRevision: number;
3001
+ currentDigest: string | null;
3002
+ evidenceDisposition: "conflict" | "installed" | "replayed" | "not-applied";
3003
+ state: {
3004
+ [x: string]: unknown;
3005
+ version: 1;
3006
+ projection: {
3007
+ [x: string]: unknown;
3008
+ producerPluginId: string;
3009
+ source: {
3010
+ [x: string]: unknown;
3011
+ provider: string;
3012
+ keys: Record<string, string>;
3013
+ presentation: {
3014
+ [x: string]: unknown;
3015
+ label: string;
3016
+ detail?: string | undefined;
3017
+ url?: string | undefined;
3018
+ };
3019
+ };
3020
+ revision: number;
3021
+ mutationId: string;
3022
+ payloadDigest: string;
3023
+ tombstone: boolean;
3024
+ targets: {
3025
+ [x: string]: unknown;
3026
+ provider: string;
3027
+ keys: Record<string, string>;
3028
+ presentation: {
3029
+ [x: string]: unknown;
3030
+ label: string;
3031
+ detail?: string | undefined;
3032
+ url?: string | undefined;
3033
+ };
3034
+ }[];
3035
+ } | null;
3036
+ evidence: {
3037
+ [x: string]: unknown;
3038
+ kind: "thread-brief";
3039
+ graphRevision: number;
3040
+ graphPayloadDigest: string;
3041
+ evidenceDigest: string;
3042
+ sourceContentRevision: string | null;
3043
+ state: "bound" | "unconfirmed";
3044
+ sourceState: "present" | "absent" | "empty";
3045
+ occurrenceCount: number;
3046
+ } | null;
3047
+ status: {
3048
+ [x: string]: unknown;
3049
+ state: "over-limit";
3050
+ sourceContentRevision: string;
3051
+ 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")[];
3052
+ attemptRevision: number;
3053
+ statusDigest: string;
3054
+ sourceFile: {
3055
+ [x: string]: unknown;
3056
+ kind: "thread-storage";
3057
+ threadId: string;
3058
+ path: "BRIEF.md";
3059
+ };
3060
+ applicability: "current" | "superseded-by-graph";
3061
+ } | {
3062
+ [x: string]: unknown;
3063
+ state: "identity-unrepresentable";
3064
+ sourceContentRevision: string;
3065
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
3066
+ 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")[];
3067
+ attemptRevision: number;
3068
+ statusDigest: string;
3069
+ sourceFile: {
3070
+ [x: string]: unknown;
3071
+ kind: "thread-storage";
3072
+ threadId: string;
3073
+ path: "BRIEF.md";
3074
+ };
3075
+ applicability: "current" | "superseded-by-graph";
3076
+ } | null;
3077
+ revisionHighWater: number;
3078
+ };
3079
+ }>;
3080
+ reportStatus: (input: ProducerReportStatusInput, signal?: AbortSignal) => Promise<{
3081
+ [x: string]: unknown;
3082
+ version: 1;
3083
+ outcome: "duplicate" | "stale" | "conflict" | "cas-mismatch" | "recorded";
3084
+ state: {
3085
+ [x: string]: unknown;
3086
+ version: 1;
3087
+ projection: {
3088
+ [x: string]: unknown;
3089
+ producerPluginId: string;
3090
+ source: {
3091
+ [x: string]: unknown;
3092
+ provider: string;
3093
+ keys: Record<string, string>;
3094
+ presentation: {
3095
+ [x: string]: unknown;
3096
+ label: string;
3097
+ detail?: string | undefined;
3098
+ url?: string | undefined;
3099
+ };
3100
+ };
3101
+ revision: number;
3102
+ mutationId: string;
3103
+ payloadDigest: string;
3104
+ tombstone: boolean;
3105
+ targets: {
3106
+ [x: string]: unknown;
3107
+ provider: string;
3108
+ keys: Record<string, string>;
3109
+ presentation: {
3110
+ [x: string]: unknown;
3111
+ label: string;
3112
+ detail?: string | undefined;
3113
+ url?: string | undefined;
3114
+ };
3115
+ }[];
3116
+ } | null;
3117
+ evidence: {
3118
+ [x: string]: unknown;
3119
+ kind: "thread-brief";
3120
+ graphRevision: number;
3121
+ graphPayloadDigest: string;
3122
+ evidenceDigest: string;
3123
+ sourceContentRevision: string | null;
3124
+ state: "bound" | "unconfirmed";
3125
+ sourceState: "present" | "absent" | "empty";
3126
+ occurrenceCount: number;
3127
+ } | null;
3128
+ status: {
3129
+ [x: string]: unknown;
3130
+ state: "over-limit";
3131
+ sourceContentRevision: string;
3132
+ 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")[];
3133
+ attemptRevision: number;
3134
+ statusDigest: string;
3135
+ sourceFile: {
3136
+ [x: string]: unknown;
3137
+ kind: "thread-storage";
3138
+ threadId: string;
3139
+ path: "BRIEF.md";
3140
+ };
3141
+ applicability: "current" | "superseded-by-graph";
3142
+ } | {
3143
+ [x: string]: unknown;
3144
+ state: "identity-unrepresentable";
3145
+ sourceContentRevision: string;
3146
+ identityReasons: ("unsafe-required-identity" | "unsupported-required-codec" | "required-identity-bound")[];
3147
+ 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")[];
3148
+ attemptRevision: number;
3149
+ statusDigest: string;
3150
+ sourceFile: {
3151
+ [x: string]: unknown;
3152
+ kind: "thread-storage";
3153
+ threadId: string;
3154
+ path: "BRIEF.md";
3155
+ };
3156
+ applicability: "current" | "superseded-by-graph";
3157
+ } | null;
3158
+ revisionHighWater: number;
3159
+ };
3160
+ }>;
3161
+ };
3162
+ export type CrossReferencesProducerClient = ReturnType<typeof createCrossReferencesProducerClient>;
3163
+ export declare function createBriefNavigationClient(sdk: CrossReferencesSdk, options?: CrossReferencesClientOptions): {
3164
+ describe(signal?: AbortSignal): Promise<{
3165
+ [x: string]: unknown;
3166
+ protocol: "thread-brief-navigation";
3167
+ versions: number[];
3168
+ }>;
3169
+ resolve(input: BriefNavigationInput, signal?: AbortSignal): Promise<{
3170
+ [x: string]: unknown;
3171
+ version: 1;
3172
+ state: "ready";
3173
+ sourceFile: {
3174
+ [x: string]: unknown;
3175
+ kind: "thread-storage";
3176
+ threadId: string;
3177
+ path: "BRIEF.md";
3178
+ };
3179
+ sourceContentRevision: string;
3180
+ location: {
3181
+ [x: string]: unknown;
3182
+ kind: "line";
3183
+ line: number;
3184
+ column: null;
3185
+ };
3186
+ proof: {
3187
+ [x: string]: unknown;
3188
+ kind: "accepted-revision-revalidated";
3189
+ acceptedRevision: string;
3190
+ selection: "same-revision";
3191
+ frame: {
3192
+ [x: string]: unknown;
3193
+ codec: "utf8-fatal-bom-consumed-v1";
3194
+ rawBytes: number;
3195
+ bomBytes: 0 | 3;
3196
+ fileUtf16Length: number;
3197
+ bodyBase: {
3198
+ [x: string]: unknown;
3199
+ startUtf16: number;
3200
+ startLine: number;
3201
+ utf16Length: number;
3202
+ };
3203
+ lineMapping: {
3204
+ [x: string]: unknown;
3205
+ codec: "native-file-lines-v1";
3206
+ fileLineCount: number;
3207
+ };
3208
+ };
3209
+ };
3210
+ } | {
3211
+ [x: string]: unknown;
3212
+ version: 1;
3213
+ state: "fallback";
3214
+ sourceFile: {
3215
+ [x: string]: unknown;
3216
+ kind: "thread-storage";
3217
+ threadId: string;
3218
+ path: "BRIEF.md";
3219
+ };
3220
+ location: null;
3221
+ reason: "stale" | "over-limit" | "no-accepted-document" | "ambiguous" | "heading-unavailable" | "source-unavailable";
3222
+ }>;
3223
+ };
3224
+ export {};