@c4a/context 0.6.18 → 0.7.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.
Files changed (130) hide show
  1. package/README.md +5 -5
  2. package/README.zh-CN.md +5 -5
  3. package/codeIndexPlan.d.ts +84 -0
  4. package/contracts.d.ts +2 -1
  5. package/docs/README.md +7 -0
  6. package/docs/README.zh-CN.md +5 -0
  7. package/docs/getting-started.md +12 -12
  8. package/docs/guides/agent-guide.md +18 -9
  9. package/docs/guides/code-indexer-skill-authoring.md +124 -0
  10. package/docs/guides/indexer-provider-and-customization.md +140 -0
  11. package/docs/guides/lark-resources.md +7 -0
  12. package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
  13. package/docs/guides/package-outputs.md +3 -3
  14. package/docs/reference/code-extractors.md +7 -6
  15. package/docs/reference/indexer-provider-protocol.md +819 -0
  16. package/docs/reference/package-templates.md +18 -10
  17. package/docs/reference/project-api.md +49 -24
  18. package/index.d.ts +48 -2
  19. package/index.js +28239 -3948
  20. package/indexerAgentStepProtocol.d.ts +9391 -0
  21. package/indexerArtifactDependencies.d.ts +689 -0
  22. package/indexerArtifactPolicy.d.ts +335 -0
  23. package/indexerArtifactResult.d.ts +2010 -0
  24. package/indexerAuditFacts.d.ts +66 -0
  25. package/indexerAuditOverrideReadiness.d.ts +27 -0
  26. package/indexerAuditProtocol.d.ts +238 -0
  27. package/indexerAuditRevision.d.ts +726 -0
  28. package/indexerAuditRevisionActions.d.ts +236 -0
  29. package/indexerAuthoringFixture.d.ts +152 -0
  30. package/indexerBaseQuestionAmendment.d.ts +2403 -0
  31. package/indexerBenchmark.d.ts +1062 -0
  32. package/indexerCandidateCompile.d.ts +801 -0
  33. package/indexerCapabilityGroupEvidence.d.ts +129 -0
  34. package/indexerCatalogFallback.d.ts +1262 -0
  35. package/indexerCollectionMapping.d.ts +75 -0
  36. package/indexerContentLayers.d.ts +137 -0
  37. package/indexerControlledInvocation.d.ts +512 -0
  38. package/indexerControlledProgram.d.ts +12535 -0
  39. package/indexerCoreExports.d.ts +21 -0
  40. package/indexerCustomizationDraft.d.ts +13800 -0
  41. package/indexerCustomizationLadder.d.ts +103 -0
  42. package/indexerDependencyView.d.ts +1610 -0
  43. package/indexerEvidenceAdapterResult.d.ts +504 -0
  44. package/indexerExampleDecision.d.ts +1606 -0
  45. package/indexerExampleIdentity.d.ts +132 -0
  46. package/indexerExampleIdentityAudit.d.ts +70 -0
  47. package/indexerExampleLinkageAudit.d.ts +80 -0
  48. package/indexerGeneratedAuthoringAudit.d.ts +208 -0
  49. package/indexerIncrementalImpact.d.ts +221 -0
  50. package/indexerInventoryDisposition.d.ts +443 -0
  51. package/indexerLayerComposition.d.ts +1652 -0
  52. package/indexerLayoutChange.d.ts +329 -0
  53. package/indexerLayoutProposalSet.d.ts +447 -0
  54. package/indexerLayoutResolver.d.ts +342 -0
  55. package/indexerLayoutTransition.d.ts +247 -0
  56. package/indexerLifecycle.d.ts +53 -0
  57. package/indexerMainLifecycle.d.ts +258 -0
  58. package/indexerMainRunLedger.d.ts +888 -0
  59. package/indexerMainRunProtocol.d.ts +6471 -0
  60. package/indexerMainWorkset.d.ts +2141 -0
  61. package/indexerMaterialAnswer.d.ts +738 -0
  62. package/indexerMaterialAnswerActualization.d.ts +91 -0
  63. package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
  64. package/indexerMaterialAnswerFlow.d.ts +63 -0
  65. package/indexerMaterialAnswerLayout.d.ts +76 -0
  66. package/indexerMaterialAnswerReview.d.ts +217 -0
  67. package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
  68. package/indexerMaterialAnswerRunLedger.d.ts +918 -0
  69. package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
  70. package/indexerMaterialGapLedger.d.ts +3111 -0
  71. package/indexerMaterialQuestionExclusion.d.ts +129 -0
  72. package/indexerMaterialQuestionWorkset.d.ts +508 -0
  73. package/indexerNavigationArtifactGraph.d.ts +5 -0
  74. package/indexerNavigationArtifactPlan.d.ts +39 -0
  75. package/indexerOverlayQuestionAmendment.d.ts +2551 -0
  76. package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
  77. package/indexerOverlayTrust.d.ts +1425 -0
  78. package/indexerParserCoordinate.d.ts +222 -0
  79. package/indexerParserFactView.d.ts +503 -0
  80. package/indexerPartitionConvergence.d.ts +496 -0
  81. package/indexerPartitionPlan.d.ts +919 -0
  82. package/indexerPartitionStrategyResolution.d.ts +594 -0
  83. package/indexerPhysicalArtifactAudit.d.ts +247 -0
  84. package/indexerPhysicalArtifactManifest.d.ts +449 -0
  85. package/indexerPlannedMaterialAnswer.d.ts +116 -0
  86. package/indexerPostAuthorComposition.d.ts +2000 -0
  87. package/indexerPostAuthorRunLedger.d.ts +1972 -0
  88. package/indexerPrimaryProjection.d.ts +262 -0
  89. package/indexerProfileContract.d.ts +3034 -0
  90. package/indexerProfileMetricAudit.d.ts +218 -0
  91. package/indexerProgramExecutionAuthorization.d.ts +227 -0
  92. package/indexerProgramRunProtocol.d.ts +7642 -0
  93. package/indexerProjectProposal.d.ts +2807 -0
  94. package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
  95. package/indexerProjectedArtifactPlan.d.ts +217 -0
  96. package/indexerProtocolCommon.d.ts +29 -0
  97. package/indexerProvider.d.ts +2573 -0
  98. package/indexerProviderComposition.d.ts +1357 -0
  99. package/indexerProviderContractReferences.d.ts +13 -0
  100. package/indexerProviderProfileResolution.d.ts +20 -0
  101. package/indexerProviderResolution.d.ts +752 -0
  102. package/indexerProviderResolutionAction.d.ts +678 -0
  103. package/indexerProviderRouting.d.ts +3909 -0
  104. package/indexerProviderSelectionProposal.d.ts +3311 -0
  105. package/indexerQuestionAuthority.d.ts +419 -0
  106. package/indexerReaderTargetInventory.d.ts +161 -0
  107. package/indexerReferenceOnlyAudit.d.ts +90 -0
  108. package/indexerRegistry.d.ts +3019 -0
  109. package/indexerRequirementComparison.d.ts +44 -0
  110. package/indexerRequirementConfirmation.d.ts +1193 -0
  111. package/indexerRequirementLifecycle.d.ts +3314 -0
  112. package/indexerRestrictedSelector.d.ts +63 -0
  113. package/indexerResultReconciliation.d.ts +6844 -0
  114. package/indexerResultReconciliationRun.d.ts +15 -0
  115. package/indexerRunEnvelope.d.ts +384 -0
  116. package/indexerRunProtocolCommon.d.ts +21 -0
  117. package/indexerSharedArtifactFingerprint.d.ts +33 -0
  118. package/indexerStructuredDeclaration.d.ts +513 -0
  119. package/indexerSubjectCatalog.d.ts +230 -0
  120. package/indexerSubjectIdentity.d.ts +19 -0
  121. package/indexerSubjectKeyAuthority.d.ts +785 -0
  122. package/indexerTemplateRendering.d.ts +485 -0
  123. package/indexerToolSnapshot.d.ts +431 -0
  124. package/indexerWorksetRead.d.ts +287 -0
  125. package/package.json +1 -1
  126. package/phases.d.ts +11 -9
  127. package/templates/package-templates/kb/AGENTS.md +1 -1
  128. package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +1 -1
  129. package/templates/package-templates.zh-CN/kb/AGENTS.md +1 -1
  130. package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +1 -1
