@c4a/context 0.6.19 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/codeIndexPlan.d.ts +34 -0
  4. package/docs/README.md +7 -0
  5. package/docs/README.zh-CN.md +5 -0
  6. package/docs/guides/code-indexer-skill-authoring.md +124 -0
  7. package/docs/guides/indexer-provider-and-customization.md +140 -0
  8. package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
  9. package/docs/reference/code-extractors.md +2 -2
  10. package/docs/reference/indexer-provider-protocol.md +819 -0
  11. package/docs/reference/project-api.md +2 -2
  12. package/index.d.ts +47 -1
  13. package/index.js +28239 -3952
  14. package/indexerAgentStepProtocol.d.ts +9391 -0
  15. package/indexerArtifactDependencies.d.ts +689 -0
  16. package/indexerArtifactPolicy.d.ts +335 -0
  17. package/indexerArtifactResult.d.ts +2010 -0
  18. package/indexerAuditFacts.d.ts +66 -0
  19. package/indexerAuditOverrideReadiness.d.ts +27 -0
  20. package/indexerAuditProtocol.d.ts +238 -0
  21. package/indexerAuditRevision.d.ts +726 -0
  22. package/indexerAuditRevisionActions.d.ts +236 -0
  23. package/indexerAuthoringFixture.d.ts +152 -0
  24. package/indexerBaseQuestionAmendment.d.ts +2403 -0
  25. package/indexerBenchmark.d.ts +1062 -0
  26. package/indexerCandidateCompile.d.ts +801 -0
  27. package/indexerCapabilityGroupEvidence.d.ts +129 -0
  28. package/indexerCatalogFallback.d.ts +1262 -0
  29. package/indexerCollectionMapping.d.ts +75 -0
  30. package/indexerContentLayers.d.ts +137 -0
  31. package/indexerControlledInvocation.d.ts +512 -0
  32. package/indexerControlledProgram.d.ts +12535 -0
  33. package/indexerCoreExports.d.ts +21 -0
  34. package/indexerCustomizationDraft.d.ts +13800 -0
  35. package/indexerCustomizationLadder.d.ts +103 -0
  36. package/indexerDependencyView.d.ts +1610 -0
  37. package/indexerEvidenceAdapterResult.d.ts +504 -0
  38. package/indexerExampleDecision.d.ts +1606 -0
  39. package/indexerExampleIdentity.d.ts +132 -0
  40. package/indexerExampleIdentityAudit.d.ts +70 -0
  41. package/indexerExampleLinkageAudit.d.ts +80 -0
  42. package/indexerGeneratedAuthoringAudit.d.ts +208 -0
  43. package/indexerIncrementalImpact.d.ts +221 -0
  44. package/indexerInventoryDisposition.d.ts +443 -0
  45. package/indexerLayerComposition.d.ts +1652 -0
  46. package/indexerLayoutChange.d.ts +329 -0
  47. package/indexerLayoutProposalSet.d.ts +447 -0
  48. package/indexerLayoutResolver.d.ts +342 -0
  49. package/indexerLayoutTransition.d.ts +247 -0
  50. package/indexerLifecycle.d.ts +53 -0
  51. package/indexerMainLifecycle.d.ts +258 -0
  52. package/indexerMainRunLedger.d.ts +888 -0
  53. package/indexerMainRunProtocol.d.ts +6471 -0
  54. package/indexerMainWorkset.d.ts +2141 -0
  55. package/indexerMaterialAnswer.d.ts +738 -0
  56. package/indexerMaterialAnswerActualization.d.ts +91 -0
  57. package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
  58. package/indexerMaterialAnswerFlow.d.ts +63 -0
  59. package/indexerMaterialAnswerLayout.d.ts +76 -0
  60. package/indexerMaterialAnswerReview.d.ts +217 -0
  61. package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
  62. package/indexerMaterialAnswerRunLedger.d.ts +918 -0
  63. package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
  64. package/indexerMaterialGapLedger.d.ts +3111 -0
  65. package/indexerMaterialQuestionExclusion.d.ts +129 -0
  66. package/indexerMaterialQuestionWorkset.d.ts +508 -0
  67. package/indexerNavigationArtifactGraph.d.ts +5 -0
  68. package/indexerNavigationArtifactPlan.d.ts +39 -0
  69. package/indexerOverlayQuestionAmendment.d.ts +2551 -0
  70. package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
  71. package/indexerOverlayTrust.d.ts +1425 -0
  72. package/indexerParserCoordinate.d.ts +222 -0
  73. package/indexerParserFactView.d.ts +503 -0
  74. package/indexerPartitionConvergence.d.ts +496 -0
  75. package/indexerPartitionPlan.d.ts +919 -0
  76. package/indexerPartitionStrategyResolution.d.ts +594 -0
  77. package/indexerPhysicalArtifactAudit.d.ts +247 -0
  78. package/indexerPhysicalArtifactManifest.d.ts +449 -0
  79. package/indexerPlannedMaterialAnswer.d.ts +116 -0
  80. package/indexerPostAuthorComposition.d.ts +2000 -0
  81. package/indexerPostAuthorRunLedger.d.ts +1972 -0
  82. package/indexerPrimaryProjection.d.ts +262 -0
  83. package/indexerProfileContract.d.ts +3034 -0
  84. package/indexerProfileMetricAudit.d.ts +218 -0
  85. package/indexerProgramExecutionAuthorization.d.ts +227 -0
  86. package/indexerProgramRunProtocol.d.ts +7642 -0
  87. package/indexerProjectProposal.d.ts +2807 -0
  88. package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
  89. package/indexerProjectedArtifactPlan.d.ts +217 -0
  90. package/indexerProtocolCommon.d.ts +29 -0
  91. package/indexerProvider.d.ts +2573 -0
  92. package/indexerProviderComposition.d.ts +1357 -0
  93. package/indexerProviderContractReferences.d.ts +13 -0
  94. package/indexerProviderProfileResolution.d.ts +20 -0
  95. package/indexerProviderResolution.d.ts +752 -0
  96. package/indexerProviderResolutionAction.d.ts +678 -0
  97. package/indexerProviderRouting.d.ts +3909 -0
  98. package/indexerProviderSelectionProposal.d.ts +3311 -0
  99. package/indexerQuestionAuthority.d.ts +419 -0
  100. package/indexerReaderTargetInventory.d.ts +161 -0
  101. package/indexerReferenceOnlyAudit.d.ts +90 -0
  102. package/indexerRegistry.d.ts +3019 -0
  103. package/indexerRequirementComparison.d.ts +44 -0
  104. package/indexerRequirementConfirmation.d.ts +1193 -0
  105. package/indexerRequirementLifecycle.d.ts +3314 -0
  106. package/indexerRestrictedSelector.d.ts +63 -0
  107. package/indexerResultReconciliation.d.ts +6844 -0
  108. package/indexerResultReconciliationRun.d.ts +15 -0
  109. package/indexerRunEnvelope.d.ts +384 -0
  110. package/indexerRunProtocolCommon.d.ts +21 -0
  111. package/indexerSharedArtifactFingerprint.d.ts +33 -0
  112. package/indexerStructuredDeclaration.d.ts +513 -0
  113. package/indexerSubjectCatalog.d.ts +230 -0
  114. package/indexerSubjectIdentity.d.ts +19 -0
  115. package/indexerSubjectKeyAuthority.d.ts +785 -0
  116. package/indexerTemplateRendering.d.ts +485 -0
  117. package/indexerToolSnapshot.d.ts +431 -0
  118. package/indexerWorksetRead.d.ts +287 -0
  119. package/package.json +1 -1
  120. package/phases.d.ts +1 -1
