@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,230 @@
1
+ import { z } from "zod";
2
+ import { type IndexerTargetResolutionView } from "./indexerMainWorkset.js";
3
+ declare const approvedSubjectSchema: z.ZodObject<{
4
+ node_ref: z.ZodString;
5
+ subject_key: z.ZodObject<{
6
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
7
+ namespace: z.ZodEffects<z.ZodString, string, string>;
8
+ kind: z.ZodEffects<z.ZodString, string, string>;
9
+ local_key: z.ZodEffects<z.ZodString, string, string>;
10
+ }, "strict", z.ZodTypeAny, {
11
+ kind: string;
12
+ protocol: "context.subject-key/v1";
13
+ namespace: string;
14
+ local_key: string;
15
+ }, {
16
+ kind: string;
17
+ protocol: "context.subject-key/v1";
18
+ namespace: string;
19
+ local_key: string;
20
+ }>;
21
+ }, "strict", z.ZodTypeAny, {
22
+ subject_key: {
23
+ kind: string;
24
+ protocol: "context.subject-key/v1";
25
+ namespace: string;
26
+ local_key: string;
27
+ };
28
+ node_ref: string;
29
+ }, {
30
+ subject_key: {
31
+ kind: string;
32
+ protocol: "context.subject-key/v1";
33
+ namespace: string;
34
+ local_key: string;
35
+ };
36
+ node_ref: string;
37
+ }>;
38
+ declare const partitionSubjectSchema: z.ZodObject<{
39
+ partition_workset_digest: z.ZodString;
40
+ partition_plan_digest: z.ZodString;
41
+ group_key: z.ZodString;
42
+ node_ref: z.ZodString;
43
+ subject_key: z.ZodObject<{
44
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
45
+ namespace: z.ZodEffects<z.ZodString, string, string>;
46
+ kind: z.ZodEffects<z.ZodString, string, string>;
47
+ local_key: z.ZodEffects<z.ZodString, string, string>;
48
+ }, "strict", z.ZodTypeAny, {
49
+ kind: string;
50
+ protocol: "context.subject-key/v1";
51
+ namespace: string;
52
+ local_key: string;
53
+ }, {
54
+ kind: string;
55
+ protocol: "context.subject-key/v1";
56
+ namespace: string;
57
+ local_key: string;
58
+ }>;
59
+ }, "strict", z.ZodTypeAny, {
60
+ subject_key: {
61
+ kind: string;
62
+ protocol: "context.subject-key/v1";
63
+ namespace: string;
64
+ local_key: string;
65
+ };
66
+ node_ref: string;
67
+ group_key: string;
68
+ partition_workset_digest: string;
69
+ partition_plan_digest: string;
70
+ }, {
71
+ subject_key: {
72
+ kind: string;
73
+ protocol: "context.subject-key/v1";
74
+ namespace: string;
75
+ local_key: string;
76
+ };
77
+ node_ref: string;
78
+ group_key: string;
79
+ partition_workset_digest: string;
80
+ partition_plan_digest: string;
81
+ }>;
82
+ export declare const indexerSubjectCatalogSchema: z.ZodObject<{
83
+ protocol: z.ZodLiteral<"context.indexer.subject-catalog/v1">;
84
+ requirement_ref: z.ZodString;
85
+ subject_key_schema_digest: z.ZodString;
86
+ approved_subject_set_digest: z.ZodString;
87
+ partition_subject_set_digest: z.ZodString;
88
+ entries: z.ZodArray<z.ZodObject<{
89
+ subject_key: z.ZodObject<{
90
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
91
+ namespace: z.ZodEffects<z.ZodString, string, string>;
92
+ kind: z.ZodEffects<z.ZodString, string, string>;
93
+ local_key: z.ZodEffects<z.ZodString, string, string>;
94
+ }, "strict", z.ZodTypeAny, {
95
+ kind: string;
96
+ protocol: "context.subject-key/v1";
97
+ namespace: string;
98
+ local_key: string;
99
+ }, {
100
+ kind: string;
101
+ protocol: "context.subject-key/v1";
102
+ namespace: string;
103
+ local_key: string;
104
+ }>;
105
+ node_refs: z.ZodArray<z.ZodString, "many">;
106
+ origin_refs: z.ZodArray<z.ZodString, "many">;
107
+ }, "strict", z.ZodTypeAny, {
108
+ subject_key: {
109
+ kind: string;
110
+ protocol: "context.subject-key/v1";
111
+ namespace: string;
112
+ local_key: string;
113
+ };
114
+ node_refs: string[];
115
+ origin_refs: string[];
116
+ }, {
117
+ subject_key: {
118
+ kind: string;
119
+ protocol: "context.subject-key/v1";
120
+ namespace: string;
121
+ local_key: string;
122
+ };
123
+ node_refs: string[];
124
+ origin_refs: string[];
125
+ }>, "many">;
126
+ catalog_digest: z.ZodString;
127
+ }, "strict", z.ZodTypeAny, {
128
+ entries: {
129
+ subject_key: {
130
+ kind: string;
131
+ protocol: "context.subject-key/v1";
132
+ namespace: string;
133
+ local_key: string;
134
+ };
135
+ node_refs: string[];
136
+ origin_refs: string[];
137
+ }[];
138
+ protocol: "context.indexer.subject-catalog/v1";
139
+ requirement_ref: string;
140
+ subject_key_schema_digest: string;
141
+ approved_subject_set_digest: string;
142
+ partition_subject_set_digest: string;
143
+ catalog_digest: string;
144
+ }, {
145
+ entries: {
146
+ subject_key: {
147
+ kind: string;
148
+ protocol: "context.subject-key/v1";
149
+ namespace: string;
150
+ local_key: string;
151
+ };
152
+ node_refs: string[];
153
+ origin_refs: string[];
154
+ }[];
155
+ protocol: "context.indexer.subject-catalog/v1";
156
+ requirement_ref: string;
157
+ subject_key_schema_digest: string;
158
+ approved_subject_set_digest: string;
159
+ partition_subject_set_digest: string;
160
+ catalog_digest: string;
161
+ }>;
162
+ export type IndexerApprovedSubject = z.infer<typeof approvedSubjectSchema>;
163
+ export type IndexerPartitionSubject = z.infer<typeof partitionSubjectSchema>;
164
+ export type IndexerSubjectCatalog = z.infer<typeof indexerSubjectCatalogSchema>;
165
+ type CatalogPayload = Omit<IndexerSubjectCatalog, "catalog_digest">;
166
+ export declare function indexerSubjectCatalogDigest(value: CatalogPayload): string;
167
+ export declare function buildIndexerSubjectCatalog(input: {
168
+ requirement_ref: string;
169
+ subject_key_schema_digest: string;
170
+ approved_subjects: readonly unknown[];
171
+ partition_subjects: readonly unknown[];
172
+ }): IndexerSubjectCatalog;
173
+ export declare function validateIndexerSubjectCatalog(value: unknown): IndexerSubjectCatalog;
174
+ export declare function indexerTargetQueryRef(input: {
175
+ subject_intent: "enrich-or-independent";
176
+ subject_key: unknown;
177
+ subject_key_schema_digest: string;
178
+ }): string;
179
+ export declare const indexerTargetResolutionViewSetSchema: z.ZodObject<{
180
+ protocol: z.ZodLiteral<"context.indexer.target-resolution-view-set/v1">;
181
+ catalog_digest: z.ZodString;
182
+ items: z.ZodArray<z.ZodObject<{
183
+ group_ref: z.ZodString;
184
+ query_ref: z.ZodString;
185
+ view_digest: z.ZodString;
186
+ }, "strict", z.ZodTypeAny, {
187
+ view_digest: string;
188
+ query_ref: string;
189
+ group_ref: string;
190
+ }, {
191
+ view_digest: string;
192
+ query_ref: string;
193
+ group_ref: string;
194
+ }>, "many">;
195
+ view_set_digest: z.ZodString;
196
+ }, "strict", z.ZodTypeAny, {
197
+ protocol: "context.indexer.target-resolution-view-set/v1";
198
+ items: {
199
+ view_digest: string;
200
+ query_ref: string;
201
+ group_ref: string;
202
+ }[];
203
+ catalog_digest: string;
204
+ view_set_digest: string;
205
+ }, {
206
+ protocol: "context.indexer.target-resolution-view-set/v1";
207
+ items: {
208
+ view_digest: string;
209
+ query_ref: string;
210
+ group_ref: string;
211
+ }[];
212
+ catalog_digest: string;
213
+ view_set_digest: string;
214
+ }>;
215
+ export type IndexerTargetResolutionViewSet = z.infer<typeof indexerTargetResolutionViewSetSchema>;
216
+ export declare function buildIndexerTargetResolutionViews(input: {
217
+ catalog: unknown;
218
+ queries: readonly {
219
+ group_ref: string;
220
+ subject_intent: "enrich-or-independent";
221
+ subject_key: unknown;
222
+ }[];
223
+ }): {
224
+ views: Array<{
225
+ group_ref: string;
226
+ view: IndexerTargetResolutionView;
227
+ }>;
228
+ view_set: IndexerTargetResolutionViewSet;
229
+ };
230
+ export {};
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ export declare const indexerSubjectKeySchema: z.ZodObject<{
3
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
4
+ namespace: z.ZodEffects<z.ZodString, string, string>;
5
+ kind: z.ZodEffects<z.ZodString, string, string>;
6
+ local_key: z.ZodEffects<z.ZodString, string, string>;
7
+ }, "strict", z.ZodTypeAny, {
8
+ kind: string;
9
+ protocol: "context.subject-key/v1";
10
+ namespace: string;
11
+ local_key: string;
12
+ }, {
13
+ kind: string;
14
+ protocol: "context.subject-key/v1";
15
+ namespace: string;
16
+ local_key: string;
17
+ }>;
18
+ export type IndexerSubjectKey = z.infer<typeof indexerSubjectKeySchema>;
19
+ export declare function canonicalIndexerNodeRef(value: unknown): string;