@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,329 @@
1
+ import { z } from "zod";
2
+ export declare const indexerApprovedLayoutProjectionSchema: z.ZodObject<{
3
+ protocol: z.ZodLiteral<"context.indexer.approved-layout-projection/v1">;
4
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
5
+ profile: z.ZodEffects<z.ZodString, string, string>;
6
+ profile_contract_digest: z.ZodString;
7
+ subject_key_schema_set_digest: z.ZodString;
8
+ subject_key_schema_digest: z.ZodString;
9
+ node_ref: z.ZodString;
10
+ shared_artifact_fingerprint: z.ZodObject<{
11
+ protocol: z.ZodLiteral<"context.indexer.shared-artifact-fingerprint/v1">;
12
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
13
+ implementation_fingerprint: z.ZodString;
14
+ instructions_fingerprint: z.ZodString;
15
+ template_fingerprint: z.ZodString;
16
+ } & {
17
+ fingerprint_digest: z.ZodString;
18
+ }, "strict", z.ZodTypeAny, {
19
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
20
+ indexer_id: string;
21
+ implementation_fingerprint: string;
22
+ instructions_fingerprint: string;
23
+ template_fingerprint: string;
24
+ fingerprint_digest: string;
25
+ }, {
26
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
27
+ indexer_id: string;
28
+ implementation_fingerprint: string;
29
+ instructions_fingerprint: string;
30
+ template_fingerprint: string;
31
+ fingerprint_digest: string;
32
+ }>;
33
+ artifacts: z.ZodArray<z.ZodObject<{
34
+ artifact_ref: z.ZodString;
35
+ artifact_id: z.ZodEffects<z.ZodString, string, string>;
36
+ artifact_kind: z.ZodEffects<z.ZodString, string, string>;
37
+ collection: z.ZodType<import("./contracts.js").TopLevelNamespace, z.ZodTypeDef, import("./contracts.js").TopLevelNamespace>;
38
+ output_path: z.ZodEffects<z.ZodString, string, string>;
39
+ shared_artifact_fingerprint_digest: z.ZodString;
40
+ purpose: z.ZodEnum<["required", "discretionary", "semantic-split"]>;
41
+ split_of_artifact_ref: z.ZodNullable<z.ZodString>;
42
+ split_boundary: z.ZodNullable<z.ZodObject<{
43
+ axis: z.ZodEffects<z.ZodString, string, string>;
44
+ start_key: z.ZodString;
45
+ end_key: z.ZodString;
46
+ }, "strict", z.ZodTypeAny, {
47
+ axis: string;
48
+ start_key: string;
49
+ end_key: string;
50
+ }, {
51
+ axis: string;
52
+ start_key: string;
53
+ end_key: string;
54
+ }>>;
55
+ sections: z.ZodArray<z.ZodObject<{
56
+ section_ref: z.ZodString;
57
+ section_identity_ref: z.ZodString;
58
+ }, "strict", z.ZodTypeAny, {
59
+ section_ref: string;
60
+ section_identity_ref: string;
61
+ }, {
62
+ section_ref: string;
63
+ section_identity_ref: string;
64
+ }>, "many">;
65
+ }, "strict", z.ZodTypeAny, {
66
+ collection: import("./contracts.js").TopLevelNamespace;
67
+ output_path: string;
68
+ artifact_kind: string;
69
+ artifact_id: string;
70
+ purpose: "required" | "discretionary" | "semantic-split";
71
+ sections: {
72
+ section_ref: string;
73
+ section_identity_ref: string;
74
+ }[];
75
+ artifact_ref: string;
76
+ shared_artifact_fingerprint_digest: string;
77
+ split_of_artifact_ref: string | null;
78
+ split_boundary: {
79
+ axis: string;
80
+ start_key: string;
81
+ end_key: string;
82
+ } | null;
83
+ }, {
84
+ collection: import("./contracts.js").TopLevelNamespace;
85
+ output_path: string;
86
+ artifact_kind: string;
87
+ artifact_id: string;
88
+ purpose: "required" | "discretionary" | "semantic-split";
89
+ sections: {
90
+ section_ref: string;
91
+ section_identity_ref: string;
92
+ }[];
93
+ artifact_ref: string;
94
+ shared_artifact_fingerprint_digest: string;
95
+ split_of_artifact_ref: string | null;
96
+ split_boundary: {
97
+ axis: string;
98
+ start_key: string;
99
+ end_key: string;
100
+ } | null;
101
+ }>, "many">;
102
+ } & {
103
+ projection_digest: z.ZodString;
104
+ }, "strict", z.ZodTypeAny, {
105
+ protocol: "context.indexer.approved-layout-projection/v1";
106
+ profile: string;
107
+ artifacts: {
108
+ collection: import("./contracts.js").TopLevelNamespace;
109
+ output_path: string;
110
+ artifact_kind: string;
111
+ artifact_id: string;
112
+ purpose: "required" | "discretionary" | "semantic-split";
113
+ sections: {
114
+ section_ref: string;
115
+ section_identity_ref: string;
116
+ }[];
117
+ artifact_ref: string;
118
+ shared_artifact_fingerprint_digest: string;
119
+ split_of_artifact_ref: string | null;
120
+ split_boundary: {
121
+ axis: string;
122
+ start_key: string;
123
+ end_key: string;
124
+ } | null;
125
+ }[];
126
+ indexer_id: string;
127
+ profile_contract_digest: string;
128
+ node_ref: string;
129
+ subject_key_schema_digest: string;
130
+ projection_digest: string;
131
+ shared_artifact_fingerprint: {
132
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
133
+ indexer_id: string;
134
+ implementation_fingerprint: string;
135
+ instructions_fingerprint: string;
136
+ template_fingerprint: string;
137
+ fingerprint_digest: string;
138
+ };
139
+ subject_key_schema_set_digest: string;
140
+ }, {
141
+ protocol: "context.indexer.approved-layout-projection/v1";
142
+ profile: string;
143
+ artifacts: {
144
+ collection: import("./contracts.js").TopLevelNamespace;
145
+ output_path: string;
146
+ artifact_kind: string;
147
+ artifact_id: string;
148
+ purpose: "required" | "discretionary" | "semantic-split";
149
+ sections: {
150
+ section_ref: string;
151
+ section_identity_ref: string;
152
+ }[];
153
+ artifact_ref: string;
154
+ shared_artifact_fingerprint_digest: string;
155
+ split_of_artifact_ref: string | null;
156
+ split_boundary: {
157
+ axis: string;
158
+ start_key: string;
159
+ end_key: string;
160
+ } | null;
161
+ }[];
162
+ indexer_id: string;
163
+ profile_contract_digest: string;
164
+ node_ref: string;
165
+ subject_key_schema_digest: string;
166
+ projection_digest: string;
167
+ shared_artifact_fingerprint: {
168
+ protocol: "context.indexer.shared-artifact-fingerprint/v1";
169
+ indexer_id: string;
170
+ implementation_fingerprint: string;
171
+ instructions_fingerprint: string;
172
+ template_fingerprint: string;
173
+ fingerprint_digest: string;
174
+ };
175
+ subject_key_schema_set_digest: string;
176
+ }>;
177
+ export type IndexerApprovedLayoutProjection = z.infer<typeof indexerApprovedLayoutProjectionSchema>;
178
+ export declare const indexerLayoutChangeReportSchema: z.ZodObject<{
179
+ protocol: z.ZodLiteral<"context.indexer.layout-change-report/v1">;
180
+ base_projection_digest: z.ZodNullable<z.ZodString>;
181
+ target_proposal_digest: z.ZodString;
182
+ reused_artifact_refs: z.ZodArray<z.ZodString, "many">;
183
+ changes: z.ZodArray<z.ZodObject<{
184
+ kind: z.ZodEnum<["artifact-added", "artifact-removed", "artifact-split", "artifact-merge", "artifact-rename", "section-move", "collection-move", "path-move"]>;
185
+ artifact_ref: z.ZodString;
186
+ related_artifact_ref: z.ZodNullable<z.ZodString>;
187
+ section_identity_refs: z.ZodArray<z.ZodString, "many">;
188
+ before_collection: z.ZodNullable<z.ZodType<import("./contracts.js").TopLevelNamespace, z.ZodTypeDef, import("./contracts.js").TopLevelNamespace>>;
189
+ after_collection: z.ZodNullable<z.ZodType<import("./contracts.js").TopLevelNamespace, z.ZodTypeDef, import("./contracts.js").TopLevelNamespace>>;
190
+ before_path: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
191
+ after_path: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
192
+ confirmation_class: z.ZodEnum<["compatible-addition", "destructive", "ambiguous"]>;
193
+ }, "strict", z.ZodTypeAny, {
194
+ kind: "artifact-added" | "artifact-removed" | "artifact-split" | "artifact-merge" | "artifact-rename" | "section-move" | "collection-move" | "path-move";
195
+ artifact_ref: string;
196
+ related_artifact_ref: string | null;
197
+ section_identity_refs: string[];
198
+ before_collection: import("./contracts.js").TopLevelNamespace | null;
199
+ after_collection: import("./contracts.js").TopLevelNamespace | null;
200
+ before_path: string | null;
201
+ after_path: string | null;
202
+ confirmation_class: "ambiguous" | "compatible-addition" | "destructive";
203
+ }, {
204
+ kind: "artifact-added" | "artifact-removed" | "artifact-split" | "artifact-merge" | "artifact-rename" | "section-move" | "collection-move" | "path-move";
205
+ artifact_ref: string;
206
+ related_artifact_ref: string | null;
207
+ section_identity_refs: string[];
208
+ before_collection: import("./contracts.js").TopLevelNamespace | null;
209
+ after_collection: import("./contracts.js").TopLevelNamespace | null;
210
+ before_path: string | null;
211
+ after_path: string | null;
212
+ confirmation_class: "ambiguous" | "compatible-addition" | "destructive";
213
+ }>, "many">;
214
+ requires_confirmation: z.ZodBoolean;
215
+ gate: z.ZodNullable<z.ZodObject<{
216
+ id: z.ZodLiteral<"confirm-layout-change">;
217
+ authority: z.ZodLiteral<"human">;
218
+ delegation: z.ZodLiteral<"forbidden">;
219
+ }, "strict", z.ZodTypeAny, {
220
+ id: "confirm-layout-change";
221
+ authority: "human";
222
+ delegation: "forbidden";
223
+ }, {
224
+ id: "confirm-layout-change";
225
+ authority: "human";
226
+ delegation: "forbidden";
227
+ }>>;
228
+ } & {
229
+ report_digest: z.ZodString;
230
+ }, "strict", z.ZodTypeAny, {
231
+ protocol: "context.indexer.layout-change-report/v1";
232
+ report_digest: string;
233
+ changes: {
234
+ kind: "artifact-added" | "artifact-removed" | "artifact-split" | "artifact-merge" | "artifact-rename" | "section-move" | "collection-move" | "path-move";
235
+ artifact_ref: string;
236
+ related_artifact_ref: string | null;
237
+ section_identity_refs: string[];
238
+ before_collection: import("./contracts.js").TopLevelNamespace | null;
239
+ after_collection: import("./contracts.js").TopLevelNamespace | null;
240
+ before_path: string | null;
241
+ after_path: string | null;
242
+ confirmation_class: "ambiguous" | "compatible-addition" | "destructive";
243
+ }[];
244
+ gate: {
245
+ id: "confirm-layout-change";
246
+ authority: "human";
247
+ delegation: "forbidden";
248
+ } | null;
249
+ base_projection_digest: string | null;
250
+ target_proposal_digest: string;
251
+ reused_artifact_refs: string[];
252
+ requires_confirmation: boolean;
253
+ }, {
254
+ protocol: "context.indexer.layout-change-report/v1";
255
+ report_digest: string;
256
+ changes: {
257
+ kind: "artifact-added" | "artifact-removed" | "artifact-split" | "artifact-merge" | "artifact-rename" | "section-move" | "collection-move" | "path-move";
258
+ artifact_ref: string;
259
+ related_artifact_ref: string | null;
260
+ section_identity_refs: string[];
261
+ before_collection: import("./contracts.js").TopLevelNamespace | null;
262
+ after_collection: import("./contracts.js").TopLevelNamespace | null;
263
+ before_path: string | null;
264
+ after_path: string | null;
265
+ confirmation_class: "ambiguous" | "compatible-addition" | "destructive";
266
+ }[];
267
+ gate: {
268
+ id: "confirm-layout-change";
269
+ authority: "human";
270
+ delegation: "forbidden";
271
+ } | null;
272
+ base_projection_digest: string | null;
273
+ target_proposal_digest: string;
274
+ reused_artifact_refs: string[];
275
+ requires_confirmation: boolean;
276
+ }>;
277
+ export type IndexerLayoutChangeReport = z.infer<typeof indexerLayoutChangeReportSchema>;
278
+ export declare const indexerLayoutChangeConfirmationSchema: z.ZodObject<{
279
+ protocol: z.ZodLiteral<"context.indexer.layout-change-confirmation/v1">;
280
+ gate: z.ZodLiteral<"confirm-layout-change">;
281
+ report_digest: z.ZodString;
282
+ base_projection_digest: z.ZodString;
283
+ target_proposal_digest: z.ZodString;
284
+ decision: z.ZodLiteral<"approved">;
285
+ authority: z.ZodLiteral<"human">;
286
+ delegation: z.ZodLiteral<"none">;
287
+ actor_ref: z.ZodString;
288
+ } & {
289
+ confirmation_digest: z.ZodString;
290
+ }, "strict", z.ZodTypeAny, {
291
+ decision: "approved";
292
+ protocol: "context.indexer.layout-change-confirmation/v1";
293
+ authority: "human";
294
+ report_digest: string;
295
+ gate: "confirm-layout-change";
296
+ confirmation_digest: string;
297
+ base_projection_digest: string;
298
+ target_proposal_digest: string;
299
+ delegation: "none";
300
+ actor_ref: string;
301
+ }, {
302
+ decision: "approved";
303
+ protocol: "context.indexer.layout-change-confirmation/v1";
304
+ authority: "human";
305
+ report_digest: string;
306
+ gate: "confirm-layout-change";
307
+ confirmation_digest: string;
308
+ base_projection_digest: string;
309
+ target_proposal_digest: string;
310
+ delegation: "none";
311
+ actor_ref: string;
312
+ }>;
313
+ export type IndexerLayoutChangeConfirmation = z.infer<typeof indexerLayoutChangeConfirmationSchema>;
314
+ export declare function buildIndexerApprovedLayoutProjection(value: unknown): IndexerApprovedLayoutProjection;
315
+ export declare function validateIndexerApprovedLayoutProjection(value: unknown): IndexerApprovedLayoutProjection;
316
+ export declare function compareIndexerLayout(input: {
317
+ base: unknown | null;
318
+ target: unknown;
319
+ }): IndexerLayoutChangeReport;
320
+ export declare function buildIndexerLayoutChangeConfirmation(input: {
321
+ report: IndexerLayoutChangeReport;
322
+ actor_ref: string;
323
+ }): IndexerLayoutChangeConfirmation;
324
+ export declare function authorizeIndexerLayoutChange(input: {
325
+ report: unknown;
326
+ confirmation?: unknown;
327
+ }): IndexerLayoutChangeReport;
328
+ export declare function validateIndexerLayoutChangeReport(value: unknown): IndexerLayoutChangeReport;
329
+ export declare function sameIndexerApprovedLayout(left: IndexerApprovedLayoutProjection, right: IndexerApprovedLayoutProjection): boolean;