@c4a/context 0.7.4 → 0.7.8
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 +17 -8
- package/README.zh-CN.md +15 -8
- package/docs/README.md +13 -1
- package/docs/README.zh-CN.md +13 -1
- package/docs/getting-started.md +95 -69
- package/docs/guides/agent-dialogue.md +19 -9
- package/docs/guides/agent-guide.md +52 -10
- package/docs/guides/code-indexer-skill-authoring.md +50 -5
- package/docs/guides/indexer-manifest-example.md +103 -0
- package/docs/guides/indexer-provider-and-customization.md +307 -31
- package/docs/guides/indexer-skill-creation.md +99 -0
- package/docs/guides/knowledge-updates.md +324 -0
- package/docs/guides/lark-resources.md +5 -1
- package/docs/guides/markdown-indexer-skill-authoring.md +25 -7
- package/docs/guides/note.md +37 -0
- package/docs/guides/package-outputs.md +22 -17
- package/docs/guides/sessions.md +50 -0
- package/docs/guides/workspace-commit.md +45 -0
- package/docs/guides/workspace-prepare.md +72 -0
- package/docs/guides/workspace-restore.md +59 -0
- package/docs/reference/code-extractors.md +23 -11
- package/docs/reference/indexer-provider-protocol.md +116 -22
- package/docs/reference/package-templates.md +10 -9
- package/docs/reference/project-api.md +47 -13
- package/docs/reference/template-variables.md +7 -7
- package/index.d.ts +11 -0
- package/index.js +1819 -584
- package/indexerAgentStepProtocol.d.ts +1284 -2060
- package/indexerApprovedKnowledge.d.ts +371 -0
- package/indexerArticlePlan.d.ts +83 -0
- package/indexerArtifact.d.ts +10 -7
- package/indexerArtifactDependencies.d.ts +7 -5
- package/indexerArtifactPolicy.d.ts +16 -16
- package/indexerArtifactResult.d.ts +76 -69
- package/indexerAuthoringFixture.d.ts +8 -8
- package/indexerAuthorizedWorksetView.d.ts +14 -14
- package/indexerBaseQuestionAmendment.d.ts +40 -0
- package/indexerCandidateCompile.d.ts +46 -36
- package/indexerCatalogFallback.d.ts +566 -48
- package/indexerCompositionFactDependencies.d.ts +16 -0
- package/indexerContentLayers.d.ts +6 -4
- package/indexerContractDeclaration.d.ts +3 -0
- package/indexerControlledProgram.d.ts +1039 -238
- package/indexerCustomizationDraft.d.ts +188 -0
- package/indexerDependencyView.d.ts +17 -17
- package/indexerEffectiveArtifact.d.ts +26 -15
- package/indexerExampleFactDependencies.d.ts +17 -0
- package/indexerExampleIdentityAudit.d.ts +2 -2
- package/indexerInventoryDisposition.d.ts +44 -44
- package/indexerKnowledgeDependency.d.ts +46 -0
- package/indexerLayerComposition.d.ts +92 -54
- package/indexerLayoutChange.d.ts +8 -8
- package/indexerLayoutProposalSet.d.ts +15 -10
- package/indexerLayoutResolver.d.ts +15 -6
- package/indexerLayoutTransition.d.ts +8 -8
- package/indexerLifecycle.d.ts +1 -1
- package/indexerMainRunLedger.d.ts +7 -0
- package/indexerMainRunProtocol.d.ts +872 -196
- package/indexerMainWorkset.d.ts +50 -0
- package/indexerNavigationArtifactPlan.d.ts +2 -2
- package/indexerOverlayQuestionAmendment.d.ts +56 -16
- package/indexerOverlayQuestionApplyProposal.d.ts +98 -26
- package/indexerPartitionPlan.d.ts +585 -40
- package/indexerPhysicalArtifactAudit.d.ts +2 -2
- package/indexerPhysicalArtifactManifest.d.ts +24 -24
- package/indexerPostAuthorRunLedger.d.ts +60 -34
- package/indexerPrimaryProjection.d.ts +2 -2
- package/indexerProfileContract.d.ts +28 -28
- package/indexerProgramRunProtocol.d.ts +868 -194
- package/indexerProjectProposal.d.ts +36 -8
- package/indexerProjectedArtifactFanOutAudit.d.ts +2 -2
- package/indexerProvider.d.ts +72 -28
- package/indexerProviderComposition.d.ts +4 -4
- package/indexerProviderRouting.d.ts +52 -0
- package/indexerProviderSelectionProposal.d.ts +48 -0
- package/indexerPublicContractFacts.d.ts +7 -0
- package/indexerPublicContractTable.d.ts +11 -0
- package/indexerReaderTargetInventory.d.ts +6 -6
- package/indexerReferenceOnlyAudit.d.ts +2 -2
- package/indexerRegistry.d.ts +52 -0
- package/indexerRequirementConfirmation.d.ts +48 -16
- package/indexerRequirementLifecycle.d.ts +154 -42
- package/indexerResultReconciliation.d.ts +12 -11
- package/indexerSemanticInput.d.ts +28014 -1847
- package/{indexerGeneratedAuthoringAudit.d.ts → indexerStructuredClaims.d.ts} +0 -84
- package/indexerStructuredDeclaration.d.ts +8 -8
- package/indexerTemplateRendering.d.ts +7 -7
- package/indexerToolSnapshot.d.ts +16 -16
- package/managedSources.d.ts +15 -0
- package/package.json +1 -1
- package/phases.d.ts +0 -3
- package/processedScopes.d.ts +75 -0
- package/readingStructure.d.ts +188 -0
- package/sessionMetadata.d.ts +49 -0
- package/sources.d.ts +9 -3
- package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +15 -10
- package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +8 -8
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type IndexerSubjectKey } from "./indexerSubjectIdentity.js";
|
|
3
|
+
import { type IndexerKnowledgeDependency } from "./indexerKnowledgeDependency.js";
|
|
4
|
+
export declare const indexerApprovedKnowledgeSchema: z.ZodObject<{
|
|
5
|
+
protocol: z.ZodLiteral<"context.indexer.approved-knowledge/v1">;
|
|
6
|
+
artifact_ref: z.ZodString;
|
|
7
|
+
subject_key: z.ZodObject<{
|
|
8
|
+
protocol: z.ZodLiteral<"context.subject-key/v1">;
|
|
9
|
+
namespace: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
kind: z.ZodEffects<z.ZodString, string, string>;
|
|
11
|
+
local_key: z.ZodEffects<z.ZodString, string, string>;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
kind: string;
|
|
14
|
+
namespace: string;
|
|
15
|
+
protocol: "context.subject-key/v1";
|
|
16
|
+
local_key: string;
|
|
17
|
+
}, {
|
|
18
|
+
kind: string;
|
|
19
|
+
namespace: string;
|
|
20
|
+
protocol: "context.subject-key/v1";
|
|
21
|
+
local_key: string;
|
|
22
|
+
}>;
|
|
23
|
+
primary_indexer_id: z.ZodOptional<z.ZodString>;
|
|
24
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
25
|
+
approved_content_digest: z.ZodString;
|
|
26
|
+
source_versions: z.ZodArray<z.ZodObject<{
|
|
27
|
+
source_ref: z.ZodString;
|
|
28
|
+
module_ref: z.ZodNullable<z.ZodString>;
|
|
29
|
+
version: z.ZodString;
|
|
30
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
|
+
source_ref: string;
|
|
32
|
+
version: string;
|
|
33
|
+
module_ref: string | null;
|
|
34
|
+
}, {
|
|
35
|
+
source_ref: string;
|
|
36
|
+
version: string;
|
|
37
|
+
module_ref: string | null;
|
|
38
|
+
}>, "many">;
|
|
39
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
40
|
+
section_ref: z.ZodString;
|
|
41
|
+
section_key: z.ZodOptional<z.ZodString>;
|
|
42
|
+
markdown: z.ZodString;
|
|
43
|
+
fact_refs: z.ZodArray<z.ZodString, "many">;
|
|
44
|
+
evidence_refs: z.ZodArray<z.ZodString, "many">;
|
|
45
|
+
}, "strict", z.ZodTypeAny, {
|
|
46
|
+
evidence_refs: string[];
|
|
47
|
+
fact_refs: string[];
|
|
48
|
+
markdown: string;
|
|
49
|
+
section_ref: string;
|
|
50
|
+
section_key?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
evidence_refs: string[];
|
|
53
|
+
fact_refs: string[];
|
|
54
|
+
markdown: string;
|
|
55
|
+
section_ref: string;
|
|
56
|
+
section_key?: string | undefined;
|
|
57
|
+
}>, "many">;
|
|
58
|
+
facts: z.ZodArray<z.ZodObject<{
|
|
59
|
+
fact_ref: z.ZodString;
|
|
60
|
+
fact_kind: z.ZodEffects<z.ZodString, string, string>;
|
|
61
|
+
subject_key: z.ZodObject<{
|
|
62
|
+
protocol: z.ZodLiteral<"context.subject-key/v1">;
|
|
63
|
+
namespace: z.ZodEffects<z.ZodString, string, string>;
|
|
64
|
+
kind: z.ZodEffects<z.ZodString, string, string>;
|
|
65
|
+
local_key: z.ZodEffects<z.ZodString, string, string>;
|
|
66
|
+
}, "strict", z.ZodTypeAny, {
|
|
67
|
+
kind: string;
|
|
68
|
+
namespace: string;
|
|
69
|
+
protocol: "context.subject-key/v1";
|
|
70
|
+
local_key: string;
|
|
71
|
+
}, {
|
|
72
|
+
kind: string;
|
|
73
|
+
namespace: string;
|
|
74
|
+
protocol: "context.subject-key/v1";
|
|
75
|
+
local_key: string;
|
|
76
|
+
}>;
|
|
77
|
+
value: z.ZodType<import("./indexerRegistry.js").IndexerJson, z.ZodTypeDef, import("./indexerRegistry.js").IndexerJson>;
|
|
78
|
+
evidence_refs: z.ZodArray<z.ZodString, "many">;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
value: import("./indexerRegistry.js").IndexerJson;
|
|
81
|
+
fact_ref: string;
|
|
82
|
+
fact_kind: string;
|
|
83
|
+
subject_key: {
|
|
84
|
+
kind: string;
|
|
85
|
+
namespace: string;
|
|
86
|
+
protocol: "context.subject-key/v1";
|
|
87
|
+
local_key: string;
|
|
88
|
+
};
|
|
89
|
+
evidence_refs: string[];
|
|
90
|
+
}, {
|
|
91
|
+
value: import("./indexerRegistry.js").IndexerJson;
|
|
92
|
+
fact_ref: string;
|
|
93
|
+
fact_kind: string;
|
|
94
|
+
subject_key: {
|
|
95
|
+
kind: string;
|
|
96
|
+
namespace: string;
|
|
97
|
+
protocol: "context.subject-key/v1";
|
|
98
|
+
local_key: string;
|
|
99
|
+
};
|
|
100
|
+
evidence_refs: string[];
|
|
101
|
+
}>, "many">;
|
|
102
|
+
evidence_bindings: z.ZodArray<z.ZodObject<{
|
|
103
|
+
evidence_ref: z.ZodString;
|
|
104
|
+
kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
|
|
105
|
+
source_ref: z.ZodString;
|
|
106
|
+
module_ref: z.ZodNullable<z.ZodString>;
|
|
107
|
+
locator: z.ZodEffects<z.ZodObject<{
|
|
108
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
109
|
+
start_line: z.ZodNumber;
|
|
110
|
+
end_line: z.ZodNumber;
|
|
111
|
+
}, "strict", z.ZodTypeAny, {
|
|
112
|
+
path: string;
|
|
113
|
+
start_line: number;
|
|
114
|
+
end_line: number;
|
|
115
|
+
}, {
|
|
116
|
+
path: string;
|
|
117
|
+
start_line: number;
|
|
118
|
+
end_line: number;
|
|
119
|
+
}>, {
|
|
120
|
+
path: string;
|
|
121
|
+
start_line: number;
|
|
122
|
+
end_line: number;
|
|
123
|
+
}, {
|
|
124
|
+
path: string;
|
|
125
|
+
start_line: number;
|
|
126
|
+
end_line: number;
|
|
127
|
+
}>;
|
|
128
|
+
content_digest: z.ZodString;
|
|
129
|
+
coverage_tier: z.ZodEnum<["ast-catalog", "lightweight-evidence"]>;
|
|
130
|
+
binding_digest: z.ZodString;
|
|
131
|
+
}, "strict", z.ZodTypeAny, {
|
|
132
|
+
kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
|
|
133
|
+
source_ref: string;
|
|
134
|
+
locator: {
|
|
135
|
+
path: string;
|
|
136
|
+
start_line: number;
|
|
137
|
+
end_line: number;
|
|
138
|
+
};
|
|
139
|
+
content_digest: string;
|
|
140
|
+
module_ref: string | null;
|
|
141
|
+
coverage_tier: "ast-catalog" | "lightweight-evidence";
|
|
142
|
+
evidence_ref: string;
|
|
143
|
+
binding_digest: string;
|
|
144
|
+
}, {
|
|
145
|
+
kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
|
|
146
|
+
source_ref: string;
|
|
147
|
+
locator: {
|
|
148
|
+
path: string;
|
|
149
|
+
start_line: number;
|
|
150
|
+
end_line: number;
|
|
151
|
+
};
|
|
152
|
+
content_digest: string;
|
|
153
|
+
module_ref: string | null;
|
|
154
|
+
coverage_tier: "ast-catalog" | "lightweight-evidence";
|
|
155
|
+
evidence_ref: string;
|
|
156
|
+
binding_digest: string;
|
|
157
|
+
}>, "many">;
|
|
158
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
159
|
+
artifact_ref: z.ZodString;
|
|
160
|
+
section_refs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
161
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
162
|
+
}, "strict", z.ZodTypeAny, {
|
|
163
|
+
required: boolean;
|
|
164
|
+
artifact_ref: string;
|
|
165
|
+
section_refs: string[];
|
|
166
|
+
}, {
|
|
167
|
+
artifact_ref: string;
|
|
168
|
+
required?: boolean | undefined;
|
|
169
|
+
section_refs?: string[] | undefined;
|
|
170
|
+
}>, "many">;
|
|
171
|
+
dependency_versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
172
|
+
artifact_ref: z.ZodString;
|
|
173
|
+
approved_content_digest: z.ZodString;
|
|
174
|
+
projection_digest: z.ZodString;
|
|
175
|
+
}, "strict", z.ZodTypeAny, {
|
|
176
|
+
artifact_ref: string;
|
|
177
|
+
approved_content_digest: string;
|
|
178
|
+
projection_digest: string;
|
|
179
|
+
}, {
|
|
180
|
+
artifact_ref: string;
|
|
181
|
+
approved_content_digest: string;
|
|
182
|
+
projection_digest: string;
|
|
183
|
+
}>, "many">>;
|
|
184
|
+
snapshot_digest: z.ZodString;
|
|
185
|
+
}, "strict", z.ZodTypeAny, {
|
|
186
|
+
path: string;
|
|
187
|
+
protocol: "context.indexer.approved-knowledge/v1";
|
|
188
|
+
subject_key: {
|
|
189
|
+
kind: string;
|
|
190
|
+
namespace: string;
|
|
191
|
+
protocol: "context.subject-key/v1";
|
|
192
|
+
local_key: string;
|
|
193
|
+
};
|
|
194
|
+
sections: {
|
|
195
|
+
evidence_refs: string[];
|
|
196
|
+
fact_refs: string[];
|
|
197
|
+
markdown: string;
|
|
198
|
+
section_ref: string;
|
|
199
|
+
section_key?: string | undefined;
|
|
200
|
+
}[];
|
|
201
|
+
facts: {
|
|
202
|
+
value: import("./indexerRegistry.js").IndexerJson;
|
|
203
|
+
fact_ref: string;
|
|
204
|
+
fact_kind: string;
|
|
205
|
+
subject_key: {
|
|
206
|
+
kind: string;
|
|
207
|
+
namespace: string;
|
|
208
|
+
protocol: "context.subject-key/v1";
|
|
209
|
+
local_key: string;
|
|
210
|
+
};
|
|
211
|
+
evidence_refs: string[];
|
|
212
|
+
}[];
|
|
213
|
+
snapshot_digest: string;
|
|
214
|
+
dependencies: {
|
|
215
|
+
required: boolean;
|
|
216
|
+
artifact_ref: string;
|
|
217
|
+
section_refs: string[];
|
|
218
|
+
}[];
|
|
219
|
+
evidence_bindings: {
|
|
220
|
+
kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
|
|
221
|
+
source_ref: string;
|
|
222
|
+
locator: {
|
|
223
|
+
path: string;
|
|
224
|
+
start_line: number;
|
|
225
|
+
end_line: number;
|
|
226
|
+
};
|
|
227
|
+
content_digest: string;
|
|
228
|
+
module_ref: string | null;
|
|
229
|
+
coverage_tier: "ast-catalog" | "lightweight-evidence";
|
|
230
|
+
evidence_ref: string;
|
|
231
|
+
binding_digest: string;
|
|
232
|
+
}[];
|
|
233
|
+
artifact_ref: string;
|
|
234
|
+
approved_content_digest: string;
|
|
235
|
+
source_versions: {
|
|
236
|
+
source_ref: string;
|
|
237
|
+
version: string;
|
|
238
|
+
module_ref: string | null;
|
|
239
|
+
}[];
|
|
240
|
+
primary_indexer_id?: string | undefined;
|
|
241
|
+
dependency_versions?: {
|
|
242
|
+
artifact_ref: string;
|
|
243
|
+
approved_content_digest: string;
|
|
244
|
+
projection_digest: string;
|
|
245
|
+
}[] | undefined;
|
|
246
|
+
}, {
|
|
247
|
+
path: string;
|
|
248
|
+
protocol: "context.indexer.approved-knowledge/v1";
|
|
249
|
+
subject_key: {
|
|
250
|
+
kind: string;
|
|
251
|
+
namespace: string;
|
|
252
|
+
protocol: "context.subject-key/v1";
|
|
253
|
+
local_key: string;
|
|
254
|
+
};
|
|
255
|
+
sections: {
|
|
256
|
+
evidence_refs: string[];
|
|
257
|
+
fact_refs: string[];
|
|
258
|
+
markdown: string;
|
|
259
|
+
section_ref: string;
|
|
260
|
+
section_key?: string | undefined;
|
|
261
|
+
}[];
|
|
262
|
+
facts: {
|
|
263
|
+
value: import("./indexerRegistry.js").IndexerJson;
|
|
264
|
+
fact_ref: string;
|
|
265
|
+
fact_kind: string;
|
|
266
|
+
subject_key: {
|
|
267
|
+
kind: string;
|
|
268
|
+
namespace: string;
|
|
269
|
+
protocol: "context.subject-key/v1";
|
|
270
|
+
local_key: string;
|
|
271
|
+
};
|
|
272
|
+
evidence_refs: string[];
|
|
273
|
+
}[];
|
|
274
|
+
snapshot_digest: string;
|
|
275
|
+
dependencies: {
|
|
276
|
+
artifact_ref: string;
|
|
277
|
+
required?: boolean | undefined;
|
|
278
|
+
section_refs?: string[] | undefined;
|
|
279
|
+
}[];
|
|
280
|
+
evidence_bindings: {
|
|
281
|
+
kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
|
|
282
|
+
source_ref: string;
|
|
283
|
+
locator: {
|
|
284
|
+
path: string;
|
|
285
|
+
start_line: number;
|
|
286
|
+
end_line: number;
|
|
287
|
+
};
|
|
288
|
+
content_digest: string;
|
|
289
|
+
module_ref: string | null;
|
|
290
|
+
coverage_tier: "ast-catalog" | "lightweight-evidence";
|
|
291
|
+
evidence_ref: string;
|
|
292
|
+
binding_digest: string;
|
|
293
|
+
}[];
|
|
294
|
+
artifact_ref: string;
|
|
295
|
+
approved_content_digest: string;
|
|
296
|
+
source_versions: {
|
|
297
|
+
source_ref: string;
|
|
298
|
+
version: string;
|
|
299
|
+
module_ref: string | null;
|
|
300
|
+
}[];
|
|
301
|
+
primary_indexer_id?: string | undefined;
|
|
302
|
+
dependency_versions?: {
|
|
303
|
+
artifact_ref: string;
|
|
304
|
+
approved_content_digest: string;
|
|
305
|
+
projection_digest: string;
|
|
306
|
+
}[] | undefined;
|
|
307
|
+
}>;
|
|
308
|
+
export type IndexerApprovedKnowledge = z.infer<typeof indexerApprovedKnowledgeSchema>;
|
|
309
|
+
export declare function validateIndexerApprovedKnowledge(value: unknown): IndexerApprovedKnowledge;
|
|
310
|
+
export declare function buildIndexerApprovedKnowledge(payload: Omit<IndexerApprovedKnowledge, "snapshot_digest">): IndexerApprovedKnowledge;
|
|
311
|
+
export interface PendingKnowledgeDependency {
|
|
312
|
+
artifact_ref: string;
|
|
313
|
+
reason: "not-approved" | "approval-changed" | "section-unavailable" | "source-version-changed" | "dependency-cycle" | "same-group-dependency";
|
|
314
|
+
required: boolean;
|
|
315
|
+
}
|
|
316
|
+
/** Projection is an authority boundary. It never turns approved prose into a
|
|
317
|
+
* source fact and never assigns the source members to the consuming subject. */
|
|
318
|
+
export declare function projectIndexerApprovedKnowledge(input: {
|
|
319
|
+
dependencies: readonly IndexerKnowledgeDependency[];
|
|
320
|
+
snapshots: readonly IndexerApprovedKnowledge[];
|
|
321
|
+
approved_versions: ReadonlyMap<string, string>;
|
|
322
|
+
authorized_sources: readonly {
|
|
323
|
+
source_ref: string;
|
|
324
|
+
module_ref: string | null;
|
|
325
|
+
version: string;
|
|
326
|
+
}[];
|
|
327
|
+
evidence_kinds: ReadonlySet<string>;
|
|
328
|
+
subject_key: IndexerSubjectKey;
|
|
329
|
+
}): {
|
|
330
|
+
status: "ready" | "waiting";
|
|
331
|
+
pending: PendingKnowledgeDependency[];
|
|
332
|
+
versions: {
|
|
333
|
+
artifact_ref: string;
|
|
334
|
+
approved_content_digest: string;
|
|
335
|
+
projection_digest: string;
|
|
336
|
+
}[];
|
|
337
|
+
facts: {
|
|
338
|
+
value: import("./indexerRegistry.js").IndexerJson;
|
|
339
|
+
fact_ref: string;
|
|
340
|
+
fact_kind: string;
|
|
341
|
+
subject_key: {
|
|
342
|
+
kind: string;
|
|
343
|
+
namespace: string;
|
|
344
|
+
protocol: "context.subject-key/v1";
|
|
345
|
+
local_key: string;
|
|
346
|
+
};
|
|
347
|
+
evidence_refs: string[];
|
|
348
|
+
}[];
|
|
349
|
+
reading_sections: {
|
|
350
|
+
artifact_ref: string;
|
|
351
|
+
section_ref: string;
|
|
352
|
+
approved_content_digest: string;
|
|
353
|
+
evidence_role: "approved-interpretation";
|
|
354
|
+
markdown: string;
|
|
355
|
+
evidence_refs: string[];
|
|
356
|
+
}[];
|
|
357
|
+
evidence_bindings: {
|
|
358
|
+
kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
|
|
359
|
+
source_ref: string;
|
|
360
|
+
locator: {
|
|
361
|
+
path: string;
|
|
362
|
+
start_line: number;
|
|
363
|
+
end_line: number;
|
|
364
|
+
};
|
|
365
|
+
content_digest: string;
|
|
366
|
+
module_ref: string | null;
|
|
367
|
+
coverage_tier: "ast-catalog" | "lightweight-evidence";
|
|
368
|
+
evidence_ref: string;
|
|
369
|
+
binding_digest: string;
|
|
370
|
+
}[];
|
|
371
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { IndexerArtifactResult } from "./indexerArtifactResult.js";
|
|
3
|
+
/** Reader titles can change; these keys remain stable across revisions. */
|
|
4
|
+
export declare const indexerArticleKeySchema: z.ZodString;
|
|
5
|
+
export declare const indexerArticlePlanSchema: z.ZodObject<{
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
reader_task: z.ZodString;
|
|
9
|
+
artifact_intent: z.ZodString;
|
|
10
|
+
template_id: z.ZodOptional<z.ZodString>;
|
|
11
|
+
required: z.ZodBoolean;
|
|
12
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
13
|
+
key: z.ZodString;
|
|
14
|
+
heading: z.ZodString;
|
|
15
|
+
required: z.ZodBoolean;
|
|
16
|
+
}, "strict", z.ZodTypeAny, {
|
|
17
|
+
key: string;
|
|
18
|
+
required: boolean;
|
|
19
|
+
heading: string;
|
|
20
|
+
}, {
|
|
21
|
+
key: string;
|
|
22
|
+
required: boolean;
|
|
23
|
+
heading: string;
|
|
24
|
+
}>, "many">;
|
|
25
|
+
question_targets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
+
knowledge_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
+
artifact_ref: z.ZodString;
|
|
28
|
+
section_refs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
29
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
|
+
required: boolean;
|
|
32
|
+
artifact_ref: string;
|
|
33
|
+
section_refs: string[];
|
|
34
|
+
}, {
|
|
35
|
+
artifact_ref: string;
|
|
36
|
+
required?: boolean | undefined;
|
|
37
|
+
section_refs?: string[] | undefined;
|
|
38
|
+
}>, "many">>;
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
|
+
title: string;
|
|
41
|
+
key: string;
|
|
42
|
+
required: boolean;
|
|
43
|
+
sections: {
|
|
44
|
+
key: string;
|
|
45
|
+
required: boolean;
|
|
46
|
+
heading: string;
|
|
47
|
+
}[];
|
|
48
|
+
reader_task: string;
|
|
49
|
+
artifact_intent: string;
|
|
50
|
+
question_targets: string[];
|
|
51
|
+
template_id?: string | undefined;
|
|
52
|
+
knowledge_dependencies?: {
|
|
53
|
+
required: boolean;
|
|
54
|
+
artifact_ref: string;
|
|
55
|
+
section_refs: string[];
|
|
56
|
+
}[] | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
title: string;
|
|
59
|
+
key: string;
|
|
60
|
+
required: boolean;
|
|
61
|
+
sections: {
|
|
62
|
+
key: string;
|
|
63
|
+
required: boolean;
|
|
64
|
+
heading: string;
|
|
65
|
+
}[];
|
|
66
|
+
reader_task: string;
|
|
67
|
+
artifact_intent: string;
|
|
68
|
+
template_id?: string | undefined;
|
|
69
|
+
question_targets?: string[] | undefined;
|
|
70
|
+
knowledge_dependencies?: {
|
|
71
|
+
artifact_ref: string;
|
|
72
|
+
required?: boolean | undefined;
|
|
73
|
+
section_refs?: string[] | undefined;
|
|
74
|
+
}[] | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
export type IndexerArticlePlan = z.infer<typeof indexerArticlePlanSchema>;
|
|
77
|
+
export declare function validateIndexerArticlePlan(articles: readonly IndexerArticlePlan[], targets?: readonly string[]): void;
|
|
78
|
+
export declare function indexerArticleSectionKey(article: string, section: string): string;
|
|
79
|
+
/** Applies to both semantic submissions and programmatic Providers. */
|
|
80
|
+
export declare function validateIndexerPlannedArticles(result: IndexerArtifactResult, articles: readonly IndexerArticlePlan[]): Array<{
|
|
81
|
+
code: string;
|
|
82
|
+
message: string;
|
|
83
|
+
}>;
|
package/indexerArtifact.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
94
94
|
artifact_policy_variant: string;
|
|
95
95
|
}>, z.ZodObject<{
|
|
96
96
|
representation: z.ZodLiteral<"sections">;
|
|
97
|
+
template_id: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
97
98
|
sections: z.ZodArray<z.ZodObject<{
|
|
98
99
|
section_key: z.ZodEffects<z.ZodString, string, string>;
|
|
99
100
|
owner_indexer_id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -104,17 +105,17 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
104
105
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<"layer", [z.ZodObject<{
|
|
105
106
|
block_id: z.ZodEffects<z.ZodString, string, string>;
|
|
106
107
|
layer: z.ZodLiteral<"deterministic-block">;
|
|
107
|
-
renderer: z.ZodEnum<["bullet-list", "key-value-table", "json-code-block"]>;
|
|
108
|
+
renderer: z.ZodEnum<["bullet-list", "key-value-table", "multi-column-table", "public-contract-table", "json-code-block"]>;
|
|
108
109
|
fact_refs: z.ZodArray<z.ZodString, "many">;
|
|
109
110
|
}, "strict", z.ZodTypeAny, {
|
|
110
111
|
block_id: string;
|
|
111
112
|
layer: "deterministic-block";
|
|
112
|
-
renderer: "bullet-list" | "key-value-table" | "json-code-block";
|
|
113
|
+
renderer: "bullet-list" | "key-value-table" | "multi-column-table" | "public-contract-table" | "json-code-block";
|
|
113
114
|
fact_refs: string[];
|
|
114
115
|
}, {
|
|
115
116
|
block_id: string;
|
|
116
117
|
layer: "deterministic-block";
|
|
117
|
-
renderer: "bullet-list" | "key-value-table" | "json-code-block";
|
|
118
|
+
renderer: "bullet-list" | "key-value-table" | "multi-column-table" | "public-contract-table" | "json-code-block";
|
|
118
119
|
fact_refs: string[];
|
|
119
120
|
}>, z.ZodObject<{
|
|
120
121
|
block_id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -141,7 +142,7 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
141
142
|
blocks: ({
|
|
142
143
|
block_id: string;
|
|
143
144
|
layer: "deterministic-block";
|
|
144
|
-
renderer: "bullet-list" | "key-value-table" | "json-code-block";
|
|
145
|
+
renderer: "bullet-list" | "key-value-table" | "multi-column-table" | "public-contract-table" | "json-code-block";
|
|
145
146
|
fact_refs: string[];
|
|
146
147
|
} | {
|
|
147
148
|
evidence_refs: string[];
|
|
@@ -158,7 +159,7 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
158
159
|
blocks: ({
|
|
159
160
|
block_id: string;
|
|
160
161
|
layer: "deterministic-block";
|
|
161
|
-
renderer: "bullet-list" | "key-value-table" | "json-code-block";
|
|
162
|
+
renderer: "bullet-list" | "key-value-table" | "multi-column-table" | "public-contract-table" | "json-code-block";
|
|
162
163
|
fact_refs: string[];
|
|
163
164
|
} | {
|
|
164
165
|
evidence_refs: string[];
|
|
@@ -184,7 +185,7 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
184
185
|
blocks: ({
|
|
185
186
|
block_id: string;
|
|
186
187
|
layer: "deterministic-block";
|
|
187
|
-
renderer: "bullet-list" | "key-value-table" | "json-code-block";
|
|
188
|
+
renderer: "bullet-list" | "key-value-table" | "multi-column-table" | "public-contract-table" | "json-code-block";
|
|
188
189
|
fact_refs: string[];
|
|
189
190
|
} | {
|
|
190
191
|
evidence_refs: string[];
|
|
@@ -193,6 +194,7 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
193
194
|
markdown: string;
|
|
194
195
|
})[];
|
|
195
196
|
}[];
|
|
197
|
+
template_id?: string | undefined;
|
|
196
198
|
}, {
|
|
197
199
|
artifact_kind: string;
|
|
198
200
|
representation: "sections";
|
|
@@ -207,7 +209,7 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
207
209
|
blocks: ({
|
|
208
210
|
block_id: string;
|
|
209
211
|
layer: "deterministic-block";
|
|
210
|
-
renderer: "bullet-list" | "key-value-table" | "json-code-block";
|
|
212
|
+
renderer: "bullet-list" | "key-value-table" | "multi-column-table" | "public-contract-table" | "json-code-block";
|
|
211
213
|
fact_refs: string[];
|
|
212
214
|
} | {
|
|
213
215
|
evidence_refs: string[];
|
|
@@ -216,6 +218,7 @@ export declare const indexerArtifactSchema: z.ZodDiscriminatedUnion<"representat
|
|
|
216
218
|
markdown: string;
|
|
217
219
|
})[];
|
|
218
220
|
}[];
|
|
221
|
+
template_id?: string | undefined;
|
|
219
222
|
}>]>;
|
|
220
223
|
export type IndexerArtifact = z.infer<typeof indexerArtifactSchema>;
|
|
221
224
|
export type IndexerArtifactSectionProjection = z.infer<typeof indexerArtifactSectionProjectionSchema>;
|
|
@@ -256,7 +256,7 @@ export declare const indexerArtifactDependencySetSchema: z.ZodObject<{
|
|
|
256
256
|
group_projection_digest: string;
|
|
257
257
|
dependency_ref: string;
|
|
258
258
|
}>, z.ZodObject<{
|
|
259
|
-
kind: z.ZodEnum<["template-policy-fragment", "contract-metric"]>;
|
|
259
|
+
kind: z.ZodEnum<["template-policy-fragment", "contract-metric", "approved-knowledge"]>;
|
|
260
260
|
target_ref: z.ZodString;
|
|
261
261
|
content_digest: z.ZodString;
|
|
262
262
|
targets: z.ZodArray<z.ZodDiscriminatedUnion<"level", [z.ZodObject<{
|
|
@@ -292,7 +292,7 @@ export declare const indexerArtifactDependencySetSchema: z.ZodObject<{
|
|
|
292
292
|
} & {
|
|
293
293
|
dependency_ref: z.ZodString;
|
|
294
294
|
}, "strict", z.ZodTypeAny, {
|
|
295
|
-
kind: "template-policy-fragment" | "contract-metric";
|
|
295
|
+
kind: "template-policy-fragment" | "contract-metric" | "approved-knowledge";
|
|
296
296
|
targets: ({
|
|
297
297
|
level: "logical-unit";
|
|
298
298
|
} | {
|
|
@@ -308,7 +308,7 @@ export declare const indexerArtifactDependencySetSchema: z.ZodObject<{
|
|
|
308
308
|
node_ref: string;
|
|
309
309
|
dependency_ref: string;
|
|
310
310
|
}, {
|
|
311
|
-
kind: "template-policy-fragment" | "contract-metric";
|
|
311
|
+
kind: "template-policy-fragment" | "contract-metric" | "approved-knowledge";
|
|
312
312
|
targets: ({
|
|
313
313
|
level: "logical-unit";
|
|
314
314
|
} | {
|
|
@@ -521,7 +521,7 @@ export declare const indexerArtifactDependencySetSchema: z.ZodObject<{
|
|
|
521
521
|
group_projection_digest: string;
|
|
522
522
|
dependency_ref: string;
|
|
523
523
|
} | {
|
|
524
|
-
kind: "template-policy-fragment" | "contract-metric";
|
|
524
|
+
kind: "template-policy-fragment" | "contract-metric" | "approved-knowledge";
|
|
525
525
|
targets: ({
|
|
526
526
|
level: "logical-unit";
|
|
527
527
|
} | {
|
|
@@ -634,7 +634,7 @@ export declare const indexerArtifactDependencySetSchema: z.ZodObject<{
|
|
|
634
634
|
group_projection_digest: string;
|
|
635
635
|
dependency_ref: string;
|
|
636
636
|
} | {
|
|
637
|
-
kind: "template-policy-fragment" | "contract-metric";
|
|
637
|
+
kind: "template-policy-fragment" | "contract-metric" | "approved-knowledge";
|
|
638
638
|
targets: ({
|
|
639
639
|
level: "logical-unit";
|
|
640
640
|
} | {
|
|
@@ -675,6 +675,7 @@ export declare function buildIndexerArtifactDependencySet(input: {
|
|
|
675
675
|
workset: IndexerMainAuthorWorkset;
|
|
676
676
|
run_envelope: unknown;
|
|
677
677
|
dependency_view: unknown;
|
|
678
|
+
composition_input?: unknown;
|
|
678
679
|
authorized_evidence_targets?: readonly IndexerAuthorizedEvidenceTarget[];
|
|
679
680
|
}): IndexerArtifactDependencySet;
|
|
680
681
|
export declare function validateIndexerArtifactDependencySet(input: {
|
|
@@ -683,6 +684,7 @@ export declare function validateIndexerArtifactDependencySet(input: {
|
|
|
683
684
|
workset: IndexerMainAuthorWorkset;
|
|
684
685
|
run_envelope: unknown;
|
|
685
686
|
dependency_view: unknown;
|
|
687
|
+
composition_input?: unknown;
|
|
686
688
|
authorized_evidence_targets?: readonly IndexerAuthorizedEvidenceTarget[];
|
|
687
689
|
}): IndexerArtifactDependencySet;
|
|
688
690
|
export declare function validateIndexerArtifactDependencyViewBinding(input: {
|