@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,985 @@
1
+ import { z } from "zod";
2
+ export declare const indexerCandidateCompileSchema: z.ZodObject<{
3
+ protocol: z.ZodLiteral<"context.indexer.candidate-compile/v1">;
4
+ layout_proposal_set_digest: z.ZodString;
5
+ layout_transition_digest: z.ZodString;
6
+ accepted_result_set_digest: z.ZodString;
7
+ result_bindings: z.ZodArray<z.ZodObject<{
8
+ workset_digest: z.ZodString;
9
+ execution_request_digest: z.ZodString;
10
+ acceptance_digest: z.ZodString;
11
+ run_result_digest: z.ZodString;
12
+ indexer_result_digest: z.ZodString;
13
+ artifact_result_digest: z.ZodString;
14
+ layout_proposal_digest: z.ZodString;
15
+ run_envelope_digest: z.ZodString;
16
+ shared_artifact_fingerprint: z.ZodObject<{
17
+ protocol: z.ZodLiteral<"context.indexer.shared-artifact-fingerprint/v1">;
18
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
19
+ implementation_fingerprint: z.ZodString;
20
+ instructions_fingerprint: z.ZodString;
21
+ template_fingerprint: z.ZodString;
22
+ } & {
23
+ fingerprint_digest: z.ZodString;
24
+ }, "strict", z.ZodTypeAny, {
25
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
26
+ indexer_id: string;
27
+ implementation_fingerprint: string;
28
+ instructions_fingerprint: string;
29
+ template_fingerprint: string;
30
+ fingerprint_digest: string;
31
+ }, {
32
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
33
+ indexer_id: string;
34
+ implementation_fingerprint: string;
35
+ instructions_fingerprint: string;
36
+ template_fingerprint: string;
37
+ fingerprint_digest: string;
38
+ }>;
39
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
40
+ provider_layer_ref: z.ZodString;
41
+ provider_integrity: z.ZodString;
42
+ provider_bundle_digest: z.ZodString;
43
+ config_fingerprint: z.ZodString;
44
+ customization_fingerprint: z.ZodNullable<z.ZodString>;
45
+ binding_digest: z.ZodString;
46
+ }, "strict", z.ZodTypeAny, {
47
+ workset_digest: string;
48
+ indexer_id: string;
49
+ provider_integrity: string;
50
+ artifact_result_digest: string;
51
+ provider_layer_ref: string;
52
+ provider_bundle_digest: string;
53
+ config_fingerprint: string;
54
+ customization_fingerprint: string | null;
55
+ binding_digest: string;
56
+ shared_artifact_fingerprint: {
57
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
58
+ indexer_id: string;
59
+ implementation_fingerprint: string;
60
+ instructions_fingerprint: string;
61
+ template_fingerprint: string;
62
+ fingerprint_digest: string;
63
+ };
64
+ execution_request_digest: string;
65
+ run_envelope_digest: string;
66
+ acceptance_digest: string;
67
+ run_result_digest: string;
68
+ indexer_result_digest: string;
69
+ layout_proposal_digest: string;
70
+ }, {
71
+ workset_digest: string;
72
+ indexer_id: string;
73
+ provider_integrity: string;
74
+ artifact_result_digest: string;
75
+ provider_layer_ref: string;
76
+ provider_bundle_digest: string;
77
+ config_fingerprint: string;
78
+ customization_fingerprint: string | null;
79
+ binding_digest: string;
80
+ shared_artifact_fingerprint: {
81
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
82
+ indexer_id: string;
83
+ implementation_fingerprint: string;
84
+ instructions_fingerprint: string;
85
+ template_fingerprint: string;
86
+ fingerprint_digest: string;
87
+ };
88
+ execution_request_digest: string;
89
+ run_envelope_digest: string;
90
+ acceptance_digest: string;
91
+ run_result_digest: string;
92
+ indexer_result_digest: string;
93
+ layout_proposal_digest: string;
94
+ }>, "many">;
95
+ files: z.ZodArray<z.ZodObject<{
96
+ artifact_ref: z.ZodString;
97
+ node_ref: z.ZodString;
98
+ internal_view_ref: z.ZodString;
99
+ collection: z.ZodType<import("./contracts.js").TopLevelNamespace, z.ZodTypeDef, import("./contracts.js").TopLevelNamespace>;
100
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
101
+ output_path: z.ZodEffects<z.ZodString, string, string>;
102
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
103
+ source_ref: z.ZodString;
104
+ evidence_bindings: z.ZodArray<z.ZodObject<{
105
+ evidence_ref: z.ZodString;
106
+ kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
107
+ source_ref: z.ZodString;
108
+ module_ref: z.ZodNullable<z.ZodString>;
109
+ locator: z.ZodEffects<z.ZodObject<{
110
+ path: z.ZodEffects<z.ZodString, string, string>;
111
+ start_line: z.ZodNumber;
112
+ end_line: z.ZodNumber;
113
+ }, "strict", z.ZodTypeAny, {
114
+ path: string;
115
+ start_line: number;
116
+ end_line: number;
117
+ }, {
118
+ path: string;
119
+ start_line: number;
120
+ end_line: number;
121
+ }>, {
122
+ path: string;
123
+ start_line: number;
124
+ end_line: number;
125
+ }, {
126
+ path: string;
127
+ start_line: number;
128
+ end_line: number;
129
+ }>;
130
+ content_digest: z.ZodString;
131
+ coverage_tier: z.ZodEnum<["ast-catalog", "lightweight-evidence"]>;
132
+ binding_digest: z.ZodString;
133
+ }, "strict", z.ZodTypeAny, {
134
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
135
+ source_ref: string;
136
+ locator: {
137
+ path: string;
138
+ start_line: number;
139
+ end_line: number;
140
+ };
141
+ module_ref: string | null;
142
+ coverage_tier: "ast-catalog" | "lightweight-evidence";
143
+ content_digest: string;
144
+ evidence_ref: string;
145
+ binding_digest: string;
146
+ }, {
147
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
148
+ source_ref: string;
149
+ locator: {
150
+ path: string;
151
+ start_line: number;
152
+ end_line: number;
153
+ };
154
+ module_ref: string | null;
155
+ coverage_tier: "ast-catalog" | "lightweight-evidence";
156
+ content_digest: string;
157
+ evidence_ref: string;
158
+ binding_digest: string;
159
+ }>, "many">;
160
+ acceptance_digest: z.ZodString;
161
+ indexer_result_digest: z.ZodString;
162
+ artifact_result_digest: z.ZodString;
163
+ layout_proposal_digest: z.ZodString;
164
+ result_binding_digest: z.ZodString;
165
+ shared_artifact_fingerprint_digest: z.ZodString;
166
+ section_refs: z.ZodArray<z.ZodString, "many">;
167
+ sections: z.ZodArray<z.ZodObject<{
168
+ section_ref: z.ZodString;
169
+ section_key: z.ZodEffects<z.ZodString, string, string>;
170
+ evidence_refs: z.ZodArray<z.ZodString, "many">;
171
+ markdown: z.ZodString;
172
+ markdown_digest: z.ZodString;
173
+ }, "strict", z.ZodTypeAny, {
174
+ evidence_refs: string[];
175
+ markdown: string;
176
+ section_key: string;
177
+ section_ref: string;
178
+ markdown_digest: string;
179
+ }, {
180
+ evidence_refs: string[];
181
+ markdown: string;
182
+ section_key: string;
183
+ section_ref: string;
184
+ markdown_digest: string;
185
+ }>, "many">;
186
+ markdown: z.ZodString;
187
+ markdown_digest: z.ZodString;
188
+ } & {
189
+ file_digest: z.ZodString;
190
+ }, "strict", z.ZodTypeAny, {
191
+ source_ref: string;
192
+ collection: import("./contracts.js").TopLevelNamespace;
193
+ output_path: string;
194
+ artifact_kind: string;
195
+ indexer_id: string;
196
+ markdown: string;
197
+ node_ref: string;
198
+ artifact_result_digest: string;
199
+ evidence_bindings: {
200
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
201
+ source_ref: string;
202
+ locator: {
203
+ path: string;
204
+ start_line: number;
205
+ end_line: number;
206
+ };
207
+ module_ref: string | null;
208
+ coverage_tier: "ast-catalog" | "lightweight-evidence";
209
+ content_digest: string;
210
+ evidence_ref: string;
211
+ binding_digest: string;
212
+ }[];
213
+ sections: {
214
+ evidence_refs: string[];
215
+ markdown: string;
216
+ section_key: string;
217
+ section_ref: string;
218
+ markdown_digest: string;
219
+ }[];
220
+ artifact_ref: string;
221
+ acceptance_digest: string;
222
+ internal_view_ref: string;
223
+ shared_artifact_fingerprint_digest: string;
224
+ section_refs: string[];
225
+ markdown_digest: string;
226
+ indexer_result_digest: string;
227
+ layout_proposal_digest: string;
228
+ result_binding_digest: string;
229
+ file_digest: string;
230
+ }, {
231
+ source_ref: string;
232
+ collection: import("./contracts.js").TopLevelNamespace;
233
+ output_path: string;
234
+ artifact_kind: string;
235
+ indexer_id: string;
236
+ markdown: string;
237
+ node_ref: string;
238
+ artifact_result_digest: string;
239
+ evidence_bindings: {
240
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
241
+ source_ref: string;
242
+ locator: {
243
+ path: string;
244
+ start_line: number;
245
+ end_line: number;
246
+ };
247
+ module_ref: string | null;
248
+ coverage_tier: "ast-catalog" | "lightweight-evidence";
249
+ content_digest: string;
250
+ evidence_ref: string;
251
+ binding_digest: string;
252
+ }[];
253
+ sections: {
254
+ evidence_refs: string[];
255
+ markdown: string;
256
+ section_key: string;
257
+ section_ref: string;
258
+ markdown_digest: string;
259
+ }[];
260
+ artifact_ref: string;
261
+ acceptance_digest: string;
262
+ internal_view_ref: string;
263
+ shared_artifact_fingerprint_digest: string;
264
+ section_refs: string[];
265
+ markdown_digest: string;
266
+ indexer_result_digest: string;
267
+ layout_proposal_digest: string;
268
+ result_binding_digest: string;
269
+ file_digest: string;
270
+ }>, "many">;
271
+ artifact_manifest: z.ZodObject<{
272
+ protocol: z.ZodLiteral<"context.indexer.artifact-manifest/v1">;
273
+ layout_proposal_set_digest: z.ZodString;
274
+ files: z.ZodArray<z.ZodObject<{
275
+ physical_ref: z.ZodString;
276
+ output_path: z.ZodEffects<z.ZodString, string, string>;
277
+ markdown_digest: z.ZodString;
278
+ byte_count: z.ZodNumber;
279
+ reader_body_line_count: z.ZodNumber;
280
+ empty: z.ZodBoolean;
281
+ owner: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
282
+ kind: z.ZodLiteral<"logical-unit">;
283
+ logical_unit_ref: z.ZodString;
284
+ node_ref: z.ZodString;
285
+ artifact_ref: z.ZodString;
286
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
287
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
288
+ bundle_digest: z.ZodString;
289
+ purpose: z.ZodEnum<["required", "discretionary", "semantic-split"]>;
290
+ split_of: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
291
+ section_refs: z.ZodArray<z.ZodString, "many">;
292
+ material_state: z.ZodEnum<["ready", "blocked"]>;
293
+ }, "strict", z.ZodTypeAny, {
294
+ kind: "logical-unit";
295
+ artifact_kind: string;
296
+ artifact_id: string;
297
+ purpose: "required" | "discretionary" | "semantic-split";
298
+ split_of: string | null;
299
+ logical_unit_ref: string;
300
+ bundle_digest: string;
301
+ node_ref: string;
302
+ artifact_ref: string;
303
+ section_refs: string[];
304
+ material_state: "blocked" | "ready";
305
+ }, {
306
+ kind: "logical-unit";
307
+ artifact_kind: string;
308
+ artifact_id: string;
309
+ purpose: "required" | "discretionary" | "semantic-split";
310
+ split_of: string | null;
311
+ logical_unit_ref: string;
312
+ bundle_digest: string;
313
+ node_ref: string;
314
+ artifact_ref: string;
315
+ section_refs: string[];
316
+ material_state: "blocked" | "ready";
317
+ }>, z.ZodObject<{
318
+ kind: z.ZodLiteral<"navigation">;
319
+ navigation_ref: z.ZodString;
320
+ artifact_ref: z.ZodString;
321
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
322
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
323
+ plan_digest: z.ZodString;
324
+ child_artifact_refs: z.ZodArray<z.ZodString, "many">;
325
+ }, "strict", z.ZodTypeAny, {
326
+ kind: "navigation";
327
+ artifact_kind: string;
328
+ artifact_id: string;
329
+ plan_digest: string;
330
+ artifact_ref: string;
331
+ navigation_ref: string;
332
+ child_artifact_refs: string[];
333
+ }, {
334
+ kind: "navigation";
335
+ artifact_kind: string;
336
+ artifact_id: string;
337
+ plan_digest: string;
338
+ artifact_ref: string;
339
+ navigation_ref: string;
340
+ child_artifact_refs: string[];
341
+ }>, z.ZodObject<{
342
+ kind: z.ZodLiteral<"orphan">;
343
+ reason: z.ZodLiteral<"unregistered-output-path">;
344
+ }, "strict", z.ZodTypeAny, {
345
+ kind: "orphan";
346
+ reason: "unregistered-output-path";
347
+ }, {
348
+ kind: "orphan";
349
+ reason: "unregistered-output-path";
350
+ }>]>;
351
+ }, "strict", z.ZodTypeAny, {
352
+ empty: boolean;
353
+ output_path: string;
354
+ owner: {
355
+ kind: "logical-unit";
356
+ artifact_kind: string;
357
+ artifact_id: string;
358
+ purpose: "required" | "discretionary" | "semantic-split";
359
+ split_of: string | null;
360
+ logical_unit_ref: string;
361
+ bundle_digest: string;
362
+ node_ref: string;
363
+ artifact_ref: string;
364
+ section_refs: string[];
365
+ material_state: "blocked" | "ready";
366
+ } | {
367
+ kind: "navigation";
368
+ artifact_kind: string;
369
+ artifact_id: string;
370
+ plan_digest: string;
371
+ artifact_ref: string;
372
+ navigation_ref: string;
373
+ child_artifact_refs: string[];
374
+ } | {
375
+ kind: "orphan";
376
+ reason: "unregistered-output-path";
377
+ };
378
+ physical_ref: string;
379
+ markdown_digest: string;
380
+ byte_count: number;
381
+ reader_body_line_count: number;
382
+ }, {
383
+ empty: boolean;
384
+ output_path: string;
385
+ owner: {
386
+ kind: "logical-unit";
387
+ artifact_kind: string;
388
+ artifact_id: string;
389
+ purpose: "required" | "discretionary" | "semantic-split";
390
+ split_of: string | null;
391
+ logical_unit_ref: string;
392
+ bundle_digest: string;
393
+ node_ref: string;
394
+ artifact_ref: string;
395
+ section_refs: string[];
396
+ material_state: "blocked" | "ready";
397
+ } | {
398
+ kind: "navigation";
399
+ artifact_kind: string;
400
+ artifact_id: string;
401
+ plan_digest: string;
402
+ artifact_ref: string;
403
+ navigation_ref: string;
404
+ child_artifact_refs: string[];
405
+ } | {
406
+ kind: "orphan";
407
+ reason: "unregistered-output-path";
408
+ };
409
+ physical_ref: string;
410
+ markdown_digest: string;
411
+ byte_count: number;
412
+ reader_body_line_count: number;
413
+ }>, "many">;
414
+ } & {
415
+ manifest_digest: z.ZodString;
416
+ }, "strict", z.ZodTypeAny, {
417
+ protocol: "context.indexer.artifact-manifest/v1";
418
+ files: {
419
+ empty: boolean;
420
+ output_path: string;
421
+ owner: {
422
+ kind: "logical-unit";
423
+ artifact_kind: string;
424
+ artifact_id: string;
425
+ purpose: "required" | "discretionary" | "semantic-split";
426
+ split_of: string | null;
427
+ logical_unit_ref: string;
428
+ bundle_digest: string;
429
+ node_ref: string;
430
+ artifact_ref: string;
431
+ section_refs: string[];
432
+ material_state: "blocked" | "ready";
433
+ } | {
434
+ kind: "navigation";
435
+ artifact_kind: string;
436
+ artifact_id: string;
437
+ plan_digest: string;
438
+ artifact_ref: string;
439
+ navigation_ref: string;
440
+ child_artifact_refs: string[];
441
+ } | {
442
+ kind: "orphan";
443
+ reason: "unregistered-output-path";
444
+ };
445
+ physical_ref: string;
446
+ markdown_digest: string;
447
+ byte_count: number;
448
+ reader_body_line_count: number;
449
+ }[];
450
+ manifest_digest: string;
451
+ layout_proposal_set_digest: string;
452
+ }, {
453
+ protocol: "context.indexer.artifact-manifest/v1";
454
+ files: {
455
+ empty: boolean;
456
+ output_path: string;
457
+ owner: {
458
+ kind: "logical-unit";
459
+ artifact_kind: string;
460
+ artifact_id: string;
461
+ purpose: "required" | "discretionary" | "semantic-split";
462
+ split_of: string | null;
463
+ logical_unit_ref: string;
464
+ bundle_digest: string;
465
+ node_ref: string;
466
+ artifact_ref: string;
467
+ section_refs: string[];
468
+ material_state: "blocked" | "ready";
469
+ } | {
470
+ kind: "navigation";
471
+ artifact_kind: string;
472
+ artifact_id: string;
473
+ plan_digest: string;
474
+ artifact_ref: string;
475
+ navigation_ref: string;
476
+ child_artifact_refs: string[];
477
+ } | {
478
+ kind: "orphan";
479
+ reason: "unregistered-output-path";
480
+ };
481
+ physical_ref: string;
482
+ markdown_digest: string;
483
+ byte_count: number;
484
+ reader_body_line_count: number;
485
+ }[];
486
+ manifest_digest: string;
487
+ layout_proposal_set_digest: string;
488
+ }>;
489
+ physical_artifact_audit: z.ZodObject<{
490
+ protocol: z.ZodLiteral<"context.indexer.physical-artifact-audit/v1">;
491
+ layout_proposal_set_digest: z.ZodString;
492
+ artifact_manifest_digest: z.ZodString;
493
+ state: z.ZodEnum<["passed", "failed"]>;
494
+ summary: z.ZodObject<{
495
+ logical_unit_count: z.ZodNumber;
496
+ planned_bundle_artifact_count: z.ZodNumber;
497
+ complete_bundle_artifact_count: z.ZodNumber;
498
+ physical_artifact_count: z.ZodNumber;
499
+ registered_physical_artifact_count: z.ZodNumber;
500
+ navigation_artifact_count: z.ZodNumber;
501
+ empty_artifact_count: z.ZodNumber;
502
+ orphan_artifact_count: z.ZodNumber;
503
+ missing_artifact_count: z.ZodNumber;
504
+ unresolved_material_artifact_count: z.ZodNumber;
505
+ }, "strict", z.ZodTypeAny, {
506
+ logical_unit_count: number;
507
+ planned_bundle_artifact_count: number;
508
+ complete_bundle_artifact_count: number;
509
+ physical_artifact_count: number;
510
+ registered_physical_artifact_count: number;
511
+ navigation_artifact_count: number;
512
+ empty_artifact_count: number;
513
+ orphan_artifact_count: number;
514
+ missing_artifact_count: number;
515
+ unresolved_material_artifact_count: number;
516
+ }, {
517
+ logical_unit_count: number;
518
+ planned_bundle_artifact_count: number;
519
+ complete_bundle_artifact_count: number;
520
+ physical_artifact_count: number;
521
+ registered_physical_artifact_count: number;
522
+ navigation_artifact_count: number;
523
+ empty_artifact_count: number;
524
+ orphan_artifact_count: number;
525
+ missing_artifact_count: number;
526
+ unresolved_material_artifact_count: number;
527
+ }>;
528
+ logical_unit_fan_out: z.ZodArray<z.ZodObject<{
529
+ logical_unit_ref: z.ZodString;
530
+ bundle_digest: z.ZodString;
531
+ planned_artifact_count: z.ZodNumber;
532
+ ready_artifact_count: z.ZodNumber;
533
+ materialized_artifact_count: z.ZodNumber;
534
+ discretionary_fan_out: z.ZodNumber;
535
+ semantic_split_part_count: z.ZodNumber;
536
+ }, "strict", z.ZodTypeAny, {
537
+ logical_unit_ref: string;
538
+ semantic_split_part_count: number;
539
+ bundle_digest: string;
540
+ planned_artifact_count: number;
541
+ ready_artifact_count: number;
542
+ materialized_artifact_count: number;
543
+ discretionary_fan_out: number;
544
+ }, {
545
+ logical_unit_ref: string;
546
+ semantic_split_part_count: number;
547
+ bundle_digest: string;
548
+ planned_artifact_count: number;
549
+ ready_artifact_count: number;
550
+ materialized_artifact_count: number;
551
+ discretionary_fan_out: number;
552
+ }>, "many">;
553
+ diagnostics: z.ZodArray<z.ZodObject<{
554
+ code: z.ZodEnum<["empty-physical-artifact", "missing-physical-artifact", "orphan-physical-artifact", "unresolved-material-artifact"]>;
555
+ output_path: z.ZodEffects<z.ZodString, string, string>;
556
+ artifact_ref: z.ZodNullable<z.ZodString>;
557
+ logical_unit_ref: z.ZodNullable<z.ZodString>;
558
+ }, "strict", z.ZodTypeAny, {
559
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
560
+ output_path: string;
561
+ logical_unit_ref: string | null;
562
+ artifact_ref: string | null;
563
+ }, {
564
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
565
+ output_path: string;
566
+ logical_unit_ref: string | null;
567
+ artifact_ref: string | null;
568
+ }>, "many">;
569
+ readability_advisories: z.ZodArray<z.ZodObject<{
570
+ code: z.ZodLiteral<"physical-artifact-reader-body-over-1500-lines">;
571
+ output_path: z.ZodEffects<z.ZodString, string, string>;
572
+ artifact_ref: z.ZodString;
573
+ reader_body_line_count: z.ZodNumber;
574
+ }, "strict", z.ZodTypeAny, {
575
+ code: "physical-artifact-reader-body-over-1500-lines";
576
+ output_path: string;
577
+ artifact_ref: string;
578
+ reader_body_line_count: number;
579
+ }, {
580
+ code: "physical-artifact-reader-body-over-1500-lines";
581
+ output_path: string;
582
+ artifact_ref: string;
583
+ reader_body_line_count: number;
584
+ }>, "many">;
585
+ } & {
586
+ audit_digest: z.ZodString;
587
+ }, "strict", z.ZodTypeAny, {
588
+ protocol: "context.indexer.physical-artifact-audit/v1";
589
+ diagnostics: {
590
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
591
+ output_path: string;
592
+ logical_unit_ref: string | null;
593
+ artifact_ref: string | null;
594
+ }[];
595
+ state: "passed" | "failed";
596
+ audit_digest: string;
597
+ summary: {
598
+ logical_unit_count: number;
599
+ planned_bundle_artifact_count: number;
600
+ complete_bundle_artifact_count: number;
601
+ physical_artifact_count: number;
602
+ registered_physical_artifact_count: number;
603
+ navigation_artifact_count: number;
604
+ empty_artifact_count: number;
605
+ orphan_artifact_count: number;
606
+ missing_artifact_count: number;
607
+ unresolved_material_artifact_count: number;
608
+ };
609
+ layout_proposal_set_digest: string;
610
+ artifact_manifest_digest: string;
611
+ logical_unit_fan_out: {
612
+ logical_unit_ref: string;
613
+ semantic_split_part_count: number;
614
+ bundle_digest: string;
615
+ planned_artifact_count: number;
616
+ ready_artifact_count: number;
617
+ materialized_artifact_count: number;
618
+ discretionary_fan_out: number;
619
+ }[];
620
+ readability_advisories: {
621
+ code: "physical-artifact-reader-body-over-1500-lines";
622
+ output_path: string;
623
+ artifact_ref: string;
624
+ reader_body_line_count: number;
625
+ }[];
626
+ }, {
627
+ protocol: "context.indexer.physical-artifact-audit/v1";
628
+ diagnostics: {
629
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
630
+ output_path: string;
631
+ logical_unit_ref: string | null;
632
+ artifact_ref: string | null;
633
+ }[];
634
+ state: "passed" | "failed";
635
+ audit_digest: string;
636
+ summary: {
637
+ logical_unit_count: number;
638
+ planned_bundle_artifact_count: number;
639
+ complete_bundle_artifact_count: number;
640
+ physical_artifact_count: number;
641
+ registered_physical_artifact_count: number;
642
+ navigation_artifact_count: number;
643
+ empty_artifact_count: number;
644
+ orphan_artifact_count: number;
645
+ missing_artifact_count: number;
646
+ unresolved_material_artifact_count: number;
647
+ };
648
+ layout_proposal_set_digest: string;
649
+ artifact_manifest_digest: string;
650
+ logical_unit_fan_out: {
651
+ logical_unit_ref: string;
652
+ semantic_split_part_count: number;
653
+ bundle_digest: string;
654
+ planned_artifact_count: number;
655
+ ready_artifact_count: number;
656
+ materialized_artifact_count: number;
657
+ discretionary_fan_out: number;
658
+ }[];
659
+ readability_advisories: {
660
+ code: "physical-artifact-reader-body-over-1500-lines";
661
+ output_path: string;
662
+ artifact_ref: string;
663
+ reader_body_line_count: number;
664
+ }[];
665
+ }>;
666
+ } & {
667
+ compile_digest: z.ZodString;
668
+ }, "strict", z.ZodTypeAny, {
669
+ protocol: "context.indexer.candidate-compile/v1";
670
+ files: {
671
+ source_ref: string;
672
+ collection: import("./contracts.js").TopLevelNamespace;
673
+ output_path: string;
674
+ artifact_kind: string;
675
+ indexer_id: string;
676
+ markdown: string;
677
+ node_ref: string;
678
+ artifact_result_digest: string;
679
+ evidence_bindings: {
680
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
681
+ source_ref: string;
682
+ locator: {
683
+ path: string;
684
+ start_line: number;
685
+ end_line: number;
686
+ };
687
+ module_ref: string | null;
688
+ coverage_tier: "ast-catalog" | "lightweight-evidence";
689
+ content_digest: string;
690
+ evidence_ref: string;
691
+ binding_digest: string;
692
+ }[];
693
+ sections: {
694
+ evidence_refs: string[];
695
+ markdown: string;
696
+ section_key: string;
697
+ section_ref: string;
698
+ markdown_digest: string;
699
+ }[];
700
+ artifact_ref: string;
701
+ acceptance_digest: string;
702
+ internal_view_ref: string;
703
+ shared_artifact_fingerprint_digest: string;
704
+ section_refs: string[];
705
+ markdown_digest: string;
706
+ indexer_result_digest: string;
707
+ layout_proposal_digest: string;
708
+ result_binding_digest: string;
709
+ file_digest: string;
710
+ }[];
711
+ accepted_result_set_digest: string;
712
+ layout_proposal_set_digest: string;
713
+ layout_transition_digest: string;
714
+ result_bindings: {
715
+ workset_digest: string;
716
+ indexer_id: string;
717
+ provider_integrity: string;
718
+ artifact_result_digest: string;
719
+ provider_layer_ref: string;
720
+ provider_bundle_digest: string;
721
+ config_fingerprint: string;
722
+ customization_fingerprint: string | null;
723
+ binding_digest: string;
724
+ shared_artifact_fingerprint: {
725
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
726
+ indexer_id: string;
727
+ implementation_fingerprint: string;
728
+ instructions_fingerprint: string;
729
+ template_fingerprint: string;
730
+ fingerprint_digest: string;
731
+ };
732
+ execution_request_digest: string;
733
+ run_envelope_digest: string;
734
+ acceptance_digest: string;
735
+ run_result_digest: string;
736
+ indexer_result_digest: string;
737
+ layout_proposal_digest: string;
738
+ }[];
739
+ artifact_manifest: {
740
+ protocol: "context.indexer.artifact-manifest/v1";
741
+ files: {
742
+ empty: boolean;
743
+ output_path: string;
744
+ owner: {
745
+ kind: "logical-unit";
746
+ artifact_kind: string;
747
+ artifact_id: string;
748
+ purpose: "required" | "discretionary" | "semantic-split";
749
+ split_of: string | null;
750
+ logical_unit_ref: string;
751
+ bundle_digest: string;
752
+ node_ref: string;
753
+ artifact_ref: string;
754
+ section_refs: string[];
755
+ material_state: "blocked" | "ready";
756
+ } | {
757
+ kind: "navigation";
758
+ artifact_kind: string;
759
+ artifact_id: string;
760
+ plan_digest: string;
761
+ artifact_ref: string;
762
+ navigation_ref: string;
763
+ child_artifact_refs: string[];
764
+ } | {
765
+ kind: "orphan";
766
+ reason: "unregistered-output-path";
767
+ };
768
+ physical_ref: string;
769
+ markdown_digest: string;
770
+ byte_count: number;
771
+ reader_body_line_count: number;
772
+ }[];
773
+ manifest_digest: string;
774
+ layout_proposal_set_digest: string;
775
+ };
776
+ physical_artifact_audit: {
777
+ protocol: "context.indexer.physical-artifact-audit/v1";
778
+ diagnostics: {
779
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
780
+ output_path: string;
781
+ logical_unit_ref: string | null;
782
+ artifact_ref: string | null;
783
+ }[];
784
+ state: "passed" | "failed";
785
+ audit_digest: string;
786
+ summary: {
787
+ logical_unit_count: number;
788
+ planned_bundle_artifact_count: number;
789
+ complete_bundle_artifact_count: number;
790
+ physical_artifact_count: number;
791
+ registered_physical_artifact_count: number;
792
+ navigation_artifact_count: number;
793
+ empty_artifact_count: number;
794
+ orphan_artifact_count: number;
795
+ missing_artifact_count: number;
796
+ unresolved_material_artifact_count: number;
797
+ };
798
+ layout_proposal_set_digest: string;
799
+ artifact_manifest_digest: string;
800
+ logical_unit_fan_out: {
801
+ logical_unit_ref: string;
802
+ semantic_split_part_count: number;
803
+ bundle_digest: string;
804
+ planned_artifact_count: number;
805
+ ready_artifact_count: number;
806
+ materialized_artifact_count: number;
807
+ discretionary_fan_out: number;
808
+ }[];
809
+ readability_advisories: {
810
+ code: "physical-artifact-reader-body-over-1500-lines";
811
+ output_path: string;
812
+ artifact_ref: string;
813
+ reader_body_line_count: number;
814
+ }[];
815
+ };
816
+ compile_digest: string;
817
+ }, {
818
+ protocol: "context.indexer.candidate-compile/v1";
819
+ files: {
820
+ source_ref: string;
821
+ collection: import("./contracts.js").TopLevelNamespace;
822
+ output_path: string;
823
+ artifact_kind: string;
824
+ indexer_id: string;
825
+ markdown: string;
826
+ node_ref: string;
827
+ artifact_result_digest: string;
828
+ evidence_bindings: {
829
+ kind: "contract" | "code" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
830
+ source_ref: string;
831
+ locator: {
832
+ path: string;
833
+ start_line: number;
834
+ end_line: number;
835
+ };
836
+ module_ref: string | null;
837
+ coverage_tier: "ast-catalog" | "lightweight-evidence";
838
+ content_digest: string;
839
+ evidence_ref: string;
840
+ binding_digest: string;
841
+ }[];
842
+ sections: {
843
+ evidence_refs: string[];
844
+ markdown: string;
845
+ section_key: string;
846
+ section_ref: string;
847
+ markdown_digest: string;
848
+ }[];
849
+ artifact_ref: string;
850
+ acceptance_digest: string;
851
+ internal_view_ref: string;
852
+ shared_artifact_fingerprint_digest: string;
853
+ section_refs: string[];
854
+ markdown_digest: string;
855
+ indexer_result_digest: string;
856
+ layout_proposal_digest: string;
857
+ result_binding_digest: string;
858
+ file_digest: string;
859
+ }[];
860
+ accepted_result_set_digest: string;
861
+ layout_proposal_set_digest: string;
862
+ layout_transition_digest: string;
863
+ result_bindings: {
864
+ workset_digest: string;
865
+ indexer_id: string;
866
+ provider_integrity: string;
867
+ artifact_result_digest: string;
868
+ provider_layer_ref: string;
869
+ provider_bundle_digest: string;
870
+ config_fingerprint: string;
871
+ customization_fingerprint: string | null;
872
+ binding_digest: string;
873
+ shared_artifact_fingerprint: {
874
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
875
+ indexer_id: string;
876
+ implementation_fingerprint: string;
877
+ instructions_fingerprint: string;
878
+ template_fingerprint: string;
879
+ fingerprint_digest: string;
880
+ };
881
+ execution_request_digest: string;
882
+ run_envelope_digest: string;
883
+ acceptance_digest: string;
884
+ run_result_digest: string;
885
+ indexer_result_digest: string;
886
+ layout_proposal_digest: string;
887
+ }[];
888
+ artifact_manifest: {
889
+ protocol: "context.indexer.artifact-manifest/v1";
890
+ files: {
891
+ empty: boolean;
892
+ output_path: string;
893
+ owner: {
894
+ kind: "logical-unit";
895
+ artifact_kind: string;
896
+ artifact_id: string;
897
+ purpose: "required" | "discretionary" | "semantic-split";
898
+ split_of: string | null;
899
+ logical_unit_ref: string;
900
+ bundle_digest: string;
901
+ node_ref: string;
902
+ artifact_ref: string;
903
+ section_refs: string[];
904
+ material_state: "blocked" | "ready";
905
+ } | {
906
+ kind: "navigation";
907
+ artifact_kind: string;
908
+ artifact_id: string;
909
+ plan_digest: string;
910
+ artifact_ref: string;
911
+ navigation_ref: string;
912
+ child_artifact_refs: string[];
913
+ } | {
914
+ kind: "orphan";
915
+ reason: "unregistered-output-path";
916
+ };
917
+ physical_ref: string;
918
+ markdown_digest: string;
919
+ byte_count: number;
920
+ reader_body_line_count: number;
921
+ }[];
922
+ manifest_digest: string;
923
+ layout_proposal_set_digest: string;
924
+ };
925
+ physical_artifact_audit: {
926
+ protocol: "context.indexer.physical-artifact-audit/v1";
927
+ diagnostics: {
928
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
929
+ output_path: string;
930
+ logical_unit_ref: string | null;
931
+ artifact_ref: string | null;
932
+ }[];
933
+ state: "passed" | "failed";
934
+ audit_digest: string;
935
+ summary: {
936
+ logical_unit_count: number;
937
+ planned_bundle_artifact_count: number;
938
+ complete_bundle_artifact_count: number;
939
+ physical_artifact_count: number;
940
+ registered_physical_artifact_count: number;
941
+ navigation_artifact_count: number;
942
+ empty_artifact_count: number;
943
+ orphan_artifact_count: number;
944
+ missing_artifact_count: number;
945
+ unresolved_material_artifact_count: number;
946
+ };
947
+ layout_proposal_set_digest: string;
948
+ artifact_manifest_digest: string;
949
+ logical_unit_fan_out: {
950
+ logical_unit_ref: string;
951
+ semantic_split_part_count: number;
952
+ bundle_digest: string;
953
+ planned_artifact_count: number;
954
+ ready_artifact_count: number;
955
+ materialized_artifact_count: number;
956
+ discretionary_fan_out: number;
957
+ }[];
958
+ readability_advisories: {
959
+ code: "physical-artifact-reader-body-over-1500-lines";
960
+ output_path: string;
961
+ artifact_ref: string;
962
+ reader_body_line_count: number;
963
+ }[];
964
+ };
965
+ compile_digest: string;
966
+ }>;
967
+ export type IndexerCandidateCompile = z.infer<typeof indexerCandidateCompileSchema>;
968
+ export interface IndexerAcceptedAuthorResultInput {
969
+ run_result: unknown;
970
+ accepted_record: unknown;
971
+ run_envelope: unknown;
972
+ rendered_artifacts?: readonly unknown[];
973
+ }
974
+ export declare function buildIndexerCandidateCompile(input: {
975
+ layout_proposal_set: unknown;
976
+ layout_transition: unknown;
977
+ layout_change_confirmations?: readonly unknown[];
978
+ accepted_results: readonly IndexerAcceptedAuthorResultInput[];
979
+ profile_contract: unknown;
980
+ operator_contract: unknown;
981
+ subject_key_schema_set: unknown;
982
+ }): IndexerCandidateCompile;
983
+ export declare function validateIndexerCandidateCompile(input: Parameters<typeof buildIndexerCandidateCompile>[0] & {
984
+ compile: unknown;
985
+ }): IndexerCandidateCompile;