@@ -0,0 +1,431 @@
1
+ import { z } from "zod";
2
+ declare const toolSnapshotPageSchema: z.ZodObject<{
3
+ page_ref: z.ZodString;
4
+ cursor_in: z.ZodNullable<z.ZodString>;
5
+ cursor_out: z.ZodNullable<z.ZodString>;
6
+ item_count: z.ZodNumber;
7
+ response_digest: z.ZodString;
8
+ }, "strict", z.ZodTypeAny, {
9
+ page_ref: string;
10
+ cursor_in: string | null;
11
+ cursor_out: string | null;
12
+ item_count: number;
13
+ response_digest: string;
14
+ }, {
15
+ page_ref: string;
16
+ cursor_in: string | null;
17
+ cursor_out: string | null;
18
+ item_count: number;
19
+ response_digest: string;
20
+ }>;
21
+ export declare const indexerToolSnapshotSchema: z.ZodEffects<z.ZodObject<{
22
+ protocol: z.ZodLiteral<"context.indexer.tool-snapshot/v1">;
23
+ tool: z.ZodObject<{
24
+ id: z.ZodEffects<z.ZodString, string, string>;
25
+ version: z.ZodString;
26
+ implementation_digest: z.ZodString;
27
+ authority_ref: z.ZodString;
28
+ }, "strict", z.ZodTypeAny, {
29
+ id: string;
30
+ version: string;
31
+ implementation_digest: string;
32
+ authority_ref: string;
33
+ }, {
34
+ id: string;
35
+ version: string;
36
+ implementation_digest: string;
37
+ authority_ref: string;
38
+ }>;
39
+ source: z.ZodObject<{
40
+ source_ref: z.ZodString;
41
+ module_ref: z.ZodNullable<z.ZodString>;
42
+ input_digest: z.ZodString;
43
+ }, "strict", z.ZodTypeAny, {
44
+ source_ref: string;
45
+ module_ref: string | null;
46
+ input_digest: string;
47
+ }, {
48
+ source_ref: string;
49
+ module_ref: string | null;
50
+ input_digest: string;
51
+ }>;
52
+ resource: z.ZodObject<{
53
+ provider: z.ZodEffects<z.ZodString, string, string>;
54
+ kind: z.ZodEffects<z.ZodString, string, string>;
55
+ identity: z.ZodString;
56
+ endpoint_type: z.ZodEffects<z.ZodString, string, string>;
57
+ protocol: z.ZodEffects<z.ZodString, string, string>;
58
+ resolved_revision: z.ZodString;
59
+ }, "strict", z.ZodTypeAny, {
60
+ kind: string;
61
+ protocol: string;
62
+ provider: string;
63
+ identity: string;
64
+ endpoint_type: string;
65
+ resolved_revision: string;
66
+ }, {
67
+ kind: string;
68
+ protocol: string;
69
+ provider: string;
70
+ identity: string;
71
+ endpoint_type: string;
72
+ resolved_revision: string;
73
+ }>;
74
+ location: z.ZodObject<{
75
+ site: z.ZodString;
76
+ region: z.ZodNullable<z.ZodString>;
77
+ }, "strict", z.ZodTypeAny, {
78
+ site: string;
79
+ region: string | null;
80
+ }, {
81
+ site: string;
82
+ region: string | null;
83
+ }>;
84
+ query: z.ZodObject<{
85
+ operation: z.ZodEffects<z.ZodString, string, string>;
86
+ arguments_digest: z.ZodString;
87
+ }, "strict", z.ZodTypeAny, {
88
+ operation: string;
89
+ arguments_digest: string;
90
+ }, {
91
+ operation: string;
92
+ arguments_digest: string;
93
+ }>;
94
+ pages: z.ZodArray<z.ZodObject<{
95
+ page_ref: z.ZodString;
96
+ cursor_in: z.ZodNullable<z.ZodString>;
97
+ cursor_out: z.ZodNullable<z.ZodString>;
98
+ item_count: z.ZodNumber;
99
+ response_digest: z.ZodString;
100
+ }, "strict", z.ZodTypeAny, {
101
+ page_ref: string;
102
+ cursor_in: string | null;
103
+ cursor_out: string | null;
104
+ item_count: number;
105
+ response_digest: string;
106
+ }, {
107
+ page_ref: string;
108
+ cursor_in: string | null;
109
+ cursor_out: string | null;
110
+ item_count: number;
111
+ response_digest: string;
112
+ }>, "many">;
113
+ completion: z.ZodObject<{
114
+ state: z.ZodEnum<["complete", "partial"]>;
115
+ next_cursor: z.ZodNullable<z.ZodString>;
116
+ }, "strict", z.ZodTypeAny, {
117
+ state: "complete" | "partial";
118
+ next_cursor: string | null;
119
+ }, {
120
+ state: "complete" | "partial";
121
+ next_cursor: string | null;
122
+ }>;
123
+ observation: z.ZodObject<{
124
+ observed_at: z.ZodString;
125
+ response_digest: z.ZodString;
126
+ }, "strict", z.ZodTypeAny, {
127
+ response_digest: string;
128
+ observed_at: string;
129
+ }, {
130
+ response_digest: string;
131
+ observed_at: string;
132
+ }>;
133
+ snapshot_digest: z.ZodString;
134
+ }, "strict", z.ZodTypeAny, {
135
+ protocol: "context.indexer.tool-snapshot/v1";
136
+ source: {
137
+ source_ref: string;
138
+ module_ref: string | null;
139
+ input_digest: string;
140
+ };
141
+ pages: {
142
+ page_ref: string;
143
+ cursor_in: string | null;
144
+ cursor_out: string | null;
145
+ item_count: number;
146
+ response_digest: string;
147
+ }[];
148
+ tool: {
149
+ id: string;
150
+ version: string;
151
+ implementation_digest: string;
152
+ authority_ref: string;
153
+ };
154
+ resource: {
155
+ kind: string;
156
+ protocol: string;
157
+ provider: string;
158
+ identity: string;
159
+ endpoint_type: string;
160
+ resolved_revision: string;
161
+ };
162
+ location: {
163
+ site: string;
164
+ region: string | null;
165
+ };
166
+ query: {
167
+ operation: string;
168
+ arguments_digest: string;
169
+ };
170
+ completion: {
171
+ state: "complete" | "partial";
172
+ next_cursor: string | null;
173
+ };
174
+ observation: {
175
+ response_digest: string;
176
+ observed_at: string;
177
+ };
178
+ snapshot_digest: string;
179
+ }, {
180
+ protocol: "context.indexer.tool-snapshot/v1";
181
+ source: {
182
+ source_ref: string;
183
+ module_ref: string | null;
184
+ input_digest: string;
185
+ };
186
+ pages: {
187
+ page_ref: string;
188
+ cursor_in: string | null;
189
+ cursor_out: string | null;
190
+ item_count: number;
191
+ response_digest: string;
192
+ }[];
193
+ tool: {
194
+ id: string;
195
+ version: string;
196
+ implementation_digest: string;
197
+ authority_ref: string;
198
+ };
199
+ resource: {
200
+ kind: string;
201
+ protocol: string;
202
+ provider: string;
203
+ identity: string;
204
+ endpoint_type: string;
205
+ resolved_revision: string;
206
+ };
207
+ location: {
208
+ site: string;
209
+ region: string | null;
210
+ };
211
+ query: {
212
+ operation: string;
213
+ arguments_digest: string;
214
+ };
215
+ completion: {
216
+ state: "complete" | "partial";
217
+ next_cursor: string | null;
218
+ };
219
+ observation: {
220
+ response_digest: string;
221
+ observed_at: string;
222
+ };
223
+ snapshot_digest: string;
224
+ }>, {
225
+ protocol: "context.indexer.tool-snapshot/v1";
226
+ source: {
227
+ source_ref: string;
228
+ module_ref: string | null;
229
+ input_digest: string;
230
+ };
231
+ pages: {
232
+ page_ref: string;
233
+ cursor_in: string | null;
234
+ cursor_out: string | null;
235
+ item_count: number;
236
+ response_digest: string;
237
+ }[];
238
+ tool: {
239
+ id: string;
240
+ version: string;
241
+ implementation_digest: string;
242
+ authority_ref: string;
243
+ };
244
+ resource: {
245
+ kind: string;
246
+ protocol: string;
247
+ provider: string;
248
+ identity: string;
249
+ endpoint_type: string;
250
+ resolved_revision: string;
251
+ };
252
+ location: {
253
+ site: string;
254
+ region: string | null;
255
+ };
256
+ query: {
257
+ operation: string;
258
+ arguments_digest: string;
259
+ };
260
+ completion: {
261
+ state: "complete" | "partial";
262
+ next_cursor: string | null;
263
+ };
264
+ observation: {
265
+ response_digest: string;
266
+ observed_at: string;
267
+ };
268
+ snapshot_digest: string;
269
+ }, {
270
+ protocol: "context.indexer.tool-snapshot/v1";
271
+ source: {
272
+ source_ref: string;
273
+ module_ref: string | null;
274
+ input_digest: string;
275
+ };
276
+ pages: {
277
+ page_ref: string;
278
+ cursor_in: string | null;
279
+ cursor_out: string | null;
280
+ item_count: number;
281
+ response_digest: string;
282
+ }[];
283
+ tool: {
284
+ id: string;
285
+ version: string;
286
+ implementation_digest: string;
287
+ authority_ref: string;
288
+ };
289
+ resource: {
290
+ kind: string;
291
+ protocol: string;
292
+ provider: string;
293
+ identity: string;
294
+ endpoint_type: string;
295
+ resolved_revision: string;
296
+ };
297
+ location: {
298
+ site: string;
299
+ region: string | null;
300
+ };
301
+ query: {
302
+ operation: string;
303
+ arguments_digest: string;
304
+ };
305
+ completion: {
306
+ state: "complete" | "partial";
307
+ next_cursor: string | null;
308
+ };
309
+ observation: {
310
+ response_digest: string;
311
+ observed_at: string;
312
+ };
313
+ snapshot_digest: string;
314
+ }>;
315
+ export type IndexerToolSnapshot = z.infer<typeof indexerToolSnapshotSchema>;
316
+ export declare const indexerToolSnapshotReadReceiptSchema: z.ZodObject<{
317
+ protocol: z.ZodLiteral<"context.indexer.tool-snapshot-read-receipt/v1">;
318
+ handler: z.ZodString;
319
+ authority: z.ZodObject<{
320
+ ref: z.ZodString;
321
+ digest: z.ZodString;
322
+ }, "strict", z.ZodTypeAny, {
323
+ ref: string;
324
+ digest: string;
325
+ }, {
326
+ ref: string;
327
+ digest: string;
328
+ }>;
329
+ request: z.ZodObject<{
330
+ source_ref: z.ZodString;
331
+ module_ref: z.ZodNullable<z.ZodString>;
332
+ input_digest: z.ZodString;
333
+ request_digest: z.ZodString;
334
+ }, "strict", z.ZodTypeAny, {
335
+ source_ref: string;
336
+ module_ref: string | null;
337
+ input_digest: string;
338
+ request_digest: string;
339
+ }, {
340
+ source_ref: string;
341
+ module_ref: string | null;
342
+ input_digest: string;
343
+ request_digest: string;
344
+ }>;
345
+ output: z.ZodObject<{
346
+ snapshot_digest: z.ZodString;
347
+ response_digest: z.ZodString;
348
+ }, "strict", z.ZodTypeAny, {
349
+ response_digest: string;
350
+ snapshot_digest: string;
351
+ }, {
352
+ response_digest: string;
353
+ snapshot_digest: string;
354
+ }>;
355
+ receipt_digest: z.ZodString;
356
+ }, "strict", z.ZodTypeAny, {
357
+ protocol: "context.indexer.tool-snapshot-read-receipt/v1";
358
+ handler: string;
359
+ authority: {
360
+ ref: string;
361
+ digest: string;
362
+ };
363
+ output: {
364
+ response_digest: string;
365
+ snapshot_digest: string;
366
+ };
367
+ request: {
368
+ source_ref: string;
369
+ module_ref: string | null;
370
+ input_digest: string;
371
+ request_digest: string;
372
+ };
373
+ receipt_digest: string;
374
+ }, {
375
+ protocol: "context.indexer.tool-snapshot-read-receipt/v1";
376
+ handler: string;
377
+ authority: {
378
+ ref: string;
379
+ digest: string;
380
+ };
381
+ output: {
382
+ response_digest: string;
383
+ snapshot_digest: string;
384
+ };
385
+ request: {
386
+ source_ref: string;
387
+ module_ref: string | null;
388
+ input_digest: string;
389
+ request_digest: string;
390
+ };
391
+ receipt_digest: string;
392
+ }>;
393
+ export type IndexerToolSnapshotReadReceipt = z.infer<typeof indexerToolSnapshotReadReceiptSchema>;
394
+ export interface ExpectedIndexerToolSnapshotRead {
395
+ handler: string;
396
+ authority_ref: string;
397
+ authority_digest: string;
398
+ source_ref: string;
399
+ module_ref: string | null;
400
+ input_digest: string;
401
+ }
402
+ export declare function indexerToolSnapshotPageRef(input: {
403
+ resource_identity: string;
404
+ query_arguments_digest: string;
405
+ cursor_in: string | null;
406
+ response_digest: string;
407
+ }): string;
408
+ export declare function indexerToolSnapshotResponseDigest(pages: readonly Pick<z.infer<typeof toolSnapshotPageSchema>, "page_ref" | "item_count" | "response_digest">[]): string;
409
+ export declare function indexerToolSnapshotDigest(value: Omit<IndexerToolSnapshot, "snapshot_digest">): string;
410
+ export declare function indexerToolSnapshotReadRequestDigest(input: {
411
+ snapshot: IndexerToolSnapshot;
412
+ handler: string;
413
+ authority_ref: string;
414
+ authority_digest: string;
415
+ }): string;
416
+ export declare function indexerToolSnapshotReadReceiptDigest(value: Omit<IndexerToolSnapshotReadReceipt, "receipt_digest">): string;
417
+ export declare function buildIndexerToolSnapshotReadReceipt(input: {
418
+ snapshot: unknown;
419
+ handler: string;
420
+ authority_digest: string;
421
+ }): IndexerToolSnapshotReadReceipt;
422
+ export declare function validateIndexerToolSnapshot(value: unknown): IndexerToolSnapshot;
423
+ export declare function validateAuthorizedIndexerToolSnapshot(input: {
424
+ value: unknown;
425
+ receipt: unknown;
426
+ expected: ExpectedIndexerToolSnapshotRead;
427
+ }): {
428
+ snapshot: IndexerToolSnapshot;
429
+ receipt: IndexerToolSnapshotReadReceipt;
430
+ };
431
+ export {};
@@ -0,0 +1,287 @@
1
+ import { z } from "zod";
2
+ export type IndexerReadJson = null | boolean | number | string | IndexerReadJson[] | {
3
+ [key: string]: IndexerReadJson;
4
+ };
5
+ export declare const indexerWorksetReadRequestSchema: z.ZodEffects<z.ZodObject<{
6
+ protocol: z.ZodLiteral<"context.indexer.workset-read-request/v1">;
7
+ workset_digest: z.ZodString;
8
+ read_kind: z.ZodEnum<["source", "evidence"]>;
9
+ requested_refs: z.ZodArray<z.ZodString, "many">;
10
+ request_digest: z.ZodString;
11
+ transport: z.ZodObject<{
12
+ cursor: z.ZodOptional<z.ZodString>;
13
+ page_size: z.ZodNumber;
14
+ }, "strict", z.ZodTypeAny, {
15
+ page_size: number;
16
+ cursor?: string | undefined;
17
+ }, {
18
+ page_size: number;
19
+ cursor?: string | undefined;
20
+ }>;
21
+ }, "strict", z.ZodTypeAny, {
22
+ protocol: "context.indexer.workset-read-request/v1";
23
+ workset_digest: string;
24
+ request_digest: string;
25
+ transport: {
26
+ page_size: number;
27
+ cursor?: string | undefined;
28
+ };
29
+ read_kind: "source" | "evidence";
30
+ requested_refs: string[];
31
+ }, {
32
+ protocol: "context.indexer.workset-read-request/v1";
33
+ workset_digest: string;
34
+ request_digest: string;
35
+ transport: {
36
+ page_size: number;
37
+ cursor?: string | undefined;
38
+ };
39
+ read_kind: "source" | "evidence";
40
+ requested_refs: string[];
41
+ }>, {
42
+ protocol: "context.indexer.workset-read-request/v1";
43
+ workset_digest: string;
44
+ request_digest: string;
45
+ transport: {
46
+ page_size: number;
47
+ cursor?: string | undefined;
48
+ };
49
+ read_kind: "source" | "evidence";
50
+ requested_refs: string[];
51
+ }, {
52
+ protocol: "context.indexer.workset-read-request/v1";
53
+ workset_digest: string;
54
+ request_digest: string;
55
+ transport: {
56
+ page_size: number;
57
+ cursor?: string | undefined;
58
+ };
59
+ read_kind: "source" | "evidence";
60
+ requested_refs: string[];
61
+ }>;
62
+ export type IndexerWorksetReadRequest = z.infer<typeof indexerWorksetReadRequestSchema>;
63
+ type ReadRequestIdentity = Pick<IndexerWorksetReadRequest, "protocol" | "workset_digest" | "read_kind" | "requested_refs">;
64
+ export declare function indexerWorksetReadRequestDigest(value: ReadRequestIdentity): string;
65
+ export declare function buildIndexerWorksetReadRequest(input: {
66
+ workset_digest: string;
67
+ read_kind: IndexerWorksetReadRequest["read_kind"];
68
+ requested_refs: readonly string[];
69
+ allowed_refs: readonly string[];
70
+ cursor?: string;
71
+ page_size: number;
72
+ }): IndexerWorksetReadRequest;
73
+ export declare function validateIndexerWorksetReadRequest(input: {
74
+ request: unknown;
75
+ expected_workset_digest: string;
76
+ allowed_refs: readonly string[];
77
+ }): IndexerWorksetReadRequest;
78
+ declare const readItemPayloadSchema: z.ZodObject<{
79
+ ref: z.ZodString;
80
+ value: z.ZodType<IndexerReadJson, z.ZodTypeDef, IndexerReadJson>;
81
+ }, "strict", z.ZodTypeAny, {
82
+ ref: string;
83
+ value: IndexerReadJson;
84
+ }, {
85
+ ref: string;
86
+ value: IndexerReadJson;
87
+ }>;
88
+ export declare const indexerWorksetReadResponseSchema: z.ZodEffects<z.ZodObject<{
89
+ protocol: z.ZodLiteral<"context.indexer.workset-read-response/v1">;
90
+ request_digest: z.ZodString;
91
+ workset_digest: z.ZodString;
92
+ read_kind: z.ZodEnum<["source", "evidence"]>;
93
+ items: z.ZodArray<z.ZodObject<{
94
+ ref: z.ZodString;
95
+ value: z.ZodType<IndexerReadJson, z.ZodTypeDef, IndexerReadJson>;
96
+ } & {
97
+ item_digest: z.ZodString;
98
+ }, "strict", z.ZodTypeAny, {
99
+ ref: string;
100
+ value: IndexerReadJson;
101
+ item_digest: string;
102
+ }, {
103
+ ref: string;
104
+ value: IndexerReadJson;
105
+ item_digest: string;
106
+ }>, "many">;
107
+ page_payload_digest: z.ZodString;
108
+ transport: z.ZodObject<{
109
+ request_cursor: z.ZodOptional<z.ZodString>;
110
+ next_cursor: z.ZodOptional<z.ZodString>;
111
+ complete: z.ZodBoolean;
112
+ }, "strict", z.ZodTypeAny, {
113
+ complete: boolean;
114
+ next_cursor?: string | undefined;
115
+ request_cursor?: string | undefined;
116
+ }, {
117
+ complete: boolean;
118
+ next_cursor?: string | undefined;
119
+ request_cursor?: string | undefined;
120
+ }>;
121
+ }, "strict", z.ZodTypeAny, {
122
+ protocol: "context.indexer.workset-read-response/v1";
123
+ workset_digest: string;
124
+ request_digest: string;
125
+ transport: {
126
+ complete: boolean;
127
+ next_cursor?: string | undefined;
128
+ request_cursor?: string | undefined;
129
+ };
130
+ items: {
131
+ ref: string;
132
+ value: IndexerReadJson;
133
+ item_digest: string;
134
+ }[];
135
+ read_kind: "source" | "evidence";
136
+ page_payload_digest: string;
137
+ }, {
138
+ protocol: "context.indexer.workset-read-response/v1";
139
+ workset_digest: string;
140
+ request_digest: string;
141
+ transport: {
142
+ complete: boolean;
143
+ next_cursor?: string | undefined;
144
+ request_cursor?: string | undefined;
145
+ };
146
+ items: {
147
+ ref: string;
148
+ value: IndexerReadJson;
149
+ item_digest: string;
150
+ }[];
151
+ read_kind: "source" | "evidence";
152
+ page_payload_digest: string;
153
+ }>, {
154
+ protocol: "context.indexer.workset-read-response/v1";
155
+ workset_digest: string;
156
+ request_digest: string;
157
+ transport: {
158
+ complete: boolean;
159
+ next_cursor?: string | undefined;
160
+ request_cursor?: string | undefined;
161
+ };
162
+ items: {
163
+ ref: string;
164
+ value: IndexerReadJson;
165
+ item_digest: string;
166
+ }[];
167
+ read_kind: "source" | "evidence";
168
+ page_payload_digest: string;
169
+ }, {
170
+ protocol: "context.indexer.workset-read-response/v1";
171
+ workset_digest: string;
172
+ request_digest: string;
173
+ transport: {
174
+ complete: boolean;
175
+ next_cursor?: string | undefined;
176
+ request_cursor?: string | undefined;
177
+ };
178
+ items: {
179
+ ref: string;
180
+ value: IndexerReadJson;
181
+ item_digest: string;
182
+ }[];
183
+ read_kind: "source" | "evidence";
184
+ page_payload_digest: string;
185
+ }>;
186
+ export type IndexerWorksetReadResponse = z.infer<typeof indexerWorksetReadResponseSchema>;
187
+ type ReadItemPayload = z.infer<typeof readItemPayloadSchema>;
188
+ export declare function indexerWorksetReadItemDigest(value: ReadItemPayload): string;
189
+ type ReadPagePayload = Pick<IndexerWorksetReadResponse, "protocol" | "request_digest" | "workset_digest" | "read_kind" | "items">;
190
+ export declare function indexerWorksetReadPagePayloadDigest(value: ReadPagePayload): string;
191
+ export declare function buildIndexerWorksetReadResponse(input: {
192
+ request: IndexerWorksetReadRequest;
193
+ items: readonly ReadItemPayload[];
194
+ request_cursor?: string;
195
+ next_cursor?: string;
196
+ }): IndexerWorksetReadResponse;
197
+ export declare function validateIndexerWorksetReadResponse(input: {
198
+ response: unknown;
199
+ request: IndexerWorksetReadRequest;
200
+ }): IndexerWorksetReadResponse;
201
+ declare const readSetEntrySchema: z.ZodObject<{
202
+ ref: z.ZodString;
203
+ item_digest: z.ZodString;
204
+ }, "strict", z.ZodTypeAny, {
205
+ ref: string;
206
+ item_digest: string;
207
+ }, {
208
+ ref: string;
209
+ item_digest: string;
210
+ }>;
211
+ export declare const indexerWorksetReadReceiptSchema: z.ZodEffects<z.ZodObject<{
212
+ protocol: z.ZodLiteral<"context.indexer.workset-read-receipt/v1">;
213
+ workset_digest: z.ZodString;
214
+ request_digest: z.ZodString;
215
+ read_kind: z.ZodEnum<["source", "evidence"]>;
216
+ read_set: z.ZodArray<z.ZodObject<{
217
+ ref: z.ZodString;
218
+ item_digest: z.ZodString;
219
+ }, "strict", z.ZodTypeAny, {
220
+ ref: string;
221
+ item_digest: string;
222
+ }, {
223
+ ref: string;
224
+ item_digest: string;
225
+ }>, "many">;
226
+ read_set_digest: z.ZodString;
227
+ page_payload_digests: z.ZodArray<z.ZodString, "many">;
228
+ receipt_digest: z.ZodString;
229
+ }, "strict", z.ZodTypeAny, {
230
+ protocol: "context.indexer.workset-read-receipt/v1";
231
+ workset_digest: string;
232
+ request_digest: string;
233
+ receipt_digest: string;
234
+ read_kind: "source" | "evidence";
235
+ read_set: {
236
+ ref: string;
237
+ item_digest: string;
238
+ }[];
239
+ read_set_digest: string;
240
+ page_payload_digests: string[];
241
+ }, {
242
+ protocol: "context.indexer.workset-read-receipt/v1";
243
+ workset_digest: string;
244
+ request_digest: string;
245
+ receipt_digest: string;
246
+ read_kind: "source" | "evidence";
247
+ read_set: {
248
+ ref: string;
249
+ item_digest: string;
250
+ }[];
251
+ read_set_digest: string;
252
+ page_payload_digests: string[];
253
+ }>, {
254
+ protocol: "context.indexer.workset-read-receipt/v1";
255
+ workset_digest: string;
256
+ request_digest: string;
257
+ receipt_digest: string;
258
+ read_kind: "source" | "evidence";
259
+ read_set: {
260
+ ref: string;
261
+ item_digest: string;
262
+ }[];
263
+ read_set_digest: string;
264
+ page_payload_digests: string[];
265
+ }, {
266
+ protocol: "context.indexer.workset-read-receipt/v1";
267
+ workset_digest: string;
268
+ request_digest: string;
269
+ receipt_digest: string;
270
+ read_kind: "source" | "evidence";
271
+ read_set: {
272
+ ref: string;
273
+ item_digest: string;
274
+ }[];
275
+ read_set_digest: string;
276
+ page_payload_digests: string[];
277
+ }>;
278
+ export type IndexerWorksetReadReceipt = z.infer<typeof indexerWorksetReadReceiptSchema>;
279
+ type ReadReceiptPayload = Omit<IndexerWorksetReadReceipt, "receipt_digest">;
280
+ export declare function indexerWorksetReadSetDigest(value: readonly z.infer<typeof readSetEntrySchema>[]): string;
281
+ export declare function indexerWorksetReadReceiptDigest(value: ReadReceiptPayload): string;
282
+ export declare function buildIndexerWorksetReadReceipt(input: {
283
+ request: IndexerWorksetReadRequest;
284
+ responses: readonly unknown[];
285
+ }): IndexerWorksetReadReceipt;
286
+ export declare function validateIndexerWorksetReadReceipt(value: unknown): IndexerWorksetReadReceipt;
287
+ export {};