@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,1357 @@
1
+ import { z } from "zod";
2
+ import { type IndexerCustomizationPlan } from "./indexerCustomizationLadder.js";
3
+ import { type IndexerProviderManifest } from "./indexerProvider.js";
4
+ import { type IndexerProfileContract } from "./indexerProfileContract.js";
5
+ import { type IndexerResolvedCompositionLayer } from "./indexerProviderProfileResolution.js";
6
+ import { type IndexerRegistryEntry } from "./indexerRegistry.js";
7
+ export declare const indexerSkillCapabilitySchema: z.ZodObject<{
8
+ protocol: z.ZodLiteral<"context.indexer.skill-capability/v1">;
9
+ skill: z.ZodEffects<z.ZodString, string, string>;
10
+ version: z.ZodString;
11
+ domains: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
12
+ profiles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
13
+ operations: z.ZodArray<z.ZodObject<{
14
+ id: z.ZodEnum<["main-index", "material-answer"]>;
15
+ consumes: z.ZodString;
16
+ produces: z.ZodString;
17
+ accepts_layer_fragments: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
18
+ supported_evidence_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
19
+ }, "strict", z.ZodTypeAny, {
20
+ id: "main-index" | "material-answer";
21
+ consumes: string;
22
+ produces: string;
23
+ accepts_layer_fragments: string[];
24
+ supported_evidence_kinds: string[];
25
+ }, {
26
+ id: "main-index" | "material-answer";
27
+ consumes: string;
28
+ produces: string;
29
+ accepts_layer_fragments: string[];
30
+ supported_evidence_kinds: string[];
31
+ }>, "many">;
32
+ layer_fragments: z.ZodArray<z.ZodObject<{
33
+ kind: z.ZodEffects<z.ZodString, string, string>;
34
+ phase: z.ZodEnum<["pre-authority", "post-author"]>;
35
+ produces: z.ZodString;
36
+ }, "strict", z.ZodTypeAny, {
37
+ kind: string;
38
+ phase: "pre-authority" | "post-author";
39
+ produces: string;
40
+ }, {
41
+ kind: string;
42
+ phase: "pre-authority" | "post-author";
43
+ produces: string;
44
+ }>, "many">;
45
+ source_roles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
46
+ tool_sources: z.ZodArray<z.ZodEffects<z.ZodObject<{
47
+ id: z.ZodEffects<z.ZodString, string, string>;
48
+ handler: z.ZodString;
49
+ request: z.ZodString;
50
+ produces: z.ZodLiteral<"context.indexer.tool-snapshot/v1">;
51
+ operations: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
52
+ optional: z.ZodLiteral<true>;
53
+ }, "strict", z.ZodTypeAny, {
54
+ id: string;
55
+ handler: string;
56
+ operations: string[];
57
+ optional: true;
58
+ request: string;
59
+ produces: "context.indexer.tool-snapshot/v1";
60
+ }, {
61
+ id: string;
62
+ handler: string;
63
+ operations: string[];
64
+ optional: true;
65
+ request: string;
66
+ produces: "context.indexer.tool-snapshot/v1";
67
+ }>, {
68
+ id: string;
69
+ handler: string;
70
+ operations: string[];
71
+ optional: true;
72
+ request: string;
73
+ produces: "context.indexer.tool-snapshot/v1";
74
+ }, {
75
+ id: string;
76
+ handler: string;
77
+ operations: string[];
78
+ optional: true;
79
+ request: string;
80
+ produces: "context.indexer.tool-snapshot/v1";
81
+ }>, "many">;
82
+ logical_units: z.ZodArray<z.ZodObject<{
83
+ id: z.ZodEffects<z.ZodString, string, string>;
84
+ identity: z.ZodEffects<z.ZodString, string, string>;
85
+ recommended_artifacts: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
86
+ supported_policy_variants: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
87
+ }, "strict", z.ZodTypeAny, {
88
+ id: string;
89
+ identity: string;
90
+ supported_policy_variants: string[];
91
+ recommended_artifacts: string[];
92
+ }, {
93
+ id: string;
94
+ identity: string;
95
+ supported_policy_variants: string[];
96
+ recommended_artifacts: string[];
97
+ }>, "many">;
98
+ composers: z.ZodArray<z.ZodObject<{
99
+ id: z.ZodEffects<z.ZodString, string, string>;
100
+ supported_profiles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
101
+ contract: z.ZodOptional<z.ZodEffects<z.ZodObject<{
102
+ instruction: z.ZodEffects<z.ZodString, string, string>;
103
+ primary_requirements: z.ZodObject<{
104
+ fact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
105
+ artifact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
106
+ }, "strict", z.ZodTypeAny, {
107
+ artifact_kinds: string[];
108
+ fact_kinds: string[];
109
+ }, {
110
+ artifact_kinds: string[];
111
+ fact_kinds: string[];
112
+ }>;
113
+ derived_artifact_policy: z.ZodObject<{
114
+ fragment_protocol: z.ZodLiteral<"context.indexer.layer-fragment/v1">;
115
+ fragment_kind: z.ZodLiteral<"derived-artifact-proposal">;
116
+ artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
117
+ artifact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
118
+ }, "strict", z.ZodTypeAny, {
119
+ artifact_policy_variant: string;
120
+ artifact_kinds: string[];
121
+ fragment_protocol: "context.indexer.layer-fragment/v1";
122
+ fragment_kind: "derived-artifact-proposal";
123
+ }, {
124
+ artifact_policy_variant: string;
125
+ artifact_kinds: string[];
126
+ fragment_protocol: "context.indexer.layer-fragment/v1";
127
+ fragment_kind: "derived-artifact-proposal";
128
+ }>;
129
+ empty_result: z.ZodObject<{
130
+ result_protocol: z.ZodLiteral<"context.indexer.layer-fragment-result/v1">;
131
+ behavior: z.ZodLiteral<"empty-fragment-set">;
132
+ }, "strict", z.ZodTypeAny, {
133
+ result_protocol: "context.indexer.layer-fragment-result/v1";
134
+ behavior: "empty-fragment-set";
135
+ }, {
136
+ result_protocol: "context.indexer.layer-fragment-result/v1";
137
+ behavior: "empty-fragment-set";
138
+ }>;
139
+ }, "strict", z.ZodTypeAny, {
140
+ instruction: string;
141
+ primary_requirements: {
142
+ artifact_kinds: string[];
143
+ fact_kinds: string[];
144
+ };
145
+ derived_artifact_policy: {
146
+ artifact_policy_variant: string;
147
+ artifact_kinds: string[];
148
+ fragment_protocol: "context.indexer.layer-fragment/v1";
149
+ fragment_kind: "derived-artifact-proposal";
150
+ };
151
+ empty_result: {
152
+ result_protocol: "context.indexer.layer-fragment-result/v1";
153
+ behavior: "empty-fragment-set";
154
+ };
155
+ }, {
156
+ instruction: string;
157
+ primary_requirements: {
158
+ artifact_kinds: string[];
159
+ fact_kinds: string[];
160
+ };
161
+ derived_artifact_policy: {
162
+ artifact_policy_variant: string;
163
+ artifact_kinds: string[];
164
+ fragment_protocol: "context.indexer.layer-fragment/v1";
165
+ fragment_kind: "derived-artifact-proposal";
166
+ };
167
+ empty_result: {
168
+ result_protocol: "context.indexer.layer-fragment-result/v1";
169
+ behavior: "empty-fragment-set";
170
+ };
171
+ }>, {
172
+ instruction: string;
173
+ primary_requirements: {
174
+ artifact_kinds: string[];
175
+ fact_kinds: string[];
176
+ };
177
+ derived_artifact_policy: {
178
+ artifact_policy_variant: string;
179
+ artifact_kinds: string[];
180
+ fragment_protocol: "context.indexer.layer-fragment/v1";
181
+ fragment_kind: "derived-artifact-proposal";
182
+ };
183
+ empty_result: {
184
+ result_protocol: "context.indexer.layer-fragment-result/v1";
185
+ behavior: "empty-fragment-set";
186
+ };
187
+ }, {
188
+ instruction: string;
189
+ primary_requirements: {
190
+ artifact_kinds: string[];
191
+ fact_kinds: string[];
192
+ };
193
+ derived_artifact_policy: {
194
+ artifact_policy_variant: string;
195
+ artifact_kinds: string[];
196
+ fragment_protocol: "context.indexer.layer-fragment/v1";
197
+ fragment_kind: "derived-artifact-proposal";
198
+ };
199
+ empty_result: {
200
+ result_protocol: "context.indexer.layer-fragment-result/v1";
201
+ behavior: "empty-fragment-set";
202
+ };
203
+ }>>;
204
+ }, "strict", z.ZodTypeAny, {
205
+ id: string;
206
+ supported_profiles: string[];
207
+ contract?: {
208
+ instruction: string;
209
+ primary_requirements: {
210
+ artifact_kinds: string[];
211
+ fact_kinds: string[];
212
+ };
213
+ derived_artifact_policy: {
214
+ artifact_policy_variant: string;
215
+ artifact_kinds: string[];
216
+ fragment_protocol: "context.indexer.layer-fragment/v1";
217
+ fragment_kind: "derived-artifact-proposal";
218
+ };
219
+ empty_result: {
220
+ result_protocol: "context.indexer.layer-fragment-result/v1";
221
+ behavior: "empty-fragment-set";
222
+ };
223
+ } | undefined;
224
+ }, {
225
+ id: string;
226
+ supported_profiles: string[];
227
+ contract?: {
228
+ instruction: string;
229
+ primary_requirements: {
230
+ artifact_kinds: string[];
231
+ fact_kinds: string[];
232
+ };
233
+ derived_artifact_policy: {
234
+ artifact_policy_variant: string;
235
+ artifact_kinds: string[];
236
+ fragment_protocol: "context.indexer.layer-fragment/v1";
237
+ fragment_kind: "derived-artifact-proposal";
238
+ };
239
+ empty_result: {
240
+ result_protocol: "context.indexer.layer-fragment-result/v1";
241
+ behavior: "empty-fragment-set";
242
+ };
243
+ } | undefined;
244
+ }>, "many">;
245
+ program_capabilities: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
246
+ customization_capabilities: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
247
+ } & {
248
+ capability_digest: z.ZodString;
249
+ }, "strict", z.ZodTypeAny, {
250
+ protocol: "context.indexer.skill-capability/v1";
251
+ operations: {
252
+ id: "main-index" | "material-answer";
253
+ consumes: string;
254
+ produces: string;
255
+ accepts_layer_fragments: string[];
256
+ supported_evidence_kinds: string[];
257
+ }[];
258
+ skill: string;
259
+ version: string;
260
+ composers: {
261
+ id: string;
262
+ supported_profiles: string[];
263
+ contract?: {
264
+ instruction: string;
265
+ primary_requirements: {
266
+ artifact_kinds: string[];
267
+ fact_kinds: string[];
268
+ };
269
+ derived_artifact_policy: {
270
+ artifact_policy_variant: string;
271
+ artifact_kinds: string[];
272
+ fragment_protocol: "context.indexer.layer-fragment/v1";
273
+ fragment_kind: "derived-artifact-proposal";
274
+ };
275
+ empty_result: {
276
+ result_protocol: "context.indexer.layer-fragment-result/v1";
277
+ behavior: "empty-fragment-set";
278
+ };
279
+ } | undefined;
280
+ }[];
281
+ source_roles: string[];
282
+ profiles: string[];
283
+ layer_fragments: {
284
+ kind: string;
285
+ phase: "pre-authority" | "post-author";
286
+ produces: string;
287
+ }[];
288
+ tool_sources: {
289
+ id: string;
290
+ handler: string;
291
+ operations: string[];
292
+ optional: true;
293
+ request: string;
294
+ produces: "context.indexer.tool-snapshot/v1";
295
+ }[];
296
+ logical_units: {
297
+ id: string;
298
+ identity: string;
299
+ supported_policy_variants: string[];
300
+ recommended_artifacts: string[];
301
+ }[];
302
+ domains: string[];
303
+ program_capabilities: string[];
304
+ customization_capabilities: string[];
305
+ capability_digest: string;
306
+ }, {
307
+ protocol: "context.indexer.skill-capability/v1";
308
+ operations: {
309
+ id: "main-index" | "material-answer";
310
+ consumes: string;
311
+ produces: string;
312
+ accepts_layer_fragments: string[];
313
+ supported_evidence_kinds: string[];
314
+ }[];
315
+ skill: string;
316
+ version: string;
317
+ composers: {
318
+ id: string;
319
+ supported_profiles: string[];
320
+ contract?: {
321
+ instruction: string;
322
+ primary_requirements: {
323
+ artifact_kinds: string[];
324
+ fact_kinds: string[];
325
+ };
326
+ derived_artifact_policy: {
327
+ artifact_policy_variant: string;
328
+ artifact_kinds: string[];
329
+ fragment_protocol: "context.indexer.layer-fragment/v1";
330
+ fragment_kind: "derived-artifact-proposal";
331
+ };
332
+ empty_result: {
333
+ result_protocol: "context.indexer.layer-fragment-result/v1";
334
+ behavior: "empty-fragment-set";
335
+ };
336
+ } | undefined;
337
+ }[];
338
+ source_roles: string[];
339
+ profiles: string[];
340
+ layer_fragments: {
341
+ kind: string;
342
+ phase: "pre-authority" | "post-author";
343
+ produces: string;
344
+ }[];
345
+ tool_sources: {
346
+ id: string;
347
+ handler: string;
348
+ operations: string[];
349
+ optional: true;
350
+ request: string;
351
+ produces: "context.indexer.tool-snapshot/v1";
352
+ }[];
353
+ logical_units: {
354
+ id: string;
355
+ identity: string;
356
+ supported_policy_variants: string[];
357
+ recommended_artifacts: string[];
358
+ }[];
359
+ domains: string[];
360
+ program_capabilities: string[];
361
+ customization_capabilities: string[];
362
+ capability_digest: string;
363
+ }>;
364
+ export type IndexerSkillCapability = z.infer<typeof indexerSkillCapabilitySchema>;
365
+ export declare function buildIndexerSkillCapability(value: IndexerProviderManifest): IndexerSkillCapability;
366
+ export declare function validateIndexerSkillCapability(value: unknown): IndexerSkillCapability;
367
+ export declare const indexerProviderCompositionPlanSchema: z.ZodObject<{
368
+ protocol: z.ZodLiteral<"context.indexer.provider-composition-plan/v1">;
369
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
370
+ primary_layer_id: z.ZodEffects<z.ZodString, string, string>;
371
+ active_profiles: z.ZodArray<z.ZodObject<{
372
+ id: z.ZodEffects<z.ZodString, string, string>;
373
+ kind: z.ZodEnum<["primary", "supporting", "extension"]>;
374
+ provider_layer_id: z.ZodEffects<z.ZodString, string, string>;
375
+ variants: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
376
+ }, "strict", z.ZodTypeAny, {
377
+ id: string;
378
+ kind: "primary" | "supporting" | "extension";
379
+ variants: Record<string, string>;
380
+ provider_layer_id: string;
381
+ }, {
382
+ id: string;
383
+ kind: "primary" | "supporting" | "extension";
384
+ variants: Record<string, string>;
385
+ provider_layer_id: string;
386
+ }>, "many">;
387
+ skill_capabilities: z.ZodArray<z.ZodObject<{
388
+ provider_layer_id: z.ZodEffects<z.ZodString, string, string>;
389
+ provider_integrity: z.ZodString;
390
+ manifest_digest: z.ZodString;
391
+ capability: z.ZodObject<{
392
+ protocol: z.ZodLiteral<"context.indexer.skill-capability/v1">;
393
+ skill: z.ZodEffects<z.ZodString, string, string>;
394
+ version: z.ZodString;
395
+ domains: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
396
+ profiles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
397
+ operations: z.ZodArray<z.ZodObject<{
398
+ id: z.ZodEnum<["main-index", "material-answer"]>;
399
+ consumes: z.ZodString;
400
+ produces: z.ZodString;
401
+ accepts_layer_fragments: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
402
+ supported_evidence_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
403
+ }, "strict", z.ZodTypeAny, {
404
+ id: "main-index" | "material-answer";
405
+ consumes: string;
406
+ produces: string;
407
+ accepts_layer_fragments: string[];
408
+ supported_evidence_kinds: string[];
409
+ }, {
410
+ id: "main-index" | "material-answer";
411
+ consumes: string;
412
+ produces: string;
413
+ accepts_layer_fragments: string[];
414
+ supported_evidence_kinds: string[];
415
+ }>, "many">;
416
+ layer_fragments: z.ZodArray<z.ZodObject<{
417
+ kind: z.ZodEffects<z.ZodString, string, string>;
418
+ phase: z.ZodEnum<["pre-authority", "post-author"]>;
419
+ produces: z.ZodString;
420
+ }, "strict", z.ZodTypeAny, {
421
+ kind: string;
422
+ phase: "pre-authority" | "post-author";
423
+ produces: string;
424
+ }, {
425
+ kind: string;
426
+ phase: "pre-authority" | "post-author";
427
+ produces: string;
428
+ }>, "many">;
429
+ source_roles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
430
+ tool_sources: z.ZodArray<z.ZodEffects<z.ZodObject<{
431
+ id: z.ZodEffects<z.ZodString, string, string>;
432
+ handler: z.ZodString;
433
+ request: z.ZodString;
434
+ produces: z.ZodLiteral<"context.indexer.tool-snapshot/v1">;
435
+ operations: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
436
+ optional: z.ZodLiteral<true>;
437
+ }, "strict", z.ZodTypeAny, {
438
+ id: string;
439
+ handler: string;
440
+ operations: string[];
441
+ optional: true;
442
+ request: string;
443
+ produces: "context.indexer.tool-snapshot/v1";
444
+ }, {
445
+ id: string;
446
+ handler: string;
447
+ operations: string[];
448
+ optional: true;
449
+ request: string;
450
+ produces: "context.indexer.tool-snapshot/v1";
451
+ }>, {
452
+ id: string;
453
+ handler: string;
454
+ operations: string[];
455
+ optional: true;
456
+ request: string;
457
+ produces: "context.indexer.tool-snapshot/v1";
458
+ }, {
459
+ id: string;
460
+ handler: string;
461
+ operations: string[];
462
+ optional: true;
463
+ request: string;
464
+ produces: "context.indexer.tool-snapshot/v1";
465
+ }>, "many">;
466
+ logical_units: z.ZodArray<z.ZodObject<{
467
+ id: z.ZodEffects<z.ZodString, string, string>;
468
+ identity: z.ZodEffects<z.ZodString, string, string>;
469
+ recommended_artifacts: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
470
+ supported_policy_variants: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
471
+ }, "strict", z.ZodTypeAny, {
472
+ id: string;
473
+ identity: string;
474
+ supported_policy_variants: string[];
475
+ recommended_artifacts: string[];
476
+ }, {
477
+ id: string;
478
+ identity: string;
479
+ supported_policy_variants: string[];
480
+ recommended_artifacts: string[];
481
+ }>, "many">;
482
+ composers: z.ZodArray<z.ZodObject<{
483
+ id: z.ZodEffects<z.ZodString, string, string>;
484
+ supported_profiles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
485
+ contract: z.ZodOptional<z.ZodEffects<z.ZodObject<{
486
+ instruction: z.ZodEffects<z.ZodString, string, string>;
487
+ primary_requirements: z.ZodObject<{
488
+ fact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
489
+ artifact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
490
+ }, "strict", z.ZodTypeAny, {
491
+ artifact_kinds: string[];
492
+ fact_kinds: string[];
493
+ }, {
494
+ artifact_kinds: string[];
495
+ fact_kinds: string[];
496
+ }>;
497
+ derived_artifact_policy: z.ZodObject<{
498
+ fragment_protocol: z.ZodLiteral<"context.indexer.layer-fragment/v1">;
499
+ fragment_kind: z.ZodLiteral<"derived-artifact-proposal">;
500
+ artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
501
+ artifact_kinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
502
+ }, "strict", z.ZodTypeAny, {
503
+ artifact_policy_variant: string;
504
+ artifact_kinds: string[];
505
+ fragment_protocol: "context.indexer.layer-fragment/v1";
506
+ fragment_kind: "derived-artifact-proposal";
507
+ }, {
508
+ artifact_policy_variant: string;
509
+ artifact_kinds: string[];
510
+ fragment_protocol: "context.indexer.layer-fragment/v1";
511
+ fragment_kind: "derived-artifact-proposal";
512
+ }>;
513
+ empty_result: z.ZodObject<{
514
+ result_protocol: z.ZodLiteral<"context.indexer.layer-fragment-result/v1">;
515
+ behavior: z.ZodLiteral<"empty-fragment-set">;
516
+ }, "strict", z.ZodTypeAny, {
517
+ result_protocol: "context.indexer.layer-fragment-result/v1";
518
+ behavior: "empty-fragment-set";
519
+ }, {
520
+ result_protocol: "context.indexer.layer-fragment-result/v1";
521
+ behavior: "empty-fragment-set";
522
+ }>;
523
+ }, "strict", z.ZodTypeAny, {
524
+ instruction: string;
525
+ primary_requirements: {
526
+ artifact_kinds: string[];
527
+ fact_kinds: string[];
528
+ };
529
+ derived_artifact_policy: {
530
+ artifact_policy_variant: string;
531
+ artifact_kinds: string[];
532
+ fragment_protocol: "context.indexer.layer-fragment/v1";
533
+ fragment_kind: "derived-artifact-proposal";
534
+ };
535
+ empty_result: {
536
+ result_protocol: "context.indexer.layer-fragment-result/v1";
537
+ behavior: "empty-fragment-set";
538
+ };
539
+ }, {
540
+ instruction: string;
541
+ primary_requirements: {
542
+ artifact_kinds: string[];
543
+ fact_kinds: string[];
544
+ };
545
+ derived_artifact_policy: {
546
+ artifact_policy_variant: string;
547
+ artifact_kinds: string[];
548
+ fragment_protocol: "context.indexer.layer-fragment/v1";
549
+ fragment_kind: "derived-artifact-proposal";
550
+ };
551
+ empty_result: {
552
+ result_protocol: "context.indexer.layer-fragment-result/v1";
553
+ behavior: "empty-fragment-set";
554
+ };
555
+ }>, {
556
+ instruction: string;
557
+ primary_requirements: {
558
+ artifact_kinds: string[];
559
+ fact_kinds: string[];
560
+ };
561
+ derived_artifact_policy: {
562
+ artifact_policy_variant: string;
563
+ artifact_kinds: string[];
564
+ fragment_protocol: "context.indexer.layer-fragment/v1";
565
+ fragment_kind: "derived-artifact-proposal";
566
+ };
567
+ empty_result: {
568
+ result_protocol: "context.indexer.layer-fragment-result/v1";
569
+ behavior: "empty-fragment-set";
570
+ };
571
+ }, {
572
+ instruction: string;
573
+ primary_requirements: {
574
+ artifact_kinds: string[];
575
+ fact_kinds: string[];
576
+ };
577
+ derived_artifact_policy: {
578
+ artifact_policy_variant: string;
579
+ artifact_kinds: string[];
580
+ fragment_protocol: "context.indexer.layer-fragment/v1";
581
+ fragment_kind: "derived-artifact-proposal";
582
+ };
583
+ empty_result: {
584
+ result_protocol: "context.indexer.layer-fragment-result/v1";
585
+ behavior: "empty-fragment-set";
586
+ };
587
+ }>>;
588
+ }, "strict", z.ZodTypeAny, {
589
+ id: string;
590
+ supported_profiles: string[];
591
+ contract?: {
592
+ instruction: string;
593
+ primary_requirements: {
594
+ artifact_kinds: string[];
595
+ fact_kinds: string[];
596
+ };
597
+ derived_artifact_policy: {
598
+ artifact_policy_variant: string;
599
+ artifact_kinds: string[];
600
+ fragment_protocol: "context.indexer.layer-fragment/v1";
601
+ fragment_kind: "derived-artifact-proposal";
602
+ };
603
+ empty_result: {
604
+ result_protocol: "context.indexer.layer-fragment-result/v1";
605
+ behavior: "empty-fragment-set";
606
+ };
607
+ } | undefined;
608
+ }, {
609
+ id: string;
610
+ supported_profiles: string[];
611
+ contract?: {
612
+ instruction: string;
613
+ primary_requirements: {
614
+ artifact_kinds: string[];
615
+ fact_kinds: string[];
616
+ };
617
+ derived_artifact_policy: {
618
+ artifact_policy_variant: string;
619
+ artifact_kinds: string[];
620
+ fragment_protocol: "context.indexer.layer-fragment/v1";
621
+ fragment_kind: "derived-artifact-proposal";
622
+ };
623
+ empty_result: {
624
+ result_protocol: "context.indexer.layer-fragment-result/v1";
625
+ behavior: "empty-fragment-set";
626
+ };
627
+ } | undefined;
628
+ }>, "many">;
629
+ program_capabilities: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
630
+ customization_capabilities: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
631
+ } & {
632
+ capability_digest: z.ZodString;
633
+ }, "strict", z.ZodTypeAny, {
634
+ protocol: "context.indexer.skill-capability/v1";
635
+ operations: {
636
+ id: "main-index" | "material-answer";
637
+ consumes: string;
638
+ produces: string;
639
+ accepts_layer_fragments: string[];
640
+ supported_evidence_kinds: string[];
641
+ }[];
642
+ skill: string;
643
+ version: string;
644
+ composers: {
645
+ id: string;
646
+ supported_profiles: string[];
647
+ contract?: {
648
+ instruction: string;
649
+ primary_requirements: {
650
+ artifact_kinds: string[];
651
+ fact_kinds: string[];
652
+ };
653
+ derived_artifact_policy: {
654
+ artifact_policy_variant: string;
655
+ artifact_kinds: string[];
656
+ fragment_protocol: "context.indexer.layer-fragment/v1";
657
+ fragment_kind: "derived-artifact-proposal";
658
+ };
659
+ empty_result: {
660
+ result_protocol: "context.indexer.layer-fragment-result/v1";
661
+ behavior: "empty-fragment-set";
662
+ };
663
+ } | undefined;
664
+ }[];
665
+ source_roles: string[];
666
+ profiles: string[];
667
+ layer_fragments: {
668
+ kind: string;
669
+ phase: "pre-authority" | "post-author";
670
+ produces: string;
671
+ }[];
672
+ tool_sources: {
673
+ id: string;
674
+ handler: string;
675
+ operations: string[];
676
+ optional: true;
677
+ request: string;
678
+ produces: "context.indexer.tool-snapshot/v1";
679
+ }[];
680
+ logical_units: {
681
+ id: string;
682
+ identity: string;
683
+ supported_policy_variants: string[];
684
+ recommended_artifacts: string[];
685
+ }[];
686
+ domains: string[];
687
+ program_capabilities: string[];
688
+ customization_capabilities: string[];
689
+ capability_digest: string;
690
+ }, {
691
+ protocol: "context.indexer.skill-capability/v1";
692
+ operations: {
693
+ id: "main-index" | "material-answer";
694
+ consumes: string;
695
+ produces: string;
696
+ accepts_layer_fragments: string[];
697
+ supported_evidence_kinds: string[];
698
+ }[];
699
+ skill: string;
700
+ version: string;
701
+ composers: {
702
+ id: string;
703
+ supported_profiles: string[];
704
+ contract?: {
705
+ instruction: string;
706
+ primary_requirements: {
707
+ artifact_kinds: string[];
708
+ fact_kinds: string[];
709
+ };
710
+ derived_artifact_policy: {
711
+ artifact_policy_variant: string;
712
+ artifact_kinds: string[];
713
+ fragment_protocol: "context.indexer.layer-fragment/v1";
714
+ fragment_kind: "derived-artifact-proposal";
715
+ };
716
+ empty_result: {
717
+ result_protocol: "context.indexer.layer-fragment-result/v1";
718
+ behavior: "empty-fragment-set";
719
+ };
720
+ } | undefined;
721
+ }[];
722
+ source_roles: string[];
723
+ profiles: string[];
724
+ layer_fragments: {
725
+ kind: string;
726
+ phase: "pre-authority" | "post-author";
727
+ produces: string;
728
+ }[];
729
+ tool_sources: {
730
+ id: string;
731
+ handler: string;
732
+ operations: string[];
733
+ optional: true;
734
+ request: string;
735
+ produces: "context.indexer.tool-snapshot/v1";
736
+ }[];
737
+ logical_units: {
738
+ id: string;
739
+ identity: string;
740
+ supported_policy_variants: string[];
741
+ recommended_artifacts: string[];
742
+ }[];
743
+ domains: string[];
744
+ program_capabilities: string[];
745
+ customization_capabilities: string[];
746
+ capability_digest: string;
747
+ }>;
748
+ }, "strict", z.ZodTypeAny, {
749
+ capability: {
750
+ protocol: "context.indexer.skill-capability/v1";
751
+ operations: {
752
+ id: "main-index" | "material-answer";
753
+ consumes: string;
754
+ produces: string;
755
+ accepts_layer_fragments: string[];
756
+ supported_evidence_kinds: string[];
757
+ }[];
758
+ skill: string;
759
+ version: string;
760
+ composers: {
761
+ id: string;
762
+ supported_profiles: string[];
763
+ contract?: {
764
+ instruction: string;
765
+ primary_requirements: {
766
+ artifact_kinds: string[];
767
+ fact_kinds: string[];
768
+ };
769
+ derived_artifact_policy: {
770
+ artifact_policy_variant: string;
771
+ artifact_kinds: string[];
772
+ fragment_protocol: "context.indexer.layer-fragment/v1";
773
+ fragment_kind: "derived-artifact-proposal";
774
+ };
775
+ empty_result: {
776
+ result_protocol: "context.indexer.layer-fragment-result/v1";
777
+ behavior: "empty-fragment-set";
778
+ };
779
+ } | undefined;
780
+ }[];
781
+ source_roles: string[];
782
+ profiles: string[];
783
+ layer_fragments: {
784
+ kind: string;
785
+ phase: "pre-authority" | "post-author";
786
+ produces: string;
787
+ }[];
788
+ tool_sources: {
789
+ id: string;
790
+ handler: string;
791
+ operations: string[];
792
+ optional: true;
793
+ request: string;
794
+ produces: "context.indexer.tool-snapshot/v1";
795
+ }[];
796
+ logical_units: {
797
+ id: string;
798
+ identity: string;
799
+ supported_policy_variants: string[];
800
+ recommended_artifacts: string[];
801
+ }[];
802
+ domains: string[];
803
+ program_capabilities: string[];
804
+ customization_capabilities: string[];
805
+ capability_digest: string;
806
+ };
807
+ manifest_digest: string;
808
+ provider_integrity: string;
809
+ provider_layer_id: string;
810
+ }, {
811
+ capability: {
812
+ protocol: "context.indexer.skill-capability/v1";
813
+ operations: {
814
+ id: "main-index" | "material-answer";
815
+ consumes: string;
816
+ produces: string;
817
+ accepts_layer_fragments: string[];
818
+ supported_evidence_kinds: string[];
819
+ }[];
820
+ skill: string;
821
+ version: string;
822
+ composers: {
823
+ id: string;
824
+ supported_profiles: string[];
825
+ contract?: {
826
+ instruction: string;
827
+ primary_requirements: {
828
+ artifact_kinds: string[];
829
+ fact_kinds: string[];
830
+ };
831
+ derived_artifact_policy: {
832
+ artifact_policy_variant: string;
833
+ artifact_kinds: string[];
834
+ fragment_protocol: "context.indexer.layer-fragment/v1";
835
+ fragment_kind: "derived-artifact-proposal";
836
+ };
837
+ empty_result: {
838
+ result_protocol: "context.indexer.layer-fragment-result/v1";
839
+ behavior: "empty-fragment-set";
840
+ };
841
+ } | undefined;
842
+ }[];
843
+ source_roles: string[];
844
+ profiles: string[];
845
+ layer_fragments: {
846
+ kind: string;
847
+ phase: "pre-authority" | "post-author";
848
+ produces: string;
849
+ }[];
850
+ tool_sources: {
851
+ id: string;
852
+ handler: string;
853
+ operations: string[];
854
+ optional: true;
855
+ request: string;
856
+ produces: "context.indexer.tool-snapshot/v1";
857
+ }[];
858
+ logical_units: {
859
+ id: string;
860
+ identity: string;
861
+ supported_policy_variants: string[];
862
+ recommended_artifacts: string[];
863
+ }[];
864
+ domains: string[];
865
+ program_capabilities: string[];
866
+ customization_capabilities: string[];
867
+ capability_digest: string;
868
+ };
869
+ manifest_digest: string;
870
+ provider_integrity: string;
871
+ provider_layer_id: string;
872
+ }>, "many">;
873
+ operation_authorities: z.ZodArray<z.ZodObject<{
874
+ operation: z.ZodEnum<["main-index", "material-answer"]>;
875
+ final_authority_layer_id: z.ZodEffects<z.ZodString, string, string>;
876
+ accepts_layer_fragments: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
877
+ }, "strict", z.ZodTypeAny, {
878
+ operation: "main-index" | "material-answer";
879
+ accepts_layer_fragments: string[];
880
+ final_authority_layer_id: string;
881
+ }, {
882
+ operation: "main-index" | "material-answer";
883
+ accepts_layer_fragments: string[];
884
+ final_authority_layer_id: string;
885
+ }>, "many">;
886
+ source_roles: z.ZodArray<z.ZodObject<{
887
+ id: z.ZodEffects<z.ZodString, string, string>;
888
+ provider_layer_ids: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
889
+ }, "strict", z.ZodTypeAny, {
890
+ id: string;
891
+ provider_layer_ids: string[];
892
+ }, {
893
+ id: string;
894
+ provider_layer_ids: string[];
895
+ }>, "many">;
896
+ tool_sources: z.ZodArray<z.ZodObject<{
897
+ provider_layer_id: z.ZodEffects<z.ZodString, string, string>;
898
+ declaration: z.ZodEffects<z.ZodObject<{
899
+ id: z.ZodEffects<z.ZodString, string, string>;
900
+ handler: z.ZodString;
901
+ request: z.ZodString;
902
+ produces: z.ZodLiteral<"context.indexer.tool-snapshot/v1">;
903
+ operations: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
904
+ optional: z.ZodLiteral<true>;
905
+ }, "strict", z.ZodTypeAny, {
906
+ id: string;
907
+ handler: string;
908
+ operations: string[];
909
+ optional: true;
910
+ request: string;
911
+ produces: "context.indexer.tool-snapshot/v1";
912
+ }, {
913
+ id: string;
914
+ handler: string;
915
+ operations: string[];
916
+ optional: true;
917
+ request: string;
918
+ produces: "context.indexer.tool-snapshot/v1";
919
+ }>, {
920
+ id: string;
921
+ handler: string;
922
+ operations: string[];
923
+ optional: true;
924
+ request: string;
925
+ produces: "context.indexer.tool-snapshot/v1";
926
+ }, {
927
+ id: string;
928
+ handler: string;
929
+ operations: string[];
930
+ optional: true;
931
+ request: string;
932
+ produces: "context.indexer.tool-snapshot/v1";
933
+ }>;
934
+ }, "strict", z.ZodTypeAny, {
935
+ provider_layer_id: string;
936
+ declaration: {
937
+ id: string;
938
+ handler: string;
939
+ operations: string[];
940
+ optional: true;
941
+ request: string;
942
+ produces: "context.indexer.tool-snapshot/v1";
943
+ };
944
+ }, {
945
+ provider_layer_id: string;
946
+ declaration: {
947
+ id: string;
948
+ handler: string;
949
+ operations: string[];
950
+ optional: true;
951
+ request: string;
952
+ produces: "context.indexer.tool-snapshot/v1";
953
+ };
954
+ }>, "many">;
955
+ logical_units: z.ZodArray<z.ZodObject<{
956
+ id: z.ZodEffects<z.ZodString, string, string>;
957
+ definition_digest: z.ZodString;
958
+ provider_layer_ids: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
959
+ }, "strict", z.ZodTypeAny, {
960
+ id: string;
961
+ provider_layer_ids: string[];
962
+ definition_digest: string;
963
+ }, {
964
+ id: string;
965
+ provider_layer_ids: string[];
966
+ definition_digest: string;
967
+ }>, "many">;
968
+ instructions: z.ZodArray<z.ZodObject<{
969
+ stage: z.ZodEnum<["primary", "supporting", "extension", "composer"]>;
970
+ provider_layer_id: z.ZodEffects<z.ZodString, string, string>;
971
+ profile_id: z.ZodEffects<z.ZodString, string, string>;
972
+ path: z.ZodEffects<z.ZodString, string, string>;
973
+ source: z.ZodEnum<["provider", "project-append"]>;
974
+ project_digest: z.ZodOptional<z.ZodString>;
975
+ }, "strict", z.ZodTypeAny, {
976
+ path: string;
977
+ source: "provider" | "project-append";
978
+ profile_id: string;
979
+ stage: "primary" | "supporting" | "extension" | "composer";
980
+ provider_layer_id: string;
981
+ project_digest?: string | undefined;
982
+ }, {
983
+ path: string;
984
+ source: "provider" | "project-append";
985
+ profile_id: string;
986
+ stage: "primary" | "supporting" | "extension" | "composer";
987
+ provider_layer_id: string;
988
+ project_digest?: string | undefined;
989
+ }>, "many">;
990
+ templates: z.ZodArray<z.ZodObject<{
991
+ stage: z.ZodEnum<["primary", "supporting", "extension", "composer"]>;
992
+ provider_layer_id: z.ZodEffects<z.ZodString, string, string>;
993
+ profile_id: z.ZodEffects<z.ZodString, string, string>;
994
+ template_id: z.ZodEffects<z.ZodString, string, string>;
995
+ provider_path: z.ZodEffects<z.ZodString, string, string>;
996
+ source: z.ZodEnum<["provider", "project-override"]>;
997
+ project_path: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
998
+ project_digest: z.ZodOptional<z.ZodString>;
999
+ }, "strict", z.ZodTypeAny, {
1000
+ source: "provider" | "project-override";
1001
+ template_id: string;
1002
+ profile_id: string;
1003
+ stage: "primary" | "supporting" | "extension" | "composer";
1004
+ provider_layer_id: string;
1005
+ provider_path: string;
1006
+ project_digest?: string | undefined;
1007
+ project_path?: string | undefined;
1008
+ }, {
1009
+ source: "provider" | "project-override";
1010
+ template_id: string;
1011
+ profile_id: string;
1012
+ stage: "primary" | "supporting" | "extension" | "composer";
1013
+ provider_layer_id: string;
1014
+ provider_path: string;
1015
+ project_digest?: string | undefined;
1016
+ project_path?: string | undefined;
1017
+ }>, "many">;
1018
+ isolated_configs: z.ZodArray<z.ZodObject<{
1019
+ provider_layer_id: z.ZodEffects<z.ZodString, string, string>;
1020
+ config_digest: z.ZodString;
1021
+ }, "strict", z.ZodTypeAny, {
1022
+ config_digest: string;
1023
+ provider_layer_id: string;
1024
+ }, {
1025
+ config_digest: string;
1026
+ provider_layer_id: string;
1027
+ }>, "many">;
1028
+ composers: z.ZodArray<z.ZodObject<{
1029
+ composer_ref: z.ZodString;
1030
+ composer_id: z.ZodEffects<z.ZodString, string, string>;
1031
+ provider_layer_id: z.ZodEffects<z.ZodString, string, string>;
1032
+ composer_contract_digest: z.ZodOptional<z.ZodString>;
1033
+ }, "strict", z.ZodTypeAny, {
1034
+ composer_ref: string;
1035
+ provider_layer_id: string;
1036
+ composer_id: string;
1037
+ composer_contract_digest?: string | undefined;
1038
+ }, {
1039
+ composer_ref: string;
1040
+ provider_layer_id: string;
1041
+ composer_id: string;
1042
+ composer_contract_digest?: string | undefined;
1043
+ }>, "many">;
1044
+ customization: z.ZodObject<{
1045
+ mode: z.ZodEnum<["none", "extend", "replace"]>;
1046
+ fingerprint: z.ZodString;
1047
+ plan_digest: z.ZodString;
1048
+ selected_capabilities: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1049
+ program_source: z.ZodEnum<["provider", "project-extend", "project-replace"]>;
1050
+ }, "strict", z.ZodTypeAny, {
1051
+ mode: "replace" | "extend" | "none";
1052
+ plan_digest: string;
1053
+ fingerprint: string;
1054
+ selected_capabilities: string[];
1055
+ program_source: "provider" | "project-extend" | "project-replace";
1056
+ }, {
1057
+ mode: "replace" | "extend" | "none";
1058
+ plan_digest: string;
1059
+ fingerprint: string;
1060
+ selected_capabilities: string[];
1061
+ program_source: "provider" | "project-extend" | "project-replace";
1062
+ }>;
1063
+ } & {
1064
+ composition_digest: z.ZodString;
1065
+ }, "strict", z.ZodTypeAny, {
1066
+ protocol: "context.indexer.provider-composition-plan/v1";
1067
+ composers: {
1068
+ composer_ref: string;
1069
+ provider_layer_id: string;
1070
+ composer_id: string;
1071
+ composer_contract_digest?: string | undefined;
1072
+ }[];
1073
+ customization: {
1074
+ mode: "replace" | "extend" | "none";
1075
+ plan_digest: string;
1076
+ fingerprint: string;
1077
+ selected_capabilities: string[];
1078
+ program_source: "provider" | "project-extend" | "project-replace";
1079
+ };
1080
+ source_roles: {
1081
+ id: string;
1082
+ provider_layer_ids: string[];
1083
+ }[];
1084
+ tool_sources: {
1085
+ provider_layer_id: string;
1086
+ declaration: {
1087
+ id: string;
1088
+ handler: string;
1089
+ operations: string[];
1090
+ optional: true;
1091
+ request: string;
1092
+ produces: "context.indexer.tool-snapshot/v1";
1093
+ };
1094
+ }[];
1095
+ logical_units: {
1096
+ id: string;
1097
+ provider_layer_ids: string[];
1098
+ definition_digest: string;
1099
+ }[];
1100
+ instructions: {
1101
+ path: string;
1102
+ source: "provider" | "project-append";
1103
+ profile_id: string;
1104
+ stage: "primary" | "supporting" | "extension" | "composer";
1105
+ provider_layer_id: string;
1106
+ project_digest?: string | undefined;
1107
+ }[];
1108
+ templates: {
1109
+ source: "provider" | "project-override";
1110
+ template_id: string;
1111
+ profile_id: string;
1112
+ stage: "primary" | "supporting" | "extension" | "composer";
1113
+ provider_layer_id: string;
1114
+ provider_path: string;
1115
+ project_digest?: string | undefined;
1116
+ project_path?: string | undefined;
1117
+ }[];
1118
+ indexer_id: string;
1119
+ primary_layer_id: string;
1120
+ active_profiles: {
1121
+ id: string;
1122
+ kind: "primary" | "supporting" | "extension";
1123
+ variants: Record<string, string>;
1124
+ provider_layer_id: string;
1125
+ }[];
1126
+ skill_capabilities: {
1127
+ capability: {
1128
+ protocol: "context.indexer.skill-capability/v1";
1129
+ operations: {
1130
+ id: "main-index" | "material-answer";
1131
+ consumes: string;
1132
+ produces: string;
1133
+ accepts_layer_fragments: string[];
1134
+ supported_evidence_kinds: string[];
1135
+ }[];
1136
+ skill: string;
1137
+ version: string;
1138
+ composers: {
1139
+ id: string;
1140
+ supported_profiles: string[];
1141
+ contract?: {
1142
+ instruction: string;
1143
+ primary_requirements: {
1144
+ artifact_kinds: string[];
1145
+ fact_kinds: string[];
1146
+ };
1147
+ derived_artifact_policy: {
1148
+ artifact_policy_variant: string;
1149
+ artifact_kinds: string[];
1150
+ fragment_protocol: "context.indexer.layer-fragment/v1";
1151
+ fragment_kind: "derived-artifact-proposal";
1152
+ };
1153
+ empty_result: {
1154
+ result_protocol: "context.indexer.layer-fragment-result/v1";
1155
+ behavior: "empty-fragment-set";
1156
+ };
1157
+ } | undefined;
1158
+ }[];
1159
+ source_roles: string[];
1160
+ profiles: string[];
1161
+ layer_fragments: {
1162
+ kind: string;
1163
+ phase: "pre-authority" | "post-author";
1164
+ produces: string;
1165
+ }[];
1166
+ tool_sources: {
1167
+ id: string;
1168
+ handler: string;
1169
+ operations: string[];
1170
+ optional: true;
1171
+ request: string;
1172
+ produces: "context.indexer.tool-snapshot/v1";
1173
+ }[];
1174
+ logical_units: {
1175
+ id: string;
1176
+ identity: string;
1177
+ supported_policy_variants: string[];
1178
+ recommended_artifacts: string[];
1179
+ }[];
1180
+ domains: string[];
1181
+ program_capabilities: string[];
1182
+ customization_capabilities: string[];
1183
+ capability_digest: string;
1184
+ };
1185
+ manifest_digest: string;
1186
+ provider_integrity: string;
1187
+ provider_layer_id: string;
1188
+ }[];
1189
+ operation_authorities: {
1190
+ operation: "main-index" | "material-answer";
1191
+ accepts_layer_fragments: string[];
1192
+ final_authority_layer_id: string;
1193
+ }[];
1194
+ isolated_configs: {
1195
+ config_digest: string;
1196
+ provider_layer_id: string;
1197
+ }[];
1198
+ composition_digest: string;
1199
+ }, {
1200
+ protocol: "context.indexer.provider-composition-plan/v1";
1201
+ composers: {
1202
+ composer_ref: string;
1203
+ provider_layer_id: string;
1204
+ composer_id: string;
1205
+ composer_contract_digest?: string | undefined;
1206
+ }[];
1207
+ customization: {
1208
+ mode: "replace" | "extend" | "none";
1209
+ plan_digest: string;
1210
+ fingerprint: string;
1211
+ selected_capabilities: string[];
1212
+ program_source: "provider" | "project-extend" | "project-replace";
1213
+ };
1214
+ source_roles: {
1215
+ id: string;
1216
+ provider_layer_ids: string[];
1217
+ }[];
1218
+ tool_sources: {
1219
+ provider_layer_id: string;
1220
+ declaration: {
1221
+ id: string;
1222
+ handler: string;
1223
+ operations: string[];
1224
+ optional: true;
1225
+ request: string;
1226
+ produces: "context.indexer.tool-snapshot/v1";
1227
+ };
1228
+ }[];
1229
+ logical_units: {
1230
+ id: string;
1231
+ provider_layer_ids: string[];
1232
+ definition_digest: string;
1233
+ }[];
1234
+ instructions: {
1235
+ path: string;
1236
+ source: "provider" | "project-append";
1237
+ profile_id: string;
1238
+ stage: "primary" | "supporting" | "extension" | "composer";
1239
+ provider_layer_id: string;
1240
+ project_digest?: string | undefined;
1241
+ }[];
1242
+ templates: {
1243
+ source: "provider" | "project-override";
1244
+ template_id: string;
1245
+ profile_id: string;
1246
+ stage: "primary" | "supporting" | "extension" | "composer";
1247
+ provider_layer_id: string;
1248
+ provider_path: string;
1249
+ project_digest?: string | undefined;
1250
+ project_path?: string | undefined;
1251
+ }[];
1252
+ indexer_id: string;
1253
+ primary_layer_id: string;
1254
+ active_profiles: {
1255
+ id: string;
1256
+ kind: "primary" | "supporting" | "extension";
1257
+ variants: Record<string, string>;
1258
+ provider_layer_id: string;
1259
+ }[];
1260
+ skill_capabilities: {
1261
+ capability: {
1262
+ protocol: "context.indexer.skill-capability/v1";
1263
+ operations: {
1264
+ id: "main-index" | "material-answer";
1265
+ consumes: string;
1266
+ produces: string;
1267
+ accepts_layer_fragments: string[];
1268
+ supported_evidence_kinds: string[];
1269
+ }[];
1270
+ skill: string;
1271
+ version: string;
1272
+ composers: {
1273
+ id: string;
1274
+ supported_profiles: string[];
1275
+ contract?: {
1276
+ instruction: string;
1277
+ primary_requirements: {
1278
+ artifact_kinds: string[];
1279
+ fact_kinds: string[];
1280
+ };
1281
+ derived_artifact_policy: {
1282
+ artifact_policy_variant: string;
1283
+ artifact_kinds: string[];
1284
+ fragment_protocol: "context.indexer.layer-fragment/v1";
1285
+ fragment_kind: "derived-artifact-proposal";
1286
+ };
1287
+ empty_result: {
1288
+ result_protocol: "context.indexer.layer-fragment-result/v1";
1289
+ behavior: "empty-fragment-set";
1290
+ };
1291
+ } | undefined;
1292
+ }[];
1293
+ source_roles: string[];
1294
+ profiles: string[];
1295
+ layer_fragments: {
1296
+ kind: string;
1297
+ phase: "pre-authority" | "post-author";
1298
+ produces: string;
1299
+ }[];
1300
+ tool_sources: {
1301
+ id: string;
1302
+ handler: string;
1303
+ operations: string[];
1304
+ optional: true;
1305
+ request: string;
1306
+ produces: "context.indexer.tool-snapshot/v1";
1307
+ }[];
1308
+ logical_units: {
1309
+ id: string;
1310
+ identity: string;
1311
+ supported_policy_variants: string[];
1312
+ recommended_artifacts: string[];
1313
+ }[];
1314
+ domains: string[];
1315
+ program_capabilities: string[];
1316
+ customization_capabilities: string[];
1317
+ capability_digest: string;
1318
+ };
1319
+ manifest_digest: string;
1320
+ provider_integrity: string;
1321
+ provider_layer_id: string;
1322
+ }[];
1323
+ operation_authorities: {
1324
+ operation: "main-index" | "material-answer";
1325
+ accepts_layer_fragments: string[];
1326
+ final_authority_layer_id: string;
1327
+ }[];
1328
+ isolated_configs: {
1329
+ config_digest: string;
1330
+ provider_layer_id: string;
1331
+ }[];
1332
+ composition_digest: string;
1333
+ }>;
1334
+ export type IndexerProviderCompositionPlan = z.infer<typeof indexerProviderCompositionPlanSchema>;
1335
+ export interface IndexerCompositionCustomizationInput {
1336
+ mode: "none" | "extend" | "replace";
1337
+ fingerprint: string;
1338
+ files: readonly {
1339
+ path: string;
1340
+ digest: string;
1341
+ capability: "instructions-append" | "template-override" | "program-extend";
1342
+ origin: {
1343
+ skill: string;
1344
+ version: string;
1345
+ profile: string;
1346
+ };
1347
+ }[];
1348
+ plan: IndexerCustomizationPlan;
1349
+ }
1350
+ export type { IndexerResolvedCompositionLayer } from "./indexerProviderProfileResolution.js";
1351
+ export declare function buildIndexerProviderCompositionPlan(input: {
1352
+ indexer: IndexerRegistryEntry;
1353
+ resolved_layers: readonly IndexerResolvedCompositionLayer[];
1354
+ profile_contract: IndexerProfileContract;
1355
+ customization: IndexerCompositionCustomizationInput;
1356
+ }): IndexerProviderCompositionPlan;
1357
+ export declare function validateIndexerProviderCompositionPlan(value: unknown): IndexerProviderCompositionPlan;