@c4a/context 0.6.19 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +2 -2
  2. package/README.zh-CN.md +2 -2
  3. package/codeIndexPlan.d.ts +34 -0
  4. package/docs/README.md +7 -0
  5. package/docs/README.zh-CN.md +5 -0
  6. package/docs/getting-started.md +30 -24
  7. package/docs/guides/agent-guide.md +41 -46
  8. package/docs/guides/code-indexer-skill-authoring.md +124 -0
  9. package/docs/guides/indexer-provider-and-customization.md +140 -0
  10. package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
  11. package/docs/reference/code-extractors.md +9 -24
  12. package/docs/reference/indexer-provider-protocol.md +808 -0
  13. package/docs/reference/project-api.md +41 -40
  14. package/index.d.ts +47 -1
  15. package/index.js +28010 -3945
  16. package/indexerAgentStepProtocol.d.ts +9391 -0
  17. package/indexerArtifactDependencies.d.ts +689 -0
  18. package/indexerArtifactPolicy.d.ts +335 -0
  19. package/indexerArtifactResult.d.ts +2009 -0
  20. package/indexerAuditFacts.d.ts +66 -0
  21. package/indexerAuditOverrideReadiness.d.ts +27 -0
  22. package/indexerAuditProtocol.d.ts +238 -0
  23. package/indexerAuditRevision.d.ts +726 -0
  24. package/indexerAuditRevisionActions.d.ts +236 -0
  25. package/indexerAuthoringFixture.d.ts +152 -0
  26. package/indexerBaseQuestionAmendment.d.ts +2403 -0
  27. package/indexerBenchmark.d.ts +1062 -0
  28. package/indexerCandidateCompile.d.ts +985 -0
  29. package/indexerCapabilityGroupEvidence.d.ts +129 -0
  30. package/indexerCatalogFallback.d.ts +1262 -0
  31. package/indexerCollectionMapping.d.ts +75 -0
  32. package/indexerContentLayers.d.ts +137 -0
  33. package/indexerContractOverlay.d.ts +879 -0
  34. package/indexerControlledInvocation.d.ts +512 -0
  35. package/indexerControlledProgram.d.ts +12535 -0
  36. package/indexerCoreExports.d.ts +21 -0
  37. package/indexerCustomizationDraft.d.ts +13800 -0
  38. package/indexerCustomizationLadder.d.ts +103 -0
  39. package/indexerDependencyView.d.ts +1610 -0
  40. package/indexerEvidenceAdapterResult.d.ts +504 -0
  41. package/indexerExampleDecision.d.ts +1606 -0
  42. package/indexerExampleIdentity.d.ts +132 -0
  43. package/indexerExampleIdentityAudit.d.ts +70 -0
  44. package/indexerExampleLinkageAudit.d.ts +80 -0
  45. package/indexerGeneratedAuthoringAudit.d.ts +208 -0
  46. package/indexerIncrementalImpact.d.ts +221 -0
  47. package/indexerInventoryDisposition.d.ts +443 -0
  48. package/indexerLayerComposition.d.ts +1652 -0
  49. package/indexerLayoutChange.d.ts +329 -0
  50. package/indexerLayoutProposalSet.d.ts +447 -0
  51. package/indexerLayoutResolver.d.ts +342 -0
  52. package/indexerLayoutTransition.d.ts +247 -0
  53. package/indexerLifecycle.d.ts +53 -0
  54. package/indexerMainLifecycle.d.ts +258 -0
  55. package/indexerMainRunLedger.d.ts +888 -0
  56. package/indexerMainRunProtocol.d.ts +6471 -0
  57. package/indexerMainWorkset.d.ts +2141 -0
  58. package/indexerMaterialAnswer.d.ts +738 -0
  59. package/indexerMaterialAnswerActualization.d.ts +91 -0
  60. package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
  61. package/indexerMaterialAnswerFlow.d.ts +63 -0
  62. package/indexerMaterialAnswerLayout.d.ts +76 -0
  63. package/indexerMaterialAnswerReview.d.ts +217 -0
  64. package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
  65. package/indexerMaterialAnswerRunLedger.d.ts +918 -0
  66. package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
  67. package/indexerMaterialGapLedger.d.ts +3111 -0
  68. package/indexerMaterialQuestionExclusion.d.ts +129 -0
  69. package/indexerMaterialQuestionWorkset.d.ts +508 -0
  70. package/indexerNavigationArtifactGraph.d.ts +5 -0
  71. package/indexerNavigationArtifactPlan.d.ts +39 -0
  72. package/indexerOverlayQuestionAmendment.d.ts +2551 -0
  73. package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
  74. package/indexerParserCoordinate.d.ts +222 -0
  75. package/indexerParserFactView.d.ts +503 -0
  76. package/indexerPartitionConvergence.d.ts +496 -0
  77. package/indexerPartitionPlan.d.ts +919 -0
  78. package/indexerPartitionStrategyResolution.d.ts +594 -0
  79. package/indexerPhysicalArtifactAudit.d.ts +247 -0
  80. package/indexerPhysicalArtifactManifest.d.ts +449 -0
  81. package/indexerPlannedMaterialAnswer.d.ts +116 -0
  82. package/indexerPostAuthorComposition.d.ts +2000 -0
  83. package/indexerPostAuthorRunLedger.d.ts +1972 -0
  84. package/indexerPrimaryProjection.d.ts +262 -0
  85. package/indexerProfileContract.d.ts +3034 -0
  86. package/indexerProfileMetricAudit.d.ts +218 -0
  87. package/indexerProgramExecutionAuthorization.d.ts +227 -0
  88. package/indexerProgramRunProtocol.d.ts +7642 -0
  89. package/indexerProjectProposal.d.ts +2807 -0
  90. package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
  91. package/indexerProjectedArtifactPlan.d.ts +217 -0
  92. package/indexerProtocolCommon.d.ts +29 -0
  93. package/indexerProvider.d.ts +2510 -0
  94. package/indexerProviderComposition.d.ts +1357 -0
  95. package/indexerProviderContractReferences.d.ts +13 -0
  96. package/indexerProviderProfileResolution.d.ts +20 -0
  97. package/indexerProviderResolution.d.ts +752 -0
  98. package/indexerProviderResolutionAction.d.ts +678 -0
  99. package/indexerProviderRouting.d.ts +3909 -0
  100. package/indexerProviderSelectionProposal.d.ts +3311 -0
  101. package/indexerQuestionAuthority.d.ts +419 -0
  102. package/indexerReaderTargetInventory.d.ts +161 -0
  103. package/indexerReferenceOnlyAudit.d.ts +90 -0
  104. package/indexerRegistry.d.ts +3019 -0
  105. package/indexerRequirementComparison.d.ts +44 -0
  106. package/indexerRequirementConfirmation.d.ts +1193 -0
  107. package/indexerRequirementLifecycle.d.ts +3314 -0
  108. package/indexerRestrictedSelector.d.ts +63 -0
  109. package/indexerResultReconciliation.d.ts +6844 -0
  110. package/indexerResultReconciliationRun.d.ts +15 -0
  111. package/indexerRunEnvelope.d.ts +384 -0
  112. package/indexerRunProtocolCommon.d.ts +21 -0
  113. package/indexerSharedArtifactFingerprint.d.ts +33 -0
  114. package/indexerStructuredDeclaration.d.ts +513 -0
  115. package/indexerSubjectCatalog.d.ts +230 -0
  116. package/indexerSubjectIdentity.d.ts +19 -0
  117. package/indexerSubjectKeyAuthority.d.ts +785 -0
  118. package/indexerTemplateRendering.d.ts +485 -0
  119. package/indexerToolSnapshot.d.ts +431 -0
  120. package/indexerWorksetRead.d.ts +287 -0
  121. package/package.json +1 -1
  122. package/phases.d.ts +1 -1
