@c4a/context 0.7.1 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +65 -170
  2. package/README.zh-CN.md +52 -129
  3. package/docs/README.md +9 -10
  4. package/docs/README.zh-CN.md +6 -7
  5. package/docs/getting-started.md +73 -428
  6. package/docs/guides/agent-guide.md +94 -518
  7. package/docs/guides/code-indexer-skill-authoring.md +24 -13
  8. package/docs/guides/markdown-indexer-skill-authoring.md +14 -14
  9. package/docs/reference/code-extractors.md +29 -121
  10. package/docs/reference/indexer-provider-protocol.md +43 -110
  11. package/docs/reference/package-templates.md +2 -3
  12. package/docs/reference/project-api.md +52 -986
  13. package/index.d.ts +10 -8
  14. package/index.js +4739 -7103
  15. package/indexerAgentStepProtocol.d.ts +1366 -7649
  16. package/indexerArtifact.d.ts +225 -0
  17. package/indexerArtifactDependencies.d.ts +41 -39
  18. package/indexerArtifactResult.d.ts +219 -252
  19. package/indexerAuthorizedWorksetView.d.ts +368 -0
  20. package/indexerBaseQuestionAmendment.d.ts +484 -280
  21. package/indexerBenchmark.d.ts +16 -16
  22. package/indexerCandidateCompile.d.ts +66 -60
  23. package/indexerCapabilityGroupEvidence.d.ts +6 -6
  24. package/indexerCatalogFallback.d.ts +122 -128
  25. package/indexerCollectionMapping.d.ts +13 -13
  26. package/indexerContentLayers.d.ts +8 -8
  27. package/indexerContractOverlay.d.ts +10 -10
  28. package/indexerControlledInvocation.d.ts +12 -12
  29. package/indexerControlledProgram.d.ts +2467 -2797
  30. package/indexerCoreExports.d.ts +6 -6
  31. package/indexerCustomizationDraft.d.ts +3315 -2091
  32. package/indexerCustomizationLadder.d.ts +2 -2
  33. package/indexerDependencyView.d.ts +108 -108
  34. package/indexerEffectiveArtifact.d.ts +1134 -0
  35. package/indexerEvidenceAdapterAuthorityMerge.d.ts +48 -0
  36. package/indexerEvidenceAdapterResult.d.ts +52 -52
  37. package/indexerExampleDecision.d.ts +128 -128
  38. package/indexerExampleIdentity.d.ts +6 -6
  39. package/indexerGeneratedAuthoringAudit.d.ts +18 -18
  40. package/indexerIncrementalImpact.d.ts +16 -16
  41. package/indexerInspectorWorksetProjection.d.ts +6 -0
  42. package/indexerInventoryDisposition.d.ts +70 -70
  43. package/indexerLayerComposition.d.ts +2139 -373
  44. package/indexerLayoutChange.d.ts +10 -10
  45. package/indexerLayoutProposalSet.d.ts +71 -66
  46. package/indexerLayoutResolver.d.ts +53 -48
  47. package/indexerLayoutTransition.d.ts +0 -50
  48. package/indexerLifecycle.d.ts +0 -13
  49. package/indexerMainLifecycle.d.ts +10 -0
  50. package/indexerMainRunLedger.d.ts +138 -11
  51. package/indexerMainRunProtocol.d.ts +1406 -785
  52. package/indexerMainWorkset.d.ts +460 -206
  53. package/indexerMaterialGapLedger.d.ts +13 -2904
  54. package/indexerOverlayQuestionAmendment.d.ts +491 -287
  55. package/indexerOverlayQuestionApplyProposal.d.ts +1022 -614
  56. package/indexerParserCapabilityCatalog.d.ts +136 -0
  57. package/indexerParserCoordinate.d.ts +16 -16
  58. package/indexerParserDependencyIntent.d.ts +22 -0
  59. package/indexerParserExecutionPlan.d.ts +388 -0
  60. package/indexerParserFactView.d.ts +42 -22
  61. package/indexerPartitionConvergence.d.ts +0 -3
  62. package/indexerPartitionInventory.d.ts +2 -0
  63. package/indexerPartitionPlan.d.ts +101 -99
  64. package/indexerPhysicalArtifactManifest.d.ts +8 -8
  65. package/indexerPostAuthorComposition.d.ts +116 -1156
  66. package/indexerPostAuthorRunLedger.d.ts +1434 -280
  67. package/indexerPrimaryProjection.d.ts +10 -10
  68. package/indexerPrimaryResultView.d.ts +435 -0
  69. package/indexerProfileContract.d.ts +181 -181
  70. package/indexerProgramExecutionAuthorization.d.ts +12 -12
  71. package/indexerProgramRunProtocol.d.ts +2141 -2749
  72. package/indexerProjectProposal.d.ts +496 -292
  73. package/indexerProjectedArtifactFanOutAudit.d.ts +0 -3
  74. package/indexerProtocolCommon.d.ts +4 -1
  75. package/indexerProvider.d.ts +134 -218
  76. package/indexerProviderComposition.d.ts +53 -53
  77. package/indexerProviderResolution.d.ts +12 -12
  78. package/indexerProviderResolutionAction.d.ts +14 -14
  79. package/indexerProviderRouting.d.ts +923 -515
  80. package/indexerProviderSelectionProposal.d.ts +893 -485
  81. package/indexerQuestionAuthority.d.ts +46 -47
  82. package/indexerReaderTargetInventory.d.ts +8 -8
  83. package/indexerRegistry.d.ts +765 -357
  84. package/indexerRequirementConfirmation.d.ts +98 -98
  85. package/indexerRequirementLifecycle.d.ts +224 -224
  86. package/indexerResultReconciliation.d.ts +204 -5919
  87. package/indexerResultReconciliationRun.d.ts +0 -1
  88. package/indexerRunEnvelope.d.ts +20 -20
  89. package/indexerSemanticInput.d.ts +3678 -0
  90. package/indexerStructuredDeclaration.d.ts +57 -53
  91. package/indexerSubjectCatalog.d.ts +14 -14
  92. package/indexerSubjectIdentity.d.ts +2 -2
  93. package/indexerSubjectKeyAuthority.d.ts +31 -30
  94. package/indexerTemplateRendering.d.ts +64 -64
  95. package/indexerToolSnapshot.d.ts +8 -8
  96. package/package.json +1 -1
  97. package/phases.d.ts +3 -183
  98. package/codeIndexPlan.d.ts +0 -158
  99. package/indexerAuditFacts.d.ts +0 -66
  100. package/indexerAuditOverrideReadiness.d.ts +0 -27
  101. package/indexerAuditProtocol.d.ts +0 -238
  102. package/indexerAuditRevision.d.ts +0 -726
  103. package/indexerAuditRevisionActions.d.ts +0 -236
  104. package/indexerMaterialAnswer.d.ts +0 -738
  105. package/indexerMaterialAnswerActualization.d.ts +0 -91
  106. package/indexerMaterialAnswerExecutionPlan.d.ts +0 -2887
  107. package/indexerMaterialAnswerFlow.d.ts +0 -63
  108. package/indexerMaterialAnswerLayout.d.ts +0 -76
  109. package/indexerMaterialAnswerReview.d.ts +0 -217
  110. package/indexerMaterialAnswerReviewRoute.d.ts +0 -6145
  111. package/indexerMaterialAnswerRunLedger.d.ts +0 -918
  112. package/indexerMaterialAnswerRunProtocol.d.ts +0 -1253
  113. package/indexerMaterialQuestionExclusion.d.ts +0 -129
  114. package/indexerMaterialQuestionWorkset.d.ts +0 -508
  115. package/indexerPlannedMaterialAnswer.d.ts +0 -116
  116. package/indexerProfileMetricAudit.d.ts +0 -218
  117. package/indexerWorksetRead.d.ts +0 -287
