@thanh01.pmt/domain-kit 0.5.0 → 0.6.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/README.md +682 -168
- package/dist/assembly/index.d.cts +3 -2
- package/dist/assembly/index.d.ts +3 -2
- package/dist/{chunk-TYXSJUQU.mjs → chunk-4UCXYRM3.mjs} +208 -310
- package/dist/chunk-4UCXYRM3.mjs.map +1 -0
- package/dist/chunk-7A2SG466.mjs +325 -0
- package/dist/chunk-7A2SG466.mjs.map +1 -0
- package/dist/{chunk-E4GCCWJO.mjs → chunk-CGNXGVHV.mjs} +37 -4
- package/dist/chunk-CGNXGVHV.mjs.map +1 -0
- package/dist/{chunk-DRVOV5ZD.mjs → chunk-DSEJLTUO.mjs} +2 -2
- package/dist/chunk-DSEJLTUO.mjs.map +1 -0
- package/dist/{chunk-VCPIWJ7R.mjs → chunk-H4W3YJLK.mjs} +29 -4
- package/dist/chunk-H4W3YJLK.mjs.map +1 -0
- package/dist/chunk-IBVXXVGE.mjs +14 -0
- package/dist/chunk-IBVXXVGE.mjs.map +1 -0
- package/dist/{chunk-G7HLFMD2.mjs → chunk-KHCZYLKM.mjs} +68 -33
- package/dist/chunk-KHCZYLKM.mjs.map +1 -0
- package/dist/chunk-OYSZQVPY.mjs +10 -0
- package/dist/chunk-OYSZQVPY.mjs.map +1 -0
- package/dist/{chunk-BL5NBKPH.mjs → chunk-WD3P5V3B.mjs} +19 -8
- package/dist/chunk-WD3P5V3B.mjs.map +1 -0
- package/dist/{chunk-TWKIVUTQ.mjs → chunk-WKTH3JPA.mjs} +197 -36
- package/dist/chunk-WKTH3JPA.mjs.map +1 -0
- package/dist/{conceptEscalator-ltRLtPhf.d.cts → conceptEscalator-BmMJD8C5.d.cts} +10 -1
- package/dist/{conceptEscalator-YfMKIKCZ.d.ts → conceptEscalator-DMsehscs.d.ts} +10 -1
- package/dist/concepts/index.d.cts +4 -3
- package/dist/concepts/index.d.ts +4 -3
- package/dist/{cpp-CZUPqJt9.d.cts → cpp-vlDl6pCL.d.cts} +4 -4
- package/dist/{cpp-CZUPqJt9.d.ts → cpp-vlDl6pCL.d.ts} +4 -4
- package/dist/{curriculumFeedSchema-DUFwFyr2.d.ts → curriculumFeedSchema-DK-TUAJZ.d.cts} +164 -9
- package/dist/{curriculumFeedSchema-DUFwFyr2.d.cts → curriculumFeedSchema-DK-TUAJZ.d.ts} +164 -9
- package/dist/detector/index.cjs +22 -6
- package/dist/detector/index.cjs.map +1 -1
- package/dist/detector/index.d.cts +2 -2
- package/dist/detector/index.d.ts +2 -2
- package/dist/detector/index.mjs +2 -1
- package/dist/{domainProfileDetector-DHb1T0zB.d.ts → domainProfileDetector-6pjgL-6_.d.ts} +1 -1
- package/dist/{domainProfileDetector-bzugdQmS.d.cts → domainProfileDetector-BsADsuRV.d.cts} +1 -1
- package/dist/{domainProfileSchema-CwT3Ffsw.d.ts → domainProfileSchema-779FGk14.d.cts} +38 -1
- package/dist/{domainProfileSchema-CwT3Ffsw.d.cts → domainProfileSchema-779FGk14.d.ts} +38 -1
- package/dist/extractors/index.d.cts +3 -3
- package/dist/extractors/index.d.ts +3 -3
- package/dist/feed/index.cjs +229 -33
- package/dist/feed/index.cjs.map +1 -1
- package/dist/feed/index.d.cts +32 -2
- package/dist/feed/index.d.ts +32 -2
- package/dist/feed/index.mjs +2 -2
- package/dist/graph/index.cjs +308 -86
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +20 -8
- package/dist/graph/index.d.ts +20 -8
- package/dist/graph/index.mjs +4 -1
- package/dist/{hybridGraphPipeline-dT-bio-3.d.cts → hybridGraphPipeline-B4mamLim.d.cts} +6 -2
- package/dist/{hybridGraphPipeline-DXQDbBEj.d.ts → hybridGraphPipeline-D2_1GUva.d.ts} +6 -2
- package/dist/{hybridGraphSchema-nrUeSwpU.d.ts → hybridGraphSchema-C37qxdTM.d.cts} +16 -3
- package/dist/{hybridGraphSchema-nrUeSwpU.d.cts → hybridGraphSchema-C37qxdTM.d.ts} +16 -3
- package/dist/index.cjs +3948 -3464
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -10
- package/dist/index.d.ts +11 -10
- package/dist/index.mjs +14 -11
- package/dist/{keywordExtractor-BxlGRMHC.d.cts → keywordExtractor-1YAFntsn.d.cts} +1 -1
- package/dist/{keywordExtractor-DU5XRN8-.d.ts → keywordExtractor-DWw8z_AF.d.ts} +1 -1
- package/dist/parsers/index.cjs.map +1 -1
- package/dist/parsers/index.d.cts +1 -1
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.mjs +1 -1
- package/dist/pipeline/index.cjs +2436 -1994
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.d.cts +19 -10
- package/dist/pipeline/index.d.ts +19 -10
- package/dist/pipeline/index.mjs +11 -8
- package/dist/schemas/index.cjs +63 -2
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +3 -3
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.mjs +2 -2
- package/dist/utils/llmClient.cjs +344 -0
- package/dist/utils/llmClient.cjs.map +1 -0
- package/dist/utils/llmClient.d.cts +118 -0
- package/dist/utils/llmClient.d.ts +118 -0
- package/dist/utils/llmClient.mjs +4 -0
- package/dist/utils/llmClient.mjs.map +1 -0
- package/dist/utils/llmTransportResult.cjs +16 -0
- package/dist/utils/llmTransportResult.cjs.map +1 -0
- package/dist/utils/llmTransportResult.d.cts +36 -0
- package/dist/utils/llmTransportResult.d.ts +36 -0
- package/dist/utils/llmTransportResult.mjs +3 -0
- package/dist/utils/llmTransportResult.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-BL5NBKPH.mjs.map +0 -1
- package/dist/chunk-DRVOV5ZD.mjs.map +0 -1
- package/dist/chunk-E4GCCWJO.mjs.map +0 -1
- package/dist/chunk-G7HLFMD2.mjs.map +0 -1
- package/dist/chunk-TWKIVUTQ.mjs.map +0 -1
- package/dist/chunk-TYXSJUQU.mjs.map +0 -1
- package/dist/chunk-VCPIWJ7R.mjs.map +0 -1
- package/dist/curriculumFeedEmitter-T7NUBLAM.mjs +0 -4
- package/dist/curriculumFeedEmitter-T7NUBLAM.mjs.map +0 -1
- package/dist/llmClient-ysPhLjcH.d.cts +0 -16
- package/dist/llmClient-ysPhLjcH.d.ts +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LlmClientConfig, LlmClient } from './utils/llmClient.js';
|
|
2
2
|
import { u as ProjectGraph } from './projectGraphSchema-DnD7orZV.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -19,6 +19,12 @@ interface ConceptMapping {
|
|
|
19
19
|
keyword: string;
|
|
20
20
|
depth: 'ulo' | 'cio' | 'sio';
|
|
21
21
|
depth_rationale: string;
|
|
22
|
+
/**
|
|
23
|
+
* Who decided `depth`. The regex fallback (comment → ulo, import → sio) has no
|
|
24
|
+
* pedagogical basis — without this marker a degraded run is indistinguishable
|
|
25
|
+
* from a considered one, because both write the same field.
|
|
26
|
+
*/
|
|
27
|
+
depth_source: 'llm' | 'heuristic' | 'override';
|
|
22
28
|
evidence_files: string[];
|
|
23
29
|
}
|
|
24
30
|
interface EscalateOptions {
|
|
@@ -31,6 +37,9 @@ interface EscalateOptions {
|
|
|
31
37
|
depth?: string;
|
|
32
38
|
}>;
|
|
33
39
|
llmConfig?: LlmClientConfig;
|
|
40
|
+
/** Pre-built client from the calling pipeline — reused so every step of one run
|
|
41
|
+
* lands in ONE callLog and the feed can report real provenance. */
|
|
42
|
+
sharedClient?: LlmClient;
|
|
34
43
|
}
|
|
35
44
|
/**
|
|
36
45
|
* Escalate keywords/api_usage to neutral concepts with ULO/CIO/SIO depth and join evidence files.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { K as Keyword } from '../keywordExtractor-
|
|
3
|
-
import '../
|
|
1
|
+
import { LlmClientConfig } from '../utils/llmClient.cjs';
|
|
2
|
+
import { K as Keyword } from '../keywordExtractor-1YAFntsn.cjs';
|
|
3
|
+
import '../utils/llmTransportResult.cjs';
|
|
4
|
+
import '../cpp-vlDl6pCL.cjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Concept resolution — maps keywords to Master Tree concepts.
|
package/dist/concepts/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { K as Keyword } from '../keywordExtractor-
|
|
3
|
-
import '../
|
|
1
|
+
import { LlmClientConfig } from '../utils/llmClient.js';
|
|
2
|
+
import { K as Keyword } from '../keywordExtractor-DWw8z_AF.js';
|
|
3
|
+
import '../utils/llmTransportResult.js';
|
|
4
|
+
import '../cpp-vlDl6pCL.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Concept resolution — maps keywords to Master Tree concepts.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Swift
|
|
2
|
+
* Swift regex-based parser (heuristic) — extracts imports, types, functions, property wrappers,
|
|
3
3
|
* error handling patterns, and framework usage from Swift source files.
|
|
4
4
|
*
|
|
5
5
|
* Ported from knowledge-tree/extract_project_keywords.py parse_swift_file()
|
|
@@ -26,7 +26,7 @@ declare function parseSwiftFile(filepath: string, content: string): SwiftParseRe
|
|
|
26
26
|
declare function mergeSwiftResults(results: SwiftParseResult[]): SwiftParseResult;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* TypeScript/JavaScript
|
|
29
|
+
* TypeScript/JavaScript regex-based parser (heuristic) — extracts imports, types, functions,
|
|
30
30
|
* and error handling patterns.
|
|
31
31
|
*
|
|
32
32
|
* Ported from knowledge-tree/extract_project_keywords.py parse_ts_file()
|
|
@@ -49,7 +49,7 @@ declare function parseTsFile(filepath: string, content: string): TsParseResult;
|
|
|
49
49
|
declare function mergeTsResults(results: TsParseResult[]): TsParseResult;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* Python
|
|
52
|
+
* Python regex-based parser (heuristic) — extracts imports, classes, functions, docstrings,
|
|
53
53
|
* and error handling patterns.
|
|
54
54
|
*
|
|
55
55
|
* Ported from knowledge-tree/extract_project_keywords.py parse_python_file()
|
|
@@ -74,7 +74,7 @@ declare function parsePythonFile(filepath: string, content: string): PythonParse
|
|
|
74
74
|
declare function mergePythonResults(results: PythonParseResult[]): PythonParseResult;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* C++/Arduino
|
|
77
|
+
* C++/Arduino regex-based parser (heuristic) — extracts #include, types, functions,
|
|
78
78
|
* and error handling patterns.
|
|
79
79
|
*
|
|
80
80
|
* Ported from knowledge-tree/extract_project_keywords.py parse_cpp_file()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Swift
|
|
2
|
+
* Swift regex-based parser (heuristic) — extracts imports, types, functions, property wrappers,
|
|
3
3
|
* error handling patterns, and framework usage from Swift source files.
|
|
4
4
|
*
|
|
5
5
|
* Ported from knowledge-tree/extract_project_keywords.py parse_swift_file()
|
|
@@ -26,7 +26,7 @@ declare function parseSwiftFile(filepath: string, content: string): SwiftParseRe
|
|
|
26
26
|
declare function mergeSwiftResults(results: SwiftParseResult[]): SwiftParseResult;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* TypeScript/JavaScript
|
|
29
|
+
* TypeScript/JavaScript regex-based parser (heuristic) — extracts imports, types, functions,
|
|
30
30
|
* and error handling patterns.
|
|
31
31
|
*
|
|
32
32
|
* Ported from knowledge-tree/extract_project_keywords.py parse_ts_file()
|
|
@@ -49,7 +49,7 @@ declare function parseTsFile(filepath: string, content: string): TsParseResult;
|
|
|
49
49
|
declare function mergeTsResults(results: TsParseResult[]): TsParseResult;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* Python
|
|
52
|
+
* Python regex-based parser (heuristic) — extracts imports, classes, functions, docstrings,
|
|
53
53
|
* and error handling patterns.
|
|
54
54
|
*
|
|
55
55
|
* Ported from knowledge-tree/extract_project_keywords.py parse_python_file()
|
|
@@ -74,7 +74,7 @@ declare function parsePythonFile(filepath: string, content: string): PythonParse
|
|
|
74
74
|
declare function mergePythonResults(results: PythonParseResult[]): PythonParseResult;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* C++/Arduino
|
|
77
|
+
* C++/Arduino regex-based parser (heuristic) — extracts #include, types, functions,
|
|
78
78
|
* and error handling patterns.
|
|
79
79
|
*
|
|
80
80
|
* Ported from knowledge-tree/extract_project_keywords.py parse_cpp_file()
|
|
@@ -26,8 +26,8 @@ declare const FeedScaffoldCandidateSchema: z.ZodObject<{
|
|
|
26
26
|
minutes_saved: z.ZodDefault<z.ZodNumber>;
|
|
27
27
|
suggest: z.ZodDefault<z.ZodEnum<["provide_full", "provide_partial", "provide_reference"]>>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
item: string;
|
|
30
29
|
reason: string;
|
|
30
|
+
item: string;
|
|
31
31
|
minutes_saved: number;
|
|
32
32
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
33
33
|
}, {
|
|
@@ -65,8 +65,8 @@ declare const FeedNodeSchema: z.ZodObject<{
|
|
|
65
65
|
minutes_saved: z.ZodDefault<z.ZodNumber>;
|
|
66
66
|
suggest: z.ZodDefault<z.ZodEnum<["provide_full", "provide_partial", "provide_reference"]>>;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
item: string;
|
|
69
68
|
reason: string;
|
|
69
|
+
item: string;
|
|
70
70
|
minutes_saved: number;
|
|
71
71
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
72
72
|
}, {
|
|
@@ -78,8 +78,8 @@ declare const FeedNodeSchema: z.ZodObject<{
|
|
|
78
78
|
core_value_minutes: z.ZodDefault<z.ZodNumber>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
80
|
scaffold_candidates: {
|
|
81
|
-
item: string;
|
|
82
81
|
reason: string;
|
|
82
|
+
item: string;
|
|
83
83
|
minutes_saved: number;
|
|
84
84
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
85
85
|
}[];
|
|
@@ -136,6 +136,14 @@ declare const FeedNodeSchema: z.ZodObject<{
|
|
|
136
136
|
reason?: string | undefined;
|
|
137
137
|
}>, "many">>;
|
|
138
138
|
is_core: z.ZodDefault<z.ZodBoolean>;
|
|
139
|
+
/**
|
|
140
|
+
* Prerequisite concept ids this node needs that NO node in this feed provides —
|
|
141
|
+
* i.e. the learner must already know them before starting. Previously these were
|
|
142
|
+
* silently dropped (knowledge path) or crashed emission (both hybrid paths), so a
|
|
143
|
+
* course silently lost its entry requirements. Kept on the node so the mapping
|
|
144
|
+
* "concept X needs prior knowledge Y" survives; a course-level roll-up is derivable.
|
|
145
|
+
*/
|
|
146
|
+
external_prerequisites: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
139
147
|
depth_context: z.ZodOptional<z.ZodObject<{
|
|
140
148
|
ulo: z.ZodDefault<z.ZodString>;
|
|
141
149
|
cio: z.ZodDefault<z.ZodString>;
|
|
@@ -169,8 +177,8 @@ declare const FeedNodeSchema: z.ZodObject<{
|
|
|
169
177
|
depth_hint: "ulo" | "cio" | "sio" | null;
|
|
170
178
|
scaffolding: {
|
|
171
179
|
scaffold_candidates: {
|
|
172
|
-
item: string;
|
|
173
180
|
reason: string;
|
|
181
|
+
item: string;
|
|
174
182
|
minutes_saved: number;
|
|
175
183
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
176
184
|
}[];
|
|
@@ -183,6 +191,7 @@ declare const FeedNodeSchema: z.ZodObject<{
|
|
|
183
191
|
concept_ref: string | null;
|
|
184
192
|
user_visible_deliverable: string;
|
|
185
193
|
is_core: boolean;
|
|
194
|
+
external_prerequisites: string[];
|
|
186
195
|
introduce_aspect: "new" | "advanced" | "preview" | null;
|
|
187
196
|
depth_variants?: {
|
|
188
197
|
ulo: number;
|
|
@@ -243,6 +252,7 @@ declare const FeedNodeSchema: z.ZodObject<{
|
|
|
243
252
|
reason?: string | undefined;
|
|
244
253
|
}[] | undefined;
|
|
245
254
|
is_core?: boolean | undefined;
|
|
255
|
+
external_prerequisites?: string[] | undefined;
|
|
246
256
|
depth_context?: {
|
|
247
257
|
ulo?: string | undefined;
|
|
248
258
|
cio?: string | undefined;
|
|
@@ -302,20 +312,127 @@ declare const FeedPhaseSchema: z.ZodObject<{
|
|
|
302
312
|
node_ids: string[];
|
|
303
313
|
}>;
|
|
304
314
|
type FeedPhase = z.infer<typeof FeedPhaseSchema>;
|
|
315
|
+
/**
|
|
316
|
+
* Machine-readable diagnostic. `warnings` in `source` is the DERIVED text view of
|
|
317
|
+
* these (every diagnostic whose severity is not 'info'), so there is exactly one
|
|
318
|
+
* source of truth and the host can gate on `code`/`severity` instead of substring
|
|
319
|
+
* matching free text — the 2026-09-17 class of incident was a drift that was only
|
|
320
|
+
* ever a warning string.
|
|
321
|
+
*/
|
|
322
|
+
declare const FeedDiagnosticSchema: z.ZodObject<{
|
|
323
|
+
code: z.ZodString;
|
|
324
|
+
severity: z.ZodEnum<["info", "warning", "error"]>;
|
|
325
|
+
message: z.ZodString;
|
|
326
|
+
node_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
327
|
+
}, "strip", z.ZodTypeAny, {
|
|
328
|
+
code: string;
|
|
329
|
+
message: string;
|
|
330
|
+
severity: "info" | "warning" | "error";
|
|
331
|
+
node_ids: string[];
|
|
332
|
+
}, {
|
|
333
|
+
code: string;
|
|
334
|
+
message: string;
|
|
335
|
+
severity: "info" | "warning" | "error";
|
|
336
|
+
node_ids?: string[] | undefined;
|
|
337
|
+
}>;
|
|
338
|
+
type FeedDiagnostic = z.infer<typeof FeedDiagnosticSchema>;
|
|
339
|
+
/** Which LLM providers actually served this graph, and whether any call fell over. */
|
|
340
|
+
declare const FeedProvenanceSchema: z.ZodObject<{
|
|
341
|
+
providers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
342
|
+
models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
343
|
+
calls: z.ZodDefault<z.ZodNumber>;
|
|
344
|
+
failed_calls: z.ZodDefault<z.ZodNumber>;
|
|
345
|
+
degraded: z.ZodDefault<z.ZodBoolean>;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
models: string[];
|
|
348
|
+
providers: string[];
|
|
349
|
+
calls: number;
|
|
350
|
+
failed_calls: number;
|
|
351
|
+
degraded: boolean;
|
|
352
|
+
}, {
|
|
353
|
+
models?: string[] | undefined;
|
|
354
|
+
providers?: string[] | undefined;
|
|
355
|
+
calls?: number | undefined;
|
|
356
|
+
failed_calls?: number | undefined;
|
|
357
|
+
degraded?: boolean | undefined;
|
|
358
|
+
}>;
|
|
359
|
+
type FeedProvenance = z.infer<typeof FeedProvenanceSchema>;
|
|
305
360
|
declare const CurriculumFeedSchema: z.ZodObject<{
|
|
306
361
|
schema_version: z.ZodLiteral<2>;
|
|
307
362
|
source: z.ZodObject<{
|
|
308
363
|
graph_type: z.ZodEnum<["project_graph", "knowledge_graph", "hybrid_graph"]>;
|
|
364
|
+
/** DERIVED from diagnostics — do not write to it directly. */
|
|
309
365
|
warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
310
366
|
hallucination_count: z.ZodDefault<z.ZodNumber>;
|
|
367
|
+
diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
368
|
+
code: z.ZodString;
|
|
369
|
+
severity: z.ZodEnum<["info", "warning", "error"]>;
|
|
370
|
+
message: z.ZodString;
|
|
371
|
+
node_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
372
|
+
}, "strip", z.ZodTypeAny, {
|
|
373
|
+
code: string;
|
|
374
|
+
message: string;
|
|
375
|
+
severity: "info" | "warning" | "error";
|
|
376
|
+
node_ids: string[];
|
|
377
|
+
}, {
|
|
378
|
+
code: string;
|
|
379
|
+
message: string;
|
|
380
|
+
severity: "info" | "warning" | "error";
|
|
381
|
+
node_ids?: string[] | undefined;
|
|
382
|
+
}>, "many">>;
|
|
383
|
+
provenance: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
providers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
385
|
+
models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
386
|
+
calls: z.ZodDefault<z.ZodNumber>;
|
|
387
|
+
failed_calls: z.ZodDefault<z.ZodNumber>;
|
|
388
|
+
degraded: z.ZodDefault<z.ZodBoolean>;
|
|
389
|
+
}, "strip", z.ZodTypeAny, {
|
|
390
|
+
models: string[];
|
|
391
|
+
providers: string[];
|
|
392
|
+
calls: number;
|
|
393
|
+
failed_calls: number;
|
|
394
|
+
degraded: boolean;
|
|
395
|
+
}, {
|
|
396
|
+
models?: string[] | undefined;
|
|
397
|
+
providers?: string[] | undefined;
|
|
398
|
+
calls?: number | undefined;
|
|
399
|
+
failed_calls?: number | undefined;
|
|
400
|
+
degraded?: boolean | undefined;
|
|
401
|
+
}>>;
|
|
311
402
|
}, "strip", z.ZodTypeAny, {
|
|
312
403
|
graph_type: "knowledge_graph" | "hybrid_graph" | "project_graph";
|
|
313
404
|
warnings: string[];
|
|
314
405
|
hallucination_count: number;
|
|
406
|
+
diagnostics: {
|
|
407
|
+
code: string;
|
|
408
|
+
message: string;
|
|
409
|
+
severity: "info" | "warning" | "error";
|
|
410
|
+
node_ids: string[];
|
|
411
|
+
}[];
|
|
412
|
+
provenance?: {
|
|
413
|
+
models: string[];
|
|
414
|
+
providers: string[];
|
|
415
|
+
calls: number;
|
|
416
|
+
failed_calls: number;
|
|
417
|
+
degraded: boolean;
|
|
418
|
+
} | undefined;
|
|
315
419
|
}, {
|
|
316
420
|
graph_type: "knowledge_graph" | "hybrid_graph" | "project_graph";
|
|
317
421
|
warnings?: string[] | undefined;
|
|
318
422
|
hallucination_count?: number | undefined;
|
|
423
|
+
diagnostics?: {
|
|
424
|
+
code: string;
|
|
425
|
+
message: string;
|
|
426
|
+
severity: "info" | "warning" | "error";
|
|
427
|
+
node_ids?: string[] | undefined;
|
|
428
|
+
}[] | undefined;
|
|
429
|
+
provenance?: {
|
|
430
|
+
models?: string[] | undefined;
|
|
431
|
+
providers?: string[] | undefined;
|
|
432
|
+
calls?: number | undefined;
|
|
433
|
+
failed_calls?: number | undefined;
|
|
434
|
+
degraded?: boolean | undefined;
|
|
435
|
+
} | undefined;
|
|
319
436
|
}>;
|
|
320
437
|
learning_nodes: z.ZodArray<z.ZodObject<{
|
|
321
438
|
id: z.ZodString;
|
|
@@ -346,8 +463,8 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
346
463
|
minutes_saved: z.ZodDefault<z.ZodNumber>;
|
|
347
464
|
suggest: z.ZodDefault<z.ZodEnum<["provide_full", "provide_partial", "provide_reference"]>>;
|
|
348
465
|
}, "strip", z.ZodTypeAny, {
|
|
349
|
-
item: string;
|
|
350
466
|
reason: string;
|
|
467
|
+
item: string;
|
|
351
468
|
minutes_saved: number;
|
|
352
469
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
353
470
|
}, {
|
|
@@ -359,8 +476,8 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
359
476
|
core_value_minutes: z.ZodDefault<z.ZodNumber>;
|
|
360
477
|
}, "strip", z.ZodTypeAny, {
|
|
361
478
|
scaffold_candidates: {
|
|
362
|
-
item: string;
|
|
363
479
|
reason: string;
|
|
480
|
+
item: string;
|
|
364
481
|
minutes_saved: number;
|
|
365
482
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
366
483
|
}[];
|
|
@@ -417,6 +534,14 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
417
534
|
reason?: string | undefined;
|
|
418
535
|
}>, "many">>;
|
|
419
536
|
is_core: z.ZodDefault<z.ZodBoolean>;
|
|
537
|
+
/**
|
|
538
|
+
* Prerequisite concept ids this node needs that NO node in this feed provides —
|
|
539
|
+
* i.e. the learner must already know them before starting. Previously these were
|
|
540
|
+
* silently dropped (knowledge path) or crashed emission (both hybrid paths), so a
|
|
541
|
+
* course silently lost its entry requirements. Kept on the node so the mapping
|
|
542
|
+
* "concept X needs prior knowledge Y" survives; a course-level roll-up is derivable.
|
|
543
|
+
*/
|
|
544
|
+
external_prerequisites: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
420
545
|
depth_context: z.ZodOptional<z.ZodObject<{
|
|
421
546
|
ulo: z.ZodDefault<z.ZodString>;
|
|
422
547
|
cio: z.ZodDefault<z.ZodString>;
|
|
@@ -450,8 +575,8 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
450
575
|
depth_hint: "ulo" | "cio" | "sio" | null;
|
|
451
576
|
scaffolding: {
|
|
452
577
|
scaffold_candidates: {
|
|
453
|
-
item: string;
|
|
454
578
|
reason: string;
|
|
579
|
+
item: string;
|
|
455
580
|
minutes_saved: number;
|
|
456
581
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
457
582
|
}[];
|
|
@@ -464,6 +589,7 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
464
589
|
concept_ref: string | null;
|
|
465
590
|
user_visible_deliverable: string;
|
|
466
591
|
is_core: boolean;
|
|
592
|
+
external_prerequisites: string[];
|
|
467
593
|
introduce_aspect: "new" | "advanced" | "preview" | null;
|
|
468
594
|
depth_variants?: {
|
|
469
595
|
ulo: number;
|
|
@@ -524,6 +650,7 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
524
650
|
reason?: string | undefined;
|
|
525
651
|
}[] | undefined;
|
|
526
652
|
is_core?: boolean | undefined;
|
|
653
|
+
external_prerequisites?: string[] | undefined;
|
|
527
654
|
depth_context?: {
|
|
528
655
|
ulo?: string | undefined;
|
|
529
656
|
cio?: string | undefined;
|
|
@@ -587,6 +714,19 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
587
714
|
graph_type: "knowledge_graph" | "hybrid_graph" | "project_graph";
|
|
588
715
|
warnings: string[];
|
|
589
716
|
hallucination_count: number;
|
|
717
|
+
diagnostics: {
|
|
718
|
+
code: string;
|
|
719
|
+
message: string;
|
|
720
|
+
severity: "info" | "warning" | "error";
|
|
721
|
+
node_ids: string[];
|
|
722
|
+
}[];
|
|
723
|
+
provenance?: {
|
|
724
|
+
models: string[];
|
|
725
|
+
providers: string[];
|
|
726
|
+
calls: number;
|
|
727
|
+
failed_calls: number;
|
|
728
|
+
degraded: boolean;
|
|
729
|
+
} | undefined;
|
|
590
730
|
};
|
|
591
731
|
schema_version: 2;
|
|
592
732
|
phases: {
|
|
@@ -614,8 +754,8 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
614
754
|
depth_hint: "ulo" | "cio" | "sio" | null;
|
|
615
755
|
scaffolding: {
|
|
616
756
|
scaffold_candidates: {
|
|
617
|
-
item: string;
|
|
618
757
|
reason: string;
|
|
758
|
+
item: string;
|
|
619
759
|
minutes_saved: number;
|
|
620
760
|
suggest: "provide_full" | "provide_partial" | "provide_reference";
|
|
621
761
|
}[];
|
|
@@ -628,6 +768,7 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
628
768
|
concept_ref: string | null;
|
|
629
769
|
user_visible_deliverable: string;
|
|
630
770
|
is_core: boolean;
|
|
771
|
+
external_prerequisites: string[];
|
|
631
772
|
introduce_aspect: "new" | "advanced" | "preview" | null;
|
|
632
773
|
depth_variants?: {
|
|
633
774
|
ulo: number;
|
|
@@ -663,6 +804,19 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
663
804
|
graph_type: "knowledge_graph" | "hybrid_graph" | "project_graph";
|
|
664
805
|
warnings?: string[] | undefined;
|
|
665
806
|
hallucination_count?: number | undefined;
|
|
807
|
+
diagnostics?: {
|
|
808
|
+
code: string;
|
|
809
|
+
message: string;
|
|
810
|
+
severity: "info" | "warning" | "error";
|
|
811
|
+
node_ids?: string[] | undefined;
|
|
812
|
+
}[] | undefined;
|
|
813
|
+
provenance?: {
|
|
814
|
+
models?: string[] | undefined;
|
|
815
|
+
providers?: string[] | undefined;
|
|
816
|
+
calls?: number | undefined;
|
|
817
|
+
failed_calls?: number | undefined;
|
|
818
|
+
degraded?: boolean | undefined;
|
|
819
|
+
} | undefined;
|
|
666
820
|
};
|
|
667
821
|
schema_version: 2;
|
|
668
822
|
learning_nodes: {
|
|
@@ -708,6 +862,7 @@ declare const CurriculumFeedSchema: z.ZodObject<{
|
|
|
708
862
|
reason?: string | undefined;
|
|
709
863
|
}[] | undefined;
|
|
710
864
|
is_core?: boolean | undefined;
|
|
865
|
+
external_prerequisites?: string[] | undefined;
|
|
711
866
|
depth_context?: {
|
|
712
867
|
ulo?: string | undefined;
|
|
713
868
|
cio?: string | undefined;
|
|
@@ -742,4 +897,4 @@ type FeedGrouping = z.infer<typeof FeedGroupingSchema>;
|
|
|
742
897
|
/** Strict pre-save resolution validation — fail-closed, no defaulted-empty graphs. */
|
|
743
898
|
declare function validateCurriculumFeed(feed: unknown): CurriculumFeed;
|
|
744
899
|
|
|
745
|
-
export { CurriculumFeedSchema as C, FeedKeywordsSchema as F, FeedScaffoldCandidateSchema as a, FeedNodeSchema as b, FeedEdgeSchema as c, FeedGroupingSchema as d, FeedPhaseSchema as e, type FeedPhase as f, type CurriculumFeed as
|
|
900
|
+
export { CurriculumFeedSchema as C, FeedKeywordsSchema as F, FeedScaffoldCandidateSchema as a, FeedNodeSchema as b, FeedEdgeSchema as c, FeedGroupingSchema as d, FeedPhaseSchema as e, type FeedPhase as f, FeedDiagnosticSchema as g, type FeedDiagnostic as h, FeedProvenanceSchema as i, type FeedProvenance as j, type CurriculumFeed as k, type FeedNode as l, type FeedEdge as m, type FeedGrouping as n, validateCurriculumFeed as v };
|