@c4a/context 0.6.19 → 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 (120) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  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/guides/code-indexer-skill-authoring.md +124 -0
  7. package/docs/guides/indexer-provider-and-customization.md +140 -0
  8. package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
  9. package/docs/reference/code-extractors.md +2 -2
  10. package/docs/reference/indexer-provider-protocol.md +819 -0
  11. package/docs/reference/project-api.md +2 -2
  12. package/index.d.ts +47 -1
  13. package/index.js +28239 -3952
  14. package/indexerAgentStepProtocol.d.ts +9391 -0
  15. package/indexerArtifactDependencies.d.ts +689 -0
  16. package/indexerArtifactPolicy.d.ts +335 -0
  17. package/indexerArtifactResult.d.ts +2010 -0
  18. package/indexerAuditFacts.d.ts +66 -0
  19. package/indexerAuditOverrideReadiness.d.ts +27 -0
  20. package/indexerAuditProtocol.d.ts +238 -0
  21. package/indexerAuditRevision.d.ts +726 -0
  22. package/indexerAuditRevisionActions.d.ts +236 -0
  23. package/indexerAuthoringFixture.d.ts +152 -0
  24. package/indexerBaseQuestionAmendment.d.ts +2403 -0
  25. package/indexerBenchmark.d.ts +1062 -0
  26. package/indexerCandidateCompile.d.ts +801 -0
  27. package/indexerCapabilityGroupEvidence.d.ts +129 -0
  28. package/indexerCatalogFallback.d.ts +1262 -0
  29. package/indexerCollectionMapping.d.ts +75 -0
  30. package/indexerContentLayers.d.ts +137 -0
  31. package/indexerControlledInvocation.d.ts +512 -0
  32. package/indexerControlledProgram.d.ts +12535 -0
  33. package/indexerCoreExports.d.ts +21 -0
  34. package/indexerCustomizationDraft.d.ts +13800 -0
  35. package/indexerCustomizationLadder.d.ts +103 -0
  36. package/indexerDependencyView.d.ts +1610 -0
  37. package/indexerEvidenceAdapterResult.d.ts +504 -0
  38. package/indexerExampleDecision.d.ts +1606 -0
  39. package/indexerExampleIdentity.d.ts +132 -0
  40. package/indexerExampleIdentityAudit.d.ts +70 -0
  41. package/indexerExampleLinkageAudit.d.ts +80 -0
  42. package/indexerGeneratedAuthoringAudit.d.ts +208 -0
  43. package/indexerIncrementalImpact.d.ts +221 -0
  44. package/indexerInventoryDisposition.d.ts +443 -0
  45. package/indexerLayerComposition.d.ts +1652 -0
  46. package/indexerLayoutChange.d.ts +329 -0
  47. package/indexerLayoutProposalSet.d.ts +447 -0
  48. package/indexerLayoutResolver.d.ts +342 -0
  49. package/indexerLayoutTransition.d.ts +247 -0
  50. package/indexerLifecycle.d.ts +53 -0
  51. package/indexerMainLifecycle.d.ts +258 -0
  52. package/indexerMainRunLedger.d.ts +888 -0
  53. package/indexerMainRunProtocol.d.ts +6471 -0
  54. package/indexerMainWorkset.d.ts +2141 -0
  55. package/indexerMaterialAnswer.d.ts +738 -0
  56. package/indexerMaterialAnswerActualization.d.ts +91 -0
  57. package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
  58. package/indexerMaterialAnswerFlow.d.ts +63 -0
  59. package/indexerMaterialAnswerLayout.d.ts +76 -0
  60. package/indexerMaterialAnswerReview.d.ts +217 -0
  61. package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
  62. package/indexerMaterialAnswerRunLedger.d.ts +918 -0
  63. package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
  64. package/indexerMaterialGapLedger.d.ts +3111 -0
  65. package/indexerMaterialQuestionExclusion.d.ts +129 -0
  66. package/indexerMaterialQuestionWorkset.d.ts +508 -0
  67. package/indexerNavigationArtifactGraph.d.ts +5 -0
  68. package/indexerNavigationArtifactPlan.d.ts +39 -0
  69. package/indexerOverlayQuestionAmendment.d.ts +2551 -0
  70. package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
  71. package/indexerOverlayTrust.d.ts +1425 -0
  72. package/indexerParserCoordinate.d.ts +222 -0
  73. package/indexerParserFactView.d.ts +503 -0
  74. package/indexerPartitionConvergence.d.ts +496 -0
  75. package/indexerPartitionPlan.d.ts +919 -0
  76. package/indexerPartitionStrategyResolution.d.ts +594 -0
  77. package/indexerPhysicalArtifactAudit.d.ts +247 -0
  78. package/indexerPhysicalArtifactManifest.d.ts +449 -0
  79. package/indexerPlannedMaterialAnswer.d.ts +116 -0
  80. package/indexerPostAuthorComposition.d.ts +2000 -0
  81. package/indexerPostAuthorRunLedger.d.ts +1972 -0
  82. package/indexerPrimaryProjection.d.ts +262 -0
  83. package/indexerProfileContract.d.ts +3034 -0
  84. package/indexerProfileMetricAudit.d.ts +218 -0
  85. package/indexerProgramExecutionAuthorization.d.ts +227 -0
  86. package/indexerProgramRunProtocol.d.ts +7642 -0
  87. package/indexerProjectProposal.d.ts +2807 -0
  88. package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
  89. package/indexerProjectedArtifactPlan.d.ts +217 -0
  90. package/indexerProtocolCommon.d.ts +29 -0
  91. package/indexerProvider.d.ts +2573 -0
  92. package/indexerProviderComposition.d.ts +1357 -0
  93. package/indexerProviderContractReferences.d.ts +13 -0
  94. package/indexerProviderProfileResolution.d.ts +20 -0
  95. package/indexerProviderResolution.d.ts +752 -0
  96. package/indexerProviderResolutionAction.d.ts +678 -0
  97. package/indexerProviderRouting.d.ts +3909 -0
  98. package/indexerProviderSelectionProposal.d.ts +3311 -0
  99. package/indexerQuestionAuthority.d.ts +419 -0
  100. package/indexerReaderTargetInventory.d.ts +161 -0
  101. package/indexerReferenceOnlyAudit.d.ts +90 -0
  102. package/indexerRegistry.d.ts +3019 -0
  103. package/indexerRequirementComparison.d.ts +44 -0
  104. package/indexerRequirementConfirmation.d.ts +1193 -0
  105. package/indexerRequirementLifecycle.d.ts +3314 -0
  106. package/indexerRestrictedSelector.d.ts +63 -0
  107. package/indexerResultReconciliation.d.ts +6844 -0
  108. package/indexerResultReconciliationRun.d.ts +15 -0
  109. package/indexerRunEnvelope.d.ts +384 -0
  110. package/indexerRunProtocolCommon.d.ts +21 -0
  111. package/indexerSharedArtifactFingerprint.d.ts +33 -0
  112. package/indexerStructuredDeclaration.d.ts +513 -0
  113. package/indexerSubjectCatalog.d.ts +230 -0
  114. package/indexerSubjectIdentity.d.ts +19 -0
  115. package/indexerSubjectKeyAuthority.d.ts +785 -0
  116. package/indexerTemplateRendering.d.ts +485 -0
  117. package/indexerToolSnapshot.d.ts +431 -0
  118. package/indexerWorksetRead.d.ts +287 -0
  119. package/package.json +1 -1
  120. package/phases.d.ts +1 -1
