@c4a/context 0.7.1 → 0.7.5
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 +67 -171
- package/README.zh-CN.md +53 -130
- package/docs/README.md +9 -10
- package/docs/README.zh-CN.md +6 -7
- package/docs/getting-started.md +73 -428
- package/docs/guides/agent-guide.md +104 -518
- package/docs/guides/code-indexer-skill-authoring.md +38 -13
- package/docs/guides/indexer-provider-and-customization.md +32 -20
- package/docs/guides/markdown-indexer-skill-authoring.md +22 -13
- package/docs/reference/code-extractors.md +29 -121
- package/docs/reference/indexer-provider-protocol.md +43 -110
- package/docs/reference/package-templates.md +2 -3
- package/docs/reference/project-api.md +52 -986
- package/index.d.ts +10 -8
- package/index.js +13132 -15249
- package/indexerAgentStepProtocol.d.ts +1326 -8429
- package/indexerArtifact.d.ts +225 -0
- package/indexerArtifactDependencies.d.ts +43 -39
- package/indexerArtifactResult.d.ts +219 -252
- package/indexerAuthorizedWorksetView.d.ts +368 -0
- package/indexerBaseQuestionAmendment.d.ts +484 -280
- package/indexerBenchmark.d.ts +16 -16
- package/indexerCandidateCompile.d.ts +66 -60
- package/indexerCapabilityGroupEvidence.d.ts +6 -6
- package/indexerCatalogFallback.d.ts +122 -128
- package/indexerCollectionMapping.d.ts +13 -13
- package/indexerCompositionFactDependencies.d.ts +16 -0
- package/indexerContentLayers.d.ts +8 -8
- package/indexerContractOverlay.d.ts +10 -10
- package/indexerControlledInvocation.d.ts +12 -12
- package/indexerControlledProgram.d.ts +2467 -2797
- package/indexerCoreExports.d.ts +6 -6
- package/indexerCustomizationDraft.d.ts +3315 -2091
- package/indexerCustomizationLadder.d.ts +2 -2
- package/indexerDependencyView.d.ts +108 -108
- package/indexerEffectiveArtifact.d.ts +1134 -0
- package/indexerEvidenceAdapterAuthorityMerge.d.ts +48 -0
- package/indexerEvidenceAdapterResult.d.ts +52 -52
- package/indexerExampleDecision.d.ts +128 -128
- package/indexerExampleIdentity.d.ts +6 -6
- package/indexerGeneratedAuthoringAudit.d.ts +18 -18
- package/indexerIncrementalImpact.d.ts +16 -16
- package/indexerInspectorWorksetProjection.d.ts +6 -0
- package/indexerInventoryDisposition.d.ts +70 -70
- package/indexerLayerComposition.d.ts +2139 -373
- package/indexerLayoutChange.d.ts +10 -10
- package/indexerLayoutProposalSet.d.ts +71 -66
- package/indexerLayoutResolver.d.ts +53 -48
- package/indexerLayoutTransition.d.ts +0 -50
- package/indexerLifecycle.d.ts +0 -13
- package/indexerMainLifecycle.d.ts +10 -0
- package/indexerMainRunLedger.d.ts +142 -11
- package/indexerMainRunProtocol.d.ts +1406 -785
- package/indexerMainWorkset.d.ts +460 -206
- package/indexerMaterialGapLedger.d.ts +13 -2904
- package/indexerOverlayQuestionAmendment.d.ts +491 -287
- package/indexerOverlayQuestionApplyProposal.d.ts +1022 -614
- package/indexerParserCapabilityCatalog.d.ts +136 -0
- package/indexerParserCoordinate.d.ts +16 -16
- package/indexerParserDependencyIntent.d.ts +22 -0
- package/indexerParserExecutionPlan.d.ts +388 -0
- package/indexerParserFactView.d.ts +42 -22
- package/indexerPartitionConvergence.d.ts +0 -3
- package/indexerPartitionInventory.d.ts +2 -0
- package/indexerPartitionPlan.d.ts +101 -99
- package/indexerPhysicalArtifactManifest.d.ts +8 -8
- package/indexerPostAuthorComposition.d.ts +116 -1156
- package/indexerPostAuthorRunLedger.d.ts +1434 -280
- package/indexerPrimaryProjection.d.ts +10 -10
- package/indexerPrimaryResultView.d.ts +435 -0
- package/indexerProfileContract.d.ts +181 -181
- package/indexerProgramExecutionAuthorization.d.ts +12 -12
- package/indexerProgramRunProtocol.d.ts +2141 -2749
- package/indexerProjectProposal.d.ts +496 -292
- package/indexerProjectedArtifactFanOutAudit.d.ts +0 -3
- package/indexerProtocolCommon.d.ts +4 -1
- package/indexerProvider.d.ts +134 -218
- package/indexerProviderComposition.d.ts +53 -53
- package/indexerProviderResolution.d.ts +12 -12
- package/indexerProviderResolutionAction.d.ts +14 -14
- package/indexerProviderRouting.d.ts +923 -515
- package/indexerProviderSelectionProposal.d.ts +893 -485
- package/indexerQuestionAuthority.d.ts +46 -47
- package/indexerReaderTargetInventory.d.ts +8 -8
- package/indexerRegistry.d.ts +765 -357
- package/indexerRequirementConfirmation.d.ts +98 -98
- package/indexerRequirementLifecycle.d.ts +224 -224
- package/indexerResultReconciliation.d.ts +204 -5919
- package/indexerResultReconciliationRun.d.ts +0 -1
- package/indexerRunEnvelope.d.ts +20 -20
- package/indexerSemanticInput.d.ts +5794 -0
- package/indexerStructuredDeclaration.d.ts +57 -53
- package/indexerSubjectCatalog.d.ts +14 -14
- package/indexerSubjectIdentity.d.ts +2 -2
- package/indexerSubjectKeyAuthority.d.ts +31 -30
- package/indexerTemplateRendering.d.ts +64 -64
- package/indexerToolSnapshot.d.ts +8 -8
- package/package.json +1 -1
- package/phases.d.ts +3 -183
- package/codeIndexPlan.d.ts +0 -158
- package/indexerAuditFacts.d.ts +0 -66
- package/indexerAuditOverrideReadiness.d.ts +0 -27
- package/indexerAuditProtocol.d.ts +0 -238
- package/indexerAuditRevision.d.ts +0 -726
- package/indexerAuditRevisionActions.d.ts +0 -236
- package/indexerMaterialAnswer.d.ts +0 -738
- package/indexerMaterialAnswerActualization.d.ts +0 -91
- package/indexerMaterialAnswerExecutionPlan.d.ts +0 -2887
- package/indexerMaterialAnswerFlow.d.ts +0 -63
- package/indexerMaterialAnswerLayout.d.ts +0 -76
- package/indexerMaterialAnswerReview.d.ts +0 -217
- package/indexerMaterialAnswerReviewRoute.d.ts +0 -6145
- package/indexerMaterialAnswerRunLedger.d.ts +0 -918
- package/indexerMaterialAnswerRunProtocol.d.ts +0 -1253
- package/indexerMaterialQuestionExclusion.d.ts +0 -129
- package/indexerMaterialQuestionWorkset.d.ts +0 -508
- package/indexerPlannedMaterialAnswer.d.ts +0 -116
- package/indexerProfileMetricAudit.d.ts +0 -218
- package/indexerWorksetRead.d.ts +0 -287
package/indexerToolSnapshot.d.ts
CHANGED
|
@@ -132,12 +132,12 @@ export declare const indexerToolSnapshotSchema: z.ZodEffects<z.ZodObject<{
|
|
|
132
132
|
}>;
|
|
133
133
|
snapshot_digest: z.ZodString;
|
|
134
134
|
}, "strict", z.ZodTypeAny, {
|
|
135
|
-
protocol: "context.indexer.tool-snapshot/v1";
|
|
136
135
|
source: {
|
|
137
136
|
source_ref: string;
|
|
138
137
|
module_ref: string | null;
|
|
139
138
|
input_digest: string;
|
|
140
139
|
};
|
|
140
|
+
protocol: "context.indexer.tool-snapshot/v1";
|
|
141
141
|
pages: {
|
|
142
142
|
page_ref: string;
|
|
143
143
|
cursor_in: string | null;
|
|
@@ -177,12 +177,12 @@ export declare const indexerToolSnapshotSchema: z.ZodEffects<z.ZodObject<{
|
|
|
177
177
|
};
|
|
178
178
|
snapshot_digest: string;
|
|
179
179
|
}, {
|
|
180
|
-
protocol: "context.indexer.tool-snapshot/v1";
|
|
181
180
|
source: {
|
|
182
181
|
source_ref: string;
|
|
183
182
|
module_ref: string | null;
|
|
184
183
|
input_digest: string;
|
|
185
184
|
};
|
|
185
|
+
protocol: "context.indexer.tool-snapshot/v1";
|
|
186
186
|
pages: {
|
|
187
187
|
page_ref: string;
|
|
188
188
|
cursor_in: string | null;
|
|
@@ -222,12 +222,12 @@ export declare const indexerToolSnapshotSchema: z.ZodEffects<z.ZodObject<{
|
|
|
222
222
|
};
|
|
223
223
|
snapshot_digest: string;
|
|
224
224
|
}>, {
|
|
225
|
-
protocol: "context.indexer.tool-snapshot/v1";
|
|
226
225
|
source: {
|
|
227
226
|
source_ref: string;
|
|
228
227
|
module_ref: string | null;
|
|
229
228
|
input_digest: string;
|
|
230
229
|
};
|
|
230
|
+
protocol: "context.indexer.tool-snapshot/v1";
|
|
231
231
|
pages: {
|
|
232
232
|
page_ref: string;
|
|
233
233
|
cursor_in: string | null;
|
|
@@ -267,12 +267,12 @@ export declare const indexerToolSnapshotSchema: z.ZodEffects<z.ZodObject<{
|
|
|
267
267
|
};
|
|
268
268
|
snapshot_digest: string;
|
|
269
269
|
}, {
|
|
270
|
-
protocol: "context.indexer.tool-snapshot/v1";
|
|
271
270
|
source: {
|
|
272
271
|
source_ref: string;
|
|
273
272
|
module_ref: string | null;
|
|
274
273
|
input_digest: string;
|
|
275
274
|
};
|
|
275
|
+
protocol: "context.indexer.tool-snapshot/v1";
|
|
276
276
|
pages: {
|
|
277
277
|
page_ref: string;
|
|
278
278
|
cursor_in: string | null;
|
|
@@ -354,16 +354,16 @@ export declare const indexerToolSnapshotReadReceiptSchema: z.ZodObject<{
|
|
|
354
354
|
}>;
|
|
355
355
|
receipt_digest: z.ZodString;
|
|
356
356
|
}, "strict", z.ZodTypeAny, {
|
|
357
|
-
protocol: "context.indexer.tool-snapshot-read-receipt/v1";
|
|
358
|
-
handler: string;
|
|
359
357
|
authority: {
|
|
360
358
|
ref: string;
|
|
361
359
|
digest: string;
|
|
362
360
|
};
|
|
361
|
+
protocol: "context.indexer.tool-snapshot-read-receipt/v1";
|
|
363
362
|
output: {
|
|
364
363
|
response_digest: string;
|
|
365
364
|
snapshot_digest: string;
|
|
366
365
|
};
|
|
366
|
+
handler: string;
|
|
367
367
|
request: {
|
|
368
368
|
source_ref: string;
|
|
369
369
|
module_ref: string | null;
|
|
@@ -372,16 +372,16 @@ export declare const indexerToolSnapshotReadReceiptSchema: z.ZodObject<{
|
|
|
372
372
|
};
|
|
373
373
|
receipt_digest: string;
|
|
374
374
|
}, {
|
|
375
|
-
protocol: "context.indexer.tool-snapshot-read-receipt/v1";
|
|
376
|
-
handler: string;
|
|
377
375
|
authority: {
|
|
378
376
|
ref: string;
|
|
379
377
|
digest: string;
|
|
380
378
|
};
|
|
379
|
+
protocol: "context.indexer.tool-snapshot-read-receipt/v1";
|
|
381
380
|
output: {
|
|
382
381
|
response_digest: string;
|
|
383
382
|
snapshot_digest: string;
|
|
384
383
|
};
|
|
384
|
+
handler: string;
|
|
385
385
|
request: {
|
|
386
386
|
source_ref: string;
|
|
387
387
|
module_ref: string | null;
|
package/package.json
CHANGED
package/phases.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { type FileCaptureProcessorDefinition, type
|
|
2
|
-
import {
|
|
3
|
-
import { type CodeIndexCoverageKind, type CodeIndexInspectionAdapter, type CodeIndexUnitPlan } from "./codeIndexPlan.js";
|
|
4
|
-
export { CODE_INDEX_CAPABILITIES, CODE_INDEX_COVERAGE_KINDS, CODE_INDEX_LIFECYCLES, CODE_INDEX_MODULE_FACETS, CODE_INDEX_MODULE_TYPES, CODE_INDEX_OUTPUT_PROFILES, ExtractTsConfigurationError, NO_ENTRY_DETECTED, requiredCodeIndexCoverage, } from "./codeIndexPlan.js";
|
|
5
|
-
export type { CodeIndexCapability, CodeIndexCapabilityGap, CodeIndexCoverageKind, CodeIndexInspectionAdapter, CodeIndexInspectionContext, CodeIndexInspectionFinding, CodeIndexInspectionFindingKind, CodeIndexInspectionInventory, CodeIndexInspectionResult, CodeIndexIdentityGroup, CodeIndexChainCandidate, CodeIndexChainCandidateDecision, CodeIndexChainCandidateFamily, CodeIndexLifecycle, CodeIndexModuleFacet, CodeIndexModuleType, CodeIndexOutputProfile, CodeIndexUnitPlan, } from "./codeIndexPlan.js";
|
|
6
|
-
import type { DocumentSourceDefinition, DocumentSourceType, FileSourceDefinition, FileSourceReference, LarkSourceDefinition, LarkSourceReference, RepoProjectSourceDefinition, SourceCollectionReference, SourceDefinition } from "./sources.js";
|
|
1
|
+
import { type FileCaptureProcessorDefinition, type KnowledgeCollection, type PackageKind, type PackageSelectDefinition } from "./contracts.js";
|
|
2
|
+
import type { DocumentSourceDefinition, DocumentSourceType, FileSourceDefinition, FileSourceReference, LarkSourceDefinition, LarkSourceReference, SourceCollectionReference, SourceDefinition } from "./sources.js";
|
|
7
3
|
export type PhaseResourceReference = {
|
|
8
4
|
kind: "source";
|
|
9
5
|
source: SourceDefinition | SourceCollectionReference;
|
|
@@ -12,16 +8,6 @@ export type PhaseResourceReference = {
|
|
|
12
8
|
source: DocumentSourceDefinition;
|
|
13
9
|
sourceType: DocumentSourceType;
|
|
14
10
|
path: string;
|
|
15
|
-
} | {
|
|
16
|
-
kind: "lifecycle.candidates";
|
|
17
|
-
path: string;
|
|
18
|
-
collection?: KnowledgeCollection;
|
|
19
|
-
status?: "draft" | "rejected";
|
|
20
|
-
} | {
|
|
21
|
-
kind: "lifecycle.structure";
|
|
22
|
-
path: ".tmp/context-runtime/lifecycle/structure.yaml";
|
|
23
|
-
profileCollection?: DocumentMainlineCollection;
|
|
24
|
-
status?: "draft" | "confirmed" | "frozen";
|
|
25
11
|
} | {
|
|
26
12
|
kind: "knowledge.collection";
|
|
27
13
|
path: string;
|
|
@@ -50,105 +36,8 @@ export type ContextPhaseContext = {
|
|
|
50
36
|
ensureSources: (options?: {
|
|
51
37
|
source?: SourceDefinition;
|
|
52
38
|
}) => Promise<void>;
|
|
53
|
-
extract: {
|
|
54
|
-
ts: (options: ExtractTsPhaseDefinition) => Promise<void>;
|
|
55
|
-
};
|
|
56
|
-
review: {
|
|
57
|
-
html: (options: ReviewValidityPhaseDefinition) => Promise<void>;
|
|
58
|
-
};
|
|
59
39
|
};
|
|
60
40
|
export type ContextPhase = (ctx: ContextPhaseContext) => unknown | Promise<unknown>;
|
|
61
|
-
export type ExtractTsPhaseDefinition = {
|
|
62
|
-
kind: "phase.extract.ts";
|
|
63
|
-
id: string;
|
|
64
|
-
reads: readonly PhaseResourceReference[];
|
|
65
|
-
writes: readonly PhaseResourceReference[];
|
|
66
|
-
source: RepoProjectSourceDefinition;
|
|
67
|
-
collection: CodeIndexCollection;
|
|
68
|
-
include: readonly string[];
|
|
69
|
-
mode: "exports" | "scan";
|
|
70
|
-
entries?: readonly string[];
|
|
71
|
-
exportedOnly: boolean;
|
|
72
|
-
indexPlan: "declared" | "inferred";
|
|
73
|
-
indexUnits: readonly CodeIndexUnitPlan[];
|
|
74
|
-
transform?: MarkdownTransform | readonly MarkdownTransform[];
|
|
75
|
-
out: {
|
|
76
|
-
kind: "codegraph-entities";
|
|
77
|
-
candidateFile: string;
|
|
78
|
-
approvedPagesDir: string;
|
|
79
|
-
initialStatus: "draft";
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
export interface CustomCodeEvidence {
|
|
83
|
-
source: string;
|
|
84
|
-
file: string;
|
|
85
|
-
/** Stable canonical-ref token. Do not include ':' or '@'; keep exact signatures in Section prose. */
|
|
86
|
-
symbol: string;
|
|
87
|
-
/** Stable canonical-ref token. Do not include ':' or '@'. */
|
|
88
|
-
kind: string;
|
|
89
|
-
digest: string;
|
|
90
|
-
line?: number;
|
|
91
|
-
}
|
|
92
|
-
export interface CustomCodeCandidateReview {
|
|
93
|
-
title: string;
|
|
94
|
-
summary: string;
|
|
95
|
-
behaviorSummary?: string;
|
|
96
|
-
edgeSummary?: string;
|
|
97
|
-
signals: readonly string[];
|
|
98
|
-
reason: string;
|
|
99
|
-
}
|
|
100
|
-
export interface CustomCodeCandidateEdge {
|
|
101
|
-
type: "contains" | "depends_on";
|
|
102
|
-
from: string;
|
|
103
|
-
to: string;
|
|
104
|
-
relationType: string;
|
|
105
|
-
evidence: readonly CustomCodeEvidence[];
|
|
106
|
-
}
|
|
107
|
-
export interface CustomCodeCandidateSection {
|
|
108
|
-
id: string;
|
|
109
|
-
kind: CodeIndexCoverageKind;
|
|
110
|
-
title: string;
|
|
111
|
-
/** Reader-facing Section body only. Context renders the heading from title. */
|
|
112
|
-
markdown: string;
|
|
113
|
-
evidence: readonly CustomCodeEvidence[];
|
|
114
|
-
}
|
|
115
|
-
export interface CustomCodeCandidateDraft {
|
|
116
|
-
nodeRef: string;
|
|
117
|
-
kind: string;
|
|
118
|
-
visibility: string;
|
|
119
|
-
module: string;
|
|
120
|
-
/** Required evidence-scoped sections used to render the page and prove output-profile coverage. */
|
|
121
|
-
sections: readonly CustomCodeCandidateSection[];
|
|
122
|
-
evidence: readonly CustomCodeEvidence[];
|
|
123
|
-
review: CustomCodeCandidateReview;
|
|
124
|
-
edges?: readonly CustomCodeCandidateEdge[];
|
|
125
|
-
}
|
|
126
|
-
export interface CustomCodeExtractionResult {
|
|
127
|
-
candidates: readonly CustomCodeCandidateDraft[] | Iterable<CustomCodeCandidateDraft> | AsyncIterable<CustomCodeCandidateDraft>;
|
|
128
|
-
}
|
|
129
|
-
export interface CustomCodeExtractionContext {
|
|
130
|
-
projectRoot: string;
|
|
131
|
-
runId: string;
|
|
132
|
-
/** CLI-resolved source roots. Use these paths instead of environment-specific checkout paths. */
|
|
133
|
-
sources: readonly {
|
|
134
|
-
name: string;
|
|
135
|
-
materializedAt: string;
|
|
136
|
-
absolutePath: string;
|
|
137
|
-
}[];
|
|
138
|
-
}
|
|
139
|
-
export type CustomCodeExtractor = (context: CustomCodeExtractionContext) => CustomCodeExtractionResult | Promise<CustomCodeExtractionResult>;
|
|
140
|
-
export type ExtractCustomPhaseDefinition = {
|
|
141
|
-
kind: "phase.extract.custom";
|
|
142
|
-
id: string;
|
|
143
|
-
reads: readonly PhaseResourceReference[];
|
|
144
|
-
writes: readonly PhaseResourceReference[];
|
|
145
|
-
sources: readonly RepoProjectSourceDefinition[];
|
|
146
|
-
collection: CodeIndexCollection;
|
|
147
|
-
indexPlan: "declared" | "inferred";
|
|
148
|
-
indexUnits: readonly CodeIndexUnitPlan[];
|
|
149
|
-
inspect?: CodeIndexInspectionAdapter;
|
|
150
|
-
extract: CustomCodeExtractor;
|
|
151
|
-
};
|
|
152
41
|
export type CaptureFilePhaseDefinition = {
|
|
153
42
|
kind: "phase.capture.file";
|
|
154
43
|
id: string;
|
|
@@ -169,42 +58,6 @@ export type CaptureLarkPhaseDefinition = {
|
|
|
169
58
|
maxTotalBytes: number;
|
|
170
59
|
};
|
|
171
60
|
};
|
|
172
|
-
export type AlignProsePhaseDefinition = {
|
|
173
|
-
kind: "phase.align.prose";
|
|
174
|
-
id: string;
|
|
175
|
-
reads: readonly PhaseResourceReference[];
|
|
176
|
-
writes: readonly PhaseResourceReference[];
|
|
177
|
-
source: DocumentSourceDefinition;
|
|
178
|
-
sourceType?: DocumentSourceType;
|
|
179
|
-
collection: DocumentMainlineCollection;
|
|
180
|
-
};
|
|
181
|
-
export type CompileProsePhaseDefinition = {
|
|
182
|
-
kind: "phase.compile.prose";
|
|
183
|
-
id: string;
|
|
184
|
-
reads: readonly PhaseResourceReference[];
|
|
185
|
-
writes: readonly PhaseResourceReference[];
|
|
186
|
-
source: DocumentSourceDefinition;
|
|
187
|
-
sourceType?: DocumentSourceType;
|
|
188
|
-
collection: DocumentMainlineCollection;
|
|
189
|
-
schemaVersion: typeof DOCUMENT_COMPILE_ACTION_SCHEMA_VERSION;
|
|
190
|
-
};
|
|
191
|
-
export type ReviewValidityScope = {
|
|
192
|
-
kind: "collection";
|
|
193
|
-
collection: KnowledgeCollection;
|
|
194
|
-
} | {
|
|
195
|
-
kind: "all";
|
|
196
|
-
};
|
|
197
|
-
export type ReviewValidityPhaseDefinition = {
|
|
198
|
-
kind: "phase.review.validity";
|
|
199
|
-
id: string;
|
|
200
|
-
reads: readonly PhaseResourceReference[];
|
|
201
|
-
writes: readonly PhaseResourceReference[];
|
|
202
|
-
collection?: KnowledgeCollection;
|
|
203
|
-
scope: ReviewValidityScope;
|
|
204
|
-
status: "draft";
|
|
205
|
-
payload: string;
|
|
206
|
-
decisions: readonly ["approved", "rejected"];
|
|
207
|
-
};
|
|
208
61
|
export type CustomPhaseDefinition = {
|
|
209
62
|
kind: "phase.custom";
|
|
210
63
|
id: string;
|
|
@@ -212,7 +65,7 @@ export type CustomPhaseDefinition = {
|
|
|
212
65
|
writes: readonly PhaseResourceReference[];
|
|
213
66
|
run: ContextPhase;
|
|
214
67
|
};
|
|
215
|
-
export type PhaseDefinition =
|
|
68
|
+
export type PhaseDefinition = CaptureFilePhaseDefinition | CaptureLarkPhaseDefinition | CustomPhaseDefinition;
|
|
216
69
|
export declare function mdxJsonDocs(options?: {
|
|
217
70
|
include?: readonly string[];
|
|
218
71
|
documentExtensions?: readonly string[];
|
|
@@ -231,39 +84,6 @@ export declare const captureLark: (definition: {
|
|
|
231
84
|
maxTotalBytes?: number;
|
|
232
85
|
};
|
|
233
86
|
}) => CaptureLarkPhaseDefinition;
|
|
234
|
-
export declare const alignProse: (definition: {
|
|
235
|
-
source: DocumentSourceDefinition;
|
|
236
|
-
collection: DocumentMainlineCollection;
|
|
237
|
-
}) => AlignProsePhaseDefinition;
|
|
238
|
-
export declare const compileProse: (definition: {
|
|
239
|
-
source: DocumentSourceDefinition;
|
|
240
|
-
collection: DocumentMainlineCollection;
|
|
241
|
-
}) => CompileProsePhaseDefinition;
|
|
242
|
-
export declare const extractTs: (definition: {
|
|
243
|
-
source: RepoProjectSourceDefinition;
|
|
244
|
-
collection: CodeIndexCollection;
|
|
245
|
-
include?: readonly string[];
|
|
246
|
-
mode?: "exports" | "scan";
|
|
247
|
-
entries?: readonly string[];
|
|
248
|
-
exportedOnly?: boolean;
|
|
249
|
-
indexUnits?: readonly CodeIndexUnitPlan[];
|
|
250
|
-
transform?: MarkdownTransform | readonly MarkdownTransform[];
|
|
251
|
-
}) => ExtractTsPhaseDefinition;
|
|
252
|
-
export declare const extractCustom: (definition: {
|
|
253
|
-
id: string;
|
|
254
|
-
sources: readonly RepoProjectSourceDefinition[];
|
|
255
|
-
collection: CodeIndexCollection;
|
|
256
|
-
indexUnits?: readonly CodeIndexUnitPlan[];
|
|
257
|
-
inspect?: CodeIndexInspectionAdapter;
|
|
258
|
-
extract: CustomCodeExtractor;
|
|
259
|
-
}) => ExtractCustomPhaseDefinition;
|
|
260
|
-
export declare const reviewValidity: (definition: {
|
|
261
|
-
collection: KnowledgeCollection;
|
|
262
|
-
payload?: string;
|
|
263
|
-
} | {
|
|
264
|
-
scope: "all";
|
|
265
|
-
payload?: string;
|
|
266
|
-
}) => ReviewValidityPhaseDefinition;
|
|
267
87
|
export declare const customPhase: (id: string, run: ContextPhase, io?: {
|
|
268
88
|
reads?: readonly PhaseResourceReference[];
|
|
269
89
|
writes?: readonly PhaseResourceReference[];
|
package/codeIndexPlan.d.ts
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
export declare const CODE_INDEX_MODULE_TYPES: readonly ["api-service", "service", "background-runtime", "sdk-library", "web-application", "adapter", "cli-tool", "monorepo-container", "contract-source", "derived-source", "unknown"];
|
|
2
|
-
export type CodeIndexModuleType = typeof CODE_INDEX_MODULE_TYPES[number];
|
|
3
|
-
export declare const CODE_INDEX_MODULE_FACETS: readonly ["page-routing", "public-api", "protocol-provider", "protocol-consumer", "event-producer", "event-consumer", "persistence", "plugin-extension", "configuration-runtime", "build-release", "cross-module-chain", "generated-contract"];
|
|
4
|
-
export type CodeIndexModuleFacet = typeof CODE_INDEX_MODULE_FACETS[number];
|
|
5
|
-
export declare const CODE_INDEX_OUTPUT_PROFILES: readonly ["protocol-index", "service-boundary", "runtime-map", "public-api-reference", "module-map", "application-map", "adapter-contract", "command-map", "module-registry", "cross-module-flow", "provenance-only"];
|
|
6
|
-
export type CodeIndexOutputProfile = typeof CODE_INDEX_OUTPUT_PROFILES[number];
|
|
7
|
-
export declare const CODE_INDEX_COVERAGE_KINDS: readonly ["responsibility", "entrypoint", "operation", "contract", "handoff", "state-boundary", "failure-recovery", "delivery", "source-authority"];
|
|
8
|
-
export type CodeIndexCoverageKind = typeof CODE_INDEX_COVERAGE_KINDS[number];
|
|
9
|
-
export declare function requiredCodeIndexCoverage(input: {
|
|
10
|
-
outputProfile: CodeIndexOutputProfile;
|
|
11
|
-
facets?: readonly CodeIndexModuleFacet[];
|
|
12
|
-
}): CodeIndexCoverageKind[];
|
|
13
|
-
export declare const CODE_INDEX_CAPABILITIES: readonly ["complete", "project-adapter", "material-required"];
|
|
14
|
-
export type CodeIndexCapability = typeof CODE_INDEX_CAPABILITIES[number];
|
|
15
|
-
export declare const CODE_INDEX_LIFECYCLES: readonly ["authoritative", "generated", "mirrored", "legacy", "vendored"];
|
|
16
|
-
export type CodeIndexLifecycle = typeof CODE_INDEX_LIFECYCLES[number];
|
|
17
|
-
/** Stable knowledge intent for one user-visible code index unit. */
|
|
18
|
-
export interface CodeIndexUnitPlan {
|
|
19
|
-
id: string;
|
|
20
|
-
inputSources: readonly string[];
|
|
21
|
-
outputOwner: string;
|
|
22
|
-
/** Primary classification retained for compact reports and existing plans. */
|
|
23
|
-
moduleType: CodeIndexModuleType;
|
|
24
|
-
/** All applicable module archetypes. A hybrid module may declare more than one. */
|
|
25
|
-
moduleTypes?: readonly CodeIndexModuleType[];
|
|
26
|
-
/** Composable behavior and contract facets used to select extraction guidance. */
|
|
27
|
-
facets?: readonly CodeIndexModuleFacet[];
|
|
28
|
-
/** Source-backed reasons for the selected module type. */
|
|
29
|
-
moduleTypeEvidence?: readonly string[];
|
|
30
|
-
/** Source-relative Markdown documents read while classifying this index unit. */
|
|
31
|
-
documents?: readonly string[];
|
|
32
|
-
outputProfile: CodeIndexOutputProfile;
|
|
33
|
-
responsibility: string;
|
|
34
|
-
entries: readonly string[];
|
|
35
|
-
pageKinds: readonly string[];
|
|
36
|
-
protocols: readonly string[];
|
|
37
|
-
dependencies: readonly string[];
|
|
38
|
-
exclusions: readonly string[];
|
|
39
|
-
lifecycle?: CodeIndexLifecycle;
|
|
40
|
-
sourceOfTruth?: string;
|
|
41
|
-
capability: CodeIndexCapability;
|
|
42
|
-
}
|
|
43
|
-
export type CodeIndexInspectionFindingKind = "module" | "entry" | "protocol" | "dependency" | "lifecycle" | "source-of-truth";
|
|
44
|
-
export interface CodeIndexInspectionFinding {
|
|
45
|
-
indexUnitId: string;
|
|
46
|
-
source: string;
|
|
47
|
-
kind: CodeIndexInspectionFindingKind;
|
|
48
|
-
summary: string;
|
|
49
|
-
path?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface CodeIndexCapabilityGap {
|
|
52
|
-
indexUnitId: string;
|
|
53
|
-
reason: string;
|
|
54
|
-
requestedMaterial?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface CodeIndexIdentityGroup {
|
|
57
|
-
id: string;
|
|
58
|
-
/** Stable target identities represented by one reader-facing capability group. */
|
|
59
|
-
members: readonly string[];
|
|
60
|
-
/** Reader-facing page that explains the common responsibility of the members. */
|
|
61
|
-
viewRef: string;
|
|
62
|
-
/** Eligible source files that prove the group membership. */
|
|
63
|
-
sourceFiles: readonly string[];
|
|
64
|
-
}
|
|
65
|
-
export type CodeIndexChainCandidateFamily = "entry-operation" | "operation-handler" | "handler-downstream" | "event-processing" | "command-effect" | "export-implementation" | "cross-source-handoff";
|
|
66
|
-
export interface CodeIndexChainCandidate {
|
|
67
|
-
id: string;
|
|
68
|
-
family: CodeIndexChainCandidateFamily;
|
|
69
|
-
from: string;
|
|
70
|
-
to: string;
|
|
71
|
-
sourceFiles: readonly string[];
|
|
72
|
-
confidence: "structural" | "declared" | "ambiguous";
|
|
73
|
-
}
|
|
74
|
-
export interface CodeIndexChainCandidateDecision {
|
|
75
|
-
candidateId: string;
|
|
76
|
-
decision: "document" | "merge" | "exclude" | "request-input";
|
|
77
|
-
/** Required for document decisions and must identify the reader-facing chain page. */
|
|
78
|
-
viewRef?: string;
|
|
79
|
-
/** Required when an equivalent candidate is merged into a canonical chain. */
|
|
80
|
-
canonicalChainId?: string;
|
|
81
|
-
/** Required for exclude and request-input decisions. */
|
|
82
|
-
reason?: string;
|
|
83
|
-
}
|
|
84
|
-
/** Complete source inventory returned by a project adapter for mechanical quality scoring. */
|
|
85
|
-
export interface CodeIndexInspectionInventory {
|
|
86
|
-
indexUnitId: string;
|
|
87
|
-
eligibleFiles: number;
|
|
88
|
-
analyzedFiles: number;
|
|
89
|
-
/** Complete eligible source identities used as the file denominator. */
|
|
90
|
-
eligibleFileTargets: readonly string[];
|
|
91
|
-
/** Complete source identities successfully analyzed by the adapter. */
|
|
92
|
-
analyzedFileTargets: readonly string[];
|
|
93
|
-
eligibleLoc: number;
|
|
94
|
-
analyzedLoc: number;
|
|
95
|
-
documentsDiscovered: number;
|
|
96
|
-
documentsRead: number;
|
|
97
|
-
/** Discovered Markdown identities, relative to the registered source root. */
|
|
98
|
-
documentTargets?: readonly string[];
|
|
99
|
-
/** Root README or documentation entry identities that require complete reading. */
|
|
100
|
-
rootDocumentTargets?: readonly string[];
|
|
101
|
-
/** Discovered document identities read during module classification. */
|
|
102
|
-
readDocumentTargets?: readonly string[];
|
|
103
|
-
/** Documents already referenced by emitted knowledge candidates. */
|
|
104
|
-
referencedDocumentTargets?: readonly string[];
|
|
105
|
-
symbolsDiscovered: number;
|
|
106
|
-
symbolsAnalyzed: number;
|
|
107
|
-
targetSymbols: number;
|
|
108
|
-
exportedSymbols: number;
|
|
109
|
-
/** Stable target identities, normally exported or profile-selected symbol names. */
|
|
110
|
-
targetSymbolIdentities: readonly string[];
|
|
111
|
-
/** Public export identities that must remain discoverable. */
|
|
112
|
-
exportedTargetIdentities: readonly string[];
|
|
113
|
-
entryTargets: readonly string[];
|
|
114
|
-
protocolTargets: readonly string[];
|
|
115
|
-
boundaryTargets?: readonly {
|
|
116
|
-
kind: "entry" | "export" | "route" | "operation" | "handler" | "downstream" | "command" | "event" | "plugin" | "handoff";
|
|
117
|
-
identity: string;
|
|
118
|
-
}[];
|
|
119
|
-
coveredBoundaryTargets?: readonly {
|
|
120
|
-
kind: "entry" | "export" | "route" | "operation" | "handler" | "downstream" | "command" | "event" | "plugin" | "handoff";
|
|
121
|
-
identity: string;
|
|
122
|
-
}[];
|
|
123
|
-
/** Source-constrained groups that cover target identities without listing every member in prose. */
|
|
124
|
-
identityGroups?: readonly CodeIndexIdentityGroup[];
|
|
125
|
-
/** Static or declared chain candidates discovered during source inspection. */
|
|
126
|
-
chainCandidates?: readonly CodeIndexChainCandidate[];
|
|
127
|
-
/** Explicit disposition for every discovered chain candidate. */
|
|
128
|
-
chainCandidateDecisions?: readonly CodeIndexChainCandidateDecision[];
|
|
129
|
-
excludedFiles: number;
|
|
130
|
-
/** Complete identities deliberately excluded after discovery. */
|
|
131
|
-
excludedFileTargets: readonly string[];
|
|
132
|
-
excludedReasons: readonly string[];
|
|
133
|
-
parserSkippedFiles: number;
|
|
134
|
-
/** Complete eligible identities that the parser could not analyze. */
|
|
135
|
-
parserSkippedFileTargets: readonly string[];
|
|
136
|
-
}
|
|
137
|
-
export interface CodeIndexInspectionResult {
|
|
138
|
-
findings: readonly CodeIndexInspectionFinding[];
|
|
139
|
-
capabilityGaps?: readonly CodeIndexCapabilityGap[];
|
|
140
|
-
inventories?: readonly CodeIndexInspectionInventory[];
|
|
141
|
-
}
|
|
142
|
-
export interface CodeIndexInspectionContext {
|
|
143
|
-
projectRoot: string;
|
|
144
|
-
sources: readonly {
|
|
145
|
-
name: string;
|
|
146
|
-
materializedAt: string;
|
|
147
|
-
absolutePath: string;
|
|
148
|
-
}[];
|
|
149
|
-
}
|
|
150
|
-
export type CodeIndexInspectionAdapter = (context: CodeIndexInspectionContext) => CodeIndexInspectionResult | Promise<CodeIndexInspectionResult>;
|
|
151
|
-
export declare const NO_ENTRY_DETECTED: "NO_ENTRY_DETECTED";
|
|
152
|
-
export declare class ExtractTsConfigurationError extends TypeError {
|
|
153
|
-
readonly code: "NO_ENTRY_DETECTED";
|
|
154
|
-
constructor(message: string);
|
|
155
|
-
}
|
|
156
|
-
export declare function normalizeExtractEntry(value: string): string;
|
|
157
|
-
export declare function normalizeIndexUnit(unit: CodeIndexUnitPlan, field: string): CodeIndexUnitPlan;
|
|
158
|
-
export declare function assertUniqueIndexUnits(units: readonly CodeIndexUnitPlan[], field: string): void;
|
package/indexerAuditFacts.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const indexerAuditFactsSchema: z.ZodObject<{
|
|
3
|
-
protocol: z.ZodLiteral<"context.indexer.audit-facts/v1">;
|
|
4
|
-
audit: z.ZodObject<{
|
|
5
|
-
baseline_clear: z.ZodBoolean;
|
|
6
|
-
profile_state: z.ZodEnum<["not-applicable", "passed", "revision-required", "human-guidance-required"]>;
|
|
7
|
-
problem_lineage_id: z.ZodNullable<z.ZodString>;
|
|
8
|
-
profile_attempt_count: z.ZodNumber;
|
|
9
|
-
profile_report_digest: z.ZodNullable<z.ZodString>;
|
|
10
|
-
profile_override_eligible: z.ZodBoolean;
|
|
11
|
-
profile_override_receipt_digest: z.ZodNullable<z.ZodString>;
|
|
12
|
-
}, "strict", z.ZodTypeAny, {
|
|
13
|
-
profile_override_receipt_digest: string | null;
|
|
14
|
-
profile_report_digest: string | null;
|
|
15
|
-
baseline_clear: boolean;
|
|
16
|
-
profile_state: "passed" | "not-applicable" | "revision-required" | "human-guidance-required";
|
|
17
|
-
problem_lineage_id: string | null;
|
|
18
|
-
profile_attempt_count: number;
|
|
19
|
-
profile_override_eligible: boolean;
|
|
20
|
-
}, {
|
|
21
|
-
profile_override_receipt_digest: string | null;
|
|
22
|
-
profile_report_digest: string | null;
|
|
23
|
-
baseline_clear: boolean;
|
|
24
|
-
profile_state: "passed" | "not-applicable" | "revision-required" | "human-guidance-required";
|
|
25
|
-
problem_lineage_id: string | null;
|
|
26
|
-
profile_attempt_count: number;
|
|
27
|
-
profile_override_eligible: boolean;
|
|
28
|
-
}>;
|
|
29
|
-
facts_digest: z.ZodString;
|
|
30
|
-
}, "strict", z.ZodTypeAny, {
|
|
31
|
-
protocol: "context.indexer.audit-facts/v1";
|
|
32
|
-
audit: {
|
|
33
|
-
profile_override_receipt_digest: string | null;
|
|
34
|
-
profile_report_digest: string | null;
|
|
35
|
-
baseline_clear: boolean;
|
|
36
|
-
profile_state: "passed" | "not-applicable" | "revision-required" | "human-guidance-required";
|
|
37
|
-
problem_lineage_id: string | null;
|
|
38
|
-
profile_attempt_count: number;
|
|
39
|
-
profile_override_eligible: boolean;
|
|
40
|
-
};
|
|
41
|
-
facts_digest: string;
|
|
42
|
-
}, {
|
|
43
|
-
protocol: "context.indexer.audit-facts/v1";
|
|
44
|
-
audit: {
|
|
45
|
-
profile_override_receipt_digest: string | null;
|
|
46
|
-
profile_report_digest: string | null;
|
|
47
|
-
baseline_clear: boolean;
|
|
48
|
-
profile_state: "passed" | "not-applicable" | "revision-required" | "human-guidance-required";
|
|
49
|
-
problem_lineage_id: string | null;
|
|
50
|
-
profile_attempt_count: number;
|
|
51
|
-
profile_override_eligible: boolean;
|
|
52
|
-
};
|
|
53
|
-
facts_digest: string;
|
|
54
|
-
}>;
|
|
55
|
-
export type IndexerAuditFacts = z.infer<typeof indexerAuditFactsSchema>;
|
|
56
|
-
interface IndexerAuditFactsInput {
|
|
57
|
-
precompile_report: unknown;
|
|
58
|
-
postcompile_report: unknown;
|
|
59
|
-
lineage?: unknown;
|
|
60
|
-
ledger?: unknown;
|
|
61
|
-
failure_report?: unknown;
|
|
62
|
-
override_receipt?: unknown;
|
|
63
|
-
}
|
|
64
|
-
export declare function buildIndexerAuditFacts(input: IndexerAuditFactsInput): IndexerAuditFacts;
|
|
65
|
-
export declare function validateIndexerAuditFacts(value: unknown): IndexerAuditFacts;
|
|
66
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare function evaluateIndexerCandidateReviewReadinessWithOverride(input: {
|
|
2
|
-
request: unknown;
|
|
3
|
-
precompile_report: unknown;
|
|
4
|
-
postcompile_report: unknown;
|
|
5
|
-
profile_override_receipt: unknown;
|
|
6
|
-
}): {
|
|
7
|
-
graph_outcome: "completed";
|
|
8
|
-
result_digest: string;
|
|
9
|
-
protocol: "context.indexer.candidate-review-readiness-result/v1";
|
|
10
|
-
state: "ready";
|
|
11
|
-
binding: {
|
|
12
|
-
inventory_digest: string;
|
|
13
|
-
requirement_set_digest: string;
|
|
14
|
-
registry_digest: string;
|
|
15
|
-
candidate_set_digest: string;
|
|
16
|
-
layout_digest: string;
|
|
17
|
-
effective_revision_digest: string;
|
|
18
|
-
};
|
|
19
|
-
precompile_audit_report_digest: string;
|
|
20
|
-
postcompile_audit_report_digest: string;
|
|
21
|
-
baseline_failed_check_ids: string[];
|
|
22
|
-
profile_state: "passed" | "not-applicable" | "revision-required" | "human-guidance-required";
|
|
23
|
-
profile_failed_metric_ids: string[];
|
|
24
|
-
profile_override_receipt_digest: string | null;
|
|
25
|
-
profile_override_applied: boolean;
|
|
26
|
-
review_binding_digest: string;
|
|
27
|
-
};
|