@@ -0,0 +1,879 @@
1
+ import { z } from "zod";
2
+ import { type IndexerOperatorContract, type IndexerProfileContract, type IndexerProfileContractEntry } from "./indexerProfileContract.js";
3
+ export declare const indexerContractOverlaySchema: z.ZodObject<{
4
+ protocol: z.ZodLiteral<"context.indexer.contract-overlay/v1">;
5
+ id: z.ZodEffects<z.ZodString, string, string>;
6
+ version: z.ZodString;
7
+ extends: z.ZodObject<{
8
+ profile: z.ZodEffects<z.ZodString, string, string>;
9
+ version: z.ZodString;
10
+ contract_digest: z.ZodString;
11
+ }, "strict", z.ZodTypeAny, {
12
+ contract_digest: string;
13
+ version: string;
14
+ profile: string;
15
+ }, {
16
+ contract_digest: string;
17
+ version: string;
18
+ profile: string;
19
+ }>;
20
+ operator_contract_version: z.ZodString;
21
+ operator_contract_digest: z.ZodString;
22
+ additions: z.ZodObject<{
23
+ inventory_domains: z.ZodOptional<z.ZodArray<z.ZodObject<{
24
+ id: z.ZodEffects<z.ZodString, string, string>;
25
+ selector: z.ZodObject<{
26
+ operator: z.ZodEffects<z.ZodString, string, string>;
27
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./indexerRegistry.js").IndexerJson, z.ZodTypeDef, import("./indexerRegistry.js").IndexerJson>>>;
28
+ }, "strict", z.ZodTypeAny, {
29
+ operator: string;
30
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
31
+ }, {
32
+ operator: string;
33
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
34
+ }>;
35
+ disposition_required: z.ZodLiteral<true>;
36
+ }, "strict", z.ZodTypeAny, {
37
+ id: string;
38
+ selector: {
39
+ operator: string;
40
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
41
+ };
42
+ disposition_required: true;
43
+ }, {
44
+ id: string;
45
+ selector: {
46
+ operator: string;
47
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
48
+ };
49
+ disposition_required: true;
50
+ }>, "many">>;
51
+ required_dispositions: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
52
+ metrics: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
53
+ id: z.ZodEffects<z.ZodString, string, string>;
54
+ unit: z.ZodEnum<["count", "ratio"]>;
55
+ operator: z.ZodEffects<z.ZodString, string, string>;
56
+ threshold_policy: z.ZodLiteral<"explicit">;
57
+ direction: z.ZodLiteral<"minimum">;
58
+ recommended_min: z.ZodNumber;
59
+ hard_min: z.ZodNumber;
60
+ }, "strict", z.ZodTypeAny, {
61
+ id: string;
62
+ operator: string;
63
+ unit: "count" | "ratio";
64
+ threshold_policy: "explicit";
65
+ direction: "minimum";
66
+ recommended_min: number;
67
+ hard_min: number;
68
+ }, {
69
+ id: string;
70
+ operator: string;
71
+ unit: "count" | "ratio";
72
+ threshold_policy: "explicit";
73
+ direction: "minimum";
74
+ recommended_min: number;
75
+ hard_min: number;
76
+ }>, {
77
+ id: string;
78
+ operator: string;
79
+ unit: "count" | "ratio";
80
+ threshold_policy: "explicit";
81
+ direction: "minimum";
82
+ recommended_min: number;
83
+ hard_min: number;
84
+ }, {
85
+ id: string;
86
+ operator: string;
87
+ unit: "count" | "ratio";
88
+ threshold_policy: "explicit";
89
+ direction: "minimum";
90
+ recommended_min: number;
91
+ hard_min: number;
92
+ }>, z.ZodEffects<z.ZodObject<{
93
+ id: z.ZodEffects<z.ZodString, string, string>;
94
+ unit: z.ZodEnum<["count", "ratio"]>;
95
+ operator: z.ZodEffects<z.ZodString, string, string>;
96
+ threshold_policy: z.ZodLiteral<"explicit">;
97
+ direction: z.ZodLiteral<"maximum">;
98
+ recommended_max: z.ZodNumber;
99
+ hard_max: z.ZodNumber;
100
+ }, "strict", z.ZodTypeAny, {
101
+ id: string;
102
+ operator: string;
103
+ unit: "count" | "ratio";
104
+ threshold_policy: "explicit";
105
+ direction: "maximum";
106
+ recommended_max: number;
107
+ hard_max: number;
108
+ }, {
109
+ id: string;
110
+ operator: string;
111
+ unit: "count" | "ratio";
112
+ threshold_policy: "explicit";
113
+ direction: "maximum";
114
+ recommended_max: number;
115
+ hard_max: number;
116
+ }>, {
117
+ id: string;
118
+ operator: string;
119
+ unit: "count" | "ratio";
120
+ threshold_policy: "explicit";
121
+ direction: "maximum";
122
+ recommended_max: number;
123
+ hard_max: number;
124
+ }, {
125
+ id: string;
126
+ operator: string;
127
+ unit: "count" | "ratio";
128
+ threshold_policy: "explicit";
129
+ direction: "maximum";
130
+ recommended_max: number;
131
+ hard_max: number;
132
+ }>, z.ZodObject<{
133
+ id: z.ZodEffects<z.ZodString, string, string>;
134
+ unit: z.ZodEnum<["count", "ratio"]>;
135
+ operator: z.ZodEffects<z.ZodString, string, string>;
136
+ threshold_policy: z.ZodLiteral<"inflation-sensitive">;
137
+ direction: z.ZodLiteral<"maximum">;
138
+ }, "strict", z.ZodTypeAny, {
139
+ id: string;
140
+ operator: string;
141
+ unit: "count" | "ratio";
142
+ threshold_policy: "inflation-sensitive";
143
+ direction: "maximum";
144
+ }, {
145
+ id: string;
146
+ operator: string;
147
+ unit: "count" | "ratio";
148
+ threshold_policy: "inflation-sensitive";
149
+ direction: "maximum";
150
+ }>]>, "many">>;
151
+ artifact_policy_variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
152
+ id: z.ZodEffects<z.ZodString, string, string>;
153
+ eligibility: z.ZodObject<{
154
+ protocol: z.ZodLiteral<"context.indexer.selector/v1">;
155
+ expression: z.ZodType<import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression, z.ZodTypeDef, import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression>;
156
+ }, "strict", z.ZodTypeAny, {
157
+ protocol: "context.indexer.selector/v1";
158
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
159
+ }, {
160
+ protocol: "context.indexer.selector/v1";
161
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
162
+ }>;
163
+ artifact_kinds: z.ZodEffects<z.ZodObject<{
164
+ required: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
165
+ discretionary: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
166
+ }, "strict", z.ZodTypeAny, {
167
+ required: string[];
168
+ discretionary: string[];
169
+ }, {
170
+ required: string[];
171
+ discretionary: string[];
172
+ }>, {
173
+ required: string[];
174
+ discretionary: string[];
175
+ }, {
176
+ required: string[];
177
+ discretionary: string[];
178
+ }>;
179
+ thresholds: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
180
+ recommended_max: z.ZodNumber;
181
+ }, "strict", z.ZodTypeAny, {
182
+ recommended_max: number;
183
+ }, {
184
+ recommended_max: number;
185
+ }>>;
186
+ }, "strict", z.ZodTypeAny, {
187
+ id: string;
188
+ thresholds: Record<string, {
189
+ recommended_max: number;
190
+ }>;
191
+ eligibility: {
192
+ protocol: "context.indexer.selector/v1";
193
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
194
+ };
195
+ artifact_kinds: {
196
+ required: string[];
197
+ discretionary: string[];
198
+ };
199
+ }, {
200
+ id: string;
201
+ thresholds: Record<string, {
202
+ recommended_max: number;
203
+ }>;
204
+ eligibility: {
205
+ protocol: "context.indexer.selector/v1";
206
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
207
+ };
208
+ artifact_kinds: {
209
+ required: string[];
210
+ discretionary: string[];
211
+ };
212
+ }>, "many">>;
213
+ question_target_domains: z.ZodOptional<z.ZodArray<z.ZodObject<{
214
+ id: z.ZodEffects<z.ZodString, string, string>;
215
+ selector: z.ZodObject<{
216
+ operator: z.ZodEffects<z.ZodString, string, string>;
217
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./indexerRegistry.js").IndexerJson, z.ZodTypeDef, import("./indexerRegistry.js").IndexerJson>>>;
218
+ }, "strict", z.ZodTypeAny, {
219
+ operator: string;
220
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
221
+ }, {
222
+ operator: string;
223
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
224
+ }>;
225
+ grouping_operator: z.ZodEffects<z.ZodString, string, string>;
226
+ subject_key_kind: z.ZodEffects<z.ZodString, string, string>;
227
+ granularity: z.ZodEnum<["module", "identity"]>;
228
+ }, "strict", z.ZodTypeAny, {
229
+ id: string;
230
+ selector: {
231
+ operator: string;
232
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
233
+ };
234
+ grouping_operator: string;
235
+ subject_key_kind: string;
236
+ granularity: "module" | "identity";
237
+ }, {
238
+ id: string;
239
+ selector: {
240
+ operator: string;
241
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
242
+ };
243
+ grouping_operator: string;
244
+ subject_key_kind: string;
245
+ granularity: "module" | "identity";
246
+ }>, "many">>;
247
+ reader_question_contracts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
248
+ ref: z.ZodString;
249
+ semantic: z.ZodEffects<z.ZodString, string, string>;
250
+ version: z.ZodNumber;
251
+ coverage_domain: z.ZodEffects<z.ZodString, string, string>;
252
+ target_domain_ref: z.ZodEffects<z.ZodString, string, string>;
253
+ target_selector: z.ZodObject<{
254
+ protocol: z.ZodLiteral<"context.indexer.selector/v1">;
255
+ expression: z.ZodType<import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression, z.ZodTypeDef, import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression>;
256
+ }, "strict", z.ZodTypeAny, {
257
+ protocol: "context.indexer.selector/v1";
258
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
259
+ }, {
260
+ protocol: "context.indexer.selector/v1";
261
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
262
+ }>;
263
+ evidence_contract: z.ZodObject<{
264
+ accepted_kinds: z.ZodArray<z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>, "many">;
265
+ minimum_items: z.ZodNumber;
266
+ minimum_distinct_sources: z.ZodNumber;
267
+ provenance_constraints: z.ZodOptional<z.ZodObject<{
268
+ protocol: z.ZodLiteral<"context.indexer.selector/v1">;
269
+ expression: z.ZodType<import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression, z.ZodTypeDef, import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression>;
270
+ }, "strict", z.ZodTypeAny, {
271
+ protocol: "context.indexer.selector/v1";
272
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
273
+ }, {
274
+ protocol: "context.indexer.selector/v1";
275
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
276
+ }>>;
277
+ }, "strict", z.ZodTypeAny, {
278
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
279
+ minimum_items: number;
280
+ minimum_distinct_sources: number;
281
+ provenance_constraints?: {
282
+ protocol: "context.indexer.selector/v1";
283
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
284
+ } | undefined;
285
+ }, {
286
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
287
+ minimum_items: number;
288
+ minimum_distinct_sources: number;
289
+ provenance_constraints?: {
290
+ protocol: "context.indexer.selector/v1";
291
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
292
+ } | undefined;
293
+ }>;
294
+ allowed_exclusion_reason_codes: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
295
+ }, "strict", z.ZodTypeAny, {
296
+ ref: string;
297
+ version: number;
298
+ semantic: string;
299
+ coverage_domain: string;
300
+ target_domain_ref: string;
301
+ target_selector: {
302
+ protocol: "context.indexer.selector/v1";
303
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
304
+ };
305
+ evidence_contract: {
306
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
307
+ minimum_items: number;
308
+ minimum_distinct_sources: number;
309
+ provenance_constraints?: {
310
+ protocol: "context.indexer.selector/v1";
311
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
312
+ } | undefined;
313
+ };
314
+ allowed_exclusion_reason_codes?: string[] | undefined;
315
+ }, {
316
+ ref: string;
317
+ version: number;
318
+ semantic: string;
319
+ coverage_domain: string;
320
+ target_domain_ref: string;
321
+ target_selector: {
322
+ protocol: "context.indexer.selector/v1";
323
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
324
+ };
325
+ evidence_contract: {
326
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
327
+ minimum_items: number;
328
+ minimum_distinct_sources: number;
329
+ provenance_constraints?: {
330
+ protocol: "context.indexer.selector/v1";
331
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
332
+ } | undefined;
333
+ };
334
+ allowed_exclusion_reason_codes?: string[] | undefined;
335
+ }>, {
336
+ ref: string;
337
+ version: number;
338
+ semantic: string;
339
+ coverage_domain: string;
340
+ target_domain_ref: string;
341
+ target_selector: {
342
+ protocol: "context.indexer.selector/v1";
343
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
344
+ };
345
+ evidence_contract: {
346
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
347
+ minimum_items: number;
348
+ minimum_distinct_sources: number;
349
+ provenance_constraints?: {
350
+ protocol: "context.indexer.selector/v1";
351
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
352
+ } | undefined;
353
+ };
354
+ allowed_exclusion_reason_codes?: string[] | undefined;
355
+ }, {
356
+ ref: string;
357
+ version: number;
358
+ semantic: string;
359
+ coverage_domain: string;
360
+ target_domain_ref: string;
361
+ target_selector: {
362
+ protocol: "context.indexer.selector/v1";
363
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
364
+ };
365
+ evidence_contract: {
366
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
367
+ minimum_items: number;
368
+ minimum_distinct_sources: number;
369
+ provenance_constraints?: {
370
+ protocol: "context.indexer.selector/v1";
371
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
372
+ } | undefined;
373
+ };
374
+ allowed_exclusion_reason_codes?: string[] | undefined;
375
+ }>, "many">>;
376
+ }, "strict", z.ZodTypeAny, {
377
+ metrics?: ({
378
+ id: string;
379
+ operator: string;
380
+ unit: "count" | "ratio";
381
+ threshold_policy: "explicit";
382
+ direction: "minimum";
383
+ recommended_min: number;
384
+ hard_min: number;
385
+ } | {
386
+ id: string;
387
+ operator: string;
388
+ unit: "count" | "ratio";
389
+ threshold_policy: "explicit";
390
+ direction: "maximum";
391
+ recommended_max: number;
392
+ hard_max: number;
393
+ } | {
394
+ id: string;
395
+ operator: string;
396
+ unit: "count" | "ratio";
397
+ threshold_policy: "inflation-sensitive";
398
+ direction: "maximum";
399
+ })[] | undefined;
400
+ inventory_domains?: {
401
+ id: string;
402
+ selector: {
403
+ operator: string;
404
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
405
+ };
406
+ disposition_required: true;
407
+ }[] | undefined;
408
+ required_dispositions?: string[] | undefined;
409
+ artifact_policy_variants?: {
410
+ id: string;
411
+ thresholds: Record<string, {
412
+ recommended_max: number;
413
+ }>;
414
+ eligibility: {
415
+ protocol: "context.indexer.selector/v1";
416
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
417
+ };
418
+ artifact_kinds: {
419
+ required: string[];
420
+ discretionary: string[];
421
+ };
422
+ }[] | undefined;
423
+ question_target_domains?: {
424
+ id: string;
425
+ selector: {
426
+ operator: string;
427
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
428
+ };
429
+ grouping_operator: string;
430
+ subject_key_kind: string;
431
+ granularity: "module" | "identity";
432
+ }[] | undefined;
433
+ reader_question_contracts?: {
434
+ ref: string;
435
+ version: number;
436
+ semantic: string;
437
+ coverage_domain: string;
438
+ target_domain_ref: string;
439
+ target_selector: {
440
+ protocol: "context.indexer.selector/v1";
441
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
442
+ };
443
+ evidence_contract: {
444
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
445
+ minimum_items: number;
446
+ minimum_distinct_sources: number;
447
+ provenance_constraints?: {
448
+ protocol: "context.indexer.selector/v1";
449
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
450
+ } | undefined;
451
+ };
452
+ allowed_exclusion_reason_codes?: string[] | undefined;
453
+ }[] | undefined;
454
+ }, {
455
+ metrics?: ({
456
+ id: string;
457
+ operator: string;
458
+ unit: "count" | "ratio";
459
+ threshold_policy: "explicit";
460
+ direction: "minimum";
461
+ recommended_min: number;
462
+ hard_min: number;
463
+ } | {
464
+ id: string;
465
+ operator: string;
466
+ unit: "count" | "ratio";
467
+ threshold_policy: "explicit";
468
+ direction: "maximum";
469
+ recommended_max: number;
470
+ hard_max: number;
471
+ } | {
472
+ id: string;
473
+ operator: string;
474
+ unit: "count" | "ratio";
475
+ threshold_policy: "inflation-sensitive";
476
+ direction: "maximum";
477
+ })[] | undefined;
478
+ inventory_domains?: {
479
+ id: string;
480
+ selector: {
481
+ operator: string;
482
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
483
+ };
484
+ disposition_required: true;
485
+ }[] | undefined;
486
+ required_dispositions?: string[] | undefined;
487
+ artifact_policy_variants?: {
488
+ id: string;
489
+ thresholds: Record<string, {
490
+ recommended_max: number;
491
+ }>;
492
+ eligibility: {
493
+ protocol: "context.indexer.selector/v1";
494
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
495
+ };
496
+ artifact_kinds: {
497
+ required: string[];
498
+ discretionary: string[];
499
+ };
500
+ }[] | undefined;
501
+ question_target_domains?: {
502
+ id: string;
503
+ selector: {
504
+ operator: string;
505
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
506
+ };
507
+ grouping_operator: string;
508
+ subject_key_kind: string;
509
+ granularity: "module" | "identity";
510
+ }[] | undefined;
511
+ reader_question_contracts?: {
512
+ ref: string;
513
+ version: number;
514
+ semantic: string;
515
+ coverage_domain: string;
516
+ target_domain_ref: string;
517
+ target_selector: {
518
+ protocol: "context.indexer.selector/v1";
519
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
520
+ };
521
+ evidence_contract: {
522
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
523
+ minimum_items: number;
524
+ minimum_distinct_sources: number;
525
+ provenance_constraints?: {
526
+ protocol: "context.indexer.selector/v1";
527
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
528
+ } | undefined;
529
+ };
530
+ allowed_exclusion_reason_codes?: string[] | undefined;
531
+ }[] | undefined;
532
+ }>;
533
+ metric_tightenings: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
534
+ metric_ref: z.ZodEffects<z.ZodString, string, string>;
535
+ direction: z.ZodLiteral<"minimum">;
536
+ recommended_min: z.ZodOptional<z.ZodNumber>;
537
+ hard_min: z.ZodOptional<z.ZodNumber>;
538
+ }, "strict", z.ZodTypeAny, {
539
+ direction: "minimum";
540
+ metric_ref: string;
541
+ recommended_min?: number | undefined;
542
+ hard_min?: number | undefined;
543
+ }, {
544
+ direction: "minimum";
545
+ metric_ref: string;
546
+ recommended_min?: number | undefined;
547
+ hard_min?: number | undefined;
548
+ }>, {
549
+ direction: "minimum";
550
+ metric_ref: string;
551
+ recommended_min?: number | undefined;
552
+ hard_min?: number | undefined;
553
+ }, {
554
+ direction: "minimum";
555
+ metric_ref: string;
556
+ recommended_min?: number | undefined;
557
+ hard_min?: number | undefined;
558
+ }>, z.ZodEffects<z.ZodObject<{
559
+ metric_ref: z.ZodEffects<z.ZodString, string, string>;
560
+ direction: z.ZodLiteral<"maximum">;
561
+ recommended_max: z.ZodOptional<z.ZodNumber>;
562
+ hard_max: z.ZodOptional<z.ZodNumber>;
563
+ }, "strict", z.ZodTypeAny, {
564
+ direction: "maximum";
565
+ metric_ref: string;
566
+ recommended_max?: number | undefined;
567
+ hard_max?: number | undefined;
568
+ }, {
569
+ direction: "maximum";
570
+ metric_ref: string;
571
+ recommended_max?: number | undefined;
572
+ hard_max?: number | undefined;
573
+ }>, {
574
+ direction: "maximum";
575
+ metric_ref: string;
576
+ recommended_max?: number | undefined;
577
+ hard_max?: number | undefined;
578
+ }, {
579
+ direction: "maximum";
580
+ metric_ref: string;
581
+ recommended_max?: number | undefined;
582
+ hard_max?: number | undefined;
583
+ }>]>, "many">>;
584
+ artifact_policy_threshold_tightenings: z.ZodOptional<z.ZodArray<z.ZodObject<{
585
+ variant_ref: z.ZodEffects<z.ZodString, string, string>;
586
+ metric_ref: z.ZodEffects<z.ZodString, string, string>;
587
+ recommended_max: z.ZodNumber;
588
+ }, "strict", z.ZodTypeAny, {
589
+ recommended_max: number;
590
+ metric_ref: string;
591
+ variant_ref: string;
592
+ }, {
593
+ recommended_max: number;
594
+ metric_ref: string;
595
+ variant_ref: string;
596
+ }>, "many">>;
597
+ overlay_digest: z.ZodString;
598
+ }, "strict", z.ZodTypeAny, {
599
+ id: string;
600
+ protocol: "context.indexer.contract-overlay/v1";
601
+ version: string;
602
+ operator_contract_version: string;
603
+ operator_contract_digest: string;
604
+ extends: {
605
+ contract_digest: string;
606
+ version: string;
607
+ profile: string;
608
+ };
609
+ additions: {
610
+ metrics?: ({
611
+ id: string;
612
+ operator: string;
613
+ unit: "count" | "ratio";
614
+ threshold_policy: "explicit";
615
+ direction: "minimum";
616
+ recommended_min: number;
617
+ hard_min: number;
618
+ } | {
619
+ id: string;
620
+ operator: string;
621
+ unit: "count" | "ratio";
622
+ threshold_policy: "explicit";
623
+ direction: "maximum";
624
+ recommended_max: number;
625
+ hard_max: number;
626
+ } | {
627
+ id: string;
628
+ operator: string;
629
+ unit: "count" | "ratio";
630
+ threshold_policy: "inflation-sensitive";
631
+ direction: "maximum";
632
+ })[] | undefined;
633
+ inventory_domains?: {
634
+ id: string;
635
+ selector: {
636
+ operator: string;
637
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
638
+ };
639
+ disposition_required: true;
640
+ }[] | undefined;
641
+ required_dispositions?: string[] | undefined;
642
+ artifact_policy_variants?: {
643
+ id: string;
644
+ thresholds: Record<string, {
645
+ recommended_max: number;
646
+ }>;
647
+ eligibility: {
648
+ protocol: "context.indexer.selector/v1";
649
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
650
+ };
651
+ artifact_kinds: {
652
+ required: string[];
653
+ discretionary: string[];
654
+ };
655
+ }[] | undefined;
656
+ question_target_domains?: {
657
+ id: string;
658
+ selector: {
659
+ operator: string;
660
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
661
+ };
662
+ grouping_operator: string;
663
+ subject_key_kind: string;
664
+ granularity: "module" | "identity";
665
+ }[] | undefined;
666
+ reader_question_contracts?: {
667
+ ref: string;
668
+ version: number;
669
+ semantic: string;
670
+ coverage_domain: string;
671
+ target_domain_ref: string;
672
+ target_selector: {
673
+ protocol: "context.indexer.selector/v1";
674
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
675
+ };
676
+ evidence_contract: {
677
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
678
+ minimum_items: number;
679
+ minimum_distinct_sources: number;
680
+ provenance_constraints?: {
681
+ protocol: "context.indexer.selector/v1";
682
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
683
+ } | undefined;
684
+ };
685
+ allowed_exclusion_reason_codes?: string[] | undefined;
686
+ }[] | undefined;
687
+ };
688
+ overlay_digest: string;
689
+ metric_tightenings?: ({
690
+ direction: "minimum";
691
+ metric_ref: string;
692
+ recommended_min?: number | undefined;
693
+ hard_min?: number | undefined;
694
+ } | {
695
+ direction: "maximum";
696
+ metric_ref: string;
697
+ recommended_max?: number | undefined;
698
+ hard_max?: number | undefined;
699
+ })[] | undefined;
700
+ artifact_policy_threshold_tightenings?: {
701
+ recommended_max: number;
702
+ metric_ref: string;
703
+ variant_ref: string;
704
+ }[] | undefined;
705
+ }, {
706
+ id: string;
707
+ protocol: "context.indexer.contract-overlay/v1";
708
+ version: string;
709
+ operator_contract_version: string;
710
+ operator_contract_digest: string;
711
+ extends: {
712
+ contract_digest: string;
713
+ version: string;
714
+ profile: string;
715
+ };
716
+ additions: {
717
+ metrics?: ({
718
+ id: string;
719
+ operator: string;
720
+ unit: "count" | "ratio";
721
+ threshold_policy: "explicit";
722
+ direction: "minimum";
723
+ recommended_min: number;
724
+ hard_min: number;
725
+ } | {
726
+ id: string;
727
+ operator: string;
728
+ unit: "count" | "ratio";
729
+ threshold_policy: "explicit";
730
+ direction: "maximum";
731
+ recommended_max: number;
732
+ hard_max: number;
733
+ } | {
734
+ id: string;
735
+ operator: string;
736
+ unit: "count" | "ratio";
737
+ threshold_policy: "inflation-sensitive";
738
+ direction: "maximum";
739
+ })[] | undefined;
740
+ inventory_domains?: {
741
+ id: string;
742
+ selector: {
743
+ operator: string;
744
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
745
+ };
746
+ disposition_required: true;
747
+ }[] | undefined;
748
+ required_dispositions?: string[] | undefined;
749
+ artifact_policy_variants?: {
750
+ id: string;
751
+ thresholds: Record<string, {
752
+ recommended_max: number;
753
+ }>;
754
+ eligibility: {
755
+ protocol: "context.indexer.selector/v1";
756
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
757
+ };
758
+ artifact_kinds: {
759
+ required: string[];
760
+ discretionary: string[];
761
+ };
762
+ }[] | undefined;
763
+ question_target_domains?: {
764
+ id: string;
765
+ selector: {
766
+ operator: string;
767
+ parameters?: Record<string, import("./indexerRegistry.js").IndexerJson> | undefined;
768
+ };
769
+ grouping_operator: string;
770
+ subject_key_kind: string;
771
+ granularity: "module" | "identity";
772
+ }[] | undefined;
773
+ reader_question_contracts?: {
774
+ ref: string;
775
+ version: number;
776
+ semantic: string;
777
+ coverage_domain: string;
778
+ target_domain_ref: string;
779
+ target_selector: {
780
+ protocol: "context.indexer.selector/v1";
781
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
782
+ };
783
+ evidence_contract: {
784
+ accepted_kinds: ("contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
785
+ minimum_items: number;
786
+ minimum_distinct_sources: number;
787
+ provenance_constraints?: {
788
+ protocol: "context.indexer.selector/v1";
789
+ expression: import("./indexerRestrictedSelector.js").IndexerRestrictedSelectorExpression;
790
+ } | undefined;
791
+ };
792
+ allowed_exclusion_reason_codes?: string[] | undefined;
793
+ }[] | undefined;
794
+ };
795
+ overlay_digest: string;
796
+ metric_tightenings?: ({
797
+ direction: "minimum";
798
+ metric_ref: string;
799
+ recommended_min?: number | undefined;
800
+ hard_min?: number | undefined;
801
+ } | {
802
+ direction: "maximum";
803
+ metric_ref: string;
804
+ recommended_max?: number | undefined;
805
+ hard_max?: number | undefined;
806
+ })[] | undefined;
807
+ artifact_policy_threshold_tightenings?: {
808
+ recommended_max: number;
809
+ metric_ref: string;
810
+ variant_ref: string;
811
+ }[] | undefined;
812
+ }>;
813
+ export type IndexerContractOverlay = z.infer<typeof indexerContractOverlaySchema>;
814
+ export declare function indexerContractOverlayDigest(overlay: Omit<IndexerContractOverlay, "overlay_digest">): string;
815
+ export interface IndexerOverlayConformanceReport {
816
+ protocol: "context.indexer.overlay-conformance-report/v1";
817
+ overlay_digest: string;
818
+ base_contract_digest: string;
819
+ operator_contract_digest: string;
820
+ monotonic: true;
821
+ added_refs: string[];
822
+ tightened_metric_refs: string[];
823
+ tightened_artifact_policy_refs: string[];
824
+ report_digest: string;
825
+ }
826
+ export declare function validateIndexerContractOverlay(input: {
827
+ overlay: unknown;
828
+ baseContract: unknown;
829
+ operatorContract: unknown;
830
+ }): {
831
+ overlay: IndexerContractOverlay;
832
+ effectiveProfile: IndexerProfileContractEntry;
833
+ report: IndexerOverlayConformanceReport;
834
+ };
835
+ export declare const indexerOverlayValidationReceiptSchema: z.ZodObject<{
836
+ protocol: z.ZodLiteral<"context.indexer.overlay-validation-receipt/v1">;
837
+ project_ref: z.ZodString;
838
+ overlay_digest: z.ZodString;
839
+ base_contract_digest: z.ZodString;
840
+ provider_integrity: z.ZodString;
841
+ operator_contract_digest: z.ZodString;
842
+ conformance_report_digest: z.ZodString;
843
+ receipt_digest: z.ZodString;
844
+ }, "strict", z.ZodTypeAny, {
845
+ protocol: "context.indexer.overlay-validation-receipt/v1";
846
+ receipt_digest: string;
847
+ operator_contract_digest: string;
848
+ project_ref: string;
849
+ provider_integrity: string;
850
+ overlay_digest: string;
851
+ base_contract_digest: string;
852
+ conformance_report_digest: string;
853
+ }, {
854
+ protocol: "context.indexer.overlay-validation-receipt/v1";
855
+ receipt_digest: string;
856
+ operator_contract_digest: string;
857
+ project_ref: string;
858
+ provider_integrity: string;
859
+ overlay_digest: string;
860
+ base_contract_digest: string;
861
+ conformance_report_digest: string;
862
+ }>;
863
+ export type IndexerOverlayValidationReceipt = z.infer<typeof indexerOverlayValidationReceiptSchema>;
864
+ export declare function indexerOverlayValidationReceiptDigest(receipt: Omit<IndexerOverlayValidationReceipt, "receipt_digest">): string;
865
+ export declare function createIndexerOverlayValidationReceipt(input: {
866
+ overlayValidation: ReturnType<typeof validateIndexerContractOverlay>;
867
+ baseContract: IndexerProfileContract;
868
+ operatorContract: IndexerOperatorContract;
869
+ providerIntegrity: string;
870
+ projectRef: string;
871
+ }): IndexerOverlayValidationReceipt;
872
+ export declare function validateIndexerOverlayValidationReceipt(input: {
873
+ value: unknown;
874
+ overlayValidation: ReturnType<typeof validateIndexerContractOverlay>;
875
+ baseContract: IndexerProfileContract;
876
+ operatorContract: IndexerOperatorContract;
877
+ providerIntegrity: string;
878
+ projectRef: string;
879
+ }): IndexerOverlayValidationReceipt;