@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.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/codeIndexPlan.d.ts +34 -0
- package/docs/README.md +7 -0
- package/docs/README.zh-CN.md +5 -0
- package/docs/guides/code-indexer-skill-authoring.md +124 -0
- package/docs/guides/indexer-provider-and-customization.md +140 -0
- package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
- package/docs/reference/code-extractors.md +2 -2
- package/docs/reference/indexer-provider-protocol.md +819 -0
- package/docs/reference/project-api.md +2 -2
- package/index.d.ts +47 -1
- package/index.js +28239 -3952
- package/indexerAgentStepProtocol.d.ts +9391 -0
- package/indexerArtifactDependencies.d.ts +689 -0
- package/indexerArtifactPolicy.d.ts +335 -0
- package/indexerArtifactResult.d.ts +2010 -0
- package/indexerAuditFacts.d.ts +66 -0
- package/indexerAuditOverrideReadiness.d.ts +27 -0
- package/indexerAuditProtocol.d.ts +238 -0
- package/indexerAuditRevision.d.ts +726 -0
- package/indexerAuditRevisionActions.d.ts +236 -0
- package/indexerAuthoringFixture.d.ts +152 -0
- package/indexerBaseQuestionAmendment.d.ts +2403 -0
- package/indexerBenchmark.d.ts +1062 -0
- package/indexerCandidateCompile.d.ts +801 -0
- package/indexerCapabilityGroupEvidence.d.ts +129 -0
- package/indexerCatalogFallback.d.ts +1262 -0
- package/indexerCollectionMapping.d.ts +75 -0
- package/indexerContentLayers.d.ts +137 -0
- package/indexerControlledInvocation.d.ts +512 -0
- package/indexerControlledProgram.d.ts +12535 -0
- package/indexerCoreExports.d.ts +21 -0
- package/indexerCustomizationDraft.d.ts +13800 -0
- package/indexerCustomizationLadder.d.ts +103 -0
- package/indexerDependencyView.d.ts +1610 -0
- package/indexerEvidenceAdapterResult.d.ts +504 -0
- package/indexerExampleDecision.d.ts +1606 -0
- package/indexerExampleIdentity.d.ts +132 -0
- package/indexerExampleIdentityAudit.d.ts +70 -0
- package/indexerExampleLinkageAudit.d.ts +80 -0
- package/indexerGeneratedAuthoringAudit.d.ts +208 -0
- package/indexerIncrementalImpact.d.ts +221 -0
- package/indexerInventoryDisposition.d.ts +443 -0
- package/indexerLayerComposition.d.ts +1652 -0
- package/indexerLayoutChange.d.ts +329 -0
- package/indexerLayoutProposalSet.d.ts +447 -0
- package/indexerLayoutResolver.d.ts +342 -0
- package/indexerLayoutTransition.d.ts +247 -0
- package/indexerLifecycle.d.ts +53 -0
- package/indexerMainLifecycle.d.ts +258 -0
- package/indexerMainRunLedger.d.ts +888 -0
- package/indexerMainRunProtocol.d.ts +6471 -0
- package/indexerMainWorkset.d.ts +2141 -0
- package/indexerMaterialAnswer.d.ts +738 -0
- package/indexerMaterialAnswerActualization.d.ts +91 -0
- package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
- package/indexerMaterialAnswerFlow.d.ts +63 -0
- package/indexerMaterialAnswerLayout.d.ts +76 -0
- package/indexerMaterialAnswerReview.d.ts +217 -0
- package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
- package/indexerMaterialAnswerRunLedger.d.ts +918 -0
- package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
- package/indexerMaterialGapLedger.d.ts +3111 -0
- package/indexerMaterialQuestionExclusion.d.ts +129 -0
- package/indexerMaterialQuestionWorkset.d.ts +508 -0
- package/indexerNavigationArtifactGraph.d.ts +5 -0
- package/indexerNavigationArtifactPlan.d.ts +39 -0
- package/indexerOverlayQuestionAmendment.d.ts +2551 -0
- package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
- package/indexerOverlayTrust.d.ts +1425 -0
- package/indexerParserCoordinate.d.ts +222 -0
- package/indexerParserFactView.d.ts +503 -0
- package/indexerPartitionConvergence.d.ts +496 -0
- package/indexerPartitionPlan.d.ts +919 -0
- package/indexerPartitionStrategyResolution.d.ts +594 -0
- package/indexerPhysicalArtifactAudit.d.ts +247 -0
- package/indexerPhysicalArtifactManifest.d.ts +449 -0
- package/indexerPlannedMaterialAnswer.d.ts +116 -0
- package/indexerPostAuthorComposition.d.ts +2000 -0
- package/indexerPostAuthorRunLedger.d.ts +1972 -0
- package/indexerPrimaryProjection.d.ts +262 -0
- package/indexerProfileContract.d.ts +3034 -0
- package/indexerProfileMetricAudit.d.ts +218 -0
- package/indexerProgramExecutionAuthorization.d.ts +227 -0
- package/indexerProgramRunProtocol.d.ts +7642 -0
- package/indexerProjectProposal.d.ts +2807 -0
- package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
- package/indexerProjectedArtifactPlan.d.ts +217 -0
- package/indexerProtocolCommon.d.ts +29 -0
- package/indexerProvider.d.ts +2573 -0
- package/indexerProviderComposition.d.ts +1357 -0
- package/indexerProviderContractReferences.d.ts +13 -0
- package/indexerProviderProfileResolution.d.ts +20 -0
- package/indexerProviderResolution.d.ts +752 -0
- package/indexerProviderResolutionAction.d.ts +678 -0
- package/indexerProviderRouting.d.ts +3909 -0
- package/indexerProviderSelectionProposal.d.ts +3311 -0
- package/indexerQuestionAuthority.d.ts +419 -0
- package/indexerReaderTargetInventory.d.ts +161 -0
- package/indexerReferenceOnlyAudit.d.ts +90 -0
- package/indexerRegistry.d.ts +3019 -0
- package/indexerRequirementComparison.d.ts +44 -0
- package/indexerRequirementConfirmation.d.ts +1193 -0
- package/indexerRequirementLifecycle.d.ts +3314 -0
- package/indexerRestrictedSelector.d.ts +63 -0
- package/indexerResultReconciliation.d.ts +6844 -0
- package/indexerResultReconciliationRun.d.ts +15 -0
- package/indexerRunEnvelope.d.ts +384 -0
- package/indexerRunProtocolCommon.d.ts +21 -0
- package/indexerSharedArtifactFingerprint.d.ts +33 -0
- package/indexerStructuredDeclaration.d.ts +513 -0
- package/indexerSubjectCatalog.d.ts +230 -0
- package/indexerSubjectIdentity.d.ts +19 -0
- package/indexerSubjectKeyAuthority.d.ts +785 -0
- package/indexerTemplateRendering.d.ts +485 -0
- package/indexerToolSnapshot.d.ts +431 -0
- package/indexerWorksetRead.d.ts +287 -0
- package/package.json +1 -1
- package/phases.d.ts +1 -1
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { buildIndexerMainWorkset, type IndexerMainAuthorWorkset, type IndexerMainPartitionWorkset, type IndexerMainWorksetSet, type IndexerTargetResolutionView } from "./indexerMainWorkset.js";
|
|
3
|
+
import { validateIndexerMainRunResult, type IndexerMainRunRequest, type IndexerMainRunResult } from "./indexerMainRunProtocol.js";
|
|
4
|
+
import { type IndexerPartitionPlan, type IndexerPartitionStrategy } from "./indexerPartitionPlan.js";
|
|
5
|
+
import { type IndexerInventoryMember } from "./indexerInventoryDisposition.js";
|
|
6
|
+
import { type IndexerPartitionSubject } from "./indexerSubjectCatalog.js";
|
|
7
|
+
export interface IndexerPartitionValidationInput {
|
|
8
|
+
plan: unknown;
|
|
9
|
+
workset: IndexerMainPartitionWorkset;
|
|
10
|
+
canonical_inventory_members: readonly IndexerInventoryMember[];
|
|
11
|
+
authorized_source_refs: readonly string[];
|
|
12
|
+
authorized_strategies: readonly {
|
|
13
|
+
strategy_ref: IndexerPartitionStrategy;
|
|
14
|
+
strategy_digest: string;
|
|
15
|
+
}[];
|
|
16
|
+
required_question_target_refs?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function validateIndexerPartitionInputs(inputs: readonly IndexerPartitionValidationInput[]): Array<{
|
|
19
|
+
workset: IndexerMainPartitionWorkset;
|
|
20
|
+
plan: IndexerPartitionPlan;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function indexerPartitionGroupRef(input: {
|
|
23
|
+
partition_workset_digest: string;
|
|
24
|
+
group_key: string;
|
|
25
|
+
}): string;
|
|
26
|
+
export declare function projectIndexerPartitionSubjects(inputs: readonly IndexerPartitionValidationInput[]): IndexerPartitionSubject[];
|
|
27
|
+
type PartitionWorksetInput = Parameters<typeof buildIndexerMainWorkset>[0] & {
|
|
28
|
+
stage: "partition";
|
|
29
|
+
};
|
|
30
|
+
export declare function buildIndexerMainPartitionWorksets(inputs: readonly PartitionWorksetInput[]): {
|
|
31
|
+
worksets: IndexerMainPartitionWorkset[];
|
|
32
|
+
workset_set: IndexerMainWorksetSet;
|
|
33
|
+
};
|
|
34
|
+
export interface IndexerAuthorGroupContext {
|
|
35
|
+
partition_workset_digest: string;
|
|
36
|
+
group_key: string;
|
|
37
|
+
group_dependency_view_digest: string;
|
|
38
|
+
allowed_artifact_policy_variants: readonly string[];
|
|
39
|
+
artifact_policy_eligibility_digest: string;
|
|
40
|
+
target_resolution_view?: IndexerTargetResolutionView;
|
|
41
|
+
}
|
|
42
|
+
export declare function buildIndexerMainAuthorWorksets(input: {
|
|
43
|
+
partitions: readonly IndexerPartitionValidationInput[];
|
|
44
|
+
group_contexts: readonly IndexerAuthorGroupContext[];
|
|
45
|
+
}): {
|
|
46
|
+
worksets: IndexerMainAuthorWorkset[];
|
|
47
|
+
workset_set: IndexerMainWorksetSet;
|
|
48
|
+
};
|
|
49
|
+
export declare const indexerMainAcceptedRecordSchema: z.ZodObject<{
|
|
50
|
+
protocol: z.ZodLiteral<"context.indexer.main-accepted-result/v1">;
|
|
51
|
+
workset_digest: z.ZodString;
|
|
52
|
+
stage: z.ZodEnum<["partition", "author"]>;
|
|
53
|
+
execution_request_digest: z.ZodString;
|
|
54
|
+
result_digest: z.ZodString;
|
|
55
|
+
receipt_digest: z.ZodString;
|
|
56
|
+
run_envelope_digest: z.ZodString;
|
|
57
|
+
artifact_dependency_set_digest: z.ZodNullable<z.ZodString>;
|
|
58
|
+
acceptance_digest: z.ZodString;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
protocol: "context.indexer.main-accepted-result/v1";
|
|
61
|
+
workset_digest: string;
|
|
62
|
+
receipt_digest: string;
|
|
63
|
+
stage: "partition" | "author";
|
|
64
|
+
execution_request_digest: string;
|
|
65
|
+
result_digest: string;
|
|
66
|
+
run_envelope_digest: string;
|
|
67
|
+
artifact_dependency_set_digest: string | null;
|
|
68
|
+
acceptance_digest: string;
|
|
69
|
+
}, {
|
|
70
|
+
protocol: "context.indexer.main-accepted-result/v1";
|
|
71
|
+
workset_digest: string;
|
|
72
|
+
receipt_digest: string;
|
|
73
|
+
stage: "partition" | "author";
|
|
74
|
+
execution_request_digest: string;
|
|
75
|
+
result_digest: string;
|
|
76
|
+
run_envelope_digest: string;
|
|
77
|
+
artifact_dependency_set_digest: string | null;
|
|
78
|
+
acceptance_digest: string;
|
|
79
|
+
}>;
|
|
80
|
+
export type IndexerMainAcceptedRecord = z.infer<typeof indexerMainAcceptedRecordSchema>;
|
|
81
|
+
export declare function validateIndexerMainAcceptedRecord(value: unknown): IndexerMainAcceptedRecord;
|
|
82
|
+
export declare function buildIndexerMainAcceptedRecord(input: {
|
|
83
|
+
request: IndexerMainRunRequest;
|
|
84
|
+
result: IndexerMainRunResult;
|
|
85
|
+
run_envelope: ReturnType<typeof validateIndexerMainRunResult>["run_envelope"];
|
|
86
|
+
artifact_dependency_set: ReturnType<typeof validateIndexerMainRunResult>["artifact_dependency_set"];
|
|
87
|
+
}): IndexerMainAcceptedRecord;
|
|
88
|
+
export declare function validateAndRecordIndexerMainRun(input: Parameters<typeof validateIndexerMainRunResult>[0]): ReturnType<typeof validateIndexerMainRunResult> & {
|
|
89
|
+
accepted_record: IndexerMainAcceptedRecord;
|
|
90
|
+
};
|
|
91
|
+
export declare const indexerMainStateRecordSchema: z.ZodUnion<[z.ZodObject<{
|
|
92
|
+
workset_digest: z.ZodString;
|
|
93
|
+
state: z.ZodLiteral<"pending">;
|
|
94
|
+
}, "strict", z.ZodTypeAny, {
|
|
95
|
+
workset_digest: string;
|
|
96
|
+
state: "pending";
|
|
97
|
+
}, {
|
|
98
|
+
workset_digest: string;
|
|
99
|
+
state: "pending";
|
|
100
|
+
}>, z.ZodObject<{
|
|
101
|
+
workset_digest: z.ZodString;
|
|
102
|
+
state: z.ZodLiteral<"running">;
|
|
103
|
+
execution_request_digest: z.ZodString;
|
|
104
|
+
}, "strict", z.ZodTypeAny, {
|
|
105
|
+
workset_digest: string;
|
|
106
|
+
state: "running";
|
|
107
|
+
execution_request_digest: string;
|
|
108
|
+
}, {
|
|
109
|
+
workset_digest: string;
|
|
110
|
+
state: "running";
|
|
111
|
+
execution_request_digest: string;
|
|
112
|
+
}>, z.ZodObject<{
|
|
113
|
+
protocol: z.ZodLiteral<"context.indexer.main-accepted-result/v1">;
|
|
114
|
+
workset_digest: z.ZodString;
|
|
115
|
+
stage: z.ZodEnum<["partition", "author"]>;
|
|
116
|
+
execution_request_digest: z.ZodString;
|
|
117
|
+
result_digest: z.ZodString;
|
|
118
|
+
receipt_digest: z.ZodString;
|
|
119
|
+
run_envelope_digest: z.ZodString;
|
|
120
|
+
artifact_dependency_set_digest: z.ZodNullable<z.ZodString>;
|
|
121
|
+
acceptance_digest: z.ZodString;
|
|
122
|
+
} & {
|
|
123
|
+
state: z.ZodLiteral<"accepted">;
|
|
124
|
+
}, "strict", z.ZodTypeAny, {
|
|
125
|
+
protocol: "context.indexer.main-accepted-result/v1";
|
|
126
|
+
workset_digest: string;
|
|
127
|
+
state: "accepted";
|
|
128
|
+
receipt_digest: string;
|
|
129
|
+
stage: "partition" | "author";
|
|
130
|
+
execution_request_digest: string;
|
|
131
|
+
result_digest: string;
|
|
132
|
+
run_envelope_digest: string;
|
|
133
|
+
artifact_dependency_set_digest: string | null;
|
|
134
|
+
acceptance_digest: string;
|
|
135
|
+
}, {
|
|
136
|
+
protocol: "context.indexer.main-accepted-result/v1";
|
|
137
|
+
workset_digest: string;
|
|
138
|
+
state: "accepted";
|
|
139
|
+
receipt_digest: string;
|
|
140
|
+
stage: "partition" | "author";
|
|
141
|
+
execution_request_digest: string;
|
|
142
|
+
result_digest: string;
|
|
143
|
+
run_envelope_digest: string;
|
|
144
|
+
artifact_dependency_set_digest: string | null;
|
|
145
|
+
acceptance_digest: string;
|
|
146
|
+
}>, z.ZodObject<{
|
|
147
|
+
workset_digest: z.ZodString;
|
|
148
|
+
state: z.ZodLiteral<"failed">;
|
|
149
|
+
execution_request_digest: z.ZodString;
|
|
150
|
+
reason_code: z.ZodEffects<z.ZodString, string, string>;
|
|
151
|
+
dependency_digests: z.ZodArray<z.ZodString, "many">;
|
|
152
|
+
}, "strict", z.ZodTypeAny, {
|
|
153
|
+
workset_digest: string;
|
|
154
|
+
state: "failed";
|
|
155
|
+
reason_code: string;
|
|
156
|
+
execution_request_digest: string;
|
|
157
|
+
dependency_digests: string[];
|
|
158
|
+
}, {
|
|
159
|
+
workset_digest: string;
|
|
160
|
+
state: "failed";
|
|
161
|
+
reason_code: string;
|
|
162
|
+
execution_request_digest: string;
|
|
163
|
+
dependency_digests: string[];
|
|
164
|
+
}>, z.ZodObject<{
|
|
165
|
+
workset_digest: z.ZodString;
|
|
166
|
+
state: z.ZodLiteral<"stale">;
|
|
167
|
+
previous_workset_digest: z.ZodString;
|
|
168
|
+
}, "strict", z.ZodTypeAny, {
|
|
169
|
+
workset_digest: string;
|
|
170
|
+
state: "stale";
|
|
171
|
+
previous_workset_digest: string;
|
|
172
|
+
}, {
|
|
173
|
+
workset_digest: string;
|
|
174
|
+
state: "stale";
|
|
175
|
+
previous_workset_digest: string;
|
|
176
|
+
}>]>;
|
|
177
|
+
export type IndexerMainStateRecord = z.infer<typeof indexerMainStateRecordSchema>;
|
|
178
|
+
export declare const indexerMainWorksetStatusSchema: z.ZodObject<{
|
|
179
|
+
protocol: z.ZodLiteral<"context.indexer.main-workset-status/v1">;
|
|
180
|
+
workset_set_digest: z.ZodString;
|
|
181
|
+
total_count: z.ZodNumber;
|
|
182
|
+
pending_count: z.ZodNumber;
|
|
183
|
+
accepted_count: z.ZodNumber;
|
|
184
|
+
failed_count: z.ZodNumber;
|
|
185
|
+
stale_count: z.ZodNumber;
|
|
186
|
+
next_refs: z.ZodArray<z.ZodObject<{
|
|
187
|
+
workset_digest: z.ZodString;
|
|
188
|
+
stage: z.ZodEnum<["partition", "author"]>;
|
|
189
|
+
indexer_id: z.ZodEffects<z.ZodString, string, string>;
|
|
190
|
+
owner_cohort_ref: z.ZodString;
|
|
191
|
+
group_key: z.ZodOptional<z.ZodString>;
|
|
192
|
+
state: z.ZodEnum<["pending", "failed", "stale"]>;
|
|
193
|
+
}, "strict", z.ZodTypeAny, {
|
|
194
|
+
workset_digest: string;
|
|
195
|
+
state: "failed" | "pending" | "stale";
|
|
196
|
+
indexer_id: string;
|
|
197
|
+
stage: "partition" | "author";
|
|
198
|
+
owner_cohort_ref: string;
|
|
199
|
+
group_key?: string | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
workset_digest: string;
|
|
202
|
+
state: "failed" | "pending" | "stale";
|
|
203
|
+
indexer_id: string;
|
|
204
|
+
stage: "partition" | "author";
|
|
205
|
+
owner_cohort_ref: string;
|
|
206
|
+
group_key?: string | undefined;
|
|
207
|
+
}>, "many">;
|
|
208
|
+
accepted_result_set_digest: z.ZodString;
|
|
209
|
+
outcome: z.ZodEnum<["complete", "index-main-workset-pending", "index-main-workset-failed", "index-main-workset-stale"]>;
|
|
210
|
+
can_advance: z.ZodBoolean;
|
|
211
|
+
status_digest: z.ZodString;
|
|
212
|
+
}, "strict", z.ZodTypeAny, {
|
|
213
|
+
protocol: "context.indexer.main-workset-status/v1";
|
|
214
|
+
workset_set_digest: string;
|
|
215
|
+
outcome: "complete" | "index-main-workset-pending" | "index-main-workset-failed" | "index-main-workset-stale";
|
|
216
|
+
total_count: number;
|
|
217
|
+
pending_count: number;
|
|
218
|
+
accepted_count: number;
|
|
219
|
+
failed_count: number;
|
|
220
|
+
stale_count: number;
|
|
221
|
+
next_refs: {
|
|
222
|
+
workset_digest: string;
|
|
223
|
+
state: "failed" | "pending" | "stale";
|
|
224
|
+
indexer_id: string;
|
|
225
|
+
stage: "partition" | "author";
|
|
226
|
+
owner_cohort_ref: string;
|
|
227
|
+
group_key?: string | undefined;
|
|
228
|
+
}[];
|
|
229
|
+
accepted_result_set_digest: string;
|
|
230
|
+
can_advance: boolean;
|
|
231
|
+
status_digest: string;
|
|
232
|
+
}, {
|
|
233
|
+
protocol: "context.indexer.main-workset-status/v1";
|
|
234
|
+
workset_set_digest: string;
|
|
235
|
+
outcome: "complete" | "index-main-workset-pending" | "index-main-workset-failed" | "index-main-workset-stale";
|
|
236
|
+
total_count: number;
|
|
237
|
+
pending_count: number;
|
|
238
|
+
accepted_count: number;
|
|
239
|
+
failed_count: number;
|
|
240
|
+
stale_count: number;
|
|
241
|
+
next_refs: {
|
|
242
|
+
workset_digest: string;
|
|
243
|
+
state: "failed" | "pending" | "stale";
|
|
244
|
+
indexer_id: string;
|
|
245
|
+
stage: "partition" | "author";
|
|
246
|
+
owner_cohort_ref: string;
|
|
247
|
+
group_key?: string | undefined;
|
|
248
|
+
}[];
|
|
249
|
+
accepted_result_set_digest: string;
|
|
250
|
+
can_advance: boolean;
|
|
251
|
+
status_digest: string;
|
|
252
|
+
}>;
|
|
253
|
+
export type IndexerMainWorksetStatus = z.infer<typeof indexerMainWorksetStatusSchema>;
|
|
254
|
+
export declare function observeIndexerMainWorksetState(input: {
|
|
255
|
+
workset_set: unknown;
|
|
256
|
+
records: readonly unknown[];
|
|
257
|
+
}): IndexerMainWorksetStatus;
|
|
258
|
+
export {};
|