@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,247 @@
1
+ import { z } from "zod";
2
+ import { type IndexerArtifactManifest, type IndexerPhysicalArtifactFileInput } from "./indexerPhysicalArtifactManifest.js";
3
+ declare const physicalArtifactDiagnosticSchema: z.ZodObject<{
4
+ code: z.ZodEnum<["empty-physical-artifact", "missing-physical-artifact", "orphan-physical-artifact", "unresolved-material-artifact"]>;
5
+ output_path: z.ZodEffects<z.ZodString, string, string>;
6
+ artifact_ref: z.ZodNullable<z.ZodString>;
7
+ logical_unit_ref: z.ZodNullable<z.ZodString>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
10
+ output_path: string;
11
+ logical_unit_ref: string | null;
12
+ artifact_ref: string | null;
13
+ }, {
14
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
15
+ output_path: string;
16
+ logical_unit_ref: string | null;
17
+ artifact_ref: string | null;
18
+ }>;
19
+ declare const logicalUnitFanOutSchema: z.ZodObject<{
20
+ logical_unit_ref: z.ZodString;
21
+ bundle_digest: z.ZodString;
22
+ planned_artifact_count: z.ZodNumber;
23
+ ready_artifact_count: z.ZodNumber;
24
+ materialized_artifact_count: z.ZodNumber;
25
+ discretionary_fan_out: z.ZodNumber;
26
+ semantic_split_part_count: z.ZodNumber;
27
+ }, "strict", z.ZodTypeAny, {
28
+ logical_unit_ref: string;
29
+ semantic_split_part_count: number;
30
+ bundle_digest: string;
31
+ planned_artifact_count: number;
32
+ ready_artifact_count: number;
33
+ materialized_artifact_count: number;
34
+ discretionary_fan_out: number;
35
+ }, {
36
+ logical_unit_ref: string;
37
+ semantic_split_part_count: number;
38
+ bundle_digest: string;
39
+ planned_artifact_count: number;
40
+ ready_artifact_count: number;
41
+ materialized_artifact_count: number;
42
+ discretionary_fan_out: number;
43
+ }>;
44
+ export declare const indexerPhysicalArtifactAuditSchema: z.ZodObject<{
45
+ protocol: z.ZodLiteral<"context.indexer.physical-artifact-audit/v1">;
46
+ layout_proposal_set_digest: z.ZodString;
47
+ artifact_manifest_digest: z.ZodString;
48
+ state: z.ZodEnum<["passed", "failed"]>;
49
+ summary: z.ZodObject<{
50
+ logical_unit_count: z.ZodNumber;
51
+ planned_bundle_artifact_count: z.ZodNumber;
52
+ complete_bundle_artifact_count: z.ZodNumber;
53
+ physical_artifact_count: z.ZodNumber;
54
+ registered_physical_artifact_count: z.ZodNumber;
55
+ navigation_artifact_count: z.ZodNumber;
56
+ empty_artifact_count: z.ZodNumber;
57
+ orphan_artifact_count: z.ZodNumber;
58
+ missing_artifact_count: z.ZodNumber;
59
+ unresolved_material_artifact_count: z.ZodNumber;
60
+ }, "strict", z.ZodTypeAny, {
61
+ logical_unit_count: number;
62
+ planned_bundle_artifact_count: number;
63
+ complete_bundle_artifact_count: number;
64
+ physical_artifact_count: number;
65
+ registered_physical_artifact_count: number;
66
+ navigation_artifact_count: number;
67
+ empty_artifact_count: number;
68
+ orphan_artifact_count: number;
69
+ missing_artifact_count: number;
70
+ unresolved_material_artifact_count: number;
71
+ }, {
72
+ logical_unit_count: number;
73
+ planned_bundle_artifact_count: number;
74
+ complete_bundle_artifact_count: number;
75
+ physical_artifact_count: number;
76
+ registered_physical_artifact_count: number;
77
+ navigation_artifact_count: number;
78
+ empty_artifact_count: number;
79
+ orphan_artifact_count: number;
80
+ missing_artifact_count: number;
81
+ unresolved_material_artifact_count: number;
82
+ }>;
83
+ logical_unit_fan_out: z.ZodArray<z.ZodObject<{
84
+ logical_unit_ref: z.ZodString;
85
+ bundle_digest: z.ZodString;
86
+ planned_artifact_count: z.ZodNumber;
87
+ ready_artifact_count: z.ZodNumber;
88
+ materialized_artifact_count: z.ZodNumber;
89
+ discretionary_fan_out: z.ZodNumber;
90
+ semantic_split_part_count: z.ZodNumber;
91
+ }, "strict", z.ZodTypeAny, {
92
+ logical_unit_ref: string;
93
+ semantic_split_part_count: number;
94
+ bundle_digest: string;
95
+ planned_artifact_count: number;
96
+ ready_artifact_count: number;
97
+ materialized_artifact_count: number;
98
+ discretionary_fan_out: number;
99
+ }, {
100
+ logical_unit_ref: string;
101
+ semantic_split_part_count: number;
102
+ bundle_digest: string;
103
+ planned_artifact_count: number;
104
+ ready_artifact_count: number;
105
+ materialized_artifact_count: number;
106
+ discretionary_fan_out: number;
107
+ }>, "many">;
108
+ diagnostics: z.ZodArray<z.ZodObject<{
109
+ code: z.ZodEnum<["empty-physical-artifact", "missing-physical-artifact", "orphan-physical-artifact", "unresolved-material-artifact"]>;
110
+ output_path: z.ZodEffects<z.ZodString, string, string>;
111
+ artifact_ref: z.ZodNullable<z.ZodString>;
112
+ logical_unit_ref: z.ZodNullable<z.ZodString>;
113
+ }, "strict", z.ZodTypeAny, {
114
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
115
+ output_path: string;
116
+ logical_unit_ref: string | null;
117
+ artifact_ref: string | null;
118
+ }, {
119
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
120
+ output_path: string;
121
+ logical_unit_ref: string | null;
122
+ artifact_ref: string | null;
123
+ }>, "many">;
124
+ readability_advisories: z.ZodArray<z.ZodObject<{
125
+ code: z.ZodLiteral<"physical-artifact-reader-body-over-1500-lines">;
126
+ output_path: z.ZodEffects<z.ZodString, string, string>;
127
+ artifact_ref: z.ZodString;
128
+ reader_body_line_count: z.ZodNumber;
129
+ }, "strict", z.ZodTypeAny, {
130
+ code: "physical-artifact-reader-body-over-1500-lines";
131
+ output_path: string;
132
+ artifact_ref: string;
133
+ reader_body_line_count: number;
134
+ }, {
135
+ code: "physical-artifact-reader-body-over-1500-lines";
136
+ output_path: string;
137
+ artifact_ref: string;
138
+ reader_body_line_count: number;
139
+ }>, "many">;
140
+ } & {
141
+ audit_digest: z.ZodString;
142
+ }, "strict", z.ZodTypeAny, {
143
+ protocol: "context.indexer.physical-artifact-audit/v1";
144
+ diagnostics: {
145
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
146
+ output_path: string;
147
+ logical_unit_ref: string | null;
148
+ artifact_ref: string | null;
149
+ }[];
150
+ state: "passed" | "failed";
151
+ audit_digest: string;
152
+ summary: {
153
+ logical_unit_count: number;
154
+ planned_bundle_artifact_count: number;
155
+ complete_bundle_artifact_count: number;
156
+ physical_artifact_count: number;
157
+ registered_physical_artifact_count: number;
158
+ navigation_artifact_count: number;
159
+ empty_artifact_count: number;
160
+ orphan_artifact_count: number;
161
+ missing_artifact_count: number;
162
+ unresolved_material_artifact_count: number;
163
+ };
164
+ layout_proposal_set_digest: string;
165
+ artifact_manifest_digest: string;
166
+ logical_unit_fan_out: {
167
+ logical_unit_ref: string;
168
+ semantic_split_part_count: number;
169
+ bundle_digest: string;
170
+ planned_artifact_count: number;
171
+ ready_artifact_count: number;
172
+ materialized_artifact_count: number;
173
+ discretionary_fan_out: number;
174
+ }[];
175
+ readability_advisories: {
176
+ code: "physical-artifact-reader-body-over-1500-lines";
177
+ output_path: string;
178
+ artifact_ref: string;
179
+ reader_body_line_count: number;
180
+ }[];
181
+ }, {
182
+ protocol: "context.indexer.physical-artifact-audit/v1";
183
+ diagnostics: {
184
+ code: "empty-physical-artifact" | "missing-physical-artifact" | "orphan-physical-artifact" | "unresolved-material-artifact";
185
+ output_path: string;
186
+ logical_unit_ref: string | null;
187
+ artifact_ref: string | null;
188
+ }[];
189
+ state: "passed" | "failed";
190
+ audit_digest: string;
191
+ summary: {
192
+ logical_unit_count: number;
193
+ planned_bundle_artifact_count: number;
194
+ complete_bundle_artifact_count: number;
195
+ physical_artifact_count: number;
196
+ registered_physical_artifact_count: number;
197
+ navigation_artifact_count: number;
198
+ empty_artifact_count: number;
199
+ orphan_artifact_count: number;
200
+ missing_artifact_count: number;
201
+ unresolved_material_artifact_count: number;
202
+ };
203
+ layout_proposal_set_digest: string;
204
+ artifact_manifest_digest: string;
205
+ logical_unit_fan_out: {
206
+ logical_unit_ref: string;
207
+ semantic_split_part_count: number;
208
+ bundle_digest: string;
209
+ planned_artifact_count: number;
210
+ ready_artifact_count: number;
211
+ materialized_artifact_count: number;
212
+ discretionary_fan_out: number;
213
+ }[];
214
+ readability_advisories: {
215
+ code: "physical-artifact-reader-body-over-1500-lines";
216
+ output_path: string;
217
+ artifact_ref: string;
218
+ reader_body_line_count: number;
219
+ }[];
220
+ }>;
221
+ export type IndexerPhysicalArtifactDiagnostic = z.infer<typeof physicalArtifactDiagnosticSchema>;
222
+ export type IndexerLogicalUnitFanOut = z.infer<typeof logicalUnitFanOutSchema>;
223
+ export type IndexerPhysicalArtifactAudit = z.infer<typeof indexerPhysicalArtifactAuditSchema>;
224
+ export declare function auditIndexerPhysicalArtifacts(input: {
225
+ layout_proposal_set: unknown;
226
+ artifact_bundles: readonly unknown[];
227
+ navigation_artifacts?: readonly unknown[];
228
+ files: readonly IndexerPhysicalArtifactFileInput[];
229
+ }): {
230
+ manifest: IndexerArtifactManifest;
231
+ audit: IndexerPhysicalArtifactAudit;
232
+ };
233
+ export declare function validateIndexerPhysicalArtifactAudit(input: {
234
+ audit: unknown;
235
+ manifest: unknown;
236
+ layout_proposal_set: unknown;
237
+ artifact_bundles: readonly unknown[];
238
+ navigation_artifacts?: readonly unknown[];
239
+ }): IndexerPhysicalArtifactAudit;
240
+ export declare function assertIndexerPhysicalArtifactAuditPassed(input: {
241
+ audit: unknown;
242
+ manifest: unknown;
243
+ layout_proposal_set: unknown;
244
+ artifact_bundles: readonly unknown[];
245
+ navigation_artifacts?: readonly unknown[];
246
+ }): IndexerPhysicalArtifactAudit;
247
+ export {};
@@ -0,0 +1,449 @@
1
+ import { z } from "zod";
2
+ export declare const indexerPhysicalArtifactOwnerSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3
+ kind: z.ZodLiteral<"logical-unit">;
4
+ logical_unit_ref: z.ZodString;
5
+ node_ref: z.ZodString;
6
+ artifact_ref: z.ZodString;
7
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
8
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
9
+ bundle_digest: z.ZodString;
10
+ purpose: z.ZodEnum<["required", "discretionary", "semantic-split"]>;
11
+ split_of: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
12
+ section_refs: z.ZodArray<z.ZodString, "many">;
13
+ material_state: z.ZodEnum<["ready", "blocked"]>;
14
+ }, "strict", z.ZodTypeAny, {
15
+ kind: "logical-unit";
16
+ artifact_kind: string;
17
+ artifact_id: string;
18
+ purpose: "required" | "discretionary" | "semantic-split";
19
+ split_of: string | null;
20
+ logical_unit_ref: string;
21
+ bundle_digest: string;
22
+ node_ref: string;
23
+ artifact_ref: string;
24
+ section_refs: string[];
25
+ material_state: "blocked" | "ready";
26
+ }, {
27
+ kind: "logical-unit";
28
+ artifact_kind: string;
29
+ artifact_id: string;
30
+ purpose: "required" | "discretionary" | "semantic-split";
31
+ split_of: string | null;
32
+ logical_unit_ref: string;
33
+ bundle_digest: string;
34
+ node_ref: string;
35
+ artifact_ref: string;
36
+ section_refs: string[];
37
+ material_state: "blocked" | "ready";
38
+ }>, z.ZodObject<{
39
+ kind: z.ZodLiteral<"navigation">;
40
+ navigation_ref: z.ZodString;
41
+ artifact_ref: z.ZodString;
42
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
43
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
44
+ plan_digest: z.ZodString;
45
+ child_artifact_refs: z.ZodArray<z.ZodString, "many">;
46
+ }, "strict", z.ZodTypeAny, {
47
+ kind: "navigation";
48
+ artifact_kind: string;
49
+ artifact_id: string;
50
+ plan_digest: string;
51
+ artifact_ref: string;
52
+ navigation_ref: string;
53
+ child_artifact_refs: string[];
54
+ }, {
55
+ kind: "navigation";
56
+ artifact_kind: string;
57
+ artifact_id: string;
58
+ plan_digest: string;
59
+ artifact_ref: string;
60
+ navigation_ref: string;
61
+ child_artifact_refs: string[];
62
+ }>, z.ZodObject<{
63
+ kind: z.ZodLiteral<"orphan">;
64
+ reason: z.ZodLiteral<"unregistered-output-path">;
65
+ }, "strict", z.ZodTypeAny, {
66
+ kind: "orphan";
67
+ reason: "unregistered-output-path";
68
+ }, {
69
+ kind: "orphan";
70
+ reason: "unregistered-output-path";
71
+ }>]>;
72
+ declare const physicalArtifactManifestEntrySchema: z.ZodObject<{
73
+ physical_ref: z.ZodString;
74
+ output_path: z.ZodEffects<z.ZodString, string, string>;
75
+ markdown_digest: z.ZodString;
76
+ byte_count: z.ZodNumber;
77
+ reader_body_line_count: z.ZodNumber;
78
+ empty: z.ZodBoolean;
79
+ owner: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
80
+ kind: z.ZodLiteral<"logical-unit">;
81
+ logical_unit_ref: z.ZodString;
82
+ node_ref: z.ZodString;
83
+ artifact_ref: z.ZodString;
84
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
85
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
86
+ bundle_digest: z.ZodString;
87
+ purpose: z.ZodEnum<["required", "discretionary", "semantic-split"]>;
88
+ split_of: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
89
+ section_refs: z.ZodArray<z.ZodString, "many">;
90
+ material_state: z.ZodEnum<["ready", "blocked"]>;
91
+ }, "strict", z.ZodTypeAny, {
92
+ kind: "logical-unit";
93
+ artifact_kind: string;
94
+ artifact_id: string;
95
+ purpose: "required" | "discretionary" | "semantic-split";
96
+ split_of: string | null;
97
+ logical_unit_ref: string;
98
+ bundle_digest: string;
99
+ node_ref: string;
100
+ artifact_ref: string;
101
+ section_refs: string[];
102
+ material_state: "blocked" | "ready";
103
+ }, {
104
+ kind: "logical-unit";
105
+ artifact_kind: string;
106
+ artifact_id: string;
107
+ purpose: "required" | "discretionary" | "semantic-split";
108
+ split_of: string | null;
109
+ logical_unit_ref: string;
110
+ bundle_digest: string;
111
+ node_ref: string;
112
+ artifact_ref: string;
113
+ section_refs: string[];
114
+ material_state: "blocked" | "ready";
115
+ }>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"navigation">;
117
+ navigation_ref: z.ZodString;
118
+ artifact_ref: z.ZodString;
119
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
120
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
121
+ plan_digest: z.ZodString;
122
+ child_artifact_refs: z.ZodArray<z.ZodString, "many">;
123
+ }, "strict", z.ZodTypeAny, {
124
+ kind: "navigation";
125
+ artifact_kind: string;
126
+ artifact_id: string;
127
+ plan_digest: string;
128
+ artifact_ref: string;
129
+ navigation_ref: string;
130
+ child_artifact_refs: string[];
131
+ }, {
132
+ kind: "navigation";
133
+ artifact_kind: string;
134
+ artifact_id: string;
135
+ plan_digest: string;
136
+ artifact_ref: string;
137
+ navigation_ref: string;
138
+ child_artifact_refs: string[];
139
+ }>, z.ZodObject<{
140
+ kind: z.ZodLiteral<"orphan">;
141
+ reason: z.ZodLiteral<"unregistered-output-path">;
142
+ }, "strict", z.ZodTypeAny, {
143
+ kind: "orphan";
144
+ reason: "unregistered-output-path";
145
+ }, {
146
+ kind: "orphan";
147
+ reason: "unregistered-output-path";
148
+ }>]>;
149
+ }, "strict", z.ZodTypeAny, {
150
+ empty: boolean;
151
+ output_path: string;
152
+ owner: {
153
+ kind: "logical-unit";
154
+ artifact_kind: string;
155
+ artifact_id: string;
156
+ purpose: "required" | "discretionary" | "semantic-split";
157
+ split_of: string | null;
158
+ logical_unit_ref: string;
159
+ bundle_digest: string;
160
+ node_ref: string;
161
+ artifact_ref: string;
162
+ section_refs: string[];
163
+ material_state: "blocked" | "ready";
164
+ } | {
165
+ kind: "navigation";
166
+ artifact_kind: string;
167
+ artifact_id: string;
168
+ plan_digest: string;
169
+ artifact_ref: string;
170
+ navigation_ref: string;
171
+ child_artifact_refs: string[];
172
+ } | {
173
+ kind: "orphan";
174
+ reason: "unregistered-output-path";
175
+ };
176
+ physical_ref: string;
177
+ markdown_digest: string;
178
+ byte_count: number;
179
+ reader_body_line_count: number;
180
+ }, {
181
+ empty: boolean;
182
+ output_path: string;
183
+ owner: {
184
+ kind: "logical-unit";
185
+ artifact_kind: string;
186
+ artifact_id: string;
187
+ purpose: "required" | "discretionary" | "semantic-split";
188
+ split_of: string | null;
189
+ logical_unit_ref: string;
190
+ bundle_digest: string;
191
+ node_ref: string;
192
+ artifact_ref: string;
193
+ section_refs: string[];
194
+ material_state: "blocked" | "ready";
195
+ } | {
196
+ kind: "navigation";
197
+ artifact_kind: string;
198
+ artifact_id: string;
199
+ plan_digest: string;
200
+ artifact_ref: string;
201
+ navigation_ref: string;
202
+ child_artifact_refs: string[];
203
+ } | {
204
+ kind: "orphan";
205
+ reason: "unregistered-output-path";
206
+ };
207
+ physical_ref: string;
208
+ markdown_digest: string;
209
+ byte_count: number;
210
+ reader_body_line_count: number;
211
+ }>;
212
+ export declare const indexerArtifactManifestSchema: z.ZodObject<{
213
+ protocol: z.ZodLiteral<"context.indexer.artifact-manifest/v1">;
214
+ layout_proposal_set_digest: z.ZodString;
215
+ files: z.ZodArray<z.ZodObject<{
216
+ physical_ref: z.ZodString;
217
+ output_path: z.ZodEffects<z.ZodString, string, string>;
218
+ markdown_digest: z.ZodString;
219
+ byte_count: z.ZodNumber;
220
+ reader_body_line_count: z.ZodNumber;
221
+ empty: z.ZodBoolean;
222
+ owner: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
223
+ kind: z.ZodLiteral<"logical-unit">;
224
+ logical_unit_ref: z.ZodString;
225
+ node_ref: z.ZodString;
226
+ artifact_ref: z.ZodString;
227
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
228
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
229
+ bundle_digest: z.ZodString;
230
+ purpose: z.ZodEnum<["required", "discretionary", "semantic-split"]>;
231
+ split_of: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
232
+ section_refs: z.ZodArray<z.ZodString, "many">;
233
+ material_state: z.ZodEnum<["ready", "blocked"]>;
234
+ }, "strict", z.ZodTypeAny, {
235
+ kind: "logical-unit";
236
+ artifact_kind: string;
237
+ artifact_id: string;
238
+ purpose: "required" | "discretionary" | "semantic-split";
239
+ split_of: string | null;
240
+ logical_unit_ref: string;
241
+ bundle_digest: string;
242
+ node_ref: string;
243
+ artifact_ref: string;
244
+ section_refs: string[];
245
+ material_state: "blocked" | "ready";
246
+ }, {
247
+ kind: "logical-unit";
248
+ artifact_kind: string;
249
+ artifact_id: string;
250
+ purpose: "required" | "discretionary" | "semantic-split";
251
+ split_of: string | null;
252
+ logical_unit_ref: string;
253
+ bundle_digest: string;
254
+ node_ref: string;
255
+ artifact_ref: string;
256
+ section_refs: string[];
257
+ material_state: "blocked" | "ready";
258
+ }>, z.ZodObject<{
259
+ kind: z.ZodLiteral<"navigation">;
260
+ navigation_ref: z.ZodString;
261
+ artifact_ref: z.ZodString;
262
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
263
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
264
+ plan_digest: z.ZodString;
265
+ child_artifact_refs: z.ZodArray<z.ZodString, "many">;
266
+ }, "strict", z.ZodTypeAny, {
267
+ kind: "navigation";
268
+ artifact_kind: string;
269
+ artifact_id: string;
270
+ plan_digest: string;
271
+ artifact_ref: string;
272
+ navigation_ref: string;
273
+ child_artifact_refs: string[];
274
+ }, {
275
+ kind: "navigation";
276
+ artifact_kind: string;
277
+ artifact_id: string;
278
+ plan_digest: string;
279
+ artifact_ref: string;
280
+ navigation_ref: string;
281
+ child_artifact_refs: string[];
282
+ }>, z.ZodObject<{
283
+ kind: z.ZodLiteral<"orphan">;
284
+ reason: z.ZodLiteral<"unregistered-output-path">;
285
+ }, "strict", z.ZodTypeAny, {
286
+ kind: "orphan";
287
+ reason: "unregistered-output-path";
288
+ }, {
289
+ kind: "orphan";
290
+ reason: "unregistered-output-path";
291
+ }>]>;
292
+ }, "strict", z.ZodTypeAny, {
293
+ empty: boolean;
294
+ output_path: string;
295
+ owner: {
296
+ kind: "logical-unit";
297
+ artifact_kind: string;
298
+ artifact_id: string;
299
+ purpose: "required" | "discretionary" | "semantic-split";
300
+ split_of: string | null;
301
+ logical_unit_ref: string;
302
+ bundle_digest: string;
303
+ node_ref: string;
304
+ artifact_ref: string;
305
+ section_refs: string[];
306
+ material_state: "blocked" | "ready";
307
+ } | {
308
+ kind: "navigation";
309
+ artifact_kind: string;
310
+ artifact_id: string;
311
+ plan_digest: string;
312
+ artifact_ref: string;
313
+ navigation_ref: string;
314
+ child_artifact_refs: string[];
315
+ } | {
316
+ kind: "orphan";
317
+ reason: "unregistered-output-path";
318
+ };
319
+ physical_ref: string;
320
+ markdown_digest: string;
321
+ byte_count: number;
322
+ reader_body_line_count: number;
323
+ }, {
324
+ empty: boolean;
325
+ output_path: string;
326
+ owner: {
327
+ kind: "logical-unit";
328
+ artifact_kind: string;
329
+ artifact_id: string;
330
+ purpose: "required" | "discretionary" | "semantic-split";
331
+ split_of: string | null;
332
+ logical_unit_ref: string;
333
+ bundle_digest: string;
334
+ node_ref: string;
335
+ artifact_ref: string;
336
+ section_refs: string[];
337
+ material_state: "blocked" | "ready";
338
+ } | {
339
+ kind: "navigation";
340
+ artifact_kind: string;
341
+ artifact_id: string;
342
+ plan_digest: string;
343
+ artifact_ref: string;
344
+ navigation_ref: string;
345
+ child_artifact_refs: string[];
346
+ } | {
347
+ kind: "orphan";
348
+ reason: "unregistered-output-path";
349
+ };
350
+ physical_ref: string;
351
+ markdown_digest: string;
352
+ byte_count: number;
353
+ reader_body_line_count: number;
354
+ }>, "many">;
355
+ } & {
356
+ manifest_digest: z.ZodString;
357
+ }, "strict", z.ZodTypeAny, {
358
+ protocol: "context.indexer.artifact-manifest/v1";
359
+ files: {
360
+ empty: boolean;
361
+ output_path: string;
362
+ owner: {
363
+ kind: "logical-unit";
364
+ artifact_kind: string;
365
+ artifact_id: string;
366
+ purpose: "required" | "discretionary" | "semantic-split";
367
+ split_of: string | null;
368
+ logical_unit_ref: string;
369
+ bundle_digest: string;
370
+ node_ref: string;
371
+ artifact_ref: string;
372
+ section_refs: string[];
373
+ material_state: "blocked" | "ready";
374
+ } | {
375
+ kind: "navigation";
376
+ artifact_kind: string;
377
+ artifact_id: string;
378
+ plan_digest: string;
379
+ artifact_ref: string;
380
+ navigation_ref: string;
381
+ child_artifact_refs: string[];
382
+ } | {
383
+ kind: "orphan";
384
+ reason: "unregistered-output-path";
385
+ };
386
+ physical_ref: string;
387
+ markdown_digest: string;
388
+ byte_count: number;
389
+ reader_body_line_count: number;
390
+ }[];
391
+ manifest_digest: string;
392
+ layout_proposal_set_digest: string;
393
+ }, {
394
+ protocol: "context.indexer.artifact-manifest/v1";
395
+ files: {
396
+ empty: boolean;
397
+ output_path: string;
398
+ owner: {
399
+ kind: "logical-unit";
400
+ artifact_kind: string;
401
+ artifact_id: string;
402
+ purpose: "required" | "discretionary" | "semantic-split";
403
+ split_of: string | null;
404
+ logical_unit_ref: string;
405
+ bundle_digest: string;
406
+ node_ref: string;
407
+ artifact_ref: string;
408
+ section_refs: string[];
409
+ material_state: "blocked" | "ready";
410
+ } | {
411
+ kind: "navigation";
412
+ artifact_kind: string;
413
+ artifact_id: string;
414
+ plan_digest: string;
415
+ artifact_ref: string;
416
+ navigation_ref: string;
417
+ child_artifact_refs: string[];
418
+ } | {
419
+ kind: "orphan";
420
+ reason: "unregistered-output-path";
421
+ };
422
+ physical_ref: string;
423
+ markdown_digest: string;
424
+ byte_count: number;
425
+ reader_body_line_count: number;
426
+ }[];
427
+ manifest_digest: string;
428
+ layout_proposal_set_digest: string;
429
+ }>;
430
+ export type IndexerPhysicalArtifactOwner = z.infer<typeof indexerPhysicalArtifactOwnerSchema>;
431
+ export type IndexerPhysicalArtifactManifestEntry = z.infer<typeof physicalArtifactManifestEntrySchema>;
432
+ export type IndexerArtifactManifest = z.infer<typeof indexerArtifactManifestSchema>;
433
+ export interface IndexerPhysicalArtifactRegistration {
434
+ output_path: string;
435
+ owner: Exclude<IndexerPhysicalArtifactOwner, {
436
+ kind: "orphan";
437
+ }>;
438
+ }
439
+ export interface IndexerPhysicalArtifactFileInput {
440
+ output_path: string;
441
+ markdown: string;
442
+ }
443
+ export declare function buildIndexerArtifactManifest(input: {
444
+ layout_proposal_set_digest: string;
445
+ registrations: readonly IndexerPhysicalArtifactRegistration[];
446
+ files: readonly IndexerPhysicalArtifactFileInput[];
447
+ }): IndexerArtifactManifest;
448
+ export declare function validateIndexerArtifactManifest(value: unknown): IndexerArtifactManifest;
449
+ export {};