@@ -0,0 +1,335 @@
1
+ import { z } from "zod";
2
+ import { type IndexerOperatorContract, type IndexerProfileContract } from "./indexerProfileContract.js";
3
+ import type { IndexerJson } from "./indexerRegistry.js";
4
+ export declare const indexerArtifactPolicyEligibilitySchema: z.ZodObject<{
5
+ protocol: z.ZodLiteral<"context.indexer.artifact-policy-eligibility/v1">;
6
+ profile_id: z.ZodEffects<z.ZodString, string, string>;
7
+ profile_contract_digest: z.ZodString;
8
+ operator_contract_digest: z.ZodString;
9
+ canonical_facts: z.ZodArray<z.ZodObject<{
10
+ path: z.ZodString;
11
+ value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
12
+ }, "strict", z.ZodTypeAny, {
13
+ value: IndexerJson;
14
+ path: string;
15
+ }, {
16
+ value: IndexerJson;
17
+ path: string;
18
+ }>, "many">;
19
+ provider_supported_variants: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
20
+ eligible_variants: z.ZodArray<z.ZodObject<{
21
+ id: z.ZodEffects<z.ZodString, string, string>;
22
+ required_artifact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
23
+ discretionary_artifact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
24
+ thresholds: z.ZodArray<z.ZodObject<{
25
+ metric_id: z.ZodEffects<z.ZodString, string, string>;
26
+ metric_operator: z.ZodEffects<z.ZodString, string, string>;
27
+ unit: z.ZodEnum<["count", "ratio"]>;
28
+ recommended_max: z.ZodNumber;
29
+ hard_max: z.ZodNumber;
30
+ }, "strict", z.ZodTypeAny, {
31
+ unit: "count" | "ratio";
32
+ recommended_max: number;
33
+ hard_max: number;
34
+ metric_id: string;
35
+ metric_operator: string;
36
+ }, {
37
+ unit: "count" | "ratio";
38
+ recommended_max: number;
39
+ hard_max: number;
40
+ metric_id: string;
41
+ metric_operator: string;
42
+ }>, "many">;
43
+ }, "strict", z.ZodTypeAny, {
44
+ id: string;
45
+ thresholds: {
46
+ unit: "count" | "ratio";
47
+ recommended_max: number;
48
+ hard_max: number;
49
+ metric_id: string;
50
+ metric_operator: string;
51
+ }[];
52
+ required_artifact_kinds: string[];
53
+ discretionary_artifact_kinds: string[];
54
+ }, {
55
+ id: string;
56
+ thresholds: {
57
+ unit: "count" | "ratio";
58
+ recommended_max: number;
59
+ hard_max: number;
60
+ metric_id: string;
61
+ metric_operator: string;
62
+ }[];
63
+ required_artifact_kinds: string[];
64
+ discretionary_artifact_kinds: string[];
65
+ }>, "many">;
66
+ } & {
67
+ eligibility_digest: z.ZodString;
68
+ }, "strict", z.ZodTypeAny, {
69
+ protocol: "context.indexer.artifact-policy-eligibility/v1";
70
+ operator_contract_digest: string;
71
+ profile_id: string;
72
+ profile_contract_digest: string;
73
+ canonical_facts: {
74
+ value: IndexerJson;
75
+ path: string;
76
+ }[];
77
+ provider_supported_variants: string[];
78
+ eligible_variants: {
79
+ id: string;
80
+ thresholds: {
81
+ unit: "count" | "ratio";
82
+ recommended_max: number;
83
+ hard_max: number;
84
+ metric_id: string;
85
+ metric_operator: string;
86
+ }[];
87
+ required_artifact_kinds: string[];
88
+ discretionary_artifact_kinds: string[];
89
+ }[];
90
+ eligibility_digest: string;
91
+ }, {
92
+ protocol: "context.indexer.artifact-policy-eligibility/v1";
93
+ operator_contract_digest: string;
94
+ profile_id: string;
95
+ profile_contract_digest: string;
96
+ canonical_facts: {
97
+ value: IndexerJson;
98
+ path: string;
99
+ }[];
100
+ provider_supported_variants: string[];
101
+ eligible_variants: {
102
+ id: string;
103
+ thresholds: {
104
+ unit: "count" | "ratio";
105
+ recommended_max: number;
106
+ hard_max: number;
107
+ metric_id: string;
108
+ metric_operator: string;
109
+ }[];
110
+ required_artifact_kinds: string[];
111
+ discretionary_artifact_kinds: string[];
112
+ }[];
113
+ eligibility_digest: string;
114
+ }>;
115
+ export type IndexerArtifactPolicyEligibility = z.infer<typeof indexerArtifactPolicyEligibilitySchema>;
116
+ export declare function resolveIndexerArtifactPolicyEligibility(input: {
117
+ profile_id: string;
118
+ canonical_facts: Record<string, unknown>;
119
+ provider_supported_variants: readonly string[];
120
+ profile_contract: unknown;
121
+ operator_contract: unknown;
122
+ }): IndexerArtifactPolicyEligibility;
123
+ export declare function validateIndexerArtifactPolicyEligibilityReport(value: unknown): IndexerArtifactPolicyEligibility;
124
+ export declare function validateIndexerArtifactPolicyEligibility(input: {
125
+ report: unknown;
126
+ profile_contract: IndexerProfileContract;
127
+ operator_contract: IndexerOperatorContract;
128
+ }): IndexerArtifactPolicyEligibility;
129
+ declare const artifactBundleEntrySchema: z.ZodUnion<[z.ZodObject<{
130
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
131
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
132
+ purpose: z.ZodEnum<["required", "discretionary"]>;
133
+ reader_question_refs: z.ZodArray<z.ZodString, "many">;
134
+ evidence_refs: z.ZodArray<z.ZodString, "many">;
135
+ }, "strict", z.ZodTypeAny, {
136
+ evidence_refs: string[];
137
+ artifact_kind: string;
138
+ artifact_id: string;
139
+ purpose: "required" | "discretionary";
140
+ reader_question_refs: string[];
141
+ }, {
142
+ evidence_refs: string[];
143
+ artifact_kind: string;
144
+ artifact_id: string;
145
+ purpose: "required" | "discretionary";
146
+ reader_question_refs: string[];
147
+ }>, z.ZodObject<{
148
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
149
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
150
+ purpose: z.ZodLiteral<"semantic-split">;
151
+ reader_question_refs: z.ZodArray<z.ZodString, "many">;
152
+ evidence_refs: z.ZodArray<z.ZodString, "many">;
153
+ split_of: z.ZodEffects<z.ZodString, string, string>;
154
+ boundary: z.ZodObject<{
155
+ axis: z.ZodEffects<z.ZodString, string, string>;
156
+ start_key: z.ZodString;
157
+ end_key: z.ZodString;
158
+ }, "strict", z.ZodTypeAny, {
159
+ axis: string;
160
+ start_key: string;
161
+ end_key: string;
162
+ }, {
163
+ axis: string;
164
+ start_key: string;
165
+ end_key: string;
166
+ }>;
167
+ }, "strict", z.ZodTypeAny, {
168
+ evidence_refs: string[];
169
+ artifact_kind: string;
170
+ artifact_id: string;
171
+ purpose: "semantic-split";
172
+ reader_question_refs: string[];
173
+ split_of: string;
174
+ boundary: {
175
+ axis: string;
176
+ start_key: string;
177
+ end_key: string;
178
+ };
179
+ }, {
180
+ evidence_refs: string[];
181
+ artifact_kind: string;
182
+ artifact_id: string;
183
+ purpose: "semantic-split";
184
+ reader_question_refs: string[];
185
+ split_of: string;
186
+ boundary: {
187
+ axis: string;
188
+ start_key: string;
189
+ end_key: string;
190
+ };
191
+ }>]>;
192
+ export declare const indexerArtifactBundleSchema: z.ZodObject<{
193
+ protocol: z.ZodLiteral<"context.indexer.artifact-bundle/v1">;
194
+ logical_unit_ref: z.ZodString;
195
+ artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
196
+ artifacts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
197
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
198
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
199
+ purpose: z.ZodEnum<["required", "discretionary"]>;
200
+ reader_question_refs: z.ZodArray<z.ZodString, "many">;
201
+ evidence_refs: z.ZodArray<z.ZodString, "many">;
202
+ }, "strict", z.ZodTypeAny, {
203
+ evidence_refs: string[];
204
+ artifact_kind: string;
205
+ artifact_id: string;
206
+ purpose: "required" | "discretionary";
207
+ reader_question_refs: string[];
208
+ }, {
209
+ evidence_refs: string[];
210
+ artifact_kind: string;
211
+ artifact_id: string;
212
+ purpose: "required" | "discretionary";
213
+ reader_question_refs: string[];
214
+ }>, z.ZodObject<{
215
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
216
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
217
+ purpose: z.ZodLiteral<"semantic-split">;
218
+ reader_question_refs: z.ZodArray<z.ZodString, "many">;
219
+ evidence_refs: z.ZodArray<z.ZodString, "many">;
220
+ split_of: z.ZodEffects<z.ZodString, string, string>;
221
+ boundary: z.ZodObject<{
222
+ axis: z.ZodEffects<z.ZodString, string, string>;
223
+ start_key: z.ZodString;
224
+ end_key: z.ZodString;
225
+ }, "strict", z.ZodTypeAny, {
226
+ axis: string;
227
+ start_key: string;
228
+ end_key: string;
229
+ }, {
230
+ axis: string;
231
+ start_key: string;
232
+ end_key: string;
233
+ }>;
234
+ }, "strict", z.ZodTypeAny, {
235
+ evidence_refs: string[];
236
+ artifact_kind: string;
237
+ artifact_id: string;
238
+ purpose: "semantic-split";
239
+ reader_question_refs: string[];
240
+ split_of: string;
241
+ boundary: {
242
+ axis: string;
243
+ start_key: string;
244
+ end_key: string;
245
+ };
246
+ }, {
247
+ evidence_refs: string[];
248
+ artifact_kind: string;
249
+ artifact_id: string;
250
+ purpose: "semantic-split";
251
+ reader_question_refs: string[];
252
+ split_of: string;
253
+ boundary: {
254
+ axis: string;
255
+ start_key: string;
256
+ end_key: string;
257
+ };
258
+ }>]>, "many">;
259
+ discretionary_artifact_count: z.ZodNumber;
260
+ semantic_split_part_count: z.ZodNumber;
261
+ } & {
262
+ bundle_digest: z.ZodString;
263
+ }, "strict", z.ZodTypeAny, {
264
+ protocol: "context.indexer.artifact-bundle/v1";
265
+ artifact_policy_variant: string;
266
+ artifacts: ({
267
+ evidence_refs: string[];
268
+ artifact_kind: string;
269
+ artifact_id: string;
270
+ purpose: "required" | "discretionary";
271
+ reader_question_refs: string[];
272
+ } | {
273
+ evidence_refs: string[];
274
+ artifact_kind: string;
275
+ artifact_id: string;
276
+ purpose: "semantic-split";
277
+ reader_question_refs: string[];
278
+ split_of: string;
279
+ boundary: {
280
+ axis: string;
281
+ start_key: string;
282
+ end_key: string;
283
+ };
284
+ })[];
285
+ logical_unit_ref: string;
286
+ discretionary_artifact_count: number;
287
+ semantic_split_part_count: number;
288
+ bundle_digest: string;
289
+ }, {
290
+ protocol: "context.indexer.artifact-bundle/v1";
291
+ artifact_policy_variant: string;
292
+ artifacts: ({
293
+ evidence_refs: string[];
294
+ artifact_kind: string;
295
+ artifact_id: string;
296
+ purpose: "required" | "discretionary";
297
+ reader_question_refs: string[];
298
+ } | {
299
+ evidence_refs: string[];
300
+ artifact_kind: string;
301
+ artifact_id: string;
302
+ purpose: "semantic-split";
303
+ reader_question_refs: string[];
304
+ split_of: string;
305
+ boundary: {
306
+ axis: string;
307
+ start_key: string;
308
+ end_key: string;
309
+ };
310
+ })[];
311
+ logical_unit_ref: string;
312
+ discretionary_artifact_count: number;
313
+ semantic_split_part_count: number;
314
+ bundle_digest: string;
315
+ }>;
316
+ export type IndexerArtifactBundle = z.infer<typeof indexerArtifactBundleSchema>;
317
+ export type IndexerArtifactBundleEntry = z.infer<typeof artifactBundleEntrySchema>;
318
+ export declare function buildIndexerArtifactBundle(input: {
319
+ logical_unit_ref: string;
320
+ artifact_policy_variant: string;
321
+ artifacts: readonly IndexerArtifactBundleEntry[];
322
+ }): IndexerArtifactBundle;
323
+ export declare function validateIndexerArtifactBundle(value: unknown): IndexerArtifactBundle;
324
+ export declare function validateIndexerArtifactBundlePolicy(input: {
325
+ bundle: unknown;
326
+ eligibility: unknown;
327
+ actual_artifacts: readonly {
328
+ artifact_id: string;
329
+ artifact_kind: string;
330
+ evidence_refs: readonly string[];
331
+ }[];
332
+ allowed_question_refs: readonly string[];
333
+ known_evidence_refs: readonly string[];
334
+ }): IndexerArtifactBundle;
335
+ export {};