@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,888 @@
1
+ import { z } from "zod";
2
+ import { type IndexerMainWorksetStatus } from "./indexerMainLifecycle.js";
3
+ export declare const indexerMainRunLedgerEntrySchema: z.ZodUnion<[z.ZodObject<{
4
+ state: z.ZodLiteral<"pending">;
5
+ item_ref: z.ZodString;
6
+ run_identity_digest: z.ZodString;
7
+ workset_digest: z.ZodString;
8
+ execution_request_digest: z.ZodString;
9
+ stage: z.ZodEnum<["partition", "author"]>;
10
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
11
+ owner_cohort_ref: z.ZodString;
12
+ group_key: z.ZodOptional<z.ZodString>;
13
+ }, "strict", z.ZodTypeAny, {
14
+ workset_digest: string;
15
+ state: "pending";
16
+ indexer_id: string;
17
+ stage: "partition" | "author";
18
+ owner_cohort_ref: string;
19
+ execution_request_digest: string;
20
+ item_ref: string;
21
+ run_identity_digest: string;
22
+ group_key?: string | undefined;
23
+ }, {
24
+ workset_digest: string;
25
+ state: "pending";
26
+ indexer_id: string;
27
+ stage: "partition" | "author";
28
+ owner_cohort_ref: string;
29
+ execution_request_digest: string;
30
+ item_ref: string;
31
+ run_identity_digest: string;
32
+ group_key?: string | undefined;
33
+ }>, z.ZodObject<{
34
+ state: z.ZodLiteral<"running">;
35
+ item_ref: z.ZodString;
36
+ run_identity_digest: z.ZodString;
37
+ workset_digest: z.ZodString;
38
+ execution_request_digest: z.ZodString;
39
+ stage: z.ZodEnum<["partition", "author"]>;
40
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
41
+ owner_cohort_ref: z.ZodString;
42
+ group_key: z.ZodOptional<z.ZodString>;
43
+ }, "strict", z.ZodTypeAny, {
44
+ workset_digest: string;
45
+ state: "running";
46
+ indexer_id: string;
47
+ stage: "partition" | "author";
48
+ owner_cohort_ref: string;
49
+ execution_request_digest: string;
50
+ item_ref: string;
51
+ run_identity_digest: string;
52
+ group_key?: string | undefined;
53
+ }, {
54
+ workset_digest: string;
55
+ state: "running";
56
+ indexer_id: string;
57
+ stage: "partition" | "author";
58
+ owner_cohort_ref: string;
59
+ execution_request_digest: string;
60
+ item_ref: string;
61
+ run_identity_digest: string;
62
+ group_key?: string | undefined;
63
+ }>, z.ZodObject<{
64
+ state: z.ZodLiteral<"accepted">;
65
+ accepted_record: z.ZodObject<{
66
+ protocol: z.ZodLiteral<"context.indexer.main-accepted-result/v1">;
67
+ workset_digest: z.ZodString;
68
+ stage: z.ZodEnum<["partition", "author"]>;
69
+ execution_request_digest: z.ZodString;
70
+ result_digest: z.ZodString;
71
+ receipt_digest: z.ZodString;
72
+ run_envelope_digest: z.ZodString;
73
+ artifact_dependency_set_digest: z.ZodNullable<z.ZodString>;
74
+ acceptance_digest: z.ZodString;
75
+ }, "strict", z.ZodTypeAny, {
76
+ protocol: "context.indexer.main-accepted-result/v1";
77
+ workset_digest: string;
78
+ receipt_digest: string;
79
+ stage: "partition" | "author";
80
+ execution_request_digest: string;
81
+ result_digest: string;
82
+ run_envelope_digest: string;
83
+ artifact_dependency_set_digest: string | null;
84
+ acceptance_digest: string;
85
+ }, {
86
+ protocol: "context.indexer.main-accepted-result/v1";
87
+ workset_digest: string;
88
+ receipt_digest: string;
89
+ stage: "partition" | "author";
90
+ execution_request_digest: string;
91
+ result_digest: string;
92
+ run_envelope_digest: string;
93
+ artifact_dependency_set_digest: string | null;
94
+ acceptance_digest: string;
95
+ }>;
96
+ item_ref: z.ZodString;
97
+ run_identity_digest: z.ZodString;
98
+ workset_digest: z.ZodString;
99
+ execution_request_digest: z.ZodString;
100
+ stage: z.ZodEnum<["partition", "author"]>;
101
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
102
+ owner_cohort_ref: z.ZodString;
103
+ group_key: z.ZodOptional<z.ZodString>;
104
+ }, "strict", z.ZodTypeAny, {
105
+ workset_digest: string;
106
+ state: "accepted";
107
+ indexer_id: string;
108
+ stage: "partition" | "author";
109
+ owner_cohort_ref: string;
110
+ execution_request_digest: string;
111
+ item_ref: string;
112
+ accepted_record: {
113
+ protocol: "context.indexer.main-accepted-result/v1";
114
+ workset_digest: string;
115
+ receipt_digest: string;
116
+ stage: "partition" | "author";
117
+ execution_request_digest: string;
118
+ result_digest: string;
119
+ run_envelope_digest: string;
120
+ artifact_dependency_set_digest: string | null;
121
+ acceptance_digest: string;
122
+ };
123
+ run_identity_digest: string;
124
+ group_key?: string | undefined;
125
+ }, {
126
+ workset_digest: string;
127
+ state: "accepted";
128
+ indexer_id: string;
129
+ stage: "partition" | "author";
130
+ owner_cohort_ref: string;
131
+ execution_request_digest: string;
132
+ item_ref: string;
133
+ accepted_record: {
134
+ protocol: "context.indexer.main-accepted-result/v1";
135
+ workset_digest: string;
136
+ receipt_digest: string;
137
+ stage: "partition" | "author";
138
+ execution_request_digest: string;
139
+ result_digest: string;
140
+ run_envelope_digest: string;
141
+ artifact_dependency_set_digest: string | null;
142
+ acceptance_digest: string;
143
+ };
144
+ run_identity_digest: string;
145
+ group_key?: string | undefined;
146
+ }>, z.ZodEffects<z.ZodObject<{
147
+ state: z.ZodLiteral<"failed">;
148
+ reason_code: z.ZodEffects<z.ZodString, string, string>;
149
+ dependency_digests: z.ZodArray<z.ZodString, "many">;
150
+ item_ref: z.ZodString;
151
+ run_identity_digest: z.ZodString;
152
+ workset_digest: z.ZodString;
153
+ execution_request_digest: z.ZodString;
154
+ stage: z.ZodEnum<["partition", "author"]>;
155
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
156
+ owner_cohort_ref: z.ZodString;
157
+ group_key: z.ZodOptional<z.ZodString>;
158
+ }, "strict", z.ZodTypeAny, {
159
+ workset_digest: string;
160
+ state: "failed";
161
+ indexer_id: string;
162
+ stage: "partition" | "author";
163
+ owner_cohort_ref: string;
164
+ reason_code: string;
165
+ execution_request_digest: string;
166
+ item_ref: string;
167
+ dependency_digests: string[];
168
+ run_identity_digest: string;
169
+ group_key?: string | undefined;
170
+ }, {
171
+ workset_digest: string;
172
+ state: "failed";
173
+ indexer_id: string;
174
+ stage: "partition" | "author";
175
+ owner_cohort_ref: string;
176
+ reason_code: string;
177
+ execution_request_digest: string;
178
+ item_ref: string;
179
+ dependency_digests: string[];
180
+ run_identity_digest: string;
181
+ group_key?: string | undefined;
182
+ }>, {
183
+ workset_digest: string;
184
+ state: "failed";
185
+ indexer_id: string;
186
+ stage: "partition" | "author";
187
+ owner_cohort_ref: string;
188
+ reason_code: string;
189
+ execution_request_digest: string;
190
+ item_ref: string;
191
+ dependency_digests: string[];
192
+ run_identity_digest: string;
193
+ group_key?: string | undefined;
194
+ }, {
195
+ workset_digest: string;
196
+ state: "failed";
197
+ indexer_id: string;
198
+ stage: "partition" | "author";
199
+ owner_cohort_ref: string;
200
+ reason_code: string;
201
+ execution_request_digest: string;
202
+ item_ref: string;
203
+ dependency_digests: string[];
204
+ run_identity_digest: string;
205
+ group_key?: string | undefined;
206
+ }>, z.ZodObject<{
207
+ state: z.ZodLiteral<"stale">;
208
+ previous_workset_digest: z.ZodString;
209
+ previous_execution_request_digest: z.ZodString;
210
+ item_ref: z.ZodString;
211
+ run_identity_digest: z.ZodString;
212
+ workset_digest: z.ZodString;
213
+ execution_request_digest: z.ZodString;
214
+ stage: z.ZodEnum<["partition", "author"]>;
215
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
216
+ owner_cohort_ref: z.ZodString;
217
+ group_key: z.ZodOptional<z.ZodString>;
218
+ }, "strict", z.ZodTypeAny, {
219
+ workset_digest: string;
220
+ state: "stale";
221
+ indexer_id: string;
222
+ stage: "partition" | "author";
223
+ owner_cohort_ref: string;
224
+ execution_request_digest: string;
225
+ item_ref: string;
226
+ previous_workset_digest: string;
227
+ run_identity_digest: string;
228
+ previous_execution_request_digest: string;
229
+ group_key?: string | undefined;
230
+ }, {
231
+ workset_digest: string;
232
+ state: "stale";
233
+ indexer_id: string;
234
+ stage: "partition" | "author";
235
+ owner_cohort_ref: string;
236
+ execution_request_digest: string;
237
+ item_ref: string;
238
+ previous_workset_digest: string;
239
+ run_identity_digest: string;
240
+ previous_execution_request_digest: string;
241
+ group_key?: string | undefined;
242
+ }>]>;
243
+ export type IndexerMainRunLedgerEntry = z.infer<typeof indexerMainRunLedgerEntrySchema>;
244
+ export declare const indexerMainRunLedgerSchema: z.ZodEffects<z.ZodObject<{
245
+ protocol: z.ZodLiteral<"context.indexer.main-index-run-ledger/v1">;
246
+ workset_set: z.ZodObject<{
247
+ protocol: z.ZodLiteral<"context.indexer.main-workset-set/v1">;
248
+ workset_set_digest: z.ZodString;
249
+ items: z.ZodArray<z.ZodObject<{
250
+ workset_digest: z.ZodString;
251
+ stage: z.ZodEnum<["partition", "author"]>;
252
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
253
+ owner_cohort_ref: z.ZodString;
254
+ group_key: z.ZodOptional<z.ZodString>;
255
+ }, "strict", z.ZodTypeAny, {
256
+ workset_digest: string;
257
+ indexer_id: string;
258
+ stage: "partition" | "author";
259
+ owner_cohort_ref: string;
260
+ group_key?: string | undefined;
261
+ }, {
262
+ workset_digest: string;
263
+ indexer_id: string;
264
+ stage: "partition" | "author";
265
+ owner_cohort_ref: string;
266
+ group_key?: string | undefined;
267
+ }>, "many">;
268
+ }, "strict", z.ZodTypeAny, {
269
+ protocol: "context.indexer.main-workset-set/v1";
270
+ workset_set_digest: string;
271
+ items: {
272
+ workset_digest: string;
273
+ indexer_id: string;
274
+ stage: "partition" | "author";
275
+ owner_cohort_ref: string;
276
+ group_key?: string | undefined;
277
+ }[];
278
+ }, {
279
+ protocol: "context.indexer.main-workset-set/v1";
280
+ workset_set_digest: string;
281
+ items: {
282
+ workset_digest: string;
283
+ indexer_id: string;
284
+ stage: "partition" | "author";
285
+ owner_cohort_ref: string;
286
+ group_key?: string | undefined;
287
+ }[];
288
+ }>;
289
+ entries: z.ZodArray<z.ZodUnion<[z.ZodObject<{
290
+ state: z.ZodLiteral<"pending">;
291
+ item_ref: z.ZodString;
292
+ run_identity_digest: z.ZodString;
293
+ workset_digest: z.ZodString;
294
+ execution_request_digest: z.ZodString;
295
+ stage: z.ZodEnum<["partition", "author"]>;
296
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
297
+ owner_cohort_ref: z.ZodString;
298
+ group_key: z.ZodOptional<z.ZodString>;
299
+ }, "strict", z.ZodTypeAny, {
300
+ workset_digest: string;
301
+ state: "pending";
302
+ indexer_id: string;
303
+ stage: "partition" | "author";
304
+ owner_cohort_ref: string;
305
+ execution_request_digest: string;
306
+ item_ref: string;
307
+ run_identity_digest: string;
308
+ group_key?: string | undefined;
309
+ }, {
310
+ workset_digest: string;
311
+ state: "pending";
312
+ indexer_id: string;
313
+ stage: "partition" | "author";
314
+ owner_cohort_ref: string;
315
+ execution_request_digest: string;
316
+ item_ref: string;
317
+ run_identity_digest: string;
318
+ group_key?: string | undefined;
319
+ }>, z.ZodObject<{
320
+ state: z.ZodLiteral<"running">;
321
+ item_ref: z.ZodString;
322
+ run_identity_digest: z.ZodString;
323
+ workset_digest: z.ZodString;
324
+ execution_request_digest: z.ZodString;
325
+ stage: z.ZodEnum<["partition", "author"]>;
326
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
327
+ owner_cohort_ref: z.ZodString;
328
+ group_key: z.ZodOptional<z.ZodString>;
329
+ }, "strict", z.ZodTypeAny, {
330
+ workset_digest: string;
331
+ state: "running";
332
+ indexer_id: string;
333
+ stage: "partition" | "author";
334
+ owner_cohort_ref: string;
335
+ execution_request_digest: string;
336
+ item_ref: string;
337
+ run_identity_digest: string;
338
+ group_key?: string | undefined;
339
+ }, {
340
+ workset_digest: string;
341
+ state: "running";
342
+ indexer_id: string;
343
+ stage: "partition" | "author";
344
+ owner_cohort_ref: string;
345
+ execution_request_digest: string;
346
+ item_ref: string;
347
+ run_identity_digest: string;
348
+ group_key?: string | undefined;
349
+ }>, z.ZodObject<{
350
+ state: z.ZodLiteral<"accepted">;
351
+ accepted_record: z.ZodObject<{
352
+ protocol: z.ZodLiteral<"context.indexer.main-accepted-result/v1">;
353
+ workset_digest: z.ZodString;
354
+ stage: z.ZodEnum<["partition", "author"]>;
355
+ execution_request_digest: z.ZodString;
356
+ result_digest: z.ZodString;
357
+ receipt_digest: z.ZodString;
358
+ run_envelope_digest: z.ZodString;
359
+ artifact_dependency_set_digest: z.ZodNullable<z.ZodString>;
360
+ acceptance_digest: z.ZodString;
361
+ }, "strict", z.ZodTypeAny, {
362
+ protocol: "context.indexer.main-accepted-result/v1";
363
+ workset_digest: string;
364
+ receipt_digest: string;
365
+ stage: "partition" | "author";
366
+ execution_request_digest: string;
367
+ result_digest: string;
368
+ run_envelope_digest: string;
369
+ artifact_dependency_set_digest: string | null;
370
+ acceptance_digest: string;
371
+ }, {
372
+ protocol: "context.indexer.main-accepted-result/v1";
373
+ workset_digest: string;
374
+ receipt_digest: string;
375
+ stage: "partition" | "author";
376
+ execution_request_digest: string;
377
+ result_digest: string;
378
+ run_envelope_digest: string;
379
+ artifact_dependency_set_digest: string | null;
380
+ acceptance_digest: string;
381
+ }>;
382
+ item_ref: z.ZodString;
383
+ run_identity_digest: z.ZodString;
384
+ workset_digest: z.ZodString;
385
+ execution_request_digest: z.ZodString;
386
+ stage: z.ZodEnum<["partition", "author"]>;
387
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
388
+ owner_cohort_ref: z.ZodString;
389
+ group_key: z.ZodOptional<z.ZodString>;
390
+ }, "strict", z.ZodTypeAny, {
391
+ workset_digest: string;
392
+ state: "accepted";
393
+ indexer_id: string;
394
+ stage: "partition" | "author";
395
+ owner_cohort_ref: string;
396
+ execution_request_digest: string;
397
+ item_ref: string;
398
+ accepted_record: {
399
+ protocol: "context.indexer.main-accepted-result/v1";
400
+ workset_digest: string;
401
+ receipt_digest: string;
402
+ stage: "partition" | "author";
403
+ execution_request_digest: string;
404
+ result_digest: string;
405
+ run_envelope_digest: string;
406
+ artifact_dependency_set_digest: string | null;
407
+ acceptance_digest: string;
408
+ };
409
+ run_identity_digest: string;
410
+ group_key?: string | undefined;
411
+ }, {
412
+ workset_digest: string;
413
+ state: "accepted";
414
+ indexer_id: string;
415
+ stage: "partition" | "author";
416
+ owner_cohort_ref: string;
417
+ execution_request_digest: string;
418
+ item_ref: string;
419
+ accepted_record: {
420
+ protocol: "context.indexer.main-accepted-result/v1";
421
+ workset_digest: string;
422
+ receipt_digest: string;
423
+ stage: "partition" | "author";
424
+ execution_request_digest: string;
425
+ result_digest: string;
426
+ run_envelope_digest: string;
427
+ artifact_dependency_set_digest: string | null;
428
+ acceptance_digest: string;
429
+ };
430
+ run_identity_digest: string;
431
+ group_key?: string | undefined;
432
+ }>, z.ZodEffects<z.ZodObject<{
433
+ state: z.ZodLiteral<"failed">;
434
+ reason_code: z.ZodEffects<z.ZodString, string, string>;
435
+ dependency_digests: z.ZodArray<z.ZodString, "many">;
436
+ item_ref: z.ZodString;
437
+ run_identity_digest: z.ZodString;
438
+ workset_digest: z.ZodString;
439
+ execution_request_digest: z.ZodString;
440
+ stage: z.ZodEnum<["partition", "author"]>;
441
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
442
+ owner_cohort_ref: z.ZodString;
443
+ group_key: z.ZodOptional<z.ZodString>;
444
+ }, "strict", z.ZodTypeAny, {
445
+ workset_digest: string;
446
+ state: "failed";
447
+ indexer_id: string;
448
+ stage: "partition" | "author";
449
+ owner_cohort_ref: string;
450
+ reason_code: string;
451
+ execution_request_digest: string;
452
+ item_ref: string;
453
+ dependency_digests: string[];
454
+ run_identity_digest: string;
455
+ group_key?: string | undefined;
456
+ }, {
457
+ workset_digest: string;
458
+ state: "failed";
459
+ indexer_id: string;
460
+ stage: "partition" | "author";
461
+ owner_cohort_ref: string;
462
+ reason_code: string;
463
+ execution_request_digest: string;
464
+ item_ref: string;
465
+ dependency_digests: string[];
466
+ run_identity_digest: string;
467
+ group_key?: string | undefined;
468
+ }>, {
469
+ workset_digest: string;
470
+ state: "failed";
471
+ indexer_id: string;
472
+ stage: "partition" | "author";
473
+ owner_cohort_ref: string;
474
+ reason_code: string;
475
+ execution_request_digest: string;
476
+ item_ref: string;
477
+ dependency_digests: string[];
478
+ run_identity_digest: string;
479
+ group_key?: string | undefined;
480
+ }, {
481
+ workset_digest: string;
482
+ state: "failed";
483
+ indexer_id: string;
484
+ stage: "partition" | "author";
485
+ owner_cohort_ref: string;
486
+ reason_code: string;
487
+ execution_request_digest: string;
488
+ item_ref: string;
489
+ dependency_digests: string[];
490
+ run_identity_digest: string;
491
+ group_key?: string | undefined;
492
+ }>, z.ZodObject<{
493
+ state: z.ZodLiteral<"stale">;
494
+ previous_workset_digest: z.ZodString;
495
+ previous_execution_request_digest: z.ZodString;
496
+ item_ref: z.ZodString;
497
+ run_identity_digest: z.ZodString;
498
+ workset_digest: z.ZodString;
499
+ execution_request_digest: z.ZodString;
500
+ stage: z.ZodEnum<["partition", "author"]>;
501
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
502
+ owner_cohort_ref: z.ZodString;
503
+ group_key: z.ZodOptional<z.ZodString>;
504
+ }, "strict", z.ZodTypeAny, {
505
+ workset_digest: string;
506
+ state: "stale";
507
+ indexer_id: string;
508
+ stage: "partition" | "author";
509
+ owner_cohort_ref: string;
510
+ execution_request_digest: string;
511
+ item_ref: string;
512
+ previous_workset_digest: string;
513
+ run_identity_digest: string;
514
+ previous_execution_request_digest: string;
515
+ group_key?: string | undefined;
516
+ }, {
517
+ workset_digest: string;
518
+ state: "stale";
519
+ indexer_id: string;
520
+ stage: "partition" | "author";
521
+ owner_cohort_ref: string;
522
+ execution_request_digest: string;
523
+ item_ref: string;
524
+ previous_workset_digest: string;
525
+ run_identity_digest: string;
526
+ previous_execution_request_digest: string;
527
+ group_key?: string | undefined;
528
+ }>]>, "many">;
529
+ ledger_digest: z.ZodString;
530
+ }, "strict", z.ZodTypeAny, {
531
+ entries: ({
532
+ workset_digest: string;
533
+ state: "pending";
534
+ indexer_id: string;
535
+ stage: "partition" | "author";
536
+ owner_cohort_ref: string;
537
+ execution_request_digest: string;
538
+ item_ref: string;
539
+ run_identity_digest: string;
540
+ group_key?: string | undefined;
541
+ } | {
542
+ workset_digest: string;
543
+ state: "running";
544
+ indexer_id: string;
545
+ stage: "partition" | "author";
546
+ owner_cohort_ref: string;
547
+ execution_request_digest: string;
548
+ item_ref: string;
549
+ run_identity_digest: string;
550
+ group_key?: string | undefined;
551
+ } | {
552
+ workset_digest: string;
553
+ state: "accepted";
554
+ indexer_id: string;
555
+ stage: "partition" | "author";
556
+ owner_cohort_ref: string;
557
+ execution_request_digest: string;
558
+ item_ref: string;
559
+ accepted_record: {
560
+ protocol: "context.indexer.main-accepted-result/v1";
561
+ workset_digest: string;
562
+ receipt_digest: string;
563
+ stage: "partition" | "author";
564
+ execution_request_digest: string;
565
+ result_digest: string;
566
+ run_envelope_digest: string;
567
+ artifact_dependency_set_digest: string | null;
568
+ acceptance_digest: string;
569
+ };
570
+ run_identity_digest: string;
571
+ group_key?: string | undefined;
572
+ } | {
573
+ workset_digest: string;
574
+ state: "failed";
575
+ indexer_id: string;
576
+ stage: "partition" | "author";
577
+ owner_cohort_ref: string;
578
+ reason_code: string;
579
+ execution_request_digest: string;
580
+ item_ref: string;
581
+ dependency_digests: string[];
582
+ run_identity_digest: string;
583
+ group_key?: string | undefined;
584
+ } | {
585
+ workset_digest: string;
586
+ state: "stale";
587
+ indexer_id: string;
588
+ stage: "partition" | "author";
589
+ owner_cohort_ref: string;
590
+ execution_request_digest: string;
591
+ item_ref: string;
592
+ previous_workset_digest: string;
593
+ run_identity_digest: string;
594
+ previous_execution_request_digest: string;
595
+ group_key?: string | undefined;
596
+ })[];
597
+ protocol: "context.indexer.main-index-run-ledger/v1";
598
+ ledger_digest: string;
599
+ workset_set: {
600
+ protocol: "context.indexer.main-workset-set/v1";
601
+ workset_set_digest: string;
602
+ items: {
603
+ workset_digest: string;
604
+ indexer_id: string;
605
+ stage: "partition" | "author";
606
+ owner_cohort_ref: string;
607
+ group_key?: string | undefined;
608
+ }[];
609
+ };
610
+ }, {
611
+ entries: ({
612
+ workset_digest: string;
613
+ state: "pending";
614
+ indexer_id: string;
615
+ stage: "partition" | "author";
616
+ owner_cohort_ref: string;
617
+ execution_request_digest: string;
618
+ item_ref: string;
619
+ run_identity_digest: string;
620
+ group_key?: string | undefined;
621
+ } | {
622
+ workset_digest: string;
623
+ state: "running";
624
+ indexer_id: string;
625
+ stage: "partition" | "author";
626
+ owner_cohort_ref: string;
627
+ execution_request_digest: string;
628
+ item_ref: string;
629
+ run_identity_digest: string;
630
+ group_key?: string | undefined;
631
+ } | {
632
+ workset_digest: string;
633
+ state: "accepted";
634
+ indexer_id: string;
635
+ stage: "partition" | "author";
636
+ owner_cohort_ref: string;
637
+ execution_request_digest: string;
638
+ item_ref: string;
639
+ accepted_record: {
640
+ protocol: "context.indexer.main-accepted-result/v1";
641
+ workset_digest: string;
642
+ receipt_digest: string;
643
+ stage: "partition" | "author";
644
+ execution_request_digest: string;
645
+ result_digest: string;
646
+ run_envelope_digest: string;
647
+ artifact_dependency_set_digest: string | null;
648
+ acceptance_digest: string;
649
+ };
650
+ run_identity_digest: string;
651
+ group_key?: string | undefined;
652
+ } | {
653
+ workset_digest: string;
654
+ state: "failed";
655
+ indexer_id: string;
656
+ stage: "partition" | "author";
657
+ owner_cohort_ref: string;
658
+ reason_code: string;
659
+ execution_request_digest: string;
660
+ item_ref: string;
661
+ dependency_digests: string[];
662
+ run_identity_digest: string;
663
+ group_key?: string | undefined;
664
+ } | {
665
+ workset_digest: string;
666
+ state: "stale";
667
+ indexer_id: string;
668
+ stage: "partition" | "author";
669
+ owner_cohort_ref: string;
670
+ execution_request_digest: string;
671
+ item_ref: string;
672
+ previous_workset_digest: string;
673
+ run_identity_digest: string;
674
+ previous_execution_request_digest: string;
675
+ group_key?: string | undefined;
676
+ })[];
677
+ protocol: "context.indexer.main-index-run-ledger/v1";
678
+ ledger_digest: string;
679
+ workset_set: {
680
+ protocol: "context.indexer.main-workset-set/v1";
681
+ workset_set_digest: string;
682
+ items: {
683
+ workset_digest: string;
684
+ indexer_id: string;
685
+ stage: "partition" | "author";
686
+ owner_cohort_ref: string;
687
+ group_key?: string | undefined;
688
+ }[];
689
+ };
690
+ }>, {
691
+ entries: ({
692
+ workset_digest: string;
693
+ state: "pending";
694
+ indexer_id: string;
695
+ stage: "partition" | "author";
696
+ owner_cohort_ref: string;
697
+ execution_request_digest: string;
698
+ item_ref: string;
699
+ run_identity_digest: string;
700
+ group_key?: string | undefined;
701
+ } | {
702
+ workset_digest: string;
703
+ state: "running";
704
+ indexer_id: string;
705
+ stage: "partition" | "author";
706
+ owner_cohort_ref: string;
707
+ execution_request_digest: string;
708
+ item_ref: string;
709
+ run_identity_digest: string;
710
+ group_key?: string | undefined;
711
+ } | {
712
+ workset_digest: string;
713
+ state: "accepted";
714
+ indexer_id: string;
715
+ stage: "partition" | "author";
716
+ owner_cohort_ref: string;
717
+ execution_request_digest: string;
718
+ item_ref: string;
719
+ accepted_record: {
720
+ protocol: "context.indexer.main-accepted-result/v1";
721
+ workset_digest: string;
722
+ receipt_digest: string;
723
+ stage: "partition" | "author";
724
+ execution_request_digest: string;
725
+ result_digest: string;
726
+ run_envelope_digest: string;
727
+ artifact_dependency_set_digest: string | null;
728
+ acceptance_digest: string;
729
+ };
730
+ run_identity_digest: string;
731
+ group_key?: string | undefined;
732
+ } | {
733
+ workset_digest: string;
734
+ state: "failed";
735
+ indexer_id: string;
736
+ stage: "partition" | "author";
737
+ owner_cohort_ref: string;
738
+ reason_code: string;
739
+ execution_request_digest: string;
740
+ item_ref: string;
741
+ dependency_digests: string[];
742
+ run_identity_digest: string;
743
+ group_key?: string | undefined;
744
+ } | {
745
+ workset_digest: string;
746
+ state: "stale";
747
+ indexer_id: string;
748
+ stage: "partition" | "author";
749
+ owner_cohort_ref: string;
750
+ execution_request_digest: string;
751
+ item_ref: string;
752
+ previous_workset_digest: string;
753
+ run_identity_digest: string;
754
+ previous_execution_request_digest: string;
755
+ group_key?: string | undefined;
756
+ })[];
757
+ protocol: "context.indexer.main-index-run-ledger/v1";
758
+ ledger_digest: string;
759
+ workset_set: {
760
+ protocol: "context.indexer.main-workset-set/v1";
761
+ workset_set_digest: string;
762
+ items: {
763
+ workset_digest: string;
764
+ indexer_id: string;
765
+ stage: "partition" | "author";
766
+ owner_cohort_ref: string;
767
+ group_key?: string | undefined;
768
+ }[];
769
+ };
770
+ }, {
771
+ entries: ({
772
+ workset_digest: string;
773
+ state: "pending";
774
+ indexer_id: string;
775
+ stage: "partition" | "author";
776
+ owner_cohort_ref: string;
777
+ execution_request_digest: string;
778
+ item_ref: string;
779
+ run_identity_digest: string;
780
+ group_key?: string | undefined;
781
+ } | {
782
+ workset_digest: string;
783
+ state: "running";
784
+ indexer_id: string;
785
+ stage: "partition" | "author";
786
+ owner_cohort_ref: string;
787
+ execution_request_digest: string;
788
+ item_ref: string;
789
+ run_identity_digest: string;
790
+ group_key?: string | undefined;
791
+ } | {
792
+ workset_digest: string;
793
+ state: "accepted";
794
+ indexer_id: string;
795
+ stage: "partition" | "author";
796
+ owner_cohort_ref: string;
797
+ execution_request_digest: string;
798
+ item_ref: string;
799
+ accepted_record: {
800
+ protocol: "context.indexer.main-accepted-result/v1";
801
+ workset_digest: string;
802
+ receipt_digest: string;
803
+ stage: "partition" | "author";
804
+ execution_request_digest: string;
805
+ result_digest: string;
806
+ run_envelope_digest: string;
807
+ artifact_dependency_set_digest: string | null;
808
+ acceptance_digest: string;
809
+ };
810
+ run_identity_digest: string;
811
+ group_key?: string | undefined;
812
+ } | {
813
+ workset_digest: string;
814
+ state: "failed";
815
+ indexer_id: string;
816
+ stage: "partition" | "author";
817
+ owner_cohort_ref: string;
818
+ reason_code: string;
819
+ execution_request_digest: string;
820
+ item_ref: string;
821
+ dependency_digests: string[];
822
+ run_identity_digest: string;
823
+ group_key?: string | undefined;
824
+ } | {
825
+ workset_digest: string;
826
+ state: "stale";
827
+ indexer_id: string;
828
+ stage: "partition" | "author";
829
+ owner_cohort_ref: string;
830
+ execution_request_digest: string;
831
+ item_ref: string;
832
+ previous_workset_digest: string;
833
+ run_identity_digest: string;
834
+ previous_execution_request_digest: string;
835
+ group_key?: string | undefined;
836
+ })[];
837
+ protocol: "context.indexer.main-index-run-ledger/v1";
838
+ ledger_digest: string;
839
+ workset_set: {
840
+ protocol: "context.indexer.main-workset-set/v1";
841
+ workset_set_digest: string;
842
+ items: {
843
+ workset_digest: string;
844
+ indexer_id: string;
845
+ stage: "partition" | "author";
846
+ owner_cohort_ref: string;
847
+ group_key?: string | undefined;
848
+ }[];
849
+ };
850
+ }>;
851
+ export type IndexerMainRunLedger = z.infer<typeof indexerMainRunLedgerSchema>;
852
+ export interface IndexerMainRunIdentity {
853
+ workset_digest: string;
854
+ execution_request_digest: string;
855
+ }
856
+ export declare function indexerMainRunIdentityDigest(input: IndexerMainRunIdentity): string;
857
+ export declare function validateIndexerMainRunLedger(value: unknown): IndexerMainRunLedger;
858
+ export declare function initializeIndexerMainRunLedger(input: {
859
+ workset_set: unknown;
860
+ run_identities: readonly IndexerMainRunIdentity[];
861
+ }): IndexerMainRunLedger;
862
+ export declare function recoverIndexerMainRunLedger(input: {
863
+ workset_set: unknown;
864
+ run_identities: readonly IndexerMainRunIdentity[];
865
+ previous_ledger?: unknown;
866
+ accepted_records?: readonly unknown[];
867
+ }): IndexerMainRunLedger;
868
+ export declare function startIndexerMainRun(input: {
869
+ ledger: unknown;
870
+ workset_digest: string;
871
+ }): IndexerMainRunLedger;
872
+ export declare function acceptIndexerMainRun(input: {
873
+ ledger: unknown;
874
+ accepted_record: unknown;
875
+ }): IndexerMainRunLedger;
876
+ export declare function retryIndexerMainPartitionRun(input: {
877
+ ledger: unknown;
878
+ workset_digest: string;
879
+ previous_execution_request_digest: string;
880
+ next_execution_request_digest: string;
881
+ }): IndexerMainRunLedger;
882
+ export declare function failIndexerMainRun(input: {
883
+ ledger: unknown;
884
+ workset_digest: string;
885
+ reason_code: string;
886
+ dependency_digests: readonly string[];
887
+ }): IndexerMainRunLedger;
888
+ export declare function observeIndexerMainRunLedger(value: unknown): IndexerMainWorksetStatus;