@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,23 +1,24 @@
|
|
|
1
1
|
import { u as ProjectGraph } from '../projectGraphSchema-DnD7orZV.cjs';
|
|
2
|
-
import { K as Keyword } from '../keywordExtractor-
|
|
3
|
-
import { H as Hallucination, K as KnowledgeGraphPipelineOptions, f as KnowledgeGraphVerificationReport, j as HybridGraphPipelineOptions } from '../hybridGraphPipeline-
|
|
4
|
-
import { C as ConceptMapping } from '../conceptEscalator-
|
|
2
|
+
import { K as Keyword } from '../keywordExtractor-1YAFntsn.cjs';
|
|
3
|
+
import { H as Hallucination, K as KnowledgeGraphPipelineOptions, f as KnowledgeGraphVerificationReport, j as HybridGraphPipelineOptions } from '../hybridGraphPipeline-B4mamLim.cjs';
|
|
4
|
+
import { C as ConceptMapping } from '../conceptEscalator-BmMJD8C5.cjs';
|
|
5
5
|
import { ResolveConceptsResult } from '../concepts/index.cjs';
|
|
6
6
|
import { AssembledRoadmap } from '../assembly/index.cjs';
|
|
7
|
-
import {
|
|
7
|
+
import { LlmClientConfig, LlmCallRecord } from '../utils/llmClient.cjs';
|
|
8
8
|
import { P as ParsedSyllabus } from '../syllabusParser-MSX1fEzW.cjs';
|
|
9
|
-
import { g as KnowledgeGraph, j as HybridGraph } from '../hybridGraphSchema-
|
|
10
|
-
import {
|
|
11
|
-
import { D as DetectDomainProfileOptions } from '../domainProfileDetector-
|
|
12
|
-
import {
|
|
9
|
+
import { g as KnowledgeGraph, j as HybridGraph } from '../hybridGraphSchema-C37qxdTM.cjs';
|
|
10
|
+
import { k as CurriculumFeed } from '../curriculumFeedSchema-DK-TUAJZ.cjs';
|
|
11
|
+
import { D as DetectDomainProfileOptions } from '../domainProfileDetector-BsADsuRV.cjs';
|
|
12
|
+
import { d as DomainProfile, h as GraphType } from '../domainProfileSchema-779FGk14.cjs';
|
|
13
13
|
import 'zod';
|
|
14
|
-
import '../cpp-
|
|
14
|
+
import '../cpp-vlDl6pCL.cjs';
|
|
15
|
+
import '../utils/llmTransportResult.cjs';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Project Graph Pipeline — full orchestrator.
|
|
18
19
|
*
|
|
19
20
|
* Ported from knowledge-tree/generate_roadmap_v3.py PipelineOrchestrator
|
|
20
|
-
* Coordinates:
|
|
21
|
+
* Coordinates: regex-based scan → keyword extraction → LLM graph generation →
|
|
21
22
|
* verification → concept escalation → concept resolution → assembly.
|
|
22
23
|
*/
|
|
23
24
|
|
|
@@ -41,6 +42,8 @@ interface PipelineResult {
|
|
|
41
42
|
hallucinations: Hallucination[];
|
|
42
43
|
keywords: Keyword[];
|
|
43
44
|
featureConcepts: Map<string, ConceptMapping[]>;
|
|
45
|
+
/** Which providers served this graph, and whether any call fell over. */
|
|
46
|
+
provenance: LlmCallRecord[];
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
49
|
* Run the full project graph generation pipeline.
|
|
@@ -119,6 +122,12 @@ interface DomainPipelineResult {
|
|
|
119
122
|
knowledgeResult?: KnowledgePipelineResult;
|
|
120
123
|
hybridResult?: HybridPipelineResult;
|
|
121
124
|
warnings: string[];
|
|
125
|
+
/** Present only when the AUTO-detected learning mode could not run and the router ran a weaker pipeline instead. An explicit forcedLearningMode request fails closed instead of downgrading. */
|
|
126
|
+
modeDowngrade?: {
|
|
127
|
+
from: GraphType;
|
|
128
|
+
to: GraphType;
|
|
129
|
+
reason: string;
|
|
130
|
+
};
|
|
122
131
|
}
|
|
123
132
|
/**
|
|
124
133
|
* Route and execute the appropriate domain pipeline based on input context.
|
package/dist/pipeline/index.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { u as ProjectGraph } from '../projectGraphSchema-DnD7orZV.js';
|
|
2
|
-
import { K as Keyword } from '../keywordExtractor-
|
|
3
|
-
import { H as Hallucination, K as KnowledgeGraphPipelineOptions, f as KnowledgeGraphVerificationReport, j as HybridGraphPipelineOptions } from '../hybridGraphPipeline-
|
|
4
|
-
import { C as ConceptMapping } from '../conceptEscalator-
|
|
2
|
+
import { K as Keyword } from '../keywordExtractor-DWw8z_AF.js';
|
|
3
|
+
import { H as Hallucination, K as KnowledgeGraphPipelineOptions, f as KnowledgeGraphVerificationReport, j as HybridGraphPipelineOptions } from '../hybridGraphPipeline-D2_1GUva.js';
|
|
4
|
+
import { C as ConceptMapping } from '../conceptEscalator-DMsehscs.js';
|
|
5
5
|
import { ResolveConceptsResult } from '../concepts/index.js';
|
|
6
6
|
import { AssembledRoadmap } from '../assembly/index.js';
|
|
7
|
-
import {
|
|
7
|
+
import { LlmClientConfig, LlmCallRecord } from '../utils/llmClient.js';
|
|
8
8
|
import { P as ParsedSyllabus } from '../syllabusParser-MSX1fEzW.js';
|
|
9
|
-
import { g as KnowledgeGraph, j as HybridGraph } from '../hybridGraphSchema-
|
|
10
|
-
import {
|
|
11
|
-
import { D as DetectDomainProfileOptions } from '../domainProfileDetector-
|
|
12
|
-
import {
|
|
9
|
+
import { g as KnowledgeGraph, j as HybridGraph } from '../hybridGraphSchema-C37qxdTM.js';
|
|
10
|
+
import { k as CurriculumFeed } from '../curriculumFeedSchema-DK-TUAJZ.js';
|
|
11
|
+
import { D as DetectDomainProfileOptions } from '../domainProfileDetector-6pjgL-6_.js';
|
|
12
|
+
import { d as DomainProfile, h as GraphType } from '../domainProfileSchema-779FGk14.js';
|
|
13
13
|
import 'zod';
|
|
14
|
-
import '../cpp-
|
|
14
|
+
import '../cpp-vlDl6pCL.js';
|
|
15
|
+
import '../utils/llmTransportResult.js';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Project Graph Pipeline — full orchestrator.
|
|
18
19
|
*
|
|
19
20
|
* Ported from knowledge-tree/generate_roadmap_v3.py PipelineOrchestrator
|
|
20
|
-
* Coordinates:
|
|
21
|
+
* Coordinates: regex-based scan → keyword extraction → LLM graph generation →
|
|
21
22
|
* verification → concept escalation → concept resolution → assembly.
|
|
22
23
|
*/
|
|
23
24
|
|
|
@@ -41,6 +42,8 @@ interface PipelineResult {
|
|
|
41
42
|
hallucinations: Hallucination[];
|
|
42
43
|
keywords: Keyword[];
|
|
43
44
|
featureConcepts: Map<string, ConceptMapping[]>;
|
|
45
|
+
/** Which providers served this graph, and whether any call fell over. */
|
|
46
|
+
provenance: LlmCallRecord[];
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
49
|
* Run the full project graph generation pipeline.
|
|
@@ -119,6 +122,12 @@ interface DomainPipelineResult {
|
|
|
119
122
|
knowledgeResult?: KnowledgePipelineResult;
|
|
120
123
|
hybridResult?: HybridPipelineResult;
|
|
121
124
|
warnings: string[];
|
|
125
|
+
/** Present only when the AUTO-detected learning mode could not run and the router ran a weaker pipeline instead. An explicit forcedLearningMode request fails closed instead of downgrading. */
|
|
126
|
+
modeDowngrade?: {
|
|
127
|
+
from: GraphType;
|
|
128
|
+
to: GraphType;
|
|
129
|
+
reason: string;
|
|
130
|
+
};
|
|
122
131
|
}
|
|
123
132
|
/**
|
|
124
133
|
* Route and execute the appropriate domain pipeline based on input context.
|
package/dist/pipeline/index.mjs
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
export { runDomainPipeline, runHybridGraphPipeline, runKnowledgeGraphPipeline, runProjectGraphPipeline } from '../chunk-
|
|
2
|
-
import '../chunk-TWKIVUTQ.mjs';
|
|
3
|
-
import '../chunk-E4GCCWJO.mjs';
|
|
4
|
-
import '../chunk-DRVOV5ZD.mjs';
|
|
5
|
-
import '../chunk-XMHKWHVK.mjs';
|
|
6
|
-
import '../chunk-BL5NBKPH.mjs';
|
|
7
|
-
import '../chunk-TYXSJUQU.mjs';
|
|
8
|
-
import '../chunk-T4Y2DE2W.mjs';
|
|
1
|
+
export { runDomainPipeline, runHybridGraphPipeline, runKnowledgeGraphPipeline, runProjectGraphPipeline } from '../chunk-KHCZYLKM.mjs';
|
|
9
2
|
import '../chunk-KNDBODUQ.mjs';
|
|
10
3
|
import '../chunk-ONQHJ4OH.mjs';
|
|
4
|
+
import '../chunk-WKTH3JPA.mjs';
|
|
5
|
+
import '../chunk-CGNXGVHV.mjs';
|
|
6
|
+
import '../chunk-DSEJLTUO.mjs';
|
|
7
|
+
import '../chunk-XMHKWHVK.mjs';
|
|
8
|
+
import '../chunk-WD3P5V3B.mjs';
|
|
9
|
+
import '../chunk-4UCXYRM3.mjs';
|
|
10
|
+
import '../chunk-7A2SG466.mjs';
|
|
11
|
+
import '../chunk-IBVXXVGE.mjs';
|
|
12
|
+
import '../chunk-T4Y2DE2W.mjs';
|
|
13
|
+
import '../chunk-OYSZQVPY.mjs';
|
|
11
14
|
//# sourceMappingURL=index.mjs.map
|
|
12
15
|
//# sourceMappingURL=index.mjs.map
|
package/dist/schemas/index.cjs
CHANGED
|
@@ -477,9 +477,27 @@ var HybridGraphSchema = zod.z.object({
|
|
|
477
477
|
phases: zod.z.array(DevelopmentPhaseSchema).optional().default([]),
|
|
478
478
|
// Metadata
|
|
479
479
|
description: zod.z.string().optional().default(""),
|
|
480
|
+
// ── Minute totals (HG-1, 2026-10-05) ────────────────────────────────────
|
|
481
|
+
// These three used to sit side by side with near-identical names and NO
|
|
482
|
+
// documentation. Two measured DIFFERENT quantities, which is why the field
|
|
483
|
+
// below was renamed: it does not measure "the total". Read before trusting
|
|
484
|
+
// any of them.
|
|
485
|
+
/** Minutes of PRODUCT work: sum over every feature step. */
|
|
480
486
|
total_project_minutes: zod.z.number().optional().default(0),
|
|
487
|
+
/** Minutes of CONCEPT work: sum over EVERY concept in the graph. */
|
|
481
488
|
total_concept_minutes: zod.z.number().optional().default(0),
|
|
482
|
-
|
|
489
|
+
/**
|
|
490
|
+
* Renamed from `estimated_total_minutes` (2026-10-05) — the old name read
|
|
491
|
+
* like "the course total" but the number is narrower:
|
|
492
|
+
* total_project_minutes + (minutes of concepts that HAVE a feature link)
|
|
493
|
+
* unlinked concepts are deliberately excluded, and per concept the MAXIMUM
|
|
494
|
+
* link estimate wins, not the sum. Expect this to sit well BELOW
|
|
495
|
+
* total_project_minutes + total_concept_minutes.
|
|
496
|
+
*
|
|
497
|
+
* The figure the phase planner actually commits to is
|
|
498
|
+
* total_project_minutes + total_concept_minutes (see decomposePhases).
|
|
499
|
+
*/
|
|
500
|
+
linked_prereq_minutes: zod.z.number().optional().default(0)
|
|
483
501
|
});
|
|
484
502
|
var InputTypeSchema = zod.z.enum([
|
|
485
503
|
"repository",
|
|
@@ -535,6 +553,11 @@ var DetectionConfidenceSchema = zod.z.object({
|
|
|
535
553
|
domainCategory: zod.z.number().min(0).max(1).optional().default(0.5),
|
|
536
554
|
learningMode: zod.z.number().min(0).max(1).optional().default(0.5)
|
|
537
555
|
});
|
|
556
|
+
var AmbiguousDomainSchema = zod.z.object({
|
|
557
|
+
domain1: DomainCategorySchema,
|
|
558
|
+
domain2: DomainCategorySchema,
|
|
559
|
+
reason: zod.z.string()
|
|
560
|
+
});
|
|
538
561
|
var DomainProfileSchema = zod.z.object({
|
|
539
562
|
// Detection results
|
|
540
563
|
inputType: InputTypeSchema,
|
|
@@ -543,6 +566,8 @@ var DomainProfileSchema = zod.z.object({
|
|
|
543
566
|
graphType: GraphTypeSchema,
|
|
544
567
|
// Confidence scores
|
|
545
568
|
confidence: DetectionConfidenceSchema.optional(),
|
|
569
|
+
// Ambiguity flag when detection is borderline or context-conflicted
|
|
570
|
+
ambiguous: AmbiguousDomainSchema.optional(),
|
|
546
571
|
// Evidence for detection decisions
|
|
547
572
|
evidence: zod.z.array(zod.z.string()).optional().default([]),
|
|
548
573
|
// Detected metadata (optional, populated during detection)
|
|
@@ -606,6 +631,14 @@ var FeedNodeSchema = zod.z.object({
|
|
|
606
631
|
reason: zod.z.string().default("")
|
|
607
632
|
})).optional(),
|
|
608
633
|
is_core: zod.z.boolean().default(false),
|
|
634
|
+
/**
|
|
635
|
+
* Prerequisite concept ids this node needs that NO node in this feed provides —
|
|
636
|
+
* i.e. the learner must already know them before starting. Previously these were
|
|
637
|
+
* silently dropped (knowledge path) or crashed emission (both hybrid paths), so a
|
|
638
|
+
* course silently lost its entry requirements. Kept on the node so the mapping
|
|
639
|
+
* "concept X needs prior knowledge Y" survives; a course-level roll-up is derivable.
|
|
640
|
+
*/
|
|
641
|
+
external_prerequisites: zod.z.array(zod.z.string()).default([]),
|
|
609
642
|
// Depth layer text (optional, additive — old feeds validate unchanged).
|
|
610
643
|
// Carries the ULO/CIO/SIO authored text from the KnowledgeGraph concept
|
|
611
644
|
// so downstream consumers (KX generator) can inject depth-appropriate
|
|
@@ -641,12 +674,28 @@ var FeedPhaseSchema = zod.z.object({
|
|
|
641
674
|
product_completion: zod.z.string().min(1),
|
|
642
675
|
node_ids: zod.z.array(zod.z.string()).min(1)
|
|
643
676
|
});
|
|
677
|
+
var FeedDiagnosticSchema = zod.z.object({
|
|
678
|
+
code: zod.z.string().min(1),
|
|
679
|
+
severity: zod.z.enum(["info", "warning", "error"]),
|
|
680
|
+
message: zod.z.string(),
|
|
681
|
+
node_ids: zod.z.array(zod.z.string()).default([])
|
|
682
|
+
});
|
|
683
|
+
var FeedProvenanceSchema = zod.z.object({
|
|
684
|
+
providers: zod.z.array(zod.z.string()).default([]),
|
|
685
|
+
models: zod.z.array(zod.z.string()).default([]),
|
|
686
|
+
calls: zod.z.number().int().nonnegative().default(0),
|
|
687
|
+
failed_calls: zod.z.number().int().nonnegative().default(0),
|
|
688
|
+
degraded: zod.z.boolean().default(false)
|
|
689
|
+
});
|
|
644
690
|
var CurriculumFeedSchema = zod.z.object({
|
|
645
691
|
schema_version: zod.z.literal(2),
|
|
646
692
|
source: zod.z.object({
|
|
647
693
|
graph_type: zod.z.enum(["project_graph", "knowledge_graph", "hybrid_graph"]),
|
|
694
|
+
/** DERIVED from diagnostics — do not write to it directly. */
|
|
648
695
|
warnings: zod.z.array(zod.z.string()).default([]),
|
|
649
|
-
hallucination_count: zod.z.number().int().nonnegative().default(0)
|
|
696
|
+
hallucination_count: zod.z.number().int().nonnegative().default(0),
|
|
697
|
+
diagnostics: zod.z.array(FeedDiagnosticSchema).default([]),
|
|
698
|
+
provenance: FeedProvenanceSchema.optional()
|
|
650
699
|
}),
|
|
651
700
|
learning_nodes: zod.z.array(FeedNodeSchema).min(1, "curriculum feed must contain at least one learning node"),
|
|
652
701
|
dependency_edges: zod.z.array(FeedEdgeSchema).default([]),
|
|
@@ -679,6 +728,15 @@ function validateCurriculumFeed(feed) {
|
|
|
679
728
|
}
|
|
680
729
|
const phaseIds = parsed.phases.map((p) => p.id);
|
|
681
730
|
if (new Set(phaseIds).size !== phaseIds.length) throw new Error("curriculum feed contains duplicate phase ids");
|
|
731
|
+
const phaseOrders = parsed.phases.map((p) => p.order);
|
|
732
|
+
if (new Set(phaseOrders).size !== phaseOrders.length) {
|
|
733
|
+
throw new Error("curriculum feed contains duplicate phase orders: " + phaseOrders.join(", "));
|
|
734
|
+
}
|
|
735
|
+
for (let i = 1; i < phaseOrders.length; i++) {
|
|
736
|
+
if (phaseOrders[i] <= phaseOrders[i - 1]) {
|
|
737
|
+
throw new Error("curriculum feed phase orders are not ascending: " + phaseOrders.join(", "));
|
|
738
|
+
}
|
|
739
|
+
}
|
|
682
740
|
if (parsed.phases.length > 0) {
|
|
683
741
|
const phaseIndexOf = /* @__PURE__ */ new Map();
|
|
684
742
|
parsed.phases.forEach((p, i) => {
|
|
@@ -698,6 +756,7 @@ function validateCurriculumFeed(feed) {
|
|
|
698
756
|
return parsed;
|
|
699
757
|
}
|
|
700
758
|
|
|
759
|
+
exports.AmbiguousDomainSchema = AmbiguousDomainSchema;
|
|
701
760
|
exports.ArchEdgeSchema = ArchEdgeSchema;
|
|
702
761
|
exports.ArchNodeSchema = ArchNodeSchema;
|
|
703
762
|
exports.ArchitectureDetailSchema = ArchitectureDetailSchema;
|
|
@@ -717,11 +776,13 @@ exports.ExperienceComponentSchema = ExperienceComponentSchema;
|
|
|
717
776
|
exports.ExperienceSchema = ExperienceSchema;
|
|
718
777
|
exports.ExperimentProcedureSchema = ExperimentProcedureSchema;
|
|
719
778
|
exports.FeatureSchema = FeatureSchema;
|
|
779
|
+
exports.FeedDiagnosticSchema = FeedDiagnosticSchema;
|
|
720
780
|
exports.FeedEdgeSchema = FeedEdgeSchema;
|
|
721
781
|
exports.FeedGroupingSchema = FeedGroupingSchema;
|
|
722
782
|
exports.FeedKeywordsSchema = FeedKeywordsSchema;
|
|
723
783
|
exports.FeedNodeSchema = FeedNodeSchema;
|
|
724
784
|
exports.FeedPhaseSchema = FeedPhaseSchema;
|
|
785
|
+
exports.FeedProvenanceSchema = FeedProvenanceSchema;
|
|
725
786
|
exports.FeedScaffoldCandidateSchema = FeedScaffoldCandidateSchema;
|
|
726
787
|
exports.GrammarRuleSchema = GrammarRuleSchema;
|
|
727
788
|
exports.GraphTypeSchema = GraphTypeSchema;
|