@c4a/context 0.7.8 → 0.7.10-alpha.1
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/articleStructure.d.ts +254 -0
- package/docs/guides/agent-dialogue.md +6 -5
- package/docs/guides/agent-guide.md +11 -5
- package/docs/guides/code-indexer-skill-authoring.md +76 -178
- package/docs/guides/indexer-provider-and-customization.md +93 -398
- package/docs/guides/indexer-skill-creation.md +107 -97
- package/docs/guides/knowledge-updates.md +137 -18
- package/docs/guides/markdown-indexer-skill-authoring.md +57 -134
- package/docs/guides/package-outputs.md +213 -47
- package/docs/reference/indexer-provider-protocol.md +71 -102
- package/docs/reference/package-templates.md +39 -65
- package/docs/reference/project-api.md +53 -0
- package/docs/reference/template-variables.md +2 -3
- package/index.d.ts +11 -11
- package/index.js +5826 -8062
- package/indexerAgentStepProtocol.d.ts +0 -910
- package/indexerApprovedKnowledge.d.ts +98 -359
- package/indexerArticlePlan.d.ts +3 -26
- package/indexerArtifact.d.ts +201 -70
- package/indexerArtifactPolicy.d.ts +4 -22
- package/indexerArtifactResult.d.ts +240 -888
- package/indexerAuthoringFixture.d.ts +0 -13
- package/indexerBenchmark.d.ts +2 -2
- package/indexerCandidateCompile.d.ts +123 -167
- package/indexerCatalogFallback.d.ts +32 -374
- package/indexerCollectionMapping.d.ts +2 -2
- package/indexerContentLayers.d.ts +187 -41
- package/indexerContractOverlay.d.ts +30 -44
- package/indexerControlledInvocation.d.ts +6 -6
- package/indexerControlledProgram.d.ts +959 -3020
- package/indexerDependencyView.d.ts +96 -96
- package/indexerEffectiveArtifact.d.ts +381 -242
- package/indexerExampleDecision.d.ts +134 -134
- package/indexerExampleIdentity.d.ts +6 -6
- package/indexerExampleIdentityAudit.d.ts +6 -6
- package/indexerInventoryDisposition.d.ts +0 -39
- package/indexerLayerComposition.d.ts +1378 -852
- package/indexerLayoutChange.d.ts +24 -33
- package/indexerLayoutProposalSet.d.ts +143 -137
- package/indexerLayoutResolver.d.ts +116 -101
- package/indexerLayoutTransition.d.ts +6 -6
- package/indexerMainLifecycle.d.ts +1 -11
- package/indexerMainRunLedger.d.ts +0 -14
- package/indexerMainRunProtocol.d.ts +806 -2530
- package/indexerMainWorkset.d.ts +0 -1212
- package/indexerNavigationArtifactPlan.d.ts +2 -2
- package/indexerOverlayQuestionApplyProposal.d.ts +0 -4
- package/indexerParserCoordinate.d.ts +2 -2
- package/indexerParserExecutionPlan.d.ts +42 -42
- package/indexerPartitionPlan.d.ts +24 -354
- package/indexerPhysicalArtifactManifest.d.ts +12 -27
- package/indexerPostAuthorComposition.d.ts +2 -253
- package/indexerPostAuthorRunLedger.d.ts +860 -562
- package/indexerPrimaryProjection.d.ts +2 -2
- package/indexerPrimaryResultView.d.ts +0 -318
- package/indexerProfileContract.d.ts +200 -549
- package/indexerProgramExecutionAuthorization.d.ts +4 -4
- package/indexerProgramRunProtocol.d.ts +806 -2527
- package/indexerProjectProposal.d.ts +8 -8
- package/indexerProjectedArtifactFanOutAudit.d.ts +8 -8
- package/indexerProjectedArtifactPlan.d.ts +0 -9
- package/indexerProtocolHash.d.ts +2 -0
- package/indexerProvider.d.ts +76 -318
- package/indexerProviderComposition.d.ts +16 -42
- package/indexerQuestionAuthority.d.ts +2 -82
- package/indexerReaderTargetInventory.d.ts +6 -6
- package/indexerRegistry.d.ts +606 -0
- package/indexerRequirementLifecycle.d.ts +6 -6
- package/indexerResultReconciliation.d.ts +35 -149
- package/indexerSemanticInput.d.ts +10926 -5665
- package/indexerStructuredDeclaration.d.ts +24 -24
- package/indexerTemplateRendering.d.ts +239 -113
- package/{readingStructure.d.ts → knowledgeMap.d.ts} +21 -21
- package/package.json +1 -1
- package/packageSite.d.ts +25 -0
- package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +13 -16
- package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +9 -9
- package/indexerArtifactDependencies.d.ts +0 -693
- package/indexerCompositionFactDependencies.d.ts +0 -16
- package/indexerExampleFactDependencies.d.ts +0 -17
- package/indexerIncrementalImpact.d.ts +0 -221
- package/indexerKnowledgeDependency.d.ts +0 -46
- package/indexerSubjectCatalog.d.ts +0 -230
- package/indexerSubjectKeyAuthority.d.ts +0 -786
|
@@ -19,7 +19,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
19
19
|
type: z.ZodEnum<["string", "string-list", "string-map", "number", "boolean", "json"]>;
|
|
20
20
|
content_layer: z.ZodEnum<["deterministic-fact", "semantic-prose"]>;
|
|
21
21
|
required: z.ZodBoolean;
|
|
22
|
-
evidence_required: z.ZodBoolean;
|
|
23
22
|
maximum_length: z.ZodOptional<z.ZodNumber>;
|
|
24
23
|
maximum_items: z.ZodOptional<z.ZodNumber>;
|
|
25
24
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -27,7 +26,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
27
26
|
id: string;
|
|
28
27
|
required: boolean;
|
|
29
28
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
30
|
-
evidence_required: boolean;
|
|
31
29
|
maximum_length?: number | undefined;
|
|
32
30
|
maximum_items?: number | undefined;
|
|
33
31
|
}, {
|
|
@@ -35,7 +33,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
35
33
|
id: string;
|
|
36
34
|
required: boolean;
|
|
37
35
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
38
|
-
evidence_required: boolean;
|
|
39
36
|
maximum_length?: number | undefined;
|
|
40
37
|
maximum_items?: number | undefined;
|
|
41
38
|
}>, {
|
|
@@ -43,7 +40,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
43
40
|
id: string;
|
|
44
41
|
required: boolean;
|
|
45
42
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
46
|
-
evidence_required: boolean;
|
|
47
43
|
maximum_length?: number | undefined;
|
|
48
44
|
maximum_items?: number | undefined;
|
|
49
45
|
}, {
|
|
@@ -51,7 +47,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
51
47
|
id: string;
|
|
52
48
|
required: boolean;
|
|
53
49
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
54
|
-
evidence_required: boolean;
|
|
55
50
|
maximum_length?: number | undefined;
|
|
56
51
|
maximum_items?: number | undefined;
|
|
57
52
|
}>, "many">;
|
|
@@ -75,8 +70,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
75
70
|
reader_goal: z.ZodEffects<z.ZodString, string, string>;
|
|
76
71
|
variable_ids: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
77
72
|
deterministic_block_ids: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
78
|
-
accepted_evidence_kinds: z.ZodArray<z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>, "many">;
|
|
79
|
-
minimum_evidence_items: z.ZodNumber;
|
|
80
73
|
on_missing: z.ZodEnum<["request-input", "omit"]>;
|
|
81
74
|
deletion_condition: z.ZodString;
|
|
82
75
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -86,8 +79,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
86
79
|
presence: "required" | "optional";
|
|
87
80
|
variable_ids: string[];
|
|
88
81
|
deterministic_block_ids: string[];
|
|
89
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
90
|
-
minimum_evidence_items: number;
|
|
91
82
|
on_missing: "omit" | "request-input";
|
|
92
83
|
deletion_condition: string;
|
|
93
84
|
}, {
|
|
@@ -97,8 +88,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
97
88
|
presence: "required" | "optional";
|
|
98
89
|
variable_ids: string[];
|
|
99
90
|
deterministic_block_ids: string[];
|
|
100
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
101
|
-
minimum_evidence_items: number;
|
|
102
91
|
on_missing: "omit" | "request-input";
|
|
103
92
|
deletion_condition: string;
|
|
104
93
|
}>, {
|
|
@@ -108,8 +97,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
108
97
|
presence: "required" | "optional";
|
|
109
98
|
variable_ids: string[];
|
|
110
99
|
deterministic_block_ids: string[];
|
|
111
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
112
|
-
minimum_evidence_items: number;
|
|
113
100
|
on_missing: "omit" | "request-input";
|
|
114
101
|
deletion_condition: string;
|
|
115
102
|
}, {
|
|
@@ -119,8 +106,6 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
119
106
|
presence: "required" | "optional";
|
|
120
107
|
variable_ids: string[];
|
|
121
108
|
deterministic_block_ids: string[];
|
|
122
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
123
|
-
minimum_evidence_items: number;
|
|
124
109
|
on_missing: "omit" | "request-input";
|
|
125
110
|
deletion_condition: string;
|
|
126
111
|
}>, "many">;
|
|
@@ -142,6 +127,16 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
142
127
|
forbidden_outputs: z.ZodArray<z.ZodString, "many">;
|
|
143
128
|
maximum_rendered_bytes: z.ZodNumber;
|
|
144
129
|
}, "strict", z.ZodTypeAny, {
|
|
130
|
+
sections: {
|
|
131
|
+
section_key: string;
|
|
132
|
+
reader_goal: string;
|
|
133
|
+
question_ref: string;
|
|
134
|
+
presence: "required" | "optional";
|
|
135
|
+
variable_ids: string[];
|
|
136
|
+
deterministic_block_ids: string[];
|
|
137
|
+
on_missing: "omit" | "request-input";
|
|
138
|
+
deletion_condition: string;
|
|
139
|
+
}[];
|
|
145
140
|
protocol: "context.indexer.template/v1";
|
|
146
141
|
profile: string;
|
|
147
142
|
reader_goal: string;
|
|
@@ -151,22 +146,9 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
151
146
|
id: string;
|
|
152
147
|
required: boolean;
|
|
153
148
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
154
|
-
evidence_required: boolean;
|
|
155
149
|
maximum_length?: number | undefined;
|
|
156
150
|
maximum_items?: number | undefined;
|
|
157
151
|
}[];
|
|
158
|
-
sections: {
|
|
159
|
-
section_key: string;
|
|
160
|
-
reader_goal: string;
|
|
161
|
-
question_ref: string;
|
|
162
|
-
presence: "required" | "optional";
|
|
163
|
-
variable_ids: string[];
|
|
164
|
-
deterministic_block_ids: string[];
|
|
165
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
166
|
-
minimum_evidence_items: number;
|
|
167
|
-
on_missing: "omit" | "request-input";
|
|
168
|
-
deletion_condition: string;
|
|
169
|
-
}[];
|
|
170
152
|
applicability: {
|
|
171
153
|
artifact_policy_variants: string[];
|
|
172
154
|
condition_refs: string[];
|
|
@@ -186,6 +168,16 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
186
168
|
forbidden_outputs: string[];
|
|
187
169
|
maximum_rendered_bytes: number;
|
|
188
170
|
}, {
|
|
171
|
+
sections: {
|
|
172
|
+
section_key: string;
|
|
173
|
+
reader_goal: string;
|
|
174
|
+
question_ref: string;
|
|
175
|
+
presence: "required" | "optional";
|
|
176
|
+
variable_ids: string[];
|
|
177
|
+
deterministic_block_ids: string[];
|
|
178
|
+
on_missing: "omit" | "request-input";
|
|
179
|
+
deletion_condition: string;
|
|
180
|
+
}[];
|
|
189
181
|
protocol: "context.indexer.template/v1";
|
|
190
182
|
profile: string;
|
|
191
183
|
reader_goal: string;
|
|
@@ -195,22 +187,9 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
195
187
|
id: string;
|
|
196
188
|
required: boolean;
|
|
197
189
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
198
|
-
evidence_required: boolean;
|
|
199
190
|
maximum_length?: number | undefined;
|
|
200
191
|
maximum_items?: number | undefined;
|
|
201
192
|
}[];
|
|
202
|
-
sections: {
|
|
203
|
-
section_key: string;
|
|
204
|
-
reader_goal: string;
|
|
205
|
-
question_ref: string;
|
|
206
|
-
presence: "required" | "optional";
|
|
207
|
-
variable_ids: string[];
|
|
208
|
-
deterministic_block_ids: string[];
|
|
209
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
210
|
-
minimum_evidence_items: number;
|
|
211
|
-
on_missing: "omit" | "request-input";
|
|
212
|
-
deletion_condition: string;
|
|
213
|
-
}[];
|
|
214
193
|
applicability: {
|
|
215
194
|
artifact_policy_variants: string[];
|
|
216
195
|
condition_refs: string[];
|
|
@@ -230,6 +209,16 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
230
209
|
forbidden_outputs: string[];
|
|
231
210
|
maximum_rendered_bytes: number;
|
|
232
211
|
}>, {
|
|
212
|
+
sections: {
|
|
213
|
+
section_key: string;
|
|
214
|
+
reader_goal: string;
|
|
215
|
+
question_ref: string;
|
|
216
|
+
presence: "required" | "optional";
|
|
217
|
+
variable_ids: string[];
|
|
218
|
+
deterministic_block_ids: string[];
|
|
219
|
+
on_missing: "omit" | "request-input";
|
|
220
|
+
deletion_condition: string;
|
|
221
|
+
}[];
|
|
233
222
|
protocol: "context.indexer.template/v1";
|
|
234
223
|
profile: string;
|
|
235
224
|
reader_goal: string;
|
|
@@ -239,22 +228,9 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
239
228
|
id: string;
|
|
240
229
|
required: boolean;
|
|
241
230
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
242
|
-
evidence_required: boolean;
|
|
243
231
|
maximum_length?: number | undefined;
|
|
244
232
|
maximum_items?: number | undefined;
|
|
245
233
|
}[];
|
|
246
|
-
sections: {
|
|
247
|
-
section_key: string;
|
|
248
|
-
reader_goal: string;
|
|
249
|
-
question_ref: string;
|
|
250
|
-
presence: "required" | "optional";
|
|
251
|
-
variable_ids: string[];
|
|
252
|
-
deterministic_block_ids: string[];
|
|
253
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
254
|
-
minimum_evidence_items: number;
|
|
255
|
-
on_missing: "omit" | "request-input";
|
|
256
|
-
deletion_condition: string;
|
|
257
|
-
}[];
|
|
258
234
|
applicability: {
|
|
259
235
|
artifact_policy_variants: string[];
|
|
260
236
|
condition_refs: string[];
|
|
@@ -274,6 +250,16 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
274
250
|
forbidden_outputs: string[];
|
|
275
251
|
maximum_rendered_bytes: number;
|
|
276
252
|
}, {
|
|
253
|
+
sections: {
|
|
254
|
+
section_key: string;
|
|
255
|
+
reader_goal: string;
|
|
256
|
+
question_ref: string;
|
|
257
|
+
presence: "required" | "optional";
|
|
258
|
+
variable_ids: string[];
|
|
259
|
+
deterministic_block_ids: string[];
|
|
260
|
+
on_missing: "omit" | "request-input";
|
|
261
|
+
deletion_condition: string;
|
|
262
|
+
}[];
|
|
277
263
|
protocol: "context.indexer.template/v1";
|
|
278
264
|
profile: string;
|
|
279
265
|
reader_goal: string;
|
|
@@ -283,22 +269,9 @@ export declare const indexerTemplateContractSchema: z.ZodEffects<z.ZodObject<{
|
|
|
283
269
|
id: string;
|
|
284
270
|
required: boolean;
|
|
285
271
|
content_layer: "semantic-prose" | "deterministic-fact";
|
|
286
|
-
evidence_required: boolean;
|
|
287
272
|
maximum_length?: number | undefined;
|
|
288
273
|
maximum_items?: number | undefined;
|
|
289
274
|
}[];
|
|
290
|
-
sections: {
|
|
291
|
-
section_key: string;
|
|
292
|
-
reader_goal: string;
|
|
293
|
-
question_ref: string;
|
|
294
|
-
presence: "required" | "optional";
|
|
295
|
-
variable_ids: string[];
|
|
296
|
-
deterministic_block_ids: string[];
|
|
297
|
-
accepted_evidence_kinds: ("code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot")[];
|
|
298
|
-
minimum_evidence_items: number;
|
|
299
|
-
on_missing: "omit" | "request-input";
|
|
300
|
-
deletion_condition: string;
|
|
301
|
-
}[];
|
|
302
275
|
applicability: {
|
|
303
276
|
artifact_policy_variants: string[];
|
|
304
277
|
condition_refs: string[];
|
|
@@ -338,56 +311,179 @@ export declare const indexerRenderedArtifactSchema: z.ZodObject<{
|
|
|
338
311
|
content_blocks: z.ZodArray<z.ZodObject<{
|
|
339
312
|
layer: z.ZodEnum<["deterministic-block", "semantic-prose"]>;
|
|
340
313
|
markdown: z.ZodString;
|
|
341
|
-
|
|
342
|
-
|
|
314
|
+
references: z.ZodArray<z.ZodObject<{
|
|
315
|
+
source_ref: z.ZodString;
|
|
316
|
+
locator: z.ZodEffects<z.ZodObject<{
|
|
317
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
318
|
+
start_line: z.ZodNumber;
|
|
319
|
+
end_line: z.ZodNumber;
|
|
320
|
+
}, "strict", z.ZodTypeAny, {
|
|
321
|
+
path: string;
|
|
322
|
+
start_line: number;
|
|
323
|
+
end_line: number;
|
|
324
|
+
}, {
|
|
325
|
+
path: string;
|
|
326
|
+
start_line: number;
|
|
327
|
+
end_line: number;
|
|
328
|
+
}>, {
|
|
329
|
+
path: string;
|
|
330
|
+
start_line: number;
|
|
331
|
+
end_line: number;
|
|
332
|
+
}, {
|
|
333
|
+
path: string;
|
|
334
|
+
start_line: number;
|
|
335
|
+
end_line: number;
|
|
336
|
+
}>;
|
|
337
|
+
content_digest: z.ZodString;
|
|
338
|
+
}, "strict", z.ZodTypeAny, {
|
|
339
|
+
source_ref: string;
|
|
340
|
+
locator: {
|
|
341
|
+
path: string;
|
|
342
|
+
start_line: number;
|
|
343
|
+
end_line: number;
|
|
344
|
+
};
|
|
345
|
+
content_digest: string;
|
|
346
|
+
}, {
|
|
347
|
+
source_ref: string;
|
|
348
|
+
locator: {
|
|
349
|
+
path: string;
|
|
350
|
+
start_line: number;
|
|
351
|
+
end_line: number;
|
|
352
|
+
};
|
|
353
|
+
content_digest: string;
|
|
354
|
+
}>, "many">;
|
|
343
355
|
} & {
|
|
344
356
|
content_digest: z.ZodString;
|
|
345
357
|
}, "strict", z.ZodTypeAny, {
|
|
346
|
-
evidence_refs: string[];
|
|
347
|
-
layer: "deterministic-block" | "semantic-prose";
|
|
348
|
-
fact_refs: string[];
|
|
349
|
-
markdown: string;
|
|
350
358
|
content_digest: string;
|
|
359
|
+
references: {
|
|
360
|
+
source_ref: string;
|
|
361
|
+
locator: {
|
|
362
|
+
path: string;
|
|
363
|
+
start_line: number;
|
|
364
|
+
end_line: number;
|
|
365
|
+
};
|
|
366
|
+
content_digest: string;
|
|
367
|
+
}[];
|
|
368
|
+
layer: "semantic-prose" | "deterministic-block";
|
|
369
|
+
markdown: string;
|
|
351
370
|
}, {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
371
|
+
content_digest: string;
|
|
372
|
+
references: {
|
|
373
|
+
source_ref: string;
|
|
374
|
+
locator: {
|
|
375
|
+
path: string;
|
|
376
|
+
start_line: number;
|
|
377
|
+
end_line: number;
|
|
378
|
+
};
|
|
379
|
+
content_digest: string;
|
|
380
|
+
}[];
|
|
381
|
+
layer: "semantic-prose" | "deterministic-block";
|
|
355
382
|
markdown: string;
|
|
383
|
+
}>, "many">;
|
|
384
|
+
references: z.ZodArray<z.ZodObject<{
|
|
385
|
+
source_ref: z.ZodString;
|
|
386
|
+
locator: z.ZodEffects<z.ZodObject<{
|
|
387
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
388
|
+
start_line: z.ZodNumber;
|
|
389
|
+
end_line: z.ZodNumber;
|
|
390
|
+
}, "strict", z.ZodTypeAny, {
|
|
391
|
+
path: string;
|
|
392
|
+
start_line: number;
|
|
393
|
+
end_line: number;
|
|
394
|
+
}, {
|
|
395
|
+
path: string;
|
|
396
|
+
start_line: number;
|
|
397
|
+
end_line: number;
|
|
398
|
+
}>, {
|
|
399
|
+
path: string;
|
|
400
|
+
start_line: number;
|
|
401
|
+
end_line: number;
|
|
402
|
+
}, {
|
|
403
|
+
path: string;
|
|
404
|
+
start_line: number;
|
|
405
|
+
end_line: number;
|
|
406
|
+
}>;
|
|
407
|
+
content_digest: z.ZodString;
|
|
408
|
+
}, "strict", z.ZodTypeAny, {
|
|
409
|
+
source_ref: string;
|
|
410
|
+
locator: {
|
|
411
|
+
path: string;
|
|
412
|
+
start_line: number;
|
|
413
|
+
end_line: number;
|
|
414
|
+
};
|
|
415
|
+
content_digest: string;
|
|
416
|
+
}, {
|
|
417
|
+
source_ref: string;
|
|
418
|
+
locator: {
|
|
419
|
+
path: string;
|
|
420
|
+
start_line: number;
|
|
421
|
+
end_line: number;
|
|
422
|
+
};
|
|
356
423
|
content_digest: string;
|
|
357
424
|
}>, "many">;
|
|
358
|
-
evidence_refs: z.ZodArray<z.ZodString, "many">;
|
|
359
425
|
content_digest: z.ZodString;
|
|
360
426
|
}, "strict", z.ZodTypeAny, {
|
|
361
|
-
evidence_refs: string[];
|
|
362
|
-
markdown: string;
|
|
363
427
|
content_digest: string;
|
|
428
|
+
references: {
|
|
429
|
+
source_ref: string;
|
|
430
|
+
locator: {
|
|
431
|
+
path: string;
|
|
432
|
+
start_line: number;
|
|
433
|
+
end_line: number;
|
|
434
|
+
};
|
|
435
|
+
content_digest: string;
|
|
436
|
+
}[];
|
|
437
|
+
markdown: string;
|
|
364
438
|
section_key: string;
|
|
365
439
|
owner_indexer_id: string;
|
|
366
440
|
document_kind: string;
|
|
367
441
|
reader_goal: string;
|
|
368
442
|
artifact_kind: string;
|
|
369
443
|
content_blocks: {
|
|
370
|
-
evidence_refs: string[];
|
|
371
|
-
layer: "deterministic-block" | "semantic-prose";
|
|
372
|
-
fact_refs: string[];
|
|
373
|
-
markdown: string;
|
|
374
444
|
content_digest: string;
|
|
445
|
+
references: {
|
|
446
|
+
source_ref: string;
|
|
447
|
+
locator: {
|
|
448
|
+
path: string;
|
|
449
|
+
start_line: number;
|
|
450
|
+
end_line: number;
|
|
451
|
+
};
|
|
452
|
+
content_digest: string;
|
|
453
|
+
}[];
|
|
454
|
+
layer: "semantic-prose" | "deterministic-block";
|
|
455
|
+
markdown: string;
|
|
375
456
|
}[];
|
|
376
457
|
}, {
|
|
377
|
-
evidence_refs: string[];
|
|
378
|
-
markdown: string;
|
|
379
458
|
content_digest: string;
|
|
459
|
+
references: {
|
|
460
|
+
source_ref: string;
|
|
461
|
+
locator: {
|
|
462
|
+
path: string;
|
|
463
|
+
start_line: number;
|
|
464
|
+
end_line: number;
|
|
465
|
+
};
|
|
466
|
+
content_digest: string;
|
|
467
|
+
}[];
|
|
468
|
+
markdown: string;
|
|
380
469
|
section_key: string;
|
|
381
470
|
owner_indexer_id: string;
|
|
382
471
|
document_kind: string;
|
|
383
472
|
reader_goal: string;
|
|
384
473
|
artifact_kind: string;
|
|
385
474
|
content_blocks: {
|
|
386
|
-
evidence_refs: string[];
|
|
387
|
-
layer: "deterministic-block" | "semantic-prose";
|
|
388
|
-
fact_refs: string[];
|
|
389
|
-
markdown: string;
|
|
390
475
|
content_digest: string;
|
|
476
|
+
references: {
|
|
477
|
+
source_ref: string;
|
|
478
|
+
locator: {
|
|
479
|
+
path: string;
|
|
480
|
+
start_line: number;
|
|
481
|
+
end_line: number;
|
|
482
|
+
};
|
|
483
|
+
content_digest: string;
|
|
484
|
+
}[];
|
|
485
|
+
layer: "semantic-prose" | "deterministic-block";
|
|
486
|
+
markdown: string;
|
|
391
487
|
}[];
|
|
392
488
|
}>, "many">;
|
|
393
489
|
material_question_gaps: z.ZodArray<z.ZodObject<{
|
|
@@ -409,29 +505,44 @@ export declare const indexerRenderedArtifactSchema: z.ZodObject<{
|
|
|
409
505
|
review_ready: z.ZodBoolean;
|
|
410
506
|
rendered_digest: z.ZodString;
|
|
411
507
|
}, "strict", z.ZodTypeAny, {
|
|
412
|
-
protocol: "context.indexer.rendered-artifact/v1";
|
|
413
|
-
profile: string;
|
|
414
|
-
artifact_kind: string;
|
|
415
|
-
template_id: string;
|
|
416
|
-
artifact_id: string;
|
|
417
|
-
artifact_policy_variant: string;
|
|
418
508
|
sections: {
|
|
419
|
-
evidence_refs: string[];
|
|
420
|
-
markdown: string;
|
|
421
509
|
content_digest: string;
|
|
510
|
+
references: {
|
|
511
|
+
source_ref: string;
|
|
512
|
+
locator: {
|
|
513
|
+
path: string;
|
|
514
|
+
start_line: number;
|
|
515
|
+
end_line: number;
|
|
516
|
+
};
|
|
517
|
+
content_digest: string;
|
|
518
|
+
}[];
|
|
519
|
+
markdown: string;
|
|
422
520
|
section_key: string;
|
|
423
521
|
owner_indexer_id: string;
|
|
424
522
|
document_kind: string;
|
|
425
523
|
reader_goal: string;
|
|
426
524
|
artifact_kind: string;
|
|
427
525
|
content_blocks: {
|
|
428
|
-
evidence_refs: string[];
|
|
429
|
-
layer: "deterministic-block" | "semantic-prose";
|
|
430
|
-
fact_refs: string[];
|
|
431
|
-
markdown: string;
|
|
432
526
|
content_digest: string;
|
|
527
|
+
references: {
|
|
528
|
+
source_ref: string;
|
|
529
|
+
locator: {
|
|
530
|
+
path: string;
|
|
531
|
+
start_line: number;
|
|
532
|
+
end_line: number;
|
|
533
|
+
};
|
|
534
|
+
content_digest: string;
|
|
535
|
+
}[];
|
|
536
|
+
layer: "semantic-prose" | "deterministic-block";
|
|
537
|
+
markdown: string;
|
|
433
538
|
}[];
|
|
434
539
|
}[];
|
|
540
|
+
protocol: "context.indexer.rendered-artifact/v1";
|
|
541
|
+
profile: string;
|
|
542
|
+
artifact_kind: string;
|
|
543
|
+
template_id: string;
|
|
544
|
+
artifact_id: string;
|
|
545
|
+
artifact_policy_variant: string;
|
|
435
546
|
artifact_result_digest: string;
|
|
436
547
|
template_digest: string;
|
|
437
548
|
template_origin: "provider" | "customization-override";
|
|
@@ -444,29 +555,44 @@ export declare const indexerRenderedArtifactSchema: z.ZodObject<{
|
|
|
444
555
|
review_ready: boolean;
|
|
445
556
|
rendered_digest: string;
|
|
446
557
|
}, {
|
|
447
|
-
protocol: "context.indexer.rendered-artifact/v1";
|
|
448
|
-
profile: string;
|
|
449
|
-
artifact_kind: string;
|
|
450
|
-
template_id: string;
|
|
451
|
-
artifact_id: string;
|
|
452
|
-
artifact_policy_variant: string;
|
|
453
558
|
sections: {
|
|
454
|
-
evidence_refs: string[];
|
|
455
|
-
markdown: string;
|
|
456
559
|
content_digest: string;
|
|
560
|
+
references: {
|
|
561
|
+
source_ref: string;
|
|
562
|
+
locator: {
|
|
563
|
+
path: string;
|
|
564
|
+
start_line: number;
|
|
565
|
+
end_line: number;
|
|
566
|
+
};
|
|
567
|
+
content_digest: string;
|
|
568
|
+
}[];
|
|
569
|
+
markdown: string;
|
|
457
570
|
section_key: string;
|
|
458
571
|
owner_indexer_id: string;
|
|
459
572
|
document_kind: string;
|
|
460
573
|
reader_goal: string;
|
|
461
574
|
artifact_kind: string;
|
|
462
575
|
content_blocks: {
|
|
463
|
-
evidence_refs: string[];
|
|
464
|
-
layer: "deterministic-block" | "semantic-prose";
|
|
465
|
-
fact_refs: string[];
|
|
466
|
-
markdown: string;
|
|
467
576
|
content_digest: string;
|
|
577
|
+
references: {
|
|
578
|
+
source_ref: string;
|
|
579
|
+
locator: {
|
|
580
|
+
path: string;
|
|
581
|
+
start_line: number;
|
|
582
|
+
end_line: number;
|
|
583
|
+
};
|
|
584
|
+
content_digest: string;
|
|
585
|
+
}[];
|
|
586
|
+
layer: "semantic-prose" | "deterministic-block";
|
|
587
|
+
markdown: string;
|
|
468
588
|
}[];
|
|
469
589
|
}[];
|
|
590
|
+
protocol: "context.indexer.rendered-artifact/v1";
|
|
591
|
+
profile: string;
|
|
592
|
+
artifact_kind: string;
|
|
593
|
+
template_id: string;
|
|
594
|
+
artifact_id: string;
|
|
595
|
+
artifact_policy_variant: string;
|
|
470
596
|
artifact_result_digest: string;
|
|
471
597
|
template_digest: string;
|
|
472
598
|
template_origin: "provider" | "customization-override";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/** Reader organization is independent of collections, source ownership and outputs. */
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const knowledgeMapEntrySchema: z.ZodObject<{
|
|
4
4
|
key: z.ZodString;
|
|
5
5
|
parent: z.ZodNullable<z.ZodString>;
|
|
6
6
|
title: z.ZodString;
|
|
@@ -28,13 +28,13 @@ export declare const readingStructureEntrySchema: z.ZodObject<{
|
|
|
28
28
|
title: string;
|
|
29
29
|
key: string;
|
|
30
30
|
parent: string | null;
|
|
31
|
+
order?: number | undefined;
|
|
31
32
|
target?: {
|
|
32
33
|
artifact_ref: string;
|
|
33
34
|
section_key?: string | undefined;
|
|
34
35
|
} | undefined;
|
|
35
|
-
order?: number | undefined;
|
|
36
36
|
}>;
|
|
37
|
-
export declare const
|
|
37
|
+
export declare const knowledgeMapUpdateSchema: z.ZodObject<{
|
|
38
38
|
expected_revision: z.ZodNullable<z.ZodString>;
|
|
39
39
|
upsert: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
40
40
|
key: z.ZodString;
|
|
@@ -64,11 +64,11 @@ export declare const readingStructureUpdateSchema: z.ZodObject<{
|
|
|
64
64
|
title: string;
|
|
65
65
|
key: string;
|
|
66
66
|
parent: string | null;
|
|
67
|
+
order?: number | undefined;
|
|
67
68
|
target?: {
|
|
68
69
|
artifact_ref: string;
|
|
69
70
|
section_key?: string | undefined;
|
|
70
71
|
} | undefined;
|
|
71
|
-
order?: number | undefined;
|
|
72
72
|
}>, "many">>;
|
|
73
73
|
remove: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
74
74
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -90,16 +90,16 @@ export declare const readingStructureUpdateSchema: z.ZodObject<{
|
|
|
90
90
|
title: string;
|
|
91
91
|
key: string;
|
|
92
92
|
parent: string | null;
|
|
93
|
+
order?: number | undefined;
|
|
93
94
|
target?: {
|
|
94
95
|
artifact_ref: string;
|
|
95
96
|
section_key?: string | undefined;
|
|
96
97
|
} | undefined;
|
|
97
|
-
order?: number | undefined;
|
|
98
98
|
}[] | undefined;
|
|
99
99
|
remove?: string[] | undefined;
|
|
100
100
|
}>;
|
|
101
|
-
export declare const
|
|
102
|
-
protocol: z.ZodLiteral<"context.
|
|
101
|
+
export declare const knowledgeMapSchema: z.ZodObject<{
|
|
102
|
+
protocol: z.ZodLiteral<"context.knowledge-map/v1">;
|
|
103
103
|
revision: z.ZodString;
|
|
104
104
|
entries: z.ZodArray<z.ZodObject<{
|
|
105
105
|
key: z.ZodString;
|
|
@@ -129,11 +129,11 @@ export declare const readingStructureSchema: z.ZodObject<{
|
|
|
129
129
|
title: string;
|
|
130
130
|
key: string;
|
|
131
131
|
parent: string | null;
|
|
132
|
+
order?: number | undefined;
|
|
132
133
|
target?: {
|
|
133
134
|
artifact_ref: string;
|
|
134
135
|
section_key?: string | undefined;
|
|
135
136
|
} | undefined;
|
|
136
|
-
order?: number | undefined;
|
|
137
137
|
}>, "many">;
|
|
138
138
|
}, "strict", z.ZodTypeAny, {
|
|
139
139
|
entries: {
|
|
@@ -146,43 +146,43 @@ export declare const readingStructureSchema: z.ZodObject<{
|
|
|
146
146
|
section_key?: string | undefined;
|
|
147
147
|
} | undefined;
|
|
148
148
|
}[];
|
|
149
|
-
protocol: "context.
|
|
149
|
+
protocol: "context.knowledge-map/v1";
|
|
150
150
|
revision: string;
|
|
151
151
|
}, {
|
|
152
152
|
entries: {
|
|
153
153
|
title: string;
|
|
154
154
|
key: string;
|
|
155
155
|
parent: string | null;
|
|
156
|
+
order?: number | undefined;
|
|
156
157
|
target?: {
|
|
157
158
|
artifact_ref: string;
|
|
158
159
|
section_key?: string | undefined;
|
|
159
160
|
} | undefined;
|
|
160
|
-
order?: number | undefined;
|
|
161
161
|
}[];
|
|
162
|
-
protocol: "context.
|
|
162
|
+
protocol: "context.knowledge-map/v1";
|
|
163
163
|
revision: string;
|
|
164
164
|
}>;
|
|
165
|
-
export type
|
|
166
|
-
export type
|
|
167
|
-
export declare function
|
|
168
|
-
export declare function
|
|
169
|
-
export interface
|
|
165
|
+
export type KnowledgeMap = z.infer<typeof knowledgeMapSchema>;
|
|
166
|
+
export type KnowledgeMapUpdate = z.infer<typeof knowledgeMapUpdateSchema>;
|
|
167
|
+
export declare function validateKnowledgeMap(value: unknown): KnowledgeMap;
|
|
168
|
+
export declare function updateKnowledgeMap(current: KnowledgeMap | undefined, value: unknown): KnowledgeMap;
|
|
169
|
+
export interface ProjectedKnowledgeMapEntry {
|
|
170
170
|
key: string;
|
|
171
171
|
title: string;
|
|
172
172
|
href?: string;
|
|
173
|
-
children:
|
|
173
|
+
children: ProjectedKnowledgeMapEntry[];
|
|
174
174
|
}
|
|
175
175
|
/** Target availability belongs to each channel. Omit pending/excluded entries and
|
|
176
176
|
* empty groups without mutating shared organization or another channel's map. */
|
|
177
|
-
export declare function
|
|
178
|
-
entries:
|
|
177
|
+
export declare function projectKnowledgeMap(structure: KnowledgeMap, targets: ReadonlyMap<string, string>): {
|
|
178
|
+
entries: ProjectedKnowledgeMapEntry[];
|
|
179
179
|
warnings: {
|
|
180
180
|
entry: string;
|
|
181
|
-
code: "
|
|
181
|
+
code: "knowledge-map-target-unavailable";
|
|
182
182
|
target: string;
|
|
183
183
|
}[];
|
|
184
184
|
};
|
|
185
|
-
export declare function
|
|
185
|
+
export declare function knowledgeMapTargetKey(target: {
|
|
186
186
|
artifact_ref: string;
|
|
187
187
|
section_key?: string | undefined;
|
|
188
188
|
}): string;
|