@@ -0,0 +1,1652 @@
1
+ import { z } from "zod";
2
+ import type { IndexerJson } from "./indexerRegistry.js";
3
+ export declare const indexerCanonicalRefSchema: z.ZodString;
4
+ export declare const indexerProviderLayerRefSchema: z.ZodEffects<z.ZodString, string, string>;
5
+ export declare const indexerComposerRefSchema: z.ZodEffects<z.ZodString, string, string>;
6
+ export declare const indexerEvidenceRefSchema: z.ZodObject<{
7
+ ref: z.ZodString;
8
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
9
+ source_digest: z.ZodString;
10
+ }, "strict", z.ZodTypeAny, {
11
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
12
+ ref: string;
13
+ source_digest: string;
14
+ }, {
15
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
16
+ ref: string;
17
+ source_digest: string;
18
+ }>;
19
+ export declare const indexerLayerFragmentPayloadSchema: z.ZodUnion<[z.ZodObject<{
20
+ protocol: z.ZodLiteral<"context.indexer.fragment.fact-enrichment/v1">;
21
+ facts: z.ZodArray<z.ZodObject<{
22
+ target_ref: z.ZodString;
23
+ fact_id: z.ZodEffects<z.ZodString, string, string>;
24
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
25
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
26
+ ref: z.ZodString;
27
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
28
+ source_digest: z.ZodString;
29
+ }, "strict", z.ZodTypeAny, {
30
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
31
+ ref: string;
32
+ source_digest: string;
33
+ }, {
34
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
35
+ ref: string;
36
+ source_digest: string;
37
+ }>, "many">, {
38
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
39
+ ref: string;
40
+ source_digest: string;
41
+ }[], {
42
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
43
+ ref: string;
44
+ source_digest: string;
45
+ }[]>;
46
+ }, "strict", z.ZodTypeAny, {
47
+ value: IndexerJson;
48
+ target_ref: string;
49
+ fact_id: string;
50
+ evidence_refs: {
51
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
52
+ ref: string;
53
+ source_digest: string;
54
+ }[];
55
+ }, {
56
+ value: IndexerJson;
57
+ target_ref: string;
58
+ fact_id: string;
59
+ evidence_refs: {
60
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
61
+ ref: string;
62
+ source_digest: string;
63
+ }[];
64
+ }>, "many">;
65
+ }, "strict", z.ZodTypeAny, {
66
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
67
+ facts: {
68
+ value: IndexerJson;
69
+ target_ref: string;
70
+ fact_id: string;
71
+ evidence_refs: {
72
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
73
+ ref: string;
74
+ source_digest: string;
75
+ }[];
76
+ }[];
77
+ }, {
78
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
79
+ facts: {
80
+ value: IndexerJson;
81
+ target_ref: string;
82
+ fact_id: string;
83
+ evidence_refs: {
84
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
85
+ ref: string;
86
+ source_digest: string;
87
+ }[];
88
+ }[];
89
+ }>, z.ZodObject<{
90
+ protocol: z.ZodLiteral<"context.indexer.fragment.template-variables/v1">;
91
+ variables: z.ZodArray<z.ZodObject<{
92
+ target_ref: z.ZodString;
93
+ template_id: z.ZodEffects<z.ZodString, string, string>;
94
+ variable_id: z.ZodEffects<z.ZodString, string, string>;
95
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
96
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
97
+ ref: z.ZodString;
98
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
99
+ source_digest: z.ZodString;
100
+ }, "strict", z.ZodTypeAny, {
101
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
102
+ ref: string;
103
+ source_digest: string;
104
+ }, {
105
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
106
+ ref: string;
107
+ source_digest: string;
108
+ }>, "many">, {
109
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
110
+ ref: string;
111
+ source_digest: string;
112
+ }[], {
113
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
114
+ ref: string;
115
+ source_digest: string;
116
+ }[]>;
117
+ }, "strict", z.ZodTypeAny, {
118
+ value: IndexerJson;
119
+ target_ref: string;
120
+ evidence_refs: {
121
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
122
+ ref: string;
123
+ source_digest: string;
124
+ }[];
125
+ template_id: string;
126
+ variable_id: string;
127
+ }, {
128
+ value: IndexerJson;
129
+ target_ref: string;
130
+ evidence_refs: {
131
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
132
+ ref: string;
133
+ source_digest: string;
134
+ }[];
135
+ template_id: string;
136
+ variable_id: string;
137
+ }>, "many">;
138
+ }, "strict", z.ZodTypeAny, {
139
+ protocol: "context.indexer.fragment.template-variables/v1";
140
+ variables: {
141
+ value: IndexerJson;
142
+ target_ref: string;
143
+ evidence_refs: {
144
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
145
+ ref: string;
146
+ source_digest: string;
147
+ }[];
148
+ template_id: string;
149
+ variable_id: string;
150
+ }[];
151
+ }, {
152
+ protocol: "context.indexer.fragment.template-variables/v1";
153
+ variables: {
154
+ value: IndexerJson;
155
+ target_ref: string;
156
+ evidence_refs: {
157
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
158
+ ref: string;
159
+ source_digest: string;
160
+ }[];
161
+ template_id: string;
162
+ variable_id: string;
163
+ }[];
164
+ }>, z.ZodObject<{
165
+ protocol: z.ZodLiteral<"context.indexer.fragment.derived-artifact-proposal/v1">;
166
+ proposals: z.ZodArray<z.ZodObject<{
167
+ composer_ref: z.ZodEffects<z.ZodString, string, string>;
168
+ target_node_ref: z.ZodString;
169
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
170
+ artifact_key: z.ZodEffects<z.ZodString, string, string>;
171
+ artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
172
+ variables: z.ZodRecord<z.ZodString, z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>>;
173
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
174
+ ref: z.ZodString;
175
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
176
+ source_digest: z.ZodString;
177
+ }, "strict", z.ZodTypeAny, {
178
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
179
+ ref: string;
180
+ source_digest: string;
181
+ }, {
182
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
183
+ ref: string;
184
+ source_digest: string;
185
+ }>, "many">, {
186
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
187
+ ref: string;
188
+ source_digest: string;
189
+ }[], {
190
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
191
+ ref: string;
192
+ source_digest: string;
193
+ }[]>;
194
+ }, "strict", z.ZodTypeAny, {
195
+ evidence_refs: {
196
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
197
+ ref: string;
198
+ source_digest: string;
199
+ }[];
200
+ composer_ref: string;
201
+ target_node_ref: string;
202
+ artifact_kind: string;
203
+ artifact_key: string;
204
+ artifact_policy_variant: string;
205
+ variables: Record<string, IndexerJson>;
206
+ }, {
207
+ evidence_refs: {
208
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
209
+ ref: string;
210
+ source_digest: string;
211
+ }[];
212
+ composer_ref: string;
213
+ target_node_ref: string;
214
+ artifact_kind: string;
215
+ artifact_key: string;
216
+ artifact_policy_variant: string;
217
+ variables: Record<string, IndexerJson>;
218
+ }>, "many">;
219
+ }, "strict", z.ZodTypeAny, {
220
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
221
+ proposals: {
222
+ evidence_refs: {
223
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
224
+ ref: string;
225
+ source_digest: string;
226
+ }[];
227
+ composer_ref: string;
228
+ target_node_ref: string;
229
+ artifact_kind: string;
230
+ artifact_key: string;
231
+ artifact_policy_variant: string;
232
+ variables: Record<string, IndexerJson>;
233
+ }[];
234
+ }, {
235
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
236
+ proposals: {
237
+ evidence_refs: {
238
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
239
+ ref: string;
240
+ source_digest: string;
241
+ }[];
242
+ composer_ref: string;
243
+ target_node_ref: string;
244
+ artifact_kind: string;
245
+ artifact_key: string;
246
+ artifact_policy_variant: string;
247
+ variables: Record<string, IndexerJson>;
248
+ }[];
249
+ }>]>;
250
+ export declare const indexerLayerFragmentSchema: z.ZodEffects<z.ZodObject<{
251
+ protocol: z.ZodLiteral<"context.indexer.layer-fragment/v1">;
252
+ workset_digest: z.ZodString;
253
+ layer_ref: z.ZodEffects<z.ZodString, string, string>;
254
+ layer_integrity: z.ZodString;
255
+ composer_ref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
256
+ phase: z.ZodEnum<["pre-authority", "post-author"]>;
257
+ kind: z.ZodEnum<["fact-enrichment", "template-variables", "derived-artifact-proposal"]>;
258
+ target_refs: z.ZodArray<z.ZodString, "many">;
259
+ payload: z.ZodUnion<[z.ZodObject<{
260
+ protocol: z.ZodLiteral<"context.indexer.fragment.fact-enrichment/v1">;
261
+ facts: z.ZodArray<z.ZodObject<{
262
+ target_ref: z.ZodString;
263
+ fact_id: z.ZodEffects<z.ZodString, string, string>;
264
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
265
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
266
+ ref: z.ZodString;
267
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
268
+ source_digest: z.ZodString;
269
+ }, "strict", z.ZodTypeAny, {
270
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
271
+ ref: string;
272
+ source_digest: string;
273
+ }, {
274
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
275
+ ref: string;
276
+ source_digest: string;
277
+ }>, "many">, {
278
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
279
+ ref: string;
280
+ source_digest: string;
281
+ }[], {
282
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
283
+ ref: string;
284
+ source_digest: string;
285
+ }[]>;
286
+ }, "strict", z.ZodTypeAny, {
287
+ value: IndexerJson;
288
+ target_ref: string;
289
+ fact_id: string;
290
+ evidence_refs: {
291
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
292
+ ref: string;
293
+ source_digest: string;
294
+ }[];
295
+ }, {
296
+ value: IndexerJson;
297
+ target_ref: string;
298
+ fact_id: string;
299
+ evidence_refs: {
300
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
301
+ ref: string;
302
+ source_digest: string;
303
+ }[];
304
+ }>, "many">;
305
+ }, "strict", z.ZodTypeAny, {
306
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
307
+ facts: {
308
+ value: IndexerJson;
309
+ target_ref: string;
310
+ fact_id: string;
311
+ evidence_refs: {
312
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
313
+ ref: string;
314
+ source_digest: string;
315
+ }[];
316
+ }[];
317
+ }, {
318
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
319
+ facts: {
320
+ value: IndexerJson;
321
+ target_ref: string;
322
+ fact_id: string;
323
+ evidence_refs: {
324
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
325
+ ref: string;
326
+ source_digest: string;
327
+ }[];
328
+ }[];
329
+ }>, z.ZodObject<{
330
+ protocol: z.ZodLiteral<"context.indexer.fragment.template-variables/v1">;
331
+ variables: z.ZodArray<z.ZodObject<{
332
+ target_ref: z.ZodString;
333
+ template_id: z.ZodEffects<z.ZodString, string, string>;
334
+ variable_id: z.ZodEffects<z.ZodString, string, string>;
335
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
336
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
337
+ ref: z.ZodString;
338
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
339
+ source_digest: z.ZodString;
340
+ }, "strict", z.ZodTypeAny, {
341
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
342
+ ref: string;
343
+ source_digest: string;
344
+ }, {
345
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
346
+ ref: string;
347
+ source_digest: string;
348
+ }>, "many">, {
349
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
350
+ ref: string;
351
+ source_digest: string;
352
+ }[], {
353
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
354
+ ref: string;
355
+ source_digest: string;
356
+ }[]>;
357
+ }, "strict", z.ZodTypeAny, {
358
+ value: IndexerJson;
359
+ target_ref: string;
360
+ evidence_refs: {
361
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
362
+ ref: string;
363
+ source_digest: string;
364
+ }[];
365
+ template_id: string;
366
+ variable_id: string;
367
+ }, {
368
+ value: IndexerJson;
369
+ target_ref: string;
370
+ evidence_refs: {
371
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
372
+ ref: string;
373
+ source_digest: string;
374
+ }[];
375
+ template_id: string;
376
+ variable_id: string;
377
+ }>, "many">;
378
+ }, "strict", z.ZodTypeAny, {
379
+ protocol: "context.indexer.fragment.template-variables/v1";
380
+ variables: {
381
+ value: IndexerJson;
382
+ target_ref: string;
383
+ evidence_refs: {
384
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
385
+ ref: string;
386
+ source_digest: string;
387
+ }[];
388
+ template_id: string;
389
+ variable_id: string;
390
+ }[];
391
+ }, {
392
+ protocol: "context.indexer.fragment.template-variables/v1";
393
+ variables: {
394
+ value: IndexerJson;
395
+ target_ref: string;
396
+ evidence_refs: {
397
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
398
+ ref: string;
399
+ source_digest: string;
400
+ }[];
401
+ template_id: string;
402
+ variable_id: string;
403
+ }[];
404
+ }>, z.ZodObject<{
405
+ protocol: z.ZodLiteral<"context.indexer.fragment.derived-artifact-proposal/v1">;
406
+ proposals: z.ZodArray<z.ZodObject<{
407
+ composer_ref: z.ZodEffects<z.ZodString, string, string>;
408
+ target_node_ref: z.ZodString;
409
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
410
+ artifact_key: z.ZodEffects<z.ZodString, string, string>;
411
+ artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
412
+ variables: z.ZodRecord<z.ZodString, z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>>;
413
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
414
+ ref: z.ZodString;
415
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
416
+ source_digest: z.ZodString;
417
+ }, "strict", z.ZodTypeAny, {
418
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
419
+ ref: string;
420
+ source_digest: string;
421
+ }, {
422
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
423
+ ref: string;
424
+ source_digest: string;
425
+ }>, "many">, {
426
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
427
+ ref: string;
428
+ source_digest: string;
429
+ }[], {
430
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
431
+ ref: string;
432
+ source_digest: string;
433
+ }[]>;
434
+ }, "strict", z.ZodTypeAny, {
435
+ evidence_refs: {
436
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
437
+ ref: string;
438
+ source_digest: string;
439
+ }[];
440
+ composer_ref: string;
441
+ target_node_ref: string;
442
+ artifact_kind: string;
443
+ artifact_key: string;
444
+ artifact_policy_variant: string;
445
+ variables: Record<string, IndexerJson>;
446
+ }, {
447
+ evidence_refs: {
448
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
449
+ ref: string;
450
+ source_digest: string;
451
+ }[];
452
+ composer_ref: string;
453
+ target_node_ref: string;
454
+ artifact_kind: string;
455
+ artifact_key: string;
456
+ artifact_policy_variant: string;
457
+ variables: Record<string, IndexerJson>;
458
+ }>, "many">;
459
+ }, "strict", z.ZodTypeAny, {
460
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
461
+ proposals: {
462
+ evidence_refs: {
463
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
464
+ ref: string;
465
+ source_digest: string;
466
+ }[];
467
+ composer_ref: string;
468
+ target_node_ref: string;
469
+ artifact_kind: string;
470
+ artifact_key: string;
471
+ artifact_policy_variant: string;
472
+ variables: Record<string, IndexerJson>;
473
+ }[];
474
+ }, {
475
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
476
+ proposals: {
477
+ evidence_refs: {
478
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
479
+ ref: string;
480
+ source_digest: string;
481
+ }[];
482
+ composer_ref: string;
483
+ target_node_ref: string;
484
+ artifact_kind: string;
485
+ artifact_key: string;
486
+ artifact_policy_variant: string;
487
+ variables: Record<string, IndexerJson>;
488
+ }[];
489
+ }>]>;
490
+ fragment_digest: z.ZodString;
491
+ }, "strict", z.ZodTypeAny, {
492
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
493
+ protocol: "context.indexer.layer-fragment/v1";
494
+ workset_digest: string;
495
+ layer_ref: string;
496
+ layer_integrity: string;
497
+ phase: "pre-authority" | "post-author";
498
+ target_refs: string[];
499
+ payload: {
500
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
501
+ facts: {
502
+ value: IndexerJson;
503
+ target_ref: string;
504
+ fact_id: string;
505
+ evidence_refs: {
506
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
507
+ ref: string;
508
+ source_digest: string;
509
+ }[];
510
+ }[];
511
+ } | {
512
+ protocol: "context.indexer.fragment.template-variables/v1";
513
+ variables: {
514
+ value: IndexerJson;
515
+ target_ref: string;
516
+ evidence_refs: {
517
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
518
+ ref: string;
519
+ source_digest: string;
520
+ }[];
521
+ template_id: string;
522
+ variable_id: string;
523
+ }[];
524
+ } | {
525
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
526
+ proposals: {
527
+ evidence_refs: {
528
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
529
+ ref: string;
530
+ source_digest: string;
531
+ }[];
532
+ composer_ref: string;
533
+ target_node_ref: string;
534
+ artifact_kind: string;
535
+ artifact_key: string;
536
+ artifact_policy_variant: string;
537
+ variables: Record<string, IndexerJson>;
538
+ }[];
539
+ };
540
+ fragment_digest: string;
541
+ composer_ref?: string | undefined;
542
+ }, {
543
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
544
+ protocol: "context.indexer.layer-fragment/v1";
545
+ workset_digest: string;
546
+ layer_ref: string;
547
+ layer_integrity: string;
548
+ phase: "pre-authority" | "post-author";
549
+ target_refs: string[];
550
+ payload: {
551
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
552
+ facts: {
553
+ value: IndexerJson;
554
+ target_ref: string;
555
+ fact_id: string;
556
+ evidence_refs: {
557
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
558
+ ref: string;
559
+ source_digest: string;
560
+ }[];
561
+ }[];
562
+ } | {
563
+ protocol: "context.indexer.fragment.template-variables/v1";
564
+ variables: {
565
+ value: IndexerJson;
566
+ target_ref: string;
567
+ evidence_refs: {
568
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
569
+ ref: string;
570
+ source_digest: string;
571
+ }[];
572
+ template_id: string;
573
+ variable_id: string;
574
+ }[];
575
+ } | {
576
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
577
+ proposals: {
578
+ evidence_refs: {
579
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
580
+ ref: string;
581
+ source_digest: string;
582
+ }[];
583
+ composer_ref: string;
584
+ target_node_ref: string;
585
+ artifact_kind: string;
586
+ artifact_key: string;
587
+ artifact_policy_variant: string;
588
+ variables: Record<string, IndexerJson>;
589
+ }[];
590
+ };
591
+ fragment_digest: string;
592
+ composer_ref?: string | undefined;
593
+ }>, {
594
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
595
+ protocol: "context.indexer.layer-fragment/v1";
596
+ workset_digest: string;
597
+ layer_ref: string;
598
+ layer_integrity: string;
599
+ phase: "pre-authority" | "post-author";
600
+ target_refs: string[];
601
+ payload: {
602
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
603
+ facts: {
604
+ value: IndexerJson;
605
+ target_ref: string;
606
+ fact_id: string;
607
+ evidence_refs: {
608
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
609
+ ref: string;
610
+ source_digest: string;
611
+ }[];
612
+ }[];
613
+ } | {
614
+ protocol: "context.indexer.fragment.template-variables/v1";
615
+ variables: {
616
+ value: IndexerJson;
617
+ target_ref: string;
618
+ evidence_refs: {
619
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
620
+ ref: string;
621
+ source_digest: string;
622
+ }[];
623
+ template_id: string;
624
+ variable_id: string;
625
+ }[];
626
+ } | {
627
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
628
+ proposals: {
629
+ evidence_refs: {
630
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
631
+ ref: string;
632
+ source_digest: string;
633
+ }[];
634
+ composer_ref: string;
635
+ target_node_ref: string;
636
+ artifact_kind: string;
637
+ artifact_key: string;
638
+ artifact_policy_variant: string;
639
+ variables: Record<string, IndexerJson>;
640
+ }[];
641
+ };
642
+ fragment_digest: string;
643
+ composer_ref?: string | undefined;
644
+ }, {
645
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
646
+ protocol: "context.indexer.layer-fragment/v1";
647
+ workset_digest: string;
648
+ layer_ref: string;
649
+ layer_integrity: string;
650
+ phase: "pre-authority" | "post-author";
651
+ target_refs: string[];
652
+ payload: {
653
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
654
+ facts: {
655
+ value: IndexerJson;
656
+ target_ref: string;
657
+ fact_id: string;
658
+ evidence_refs: {
659
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
660
+ ref: string;
661
+ source_digest: string;
662
+ }[];
663
+ }[];
664
+ } | {
665
+ protocol: "context.indexer.fragment.template-variables/v1";
666
+ variables: {
667
+ value: IndexerJson;
668
+ target_ref: string;
669
+ evidence_refs: {
670
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
671
+ ref: string;
672
+ source_digest: string;
673
+ }[];
674
+ template_id: string;
675
+ variable_id: string;
676
+ }[];
677
+ } | {
678
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
679
+ proposals: {
680
+ evidence_refs: {
681
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
682
+ ref: string;
683
+ source_digest: string;
684
+ }[];
685
+ composer_ref: string;
686
+ target_node_ref: string;
687
+ artifact_kind: string;
688
+ artifact_key: string;
689
+ artifact_policy_variant: string;
690
+ variables: Record<string, IndexerJson>;
691
+ }[];
692
+ };
693
+ fragment_digest: string;
694
+ composer_ref?: string | undefined;
695
+ }>;
696
+ export type IndexerLayerFragmentPayload = z.infer<typeof indexerLayerFragmentPayloadSchema>;
697
+ export type IndexerEvidenceRef = z.infer<typeof indexerEvidenceRefSchema>;
698
+ export type IndexerLayerFragment = z.infer<typeof indexerLayerFragmentSchema>;
699
+ export declare function indexerLayerFragmentDigest(fragment: Omit<IndexerLayerFragment, "fragment_digest">): string;
700
+ export declare const indexerMaterializedLayerFragmentSchema: z.ZodObject<{
701
+ fragment_digest: z.ZodString;
702
+ layer_ref: z.ZodEffects<z.ZodString, string, string>;
703
+ layer_integrity: z.ZodString;
704
+ composer_ref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
705
+ phase: z.ZodEnum<["pre-authority", "post-author"]>;
706
+ kind: z.ZodEnum<["fact-enrichment", "template-variables", "derived-artifact-proposal"]>;
707
+ target_refs: z.ZodArray<z.ZodString, "many">;
708
+ payload: z.ZodUnion<[z.ZodObject<{
709
+ protocol: z.ZodLiteral<"context.indexer.fragment.fact-enrichment/v1">;
710
+ facts: z.ZodArray<z.ZodObject<{
711
+ target_ref: z.ZodString;
712
+ fact_id: z.ZodEffects<z.ZodString, string, string>;
713
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
714
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
715
+ ref: z.ZodString;
716
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
717
+ source_digest: z.ZodString;
718
+ }, "strict", z.ZodTypeAny, {
719
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
720
+ ref: string;
721
+ source_digest: string;
722
+ }, {
723
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
724
+ ref: string;
725
+ source_digest: string;
726
+ }>, "many">, {
727
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
728
+ ref: string;
729
+ source_digest: string;
730
+ }[], {
731
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
732
+ ref: string;
733
+ source_digest: string;
734
+ }[]>;
735
+ }, "strict", z.ZodTypeAny, {
736
+ value: IndexerJson;
737
+ target_ref: string;
738
+ fact_id: string;
739
+ evidence_refs: {
740
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
741
+ ref: string;
742
+ source_digest: string;
743
+ }[];
744
+ }, {
745
+ value: IndexerJson;
746
+ target_ref: string;
747
+ fact_id: string;
748
+ evidence_refs: {
749
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
750
+ ref: string;
751
+ source_digest: string;
752
+ }[];
753
+ }>, "many">;
754
+ }, "strict", z.ZodTypeAny, {
755
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
756
+ facts: {
757
+ value: IndexerJson;
758
+ target_ref: string;
759
+ fact_id: string;
760
+ evidence_refs: {
761
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
762
+ ref: string;
763
+ source_digest: string;
764
+ }[];
765
+ }[];
766
+ }, {
767
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
768
+ facts: {
769
+ value: IndexerJson;
770
+ target_ref: string;
771
+ fact_id: string;
772
+ evidence_refs: {
773
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
774
+ ref: string;
775
+ source_digest: string;
776
+ }[];
777
+ }[];
778
+ }>, z.ZodObject<{
779
+ protocol: z.ZodLiteral<"context.indexer.fragment.template-variables/v1">;
780
+ variables: z.ZodArray<z.ZodObject<{
781
+ target_ref: z.ZodString;
782
+ template_id: z.ZodEffects<z.ZodString, string, string>;
783
+ variable_id: z.ZodEffects<z.ZodString, string, string>;
784
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
785
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
786
+ ref: z.ZodString;
787
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
788
+ source_digest: z.ZodString;
789
+ }, "strict", z.ZodTypeAny, {
790
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
791
+ ref: string;
792
+ source_digest: string;
793
+ }, {
794
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
795
+ ref: string;
796
+ source_digest: string;
797
+ }>, "many">, {
798
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
799
+ ref: string;
800
+ source_digest: string;
801
+ }[], {
802
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
803
+ ref: string;
804
+ source_digest: string;
805
+ }[]>;
806
+ }, "strict", z.ZodTypeAny, {
807
+ value: IndexerJson;
808
+ target_ref: string;
809
+ evidence_refs: {
810
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
811
+ ref: string;
812
+ source_digest: string;
813
+ }[];
814
+ template_id: string;
815
+ variable_id: string;
816
+ }, {
817
+ value: IndexerJson;
818
+ target_ref: string;
819
+ evidence_refs: {
820
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
821
+ ref: string;
822
+ source_digest: string;
823
+ }[];
824
+ template_id: string;
825
+ variable_id: string;
826
+ }>, "many">;
827
+ }, "strict", z.ZodTypeAny, {
828
+ protocol: "context.indexer.fragment.template-variables/v1";
829
+ variables: {
830
+ value: IndexerJson;
831
+ target_ref: string;
832
+ evidence_refs: {
833
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
834
+ ref: string;
835
+ source_digest: string;
836
+ }[];
837
+ template_id: string;
838
+ variable_id: string;
839
+ }[];
840
+ }, {
841
+ protocol: "context.indexer.fragment.template-variables/v1";
842
+ variables: {
843
+ value: IndexerJson;
844
+ target_ref: string;
845
+ evidence_refs: {
846
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
847
+ ref: string;
848
+ source_digest: string;
849
+ }[];
850
+ template_id: string;
851
+ variable_id: string;
852
+ }[];
853
+ }>, z.ZodObject<{
854
+ protocol: z.ZodLiteral<"context.indexer.fragment.derived-artifact-proposal/v1">;
855
+ proposals: z.ZodArray<z.ZodObject<{
856
+ composer_ref: z.ZodEffects<z.ZodString, string, string>;
857
+ target_node_ref: z.ZodString;
858
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
859
+ artifact_key: z.ZodEffects<z.ZodString, string, string>;
860
+ artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
861
+ variables: z.ZodRecord<z.ZodString, z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>>;
862
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
863
+ ref: z.ZodString;
864
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
865
+ source_digest: z.ZodString;
866
+ }, "strict", z.ZodTypeAny, {
867
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
868
+ ref: string;
869
+ source_digest: string;
870
+ }, {
871
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
872
+ ref: string;
873
+ source_digest: string;
874
+ }>, "many">, {
875
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
876
+ ref: string;
877
+ source_digest: string;
878
+ }[], {
879
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
880
+ ref: string;
881
+ source_digest: string;
882
+ }[]>;
883
+ }, "strict", z.ZodTypeAny, {
884
+ evidence_refs: {
885
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
886
+ ref: string;
887
+ source_digest: string;
888
+ }[];
889
+ composer_ref: string;
890
+ target_node_ref: string;
891
+ artifact_kind: string;
892
+ artifact_key: string;
893
+ artifact_policy_variant: string;
894
+ variables: Record<string, IndexerJson>;
895
+ }, {
896
+ evidence_refs: {
897
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
898
+ ref: string;
899
+ source_digest: string;
900
+ }[];
901
+ composer_ref: string;
902
+ target_node_ref: string;
903
+ artifact_kind: string;
904
+ artifact_key: string;
905
+ artifact_policy_variant: string;
906
+ variables: Record<string, IndexerJson>;
907
+ }>, "many">;
908
+ }, "strict", z.ZodTypeAny, {
909
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
910
+ proposals: {
911
+ evidence_refs: {
912
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
913
+ ref: string;
914
+ source_digest: string;
915
+ }[];
916
+ composer_ref: string;
917
+ target_node_ref: string;
918
+ artifact_kind: string;
919
+ artifact_key: string;
920
+ artifact_policy_variant: string;
921
+ variables: Record<string, IndexerJson>;
922
+ }[];
923
+ }, {
924
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
925
+ proposals: {
926
+ evidence_refs: {
927
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
928
+ ref: string;
929
+ source_digest: string;
930
+ }[];
931
+ composer_ref: string;
932
+ target_node_ref: string;
933
+ artifact_kind: string;
934
+ artifact_key: string;
935
+ artifact_policy_variant: string;
936
+ variables: Record<string, IndexerJson>;
937
+ }[];
938
+ }>]>;
939
+ payload_digest: z.ZodString;
940
+ materialization_receipt: z.ZodObject<{
941
+ protocol: z.ZodLiteral<"context.indexer.layer-fragment-materialization-receipt/v1">;
942
+ fragment_digest: z.ZodString;
943
+ payload_digest: z.ZodString;
944
+ layer_ref: z.ZodEffects<z.ZodString, string, string>;
945
+ layer_integrity: z.ZodString;
946
+ composer_ref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
947
+ validator_contract_digest: z.ZodString;
948
+ }, "strict", z.ZodTypeAny, {
949
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
950
+ layer_ref: string;
951
+ layer_integrity: string;
952
+ fragment_digest: string;
953
+ payload_digest: string;
954
+ validator_contract_digest: string;
955
+ composer_ref?: string | undefined;
956
+ }, {
957
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
958
+ layer_ref: string;
959
+ layer_integrity: string;
960
+ fragment_digest: string;
961
+ payload_digest: string;
962
+ validator_contract_digest: string;
963
+ composer_ref?: string | undefined;
964
+ }>;
965
+ }, "strict", z.ZodTypeAny, {
966
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
967
+ layer_ref: string;
968
+ layer_integrity: string;
969
+ phase: "pre-authority" | "post-author";
970
+ target_refs: string[];
971
+ payload: {
972
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
973
+ facts: {
974
+ value: IndexerJson;
975
+ target_ref: string;
976
+ fact_id: string;
977
+ evidence_refs: {
978
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
979
+ ref: string;
980
+ source_digest: string;
981
+ }[];
982
+ }[];
983
+ } | {
984
+ protocol: "context.indexer.fragment.template-variables/v1";
985
+ variables: {
986
+ value: IndexerJson;
987
+ target_ref: string;
988
+ evidence_refs: {
989
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
990
+ ref: string;
991
+ source_digest: string;
992
+ }[];
993
+ template_id: string;
994
+ variable_id: string;
995
+ }[];
996
+ } | {
997
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
998
+ proposals: {
999
+ evidence_refs: {
1000
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1001
+ ref: string;
1002
+ source_digest: string;
1003
+ }[];
1004
+ composer_ref: string;
1005
+ target_node_ref: string;
1006
+ artifact_kind: string;
1007
+ artifact_key: string;
1008
+ artifact_policy_variant: string;
1009
+ variables: Record<string, IndexerJson>;
1010
+ }[];
1011
+ };
1012
+ fragment_digest: string;
1013
+ payload_digest: string;
1014
+ materialization_receipt: {
1015
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1016
+ layer_ref: string;
1017
+ layer_integrity: string;
1018
+ fragment_digest: string;
1019
+ payload_digest: string;
1020
+ validator_contract_digest: string;
1021
+ composer_ref?: string | undefined;
1022
+ };
1023
+ composer_ref?: string | undefined;
1024
+ }, {
1025
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1026
+ layer_ref: string;
1027
+ layer_integrity: string;
1028
+ phase: "pre-authority" | "post-author";
1029
+ target_refs: string[];
1030
+ payload: {
1031
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
1032
+ facts: {
1033
+ value: IndexerJson;
1034
+ target_ref: string;
1035
+ fact_id: string;
1036
+ evidence_refs: {
1037
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1038
+ ref: string;
1039
+ source_digest: string;
1040
+ }[];
1041
+ }[];
1042
+ } | {
1043
+ protocol: "context.indexer.fragment.template-variables/v1";
1044
+ variables: {
1045
+ value: IndexerJson;
1046
+ target_ref: string;
1047
+ evidence_refs: {
1048
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1049
+ ref: string;
1050
+ source_digest: string;
1051
+ }[];
1052
+ template_id: string;
1053
+ variable_id: string;
1054
+ }[];
1055
+ } | {
1056
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1057
+ proposals: {
1058
+ evidence_refs: {
1059
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1060
+ ref: string;
1061
+ source_digest: string;
1062
+ }[];
1063
+ composer_ref: string;
1064
+ target_node_ref: string;
1065
+ artifact_kind: string;
1066
+ artifact_key: string;
1067
+ artifact_policy_variant: string;
1068
+ variables: Record<string, IndexerJson>;
1069
+ }[];
1070
+ };
1071
+ fragment_digest: string;
1072
+ payload_digest: string;
1073
+ materialization_receipt: {
1074
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1075
+ layer_ref: string;
1076
+ layer_integrity: string;
1077
+ fragment_digest: string;
1078
+ payload_digest: string;
1079
+ validator_contract_digest: string;
1080
+ composer_ref?: string | undefined;
1081
+ };
1082
+ composer_ref?: string | undefined;
1083
+ }>;
1084
+ export type IndexerMaterializedLayerFragment = z.infer<typeof indexerMaterializedLayerFragmentSchema>;
1085
+ export declare function validateIndexerMaterializedLayerFragment(value: unknown): IndexerMaterializedLayerFragment;
1086
+ export interface IndexerLayerFragmentLimits {
1087
+ maximum_items: number;
1088
+ maximum_payload_bytes: number;
1089
+ }
1090
+ export declare const DEFAULT_INDEXER_LAYER_FRAGMENT_LIMITS: IndexerLayerFragmentLimits;
1091
+ export declare function validateAndMaterializeIndexerLayerFragment(input: {
1092
+ fragment: unknown;
1093
+ expected_workset_digest: string;
1094
+ expected_layer_ref: string;
1095
+ expected_layer_integrity: string;
1096
+ expected_composer_ref?: string;
1097
+ allowed_kinds: readonly IndexerLayerFragment["kind"][];
1098
+ allowed_target_refs: readonly string[];
1099
+ validator_contract_digest: string;
1100
+ limits?: IndexerLayerFragmentLimits;
1101
+ }): IndexerMaterializedLayerFragment;
1102
+ export declare const indexerLayerCompositionInputSchema: z.ZodObject<{
1103
+ protocol: z.ZodLiteral<"context.indexer.layer-composition-input/v1">;
1104
+ workset_digest: z.ZodString;
1105
+ final_authority_layer_ref: z.ZodEffects<z.ZodString, string, string>;
1106
+ accepted_fragments: z.ZodArray<z.ZodObject<{
1107
+ fragment_digest: z.ZodString;
1108
+ layer_ref: z.ZodEffects<z.ZodString, string, string>;
1109
+ layer_integrity: z.ZodString;
1110
+ composer_ref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1111
+ phase: z.ZodEnum<["pre-authority", "post-author"]>;
1112
+ kind: z.ZodEnum<["fact-enrichment", "template-variables", "derived-artifact-proposal"]>;
1113
+ target_refs: z.ZodArray<z.ZodString, "many">;
1114
+ payload: z.ZodUnion<[z.ZodObject<{
1115
+ protocol: z.ZodLiteral<"context.indexer.fragment.fact-enrichment/v1">;
1116
+ facts: z.ZodArray<z.ZodObject<{
1117
+ target_ref: z.ZodString;
1118
+ fact_id: z.ZodEffects<z.ZodString, string, string>;
1119
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
1120
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
1121
+ ref: z.ZodString;
1122
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
1123
+ source_digest: z.ZodString;
1124
+ }, "strict", z.ZodTypeAny, {
1125
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1126
+ ref: string;
1127
+ source_digest: string;
1128
+ }, {
1129
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1130
+ ref: string;
1131
+ source_digest: string;
1132
+ }>, "many">, {
1133
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1134
+ ref: string;
1135
+ source_digest: string;
1136
+ }[], {
1137
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1138
+ ref: string;
1139
+ source_digest: string;
1140
+ }[]>;
1141
+ }, "strict", z.ZodTypeAny, {
1142
+ value: IndexerJson;
1143
+ target_ref: string;
1144
+ fact_id: string;
1145
+ evidence_refs: {
1146
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1147
+ ref: string;
1148
+ source_digest: string;
1149
+ }[];
1150
+ }, {
1151
+ value: IndexerJson;
1152
+ target_ref: string;
1153
+ fact_id: string;
1154
+ evidence_refs: {
1155
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1156
+ ref: string;
1157
+ source_digest: string;
1158
+ }[];
1159
+ }>, "many">;
1160
+ }, "strict", z.ZodTypeAny, {
1161
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
1162
+ facts: {
1163
+ value: IndexerJson;
1164
+ target_ref: string;
1165
+ fact_id: string;
1166
+ evidence_refs: {
1167
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1168
+ ref: string;
1169
+ source_digest: string;
1170
+ }[];
1171
+ }[];
1172
+ }, {
1173
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
1174
+ facts: {
1175
+ value: IndexerJson;
1176
+ target_ref: string;
1177
+ fact_id: string;
1178
+ evidence_refs: {
1179
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1180
+ ref: string;
1181
+ source_digest: string;
1182
+ }[];
1183
+ }[];
1184
+ }>, z.ZodObject<{
1185
+ protocol: z.ZodLiteral<"context.indexer.fragment.template-variables/v1">;
1186
+ variables: z.ZodArray<z.ZodObject<{
1187
+ target_ref: z.ZodString;
1188
+ template_id: z.ZodEffects<z.ZodString, string, string>;
1189
+ variable_id: z.ZodEffects<z.ZodString, string, string>;
1190
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
1191
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
1192
+ ref: z.ZodString;
1193
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
1194
+ source_digest: z.ZodString;
1195
+ }, "strict", z.ZodTypeAny, {
1196
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1197
+ ref: string;
1198
+ source_digest: string;
1199
+ }, {
1200
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1201
+ ref: string;
1202
+ source_digest: string;
1203
+ }>, "many">, {
1204
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1205
+ ref: string;
1206
+ source_digest: string;
1207
+ }[], {
1208
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1209
+ ref: string;
1210
+ source_digest: string;
1211
+ }[]>;
1212
+ }, "strict", z.ZodTypeAny, {
1213
+ value: IndexerJson;
1214
+ target_ref: string;
1215
+ evidence_refs: {
1216
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1217
+ ref: string;
1218
+ source_digest: string;
1219
+ }[];
1220
+ template_id: string;
1221
+ variable_id: string;
1222
+ }, {
1223
+ value: IndexerJson;
1224
+ target_ref: string;
1225
+ evidence_refs: {
1226
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1227
+ ref: string;
1228
+ source_digest: string;
1229
+ }[];
1230
+ template_id: string;
1231
+ variable_id: string;
1232
+ }>, "many">;
1233
+ }, "strict", z.ZodTypeAny, {
1234
+ protocol: "context.indexer.fragment.template-variables/v1";
1235
+ variables: {
1236
+ value: IndexerJson;
1237
+ target_ref: string;
1238
+ evidence_refs: {
1239
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1240
+ ref: string;
1241
+ source_digest: string;
1242
+ }[];
1243
+ template_id: string;
1244
+ variable_id: string;
1245
+ }[];
1246
+ }, {
1247
+ protocol: "context.indexer.fragment.template-variables/v1";
1248
+ variables: {
1249
+ value: IndexerJson;
1250
+ target_ref: string;
1251
+ evidence_refs: {
1252
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1253
+ ref: string;
1254
+ source_digest: string;
1255
+ }[];
1256
+ template_id: string;
1257
+ variable_id: string;
1258
+ }[];
1259
+ }>, z.ZodObject<{
1260
+ protocol: z.ZodLiteral<"context.indexer.fragment.derived-artifact-proposal/v1">;
1261
+ proposals: z.ZodArray<z.ZodObject<{
1262
+ composer_ref: z.ZodEffects<z.ZodString, string, string>;
1263
+ target_node_ref: z.ZodString;
1264
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
1265
+ artifact_key: z.ZodEffects<z.ZodString, string, string>;
1266
+ artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
1267
+ variables: z.ZodRecord<z.ZodString, z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>>;
1268
+ evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
1269
+ ref: z.ZodString;
1270
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
1271
+ source_digest: z.ZodString;
1272
+ }, "strict", z.ZodTypeAny, {
1273
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1274
+ ref: string;
1275
+ source_digest: string;
1276
+ }, {
1277
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1278
+ ref: string;
1279
+ source_digest: string;
1280
+ }>, "many">, {
1281
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1282
+ ref: string;
1283
+ source_digest: string;
1284
+ }[], {
1285
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1286
+ ref: string;
1287
+ source_digest: string;
1288
+ }[]>;
1289
+ }, "strict", z.ZodTypeAny, {
1290
+ evidence_refs: {
1291
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1292
+ ref: string;
1293
+ source_digest: string;
1294
+ }[];
1295
+ composer_ref: string;
1296
+ target_node_ref: string;
1297
+ artifact_kind: string;
1298
+ artifact_key: string;
1299
+ artifact_policy_variant: string;
1300
+ variables: Record<string, IndexerJson>;
1301
+ }, {
1302
+ evidence_refs: {
1303
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1304
+ ref: string;
1305
+ source_digest: string;
1306
+ }[];
1307
+ composer_ref: string;
1308
+ target_node_ref: string;
1309
+ artifact_kind: string;
1310
+ artifact_key: string;
1311
+ artifact_policy_variant: string;
1312
+ variables: Record<string, IndexerJson>;
1313
+ }>, "many">;
1314
+ }, "strict", z.ZodTypeAny, {
1315
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1316
+ proposals: {
1317
+ evidence_refs: {
1318
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1319
+ ref: string;
1320
+ source_digest: string;
1321
+ }[];
1322
+ composer_ref: string;
1323
+ target_node_ref: string;
1324
+ artifact_kind: string;
1325
+ artifact_key: string;
1326
+ artifact_policy_variant: string;
1327
+ variables: Record<string, IndexerJson>;
1328
+ }[];
1329
+ }, {
1330
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1331
+ proposals: {
1332
+ evidence_refs: {
1333
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1334
+ ref: string;
1335
+ source_digest: string;
1336
+ }[];
1337
+ composer_ref: string;
1338
+ target_node_ref: string;
1339
+ artifact_kind: string;
1340
+ artifact_key: string;
1341
+ artifact_policy_variant: string;
1342
+ variables: Record<string, IndexerJson>;
1343
+ }[];
1344
+ }>]>;
1345
+ payload_digest: z.ZodString;
1346
+ materialization_receipt: z.ZodObject<{
1347
+ protocol: z.ZodLiteral<"context.indexer.layer-fragment-materialization-receipt/v1">;
1348
+ fragment_digest: z.ZodString;
1349
+ payload_digest: z.ZodString;
1350
+ layer_ref: z.ZodEffects<z.ZodString, string, string>;
1351
+ layer_integrity: z.ZodString;
1352
+ composer_ref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1353
+ validator_contract_digest: z.ZodString;
1354
+ }, "strict", z.ZodTypeAny, {
1355
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1356
+ layer_ref: string;
1357
+ layer_integrity: string;
1358
+ fragment_digest: string;
1359
+ payload_digest: string;
1360
+ validator_contract_digest: string;
1361
+ composer_ref?: string | undefined;
1362
+ }, {
1363
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1364
+ layer_ref: string;
1365
+ layer_integrity: string;
1366
+ fragment_digest: string;
1367
+ payload_digest: string;
1368
+ validator_contract_digest: string;
1369
+ composer_ref?: string | undefined;
1370
+ }>;
1371
+ }, "strict", z.ZodTypeAny, {
1372
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1373
+ layer_ref: string;
1374
+ layer_integrity: string;
1375
+ phase: "pre-authority" | "post-author";
1376
+ target_refs: string[];
1377
+ payload: {
1378
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
1379
+ facts: {
1380
+ value: IndexerJson;
1381
+ target_ref: string;
1382
+ fact_id: string;
1383
+ evidence_refs: {
1384
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1385
+ ref: string;
1386
+ source_digest: string;
1387
+ }[];
1388
+ }[];
1389
+ } | {
1390
+ protocol: "context.indexer.fragment.template-variables/v1";
1391
+ variables: {
1392
+ value: IndexerJson;
1393
+ target_ref: string;
1394
+ evidence_refs: {
1395
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1396
+ ref: string;
1397
+ source_digest: string;
1398
+ }[];
1399
+ template_id: string;
1400
+ variable_id: string;
1401
+ }[];
1402
+ } | {
1403
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1404
+ proposals: {
1405
+ evidence_refs: {
1406
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1407
+ ref: string;
1408
+ source_digest: string;
1409
+ }[];
1410
+ composer_ref: string;
1411
+ target_node_ref: string;
1412
+ artifact_kind: string;
1413
+ artifact_key: string;
1414
+ artifact_policy_variant: string;
1415
+ variables: Record<string, IndexerJson>;
1416
+ }[];
1417
+ };
1418
+ fragment_digest: string;
1419
+ payload_digest: string;
1420
+ materialization_receipt: {
1421
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1422
+ layer_ref: string;
1423
+ layer_integrity: string;
1424
+ fragment_digest: string;
1425
+ payload_digest: string;
1426
+ validator_contract_digest: string;
1427
+ composer_ref?: string | undefined;
1428
+ };
1429
+ composer_ref?: string | undefined;
1430
+ }, {
1431
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1432
+ layer_ref: string;
1433
+ layer_integrity: string;
1434
+ phase: "pre-authority" | "post-author";
1435
+ target_refs: string[];
1436
+ payload: {
1437
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
1438
+ facts: {
1439
+ value: IndexerJson;
1440
+ target_ref: string;
1441
+ fact_id: string;
1442
+ evidence_refs: {
1443
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1444
+ ref: string;
1445
+ source_digest: string;
1446
+ }[];
1447
+ }[];
1448
+ } | {
1449
+ protocol: "context.indexer.fragment.template-variables/v1";
1450
+ variables: {
1451
+ value: IndexerJson;
1452
+ target_ref: string;
1453
+ evidence_refs: {
1454
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1455
+ ref: string;
1456
+ source_digest: string;
1457
+ }[];
1458
+ template_id: string;
1459
+ variable_id: string;
1460
+ }[];
1461
+ } | {
1462
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1463
+ proposals: {
1464
+ evidence_refs: {
1465
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1466
+ ref: string;
1467
+ source_digest: string;
1468
+ }[];
1469
+ composer_ref: string;
1470
+ target_node_ref: string;
1471
+ artifact_kind: string;
1472
+ artifact_key: string;
1473
+ artifact_policy_variant: string;
1474
+ variables: Record<string, IndexerJson>;
1475
+ }[];
1476
+ };
1477
+ fragment_digest: string;
1478
+ payload_digest: string;
1479
+ materialization_receipt: {
1480
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1481
+ layer_ref: string;
1482
+ layer_integrity: string;
1483
+ fragment_digest: string;
1484
+ payload_digest: string;
1485
+ validator_contract_digest: string;
1486
+ composer_ref?: string | undefined;
1487
+ };
1488
+ composer_ref?: string | undefined;
1489
+ }>, "many">;
1490
+ rejected_fragment_diagnostics: z.ZodArray<z.ZodObject<{
1491
+ code: z.ZodEffects<z.ZodString, string, string>;
1492
+ message: z.ZodString;
1493
+ fragment_digest: z.ZodOptional<z.ZodString>;
1494
+ }, "strict", z.ZodTypeAny, {
1495
+ code: string;
1496
+ message: string;
1497
+ fragment_digest?: string | undefined;
1498
+ }, {
1499
+ code: string;
1500
+ message: string;
1501
+ fragment_digest?: string | undefined;
1502
+ }>, "many">;
1503
+ view_digest: z.ZodString;
1504
+ }, "strict", z.ZodTypeAny, {
1505
+ protocol: "context.indexer.layer-composition-input/v1";
1506
+ workset_digest: string;
1507
+ final_authority_layer_ref: string;
1508
+ accepted_fragments: {
1509
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1510
+ layer_ref: string;
1511
+ layer_integrity: string;
1512
+ phase: "pre-authority" | "post-author";
1513
+ target_refs: string[];
1514
+ payload: {
1515
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
1516
+ facts: {
1517
+ value: IndexerJson;
1518
+ target_ref: string;
1519
+ fact_id: string;
1520
+ evidence_refs: {
1521
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1522
+ ref: string;
1523
+ source_digest: string;
1524
+ }[];
1525
+ }[];
1526
+ } | {
1527
+ protocol: "context.indexer.fragment.template-variables/v1";
1528
+ variables: {
1529
+ value: IndexerJson;
1530
+ target_ref: string;
1531
+ evidence_refs: {
1532
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1533
+ ref: string;
1534
+ source_digest: string;
1535
+ }[];
1536
+ template_id: string;
1537
+ variable_id: string;
1538
+ }[];
1539
+ } | {
1540
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1541
+ proposals: {
1542
+ evidence_refs: {
1543
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1544
+ ref: string;
1545
+ source_digest: string;
1546
+ }[];
1547
+ composer_ref: string;
1548
+ target_node_ref: string;
1549
+ artifact_kind: string;
1550
+ artifact_key: string;
1551
+ artifact_policy_variant: string;
1552
+ variables: Record<string, IndexerJson>;
1553
+ }[];
1554
+ };
1555
+ fragment_digest: string;
1556
+ payload_digest: string;
1557
+ materialization_receipt: {
1558
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1559
+ layer_ref: string;
1560
+ layer_integrity: string;
1561
+ fragment_digest: string;
1562
+ payload_digest: string;
1563
+ validator_contract_digest: string;
1564
+ composer_ref?: string | undefined;
1565
+ };
1566
+ composer_ref?: string | undefined;
1567
+ }[];
1568
+ rejected_fragment_diagnostics: {
1569
+ code: string;
1570
+ message: string;
1571
+ fragment_digest?: string | undefined;
1572
+ }[];
1573
+ view_digest: string;
1574
+ }, {
1575
+ protocol: "context.indexer.layer-composition-input/v1";
1576
+ workset_digest: string;
1577
+ final_authority_layer_ref: string;
1578
+ accepted_fragments: {
1579
+ kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1580
+ layer_ref: string;
1581
+ layer_integrity: string;
1582
+ phase: "pre-authority" | "post-author";
1583
+ target_refs: string[];
1584
+ payload: {
1585
+ protocol: "context.indexer.fragment.fact-enrichment/v1";
1586
+ facts: {
1587
+ value: IndexerJson;
1588
+ target_ref: string;
1589
+ fact_id: string;
1590
+ evidence_refs: {
1591
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1592
+ ref: string;
1593
+ source_digest: string;
1594
+ }[];
1595
+ }[];
1596
+ } | {
1597
+ protocol: "context.indexer.fragment.template-variables/v1";
1598
+ variables: {
1599
+ value: IndexerJson;
1600
+ target_ref: string;
1601
+ evidence_refs: {
1602
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1603
+ ref: string;
1604
+ source_digest: string;
1605
+ }[];
1606
+ template_id: string;
1607
+ variable_id: string;
1608
+ }[];
1609
+ } | {
1610
+ protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1611
+ proposals: {
1612
+ evidence_refs: {
1613
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1614
+ ref: string;
1615
+ source_digest: string;
1616
+ }[];
1617
+ composer_ref: string;
1618
+ target_node_ref: string;
1619
+ artifact_kind: string;
1620
+ artifact_key: string;
1621
+ artifact_policy_variant: string;
1622
+ variables: Record<string, IndexerJson>;
1623
+ }[];
1624
+ };
1625
+ fragment_digest: string;
1626
+ payload_digest: string;
1627
+ materialization_receipt: {
1628
+ protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1629
+ layer_ref: string;
1630
+ layer_integrity: string;
1631
+ fragment_digest: string;
1632
+ payload_digest: string;
1633
+ validator_contract_digest: string;
1634
+ composer_ref?: string | undefined;
1635
+ };
1636
+ composer_ref?: string | undefined;
1637
+ }[];
1638
+ rejected_fragment_diagnostics: {
1639
+ code: string;
1640
+ message: string;
1641
+ fragment_digest?: string | undefined;
1642
+ }[];
1643
+ view_digest: string;
1644
+ }>;
1645
+ export type IndexerLayerCompositionInput = z.infer<typeof indexerLayerCompositionInputSchema>;
1646
+ export declare function indexerLayerCompositionInputDigest(view: Omit<IndexerLayerCompositionInput, "view_digest">): string;
1647
+ export declare function composeIndexerLayerInput(input: {
1648
+ workset_digest: string;
1649
+ final_authority_layer_ref: string;
1650
+ fragments: readonly IndexerMaterializedLayerFragment[];
1651
+ }): IndexerLayerCompositionInput;
1652
+ export declare function validateIndexerLayerCompositionInput(value: unknown): IndexerLayerCompositionInput;