@@ -1,738 +0,0 @@
1
- import { z } from "zod";
2
- import { type IndexerEvidenceKind } from "./indexerProtocolCommon.js";
3
- export declare const INDEXER_EVIDENCE_PROVENANCE_FACT_PATHS: readonly ["content.digest", "evidence.kind", "locator.valid", "snapshot.current", "snapshot.digest", "source.origin_ref", "source.ref", "source.role", "tool.trust"];
4
- export declare const indexerSourceSpanRefSchema: z.ZodEffects<z.ZodObject<{
5
- unit: z.ZodEnum<["byte", "line"]>;
6
- start: z.ZodNumber;
7
- end_exclusive: z.ZodNumber;
8
- }, "strict", z.ZodTypeAny, {
9
- unit: "byte" | "line";
10
- start: number;
11
- end_exclusive: number;
12
- }, {
13
- unit: "byte" | "line";
14
- start: number;
15
- end_exclusive: number;
16
- }>, {
17
- unit: "byte" | "line";
18
- start: number;
19
- end_exclusive: number;
20
- }, {
21
- unit: "byte" | "line";
22
- start: number;
23
- end_exclusive: number;
24
- }>;
25
- export type IndexerSourceSpanRef = z.infer<typeof indexerSourceSpanRefSchema>;
26
- export declare const indexerMaterialAnswerEvidenceClaimSchema: z.ZodObject<{
27
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
28
- source_ref: z.ZodString;
29
- source_spans: z.ZodArray<z.ZodEffects<z.ZodObject<{
30
- unit: z.ZodEnum<["byte", "line"]>;
31
- start: z.ZodNumber;
32
- end_exclusive: z.ZodNumber;
33
- }, "strict", z.ZodTypeAny, {
34
- unit: "byte" | "line";
35
- start: number;
36
- end_exclusive: number;
37
- }, {
38
- unit: "byte" | "line";
39
- start: number;
40
- end_exclusive: number;
41
- }>, {
42
- unit: "byte" | "line";
43
- start: number;
44
- end_exclusive: number;
45
- }, {
46
- unit: "byte" | "line";
47
- start: number;
48
- end_exclusive: number;
49
- }>, "many">;
50
- evidence_digest: z.ZodString;
51
- }, "strict", z.ZodTypeAny, {
52
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
53
- source_ref: string;
54
- evidence_digest: string;
55
- source_spans: {
56
- unit: "byte" | "line";
57
- start: number;
58
- end_exclusive: number;
59
- }[];
60
- }, {
61
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
62
- source_ref: string;
63
- evidence_digest: string;
64
- source_spans: {
65
- unit: "byte" | "line";
66
- start: number;
67
- end_exclusive: number;
68
- }[];
69
- }>;
70
- export type IndexerMaterialAnswerEvidenceClaim = z.infer<typeof indexerMaterialAnswerEvidenceClaimSchema>;
71
- declare const materialAnswerBindingSchema: z.ZodObject<{
72
- workset_digest: z.ZodString;
73
- question_key: z.ZodString;
74
- question_revision_digest: z.ZodString;
75
- evidence_claims: z.ZodArray<z.ZodObject<{
76
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
77
- source_ref: z.ZodString;
78
- source_spans: z.ZodArray<z.ZodEffects<z.ZodObject<{
79
- unit: z.ZodEnum<["byte", "line"]>;
80
- start: z.ZodNumber;
81
- end_exclusive: z.ZodNumber;
82
- }, "strict", z.ZodTypeAny, {
83
- unit: "byte" | "line";
84
- start: number;
85
- end_exclusive: number;
86
- }, {
87
- unit: "byte" | "line";
88
- start: number;
89
- end_exclusive: number;
90
- }>, {
91
- unit: "byte" | "line";
92
- start: number;
93
- end_exclusive: number;
94
- }, {
95
- unit: "byte" | "line";
96
- start: number;
97
- end_exclusive: number;
98
- }>, "many">;
99
- evidence_digest: z.ZodString;
100
- }, "strict", z.ZodTypeAny, {
101
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
102
- source_ref: string;
103
- evidence_digest: string;
104
- source_spans: {
105
- unit: "byte" | "line";
106
- start: number;
107
- end_exclusive: number;
108
- }[];
109
- }, {
110
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
111
- source_ref: string;
112
- evidence_digest: string;
113
- source_spans: {
114
- unit: "byte" | "line";
115
- start: number;
116
- end_exclusive: number;
117
- }[];
118
- }>, "many">;
119
- }, "strict", z.ZodTypeAny, {
120
- workset_digest: string;
121
- question_key: string;
122
- question_revision_digest: string;
123
- evidence_claims: {
124
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
125
- source_ref: string;
126
- evidence_digest: string;
127
- source_spans: {
128
- unit: "byte" | "line";
129
- start: number;
130
- end_exclusive: number;
131
- }[];
132
- }[];
133
- }, {
134
- workset_digest: string;
135
- question_key: string;
136
- question_revision_digest: string;
137
- evidence_claims: {
138
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
139
- source_ref: string;
140
- evidence_digest: string;
141
- source_spans: {
142
- unit: "byte" | "line";
143
- start: number;
144
- end_exclusive: number;
145
- }[];
146
- }[];
147
- }>;
148
- export declare const indexerMaterialAnswerResultSchema: z.ZodObject<{
149
- protocol: z.ZodLiteral<"context.indexer.material-answer-result/v1">;
150
- workset_digest: z.ZodString;
151
- execution_request_digest: z.ZodString;
152
- answer_indexer_id: z.ZodEffects<z.ZodString, string, string>;
153
- answer_provider_composition_fingerprint: z.ZodString;
154
- bindings: z.ZodArray<z.ZodObject<{
155
- workset_digest: z.ZodString;
156
- question_key: z.ZodString;
157
- question_revision_digest: z.ZodString;
158
- evidence_claims: z.ZodArray<z.ZodObject<{
159
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
160
- source_ref: z.ZodString;
161
- source_spans: z.ZodArray<z.ZodEffects<z.ZodObject<{
162
- unit: z.ZodEnum<["byte", "line"]>;
163
- start: z.ZodNumber;
164
- end_exclusive: z.ZodNumber;
165
- }, "strict", z.ZodTypeAny, {
166
- unit: "byte" | "line";
167
- start: number;
168
- end_exclusive: number;
169
- }, {
170
- unit: "byte" | "line";
171
- start: number;
172
- end_exclusive: number;
173
- }>, {
174
- unit: "byte" | "line";
175
- start: number;
176
- end_exclusive: number;
177
- }, {
178
- unit: "byte" | "line";
179
- start: number;
180
- end_exclusive: number;
181
- }>, "many">;
182
- evidence_digest: z.ZodString;
183
- }, "strict", z.ZodTypeAny, {
184
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
185
- source_ref: string;
186
- evidence_digest: string;
187
- source_spans: {
188
- unit: "byte" | "line";
189
- start: number;
190
- end_exclusive: number;
191
- }[];
192
- }, {
193
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
194
- source_ref: string;
195
- evidence_digest: string;
196
- source_spans: {
197
- unit: "byte" | "line";
198
- start: number;
199
- end_exclusive: number;
200
- }[];
201
- }>, "many">;
202
- }, "strict", z.ZodTypeAny, {
203
- workset_digest: string;
204
- question_key: string;
205
- question_revision_digest: string;
206
- evidence_claims: {
207
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
208
- source_ref: string;
209
- evidence_digest: string;
210
- source_spans: {
211
- unit: "byte" | "line";
212
- start: number;
213
- end_exclusive: number;
214
- }[];
215
- }[];
216
- }, {
217
- workset_digest: string;
218
- question_key: string;
219
- question_revision_digest: string;
220
- evidence_claims: {
221
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
222
- source_ref: string;
223
- evidence_digest: string;
224
- source_spans: {
225
- unit: "byte" | "line";
226
- start: number;
227
- end_exclusive: number;
228
- }[];
229
- }[];
230
- }>, "many">;
231
- result_digest: z.ZodString;
232
- }, "strict", z.ZodTypeAny, {
233
- protocol: "context.indexer.material-answer-result/v1";
234
- workset_digest: string;
235
- execution_request_digest: string;
236
- result_digest: string;
237
- answer_indexer_id: string;
238
- answer_provider_composition_fingerprint: string;
239
- bindings: {
240
- workset_digest: string;
241
- question_key: string;
242
- question_revision_digest: string;
243
- evidence_claims: {
244
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
245
- source_ref: string;
246
- evidence_digest: string;
247
- source_spans: {
248
- unit: "byte" | "line";
249
- start: number;
250
- end_exclusive: number;
251
- }[];
252
- }[];
253
- }[];
254
- }, {
255
- protocol: "context.indexer.material-answer-result/v1";
256
- workset_digest: string;
257
- execution_request_digest: string;
258
- result_digest: string;
259
- answer_indexer_id: string;
260
- answer_provider_composition_fingerprint: string;
261
- bindings: {
262
- workset_digest: string;
263
- question_key: string;
264
- question_revision_digest: string;
265
- evidence_claims: {
266
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
267
- source_ref: string;
268
- evidence_digest: string;
269
- source_spans: {
270
- unit: "byte" | "line";
271
- start: number;
272
- end_exclusive: number;
273
- }[];
274
- }[];
275
- }[];
276
- }>;
277
- export type IndexerMaterialAnswerBinding = z.infer<typeof materialAnswerBindingSchema>;
278
- export type IndexerMaterialAnswerResult = z.infer<typeof indexerMaterialAnswerResultSchema>;
279
- export declare function indexerMaterialAnswerResultDigest(value: Omit<IndexerMaterialAnswerResult, "result_digest">): string;
280
- export declare const indexerCurrentEvidenceSourceSchema: z.ZodObject<{
281
- source_ref: z.ZodString;
282
- source_origin_ref: z.ZodString;
283
- source_input_digest: z.ZodString;
284
- source_role: z.ZodEffects<z.ZodString, string, string>;
285
- evidence_kinds: z.ZodArray<z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>, "many">;
286
- span_unit: z.ZodEnum<["byte", "line"]>;
287
- span_extent: z.ZodNumber;
288
- snapshot_current: z.ZodLiteral<true>;
289
- locator_valid: z.ZodLiteral<true>;
290
- tool_trust: z.ZodEffects<z.ZodString, string, string>;
291
- }, "strict", z.ZodTypeAny, {
292
- source_ref: string;
293
- source_input_digest: string;
294
- source_role: string;
295
- source_origin_ref: string;
296
- evidence_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
297
- span_unit: "byte" | "line";
298
- span_extent: number;
299
- snapshot_current: true;
300
- locator_valid: true;
301
- tool_trust: string;
302
- }, {
303
- source_ref: string;
304
- source_input_digest: string;
305
- source_role: string;
306
- source_origin_ref: string;
307
- evidence_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
308
- span_unit: "byte" | "line";
309
- span_extent: number;
310
- snapshot_current: true;
311
- locator_valid: true;
312
- tool_trust: string;
313
- }>;
314
- export type IndexerCurrentEvidenceSource = z.infer<typeof indexerCurrentEvidenceSourceSchema>;
315
- export declare const indexerCanonicalMaterialAnswerEvidenceSchema: z.ZodObject<{
316
- evidence_item_ref: z.ZodString;
317
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
318
- source_ref: z.ZodString;
319
- source_origin_ref: z.ZodString;
320
- source_input_digest: z.ZodString;
321
- source_spans: z.ZodArray<z.ZodEffects<z.ZodObject<{
322
- unit: z.ZodEnum<["byte", "line"]>;
323
- start: z.ZodNumber;
324
- end_exclusive: z.ZodNumber;
325
- }, "strict", z.ZodTypeAny, {
326
- unit: "byte" | "line";
327
- start: number;
328
- end_exclusive: number;
329
- }, {
330
- unit: "byte" | "line";
331
- start: number;
332
- end_exclusive: number;
333
- }>, {
334
- unit: "byte" | "line";
335
- start: number;
336
- end_exclusive: number;
337
- }, {
338
- unit: "byte" | "line";
339
- start: number;
340
- end_exclusive: number;
341
- }>, "many">;
342
- evidence_digest: z.ZodString;
343
- }, "strict", z.ZodTypeAny, {
344
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
345
- source_ref: string;
346
- evidence_digest: string;
347
- source_input_digest: string;
348
- source_spans: {
349
- unit: "byte" | "line";
350
- start: number;
351
- end_exclusive: number;
352
- }[];
353
- source_origin_ref: string;
354
- evidence_item_ref: string;
355
- }, {
356
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
357
- source_ref: string;
358
- evidence_digest: string;
359
- source_input_digest: string;
360
- source_spans: {
361
- unit: "byte" | "line";
362
- start: number;
363
- end_exclusive: number;
364
- }[];
365
- source_origin_ref: string;
366
- evidence_item_ref: string;
367
- }>;
368
- export type IndexerCanonicalMaterialAnswerEvidence = z.infer<typeof indexerCanonicalMaterialAnswerEvidenceSchema>;
369
- declare const materialAnswerCandidateSchema: z.ZodObject<{
370
- state: z.ZodLiteral<"candidate">;
371
- question_key: z.ZodString;
372
- question_revision_digest: z.ZodString;
373
- binding_digest: z.ZodString;
374
- evidence_item_count: z.ZodNumber;
375
- distinct_source_count: z.ZodNumber;
376
- evidence: z.ZodArray<z.ZodObject<{
377
- evidence_item_ref: z.ZodString;
378
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
379
- source_ref: z.ZodString;
380
- source_origin_ref: z.ZodString;
381
- source_input_digest: z.ZodString;
382
- source_spans: z.ZodArray<z.ZodEffects<z.ZodObject<{
383
- unit: z.ZodEnum<["byte", "line"]>;
384
- start: z.ZodNumber;
385
- end_exclusive: z.ZodNumber;
386
- }, "strict", z.ZodTypeAny, {
387
- unit: "byte" | "line";
388
- start: number;
389
- end_exclusive: number;
390
- }, {
391
- unit: "byte" | "line";
392
- start: number;
393
- end_exclusive: number;
394
- }>, {
395
- unit: "byte" | "line";
396
- start: number;
397
- end_exclusive: number;
398
- }, {
399
- unit: "byte" | "line";
400
- start: number;
401
- end_exclusive: number;
402
- }>, "many">;
403
- evidence_digest: z.ZodString;
404
- }, "strict", z.ZodTypeAny, {
405
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
406
- source_ref: string;
407
- evidence_digest: string;
408
- source_input_digest: string;
409
- source_spans: {
410
- unit: "byte" | "line";
411
- start: number;
412
- end_exclusive: number;
413
- }[];
414
- source_origin_ref: string;
415
- evidence_item_ref: string;
416
- }, {
417
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
418
- source_ref: string;
419
- evidence_digest: string;
420
- source_input_digest: string;
421
- source_spans: {
422
- unit: "byte" | "line";
423
- start: number;
424
- end_exclusive: number;
425
- }[];
426
- source_origin_ref: string;
427
- evidence_item_ref: string;
428
- }>, "many">;
429
- }, "strict", z.ZodTypeAny, {
430
- state: "candidate";
431
- binding_digest: string;
432
- evidence: {
433
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
434
- source_ref: string;
435
- evidence_digest: string;
436
- source_input_digest: string;
437
- source_spans: {
438
- unit: "byte" | "line";
439
- start: number;
440
- end_exclusive: number;
441
- }[];
442
- source_origin_ref: string;
443
- evidence_item_ref: string;
444
- }[];
445
- question_key: string;
446
- question_revision_digest: string;
447
- evidence_item_count: number;
448
- distinct_source_count: number;
449
- }, {
450
- state: "candidate";
451
- binding_digest: string;
452
- evidence: {
453
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
454
- source_ref: string;
455
- evidence_digest: string;
456
- source_input_digest: string;
457
- source_spans: {
458
- unit: "byte" | "line";
459
- start: number;
460
- end_exclusive: number;
461
- }[];
462
- source_origin_ref: string;
463
- evidence_item_ref: string;
464
- }[];
465
- question_key: string;
466
- question_revision_digest: string;
467
- evidence_item_count: number;
468
- distinct_source_count: number;
469
- }>;
470
- declare const materialAnswerInsufficientSchema: z.ZodObject<{
471
- state: z.ZodLiteral<"material-answer-evidence-insufficient">;
472
- question_key: z.ZodString;
473
- question_revision_digest: z.ZodString;
474
- reason_codes: z.ZodArray<z.ZodEnum<["minimum-items-not-met", "minimum-distinct-sources-not-met", "provenance-constraint-not-met"]>, "many">;
475
- accepted_evidence_item_count: z.ZodNumber;
476
- distinct_source_count: z.ZodNumber;
477
- rejected_evidence_item_refs: z.ZodArray<z.ZodString, "many">;
478
- }, "strict", z.ZodTypeAny, {
479
- state: "material-answer-evidence-insufficient";
480
- question_key: string;
481
- question_revision_digest: string;
482
- distinct_source_count: number;
483
- reason_codes: ("minimum-items-not-met" | "minimum-distinct-sources-not-met" | "provenance-constraint-not-met")[];
484
- accepted_evidence_item_count: number;
485
- rejected_evidence_item_refs: string[];
486
- }, {
487
- state: "material-answer-evidence-insufficient";
488
- question_key: string;
489
- question_revision_digest: string;
490
- distinct_source_count: number;
491
- reason_codes: ("minimum-items-not-met" | "minimum-distinct-sources-not-met" | "provenance-constraint-not-met")[];
492
- accepted_evidence_item_count: number;
493
- rejected_evidence_item_refs: string[];
494
- }>;
495
- export declare const indexerMaterialAnswerCandidateSetSchema: z.ZodObject<{
496
- protocol: z.ZodLiteral<"context.indexer.material-answer-candidate-set/v1">;
497
- candidate_set_digest: z.ZodString;
498
- workset_digest: z.ZodString;
499
- answer_result_digest: z.ZodString;
500
- answer_indexer_id: z.ZodEffects<z.ZodString, string, string>;
501
- answer_provider_composition_fingerprint: z.ZodString;
502
- evaluations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
503
- state: z.ZodLiteral<"candidate">;
504
- question_key: z.ZodString;
505
- question_revision_digest: z.ZodString;
506
- binding_digest: z.ZodString;
507
- evidence_item_count: z.ZodNumber;
508
- distinct_source_count: z.ZodNumber;
509
- evidence: z.ZodArray<z.ZodObject<{
510
- evidence_item_ref: z.ZodString;
511
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
512
- source_ref: z.ZodString;
513
- source_origin_ref: z.ZodString;
514
- source_input_digest: z.ZodString;
515
- source_spans: z.ZodArray<z.ZodEffects<z.ZodObject<{
516
- unit: z.ZodEnum<["byte", "line"]>;
517
- start: z.ZodNumber;
518
- end_exclusive: z.ZodNumber;
519
- }, "strict", z.ZodTypeAny, {
520
- unit: "byte" | "line";
521
- start: number;
522
- end_exclusive: number;
523
- }, {
524
- unit: "byte" | "line";
525
- start: number;
526
- end_exclusive: number;
527
- }>, {
528
- unit: "byte" | "line";
529
- start: number;
530
- end_exclusive: number;
531
- }, {
532
- unit: "byte" | "line";
533
- start: number;
534
- end_exclusive: number;
535
- }>, "many">;
536
- evidence_digest: z.ZodString;
537
- }, "strict", z.ZodTypeAny, {
538
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
539
- source_ref: string;
540
- evidence_digest: string;
541
- source_input_digest: string;
542
- source_spans: {
543
- unit: "byte" | "line";
544
- start: number;
545
- end_exclusive: number;
546
- }[];
547
- source_origin_ref: string;
548
- evidence_item_ref: string;
549
- }, {
550
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
551
- source_ref: string;
552
- evidence_digest: string;
553
- source_input_digest: string;
554
- source_spans: {
555
- unit: "byte" | "line";
556
- start: number;
557
- end_exclusive: number;
558
- }[];
559
- source_origin_ref: string;
560
- evidence_item_ref: string;
561
- }>, "many">;
562
- }, "strict", z.ZodTypeAny, {
563
- state: "candidate";
564
- binding_digest: string;
565
- evidence: {
566
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
567
- source_ref: string;
568
- evidence_digest: string;
569
- source_input_digest: string;
570
- source_spans: {
571
- unit: "byte" | "line";
572
- start: number;
573
- end_exclusive: number;
574
- }[];
575
- source_origin_ref: string;
576
- evidence_item_ref: string;
577
- }[];
578
- question_key: string;
579
- question_revision_digest: string;
580
- evidence_item_count: number;
581
- distinct_source_count: number;
582
- }, {
583
- state: "candidate";
584
- binding_digest: string;
585
- evidence: {
586
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
587
- source_ref: string;
588
- evidence_digest: string;
589
- source_input_digest: string;
590
- source_spans: {
591
- unit: "byte" | "line";
592
- start: number;
593
- end_exclusive: number;
594
- }[];
595
- source_origin_ref: string;
596
- evidence_item_ref: string;
597
- }[];
598
- question_key: string;
599
- question_revision_digest: string;
600
- evidence_item_count: number;
601
- distinct_source_count: number;
602
- }>, z.ZodObject<{
603
- state: z.ZodLiteral<"material-answer-evidence-insufficient">;
604
- question_key: z.ZodString;
605
- question_revision_digest: z.ZodString;
606
- reason_codes: z.ZodArray<z.ZodEnum<["minimum-items-not-met", "minimum-distinct-sources-not-met", "provenance-constraint-not-met"]>, "many">;
607
- accepted_evidence_item_count: z.ZodNumber;
608
- distinct_source_count: z.ZodNumber;
609
- rejected_evidence_item_refs: z.ZodArray<z.ZodString, "many">;
610
- }, "strict", z.ZodTypeAny, {
611
- state: "material-answer-evidence-insufficient";
612
- question_key: string;
613
- question_revision_digest: string;
614
- distinct_source_count: number;
615
- reason_codes: ("minimum-items-not-met" | "minimum-distinct-sources-not-met" | "provenance-constraint-not-met")[];
616
- accepted_evidence_item_count: number;
617
- rejected_evidence_item_refs: string[];
618
- }, {
619
- state: "material-answer-evidence-insufficient";
620
- question_key: string;
621
- question_revision_digest: string;
622
- distinct_source_count: number;
623
- reason_codes: ("minimum-items-not-met" | "minimum-distinct-sources-not-met" | "provenance-constraint-not-met")[];
624
- accepted_evidence_item_count: number;
625
- rejected_evidence_item_refs: string[];
626
- }>]>, "many">;
627
- }, "strict", z.ZodTypeAny, {
628
- protocol: "context.indexer.material-answer-candidate-set/v1";
629
- workset_digest: string;
630
- answer_indexer_id: string;
631
- answer_provider_composition_fingerprint: string;
632
- candidate_set_digest: string;
633
- answer_result_digest: string;
634
- evaluations: ({
635
- state: "candidate";
636
- binding_digest: string;
637
- evidence: {
638
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
639
- source_ref: string;
640
- evidence_digest: string;
641
- source_input_digest: string;
642
- source_spans: {
643
- unit: "byte" | "line";
644
- start: number;
645
- end_exclusive: number;
646
- }[];
647
- source_origin_ref: string;
648
- evidence_item_ref: string;
649
- }[];
650
- question_key: string;
651
- question_revision_digest: string;
652
- evidence_item_count: number;
653
- distinct_source_count: number;
654
- } | {
655
- state: "material-answer-evidence-insufficient";
656
- question_key: string;
657
- question_revision_digest: string;
658
- distinct_source_count: number;
659
- reason_codes: ("minimum-items-not-met" | "minimum-distinct-sources-not-met" | "provenance-constraint-not-met")[];
660
- accepted_evidence_item_count: number;
661
- rejected_evidence_item_refs: string[];
662
- })[];
663
- }, {
664
- protocol: "context.indexer.material-answer-candidate-set/v1";
665
- workset_digest: string;
666
- answer_indexer_id: string;
667
- answer_provider_composition_fingerprint: string;
668
- candidate_set_digest: string;
669
- answer_result_digest: string;
670
- evaluations: ({
671
- state: "candidate";
672
- binding_digest: string;
673
- evidence: {
674
- kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
675
- source_ref: string;
676
- evidence_digest: string;
677
- source_input_digest: string;
678
- source_spans: {
679
- unit: "byte" | "line";
680
- start: number;
681
- end_exclusive: number;
682
- }[];
683
- source_origin_ref: string;
684
- evidence_item_ref: string;
685
- }[];
686
- question_key: string;
687
- question_revision_digest: string;
688
- evidence_item_count: number;
689
- distinct_source_count: number;
690
- } | {
691
- state: "material-answer-evidence-insufficient";
692
- question_key: string;
693
- question_revision_digest: string;
694
- distinct_source_count: number;
695
- reason_codes: ("minimum-items-not-met" | "minimum-distinct-sources-not-met" | "provenance-constraint-not-met")[];
696
- accepted_evidence_item_count: number;
697
- rejected_evidence_item_refs: string[];
698
- })[];
699
- }>;
700
- export type IndexerMaterialAnswerCandidate = z.infer<typeof materialAnswerCandidateSchema>;
701
- export type IndexerMaterialAnswerEvaluation = IndexerMaterialAnswerCandidate | z.infer<typeof materialAnswerInsufficientSchema>;
702
- export type IndexerMaterialAnswerCandidateSet = z.infer<typeof indexerMaterialAnswerCandidateSetSchema>;
703
- export declare function indexerEvidenceItemRef(input: {
704
- kind: IndexerEvidenceKind;
705
- source_origin_ref: string;
706
- source_input_digest: string;
707
- source_spans: readonly IndexerSourceSpanRef[];
708
- evidence_digest: string;
709
- }): string;
710
- export declare function indexerMaterialAnswerBindingDigest(input: {
711
- accepted_workset_digest: string;
712
- question_key: string;
713
- question_revision_digest: string;
714
- answer_indexer_id: string;
715
- answer_provider_composition_fingerprint: string;
716
- answer_result_digest: string;
717
- evidence: readonly IndexerCanonicalMaterialAnswerEvidence[];
718
- }): string;
719
- export declare function normalizeIndexerSourceSpans(input: {
720
- spans: readonly IndexerSourceSpanRef[];
721
- source: IndexerCurrentEvidenceSource;
722
- }): IndexerSourceSpanRef[];
723
- export declare function validateIndexerMaterialAnswerResult(input: {
724
- result: unknown;
725
- workset: unknown;
726
- expected_execution_request_digest: string;
727
- expected_provider_composition_fingerprint: string;
728
- current_sources: readonly IndexerCurrentEvidenceSource[];
729
- resolve_evidence_digest: (input: {
730
- source: IndexerCurrentEvidenceSource;
731
- source_spans: readonly IndexerSourceSpanRef[];
732
- }) => string;
733
- }): {
734
- result: IndexerMaterialAnswerResult;
735
- candidate_set: IndexerMaterialAnswerCandidateSet;
736
- };
737
- export declare function validateIndexerMaterialAnswerCandidateSet(value: unknown): IndexerMaterialAnswerCandidateSet;
738
- export {};