@driftsys/markspec 0.10.3 → 0.12.0
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 +11 -2
- package/esm/ast/normalize.d.ts +4 -5
- package/esm/ast/normalize.d.ts.map +1 -1
- package/esm/ast/normalize.js +6 -37
- package/esm/collect/mod.d.ts +29 -9
- package/esm/collect/mod.d.ts.map +1 -1
- package/esm/collect/mod.js +36 -10
- package/esm/compiler/deserialize.d.ts +49 -0
- package/esm/compiler/deserialize.d.ts.map +1 -0
- package/esm/compiler/deserialize.js +139 -0
- package/esm/compiler/manifest.d.ts +3 -0
- package/esm/compiler/manifest.d.ts.map +1 -1
- package/esm/compiler/manifest.js +9 -3
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +18 -13
- package/esm/config/markspec.d.ts +40 -1
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/markspec.js +127 -2
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +143 -147
- package/esm/decl/duplicates.d.ts +29 -0
- package/esm/decl/duplicates.d.ts.map +1 -0
- package/esm/decl/duplicates.js +28 -0
- package/esm/decl/mod.d.ts +4 -2
- package/esm/decl/mod.d.ts.map +1 -1
- package/esm/decl/mod.js +2 -1
- package/esm/decl/surfaces.d.ts +29 -7
- package/esm/decl/surfaces.d.ts.map +1 -1
- package/esm/decl/surfaces.js +31 -18
- package/esm/discovery/mod.d.ts +24 -8
- package/esm/discovery/mod.d.ts.map +1 -1
- package/esm/discovery/mod.js +57 -21
- package/esm/discovery/projects.d.ts +109 -0
- package/esm/discovery/projects.d.ts.map +1 -0
- package/esm/discovery/projects.js +232 -0
- package/esm/formatter/entry_body.d.ts +86 -0
- package/esm/formatter/entry_body.d.ts.map +1 -0
- package/esm/formatter/entry_body.js +287 -0
- package/esm/formatter/mod.d.ts +13 -9
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +126 -50
- package/esm/gates/mod.d.ts +13 -2
- package/esm/gates/mod.d.ts.map +1 -1
- package/esm/gates/mod.js +41 -13
- package/esm/lint/runner.d.ts.map +1 -1
- package/esm/lint/runner.js +7 -5
- package/esm/lock/acquire_compile.d.ts +31 -0
- package/esm/lock/acquire_compile.d.ts.map +1 -0
- package/esm/lock/acquire_compile.js +83 -0
- package/esm/lock/cache_check.d.ts +28 -0
- package/esm/lock/cache_check.d.ts.map +1 -0
- package/esm/lock/cache_check.js +51 -0
- package/esm/lock/check.d.ts +14 -3
- package/esm/lock/check.d.ts.map +1 -1
- package/esm/lock/check.js +43 -4
- package/esm/lock/edge_drift.d.ts +2 -0
- package/esm/lock/edge_drift.d.ts.map +1 -1
- package/esm/lock/edge_drift.js +4 -0
- package/esm/lock/git_intent.d.ts +46 -0
- package/esm/lock/git_intent.d.ts.map +1 -0
- package/esm/lock/git_intent.js +111 -0
- package/esm/lock/mod.d.ts +11 -4
- package/esm/lock/mod.d.ts.map +1 -1
- package/esm/lock/mod.js +8 -2
- package/esm/lock/model.d.ts +24 -1
- package/esm/lock/model.d.ts.map +1 -1
- package/esm/lock/parser.d.ts.map +1 -1
- package/esm/lock/parser.js +32 -0
- package/esm/lock/pin_assurance.d.ts +20 -0
- package/esm/lock/pin_assurance.d.ts.map +1 -0
- package/esm/lock/pin_assurance.js +34 -0
- package/esm/lock/resolve.d.ts +8 -17
- package/esm/lock/resolve.d.ts.map +1 -1
- package/esm/lock/resolve.js +7 -67
- package/esm/lock/serializer.d.ts.map +1 -1
- package/esm/lock/serializer.js +23 -0
- package/esm/lock/upstream_common.d.ts +29 -0
- package/esm/lock/upstream_common.d.ts.map +1 -0
- package/esm/lock/upstream_common.js +38 -0
- package/esm/lock/upstream_deps.d.ts +63 -0
- package/esm/lock/upstream_deps.d.ts.map +1 -0
- package/esm/lock/upstream_deps.js +172 -0
- package/esm/lock/upstream_refs.d.ts +69 -0
- package/esm/lock/upstream_refs.d.ts.map +1 -0
- package/esm/lock/upstream_refs.js +238 -0
- package/esm/mod.d.ts +23 -11
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +20 -8
- package/esm/model/mod.d.ts +114 -28
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +76 -13
- package/esm/model/profile.d.ts +13 -0
- package/esm/model/profile.d.ts.map +1 -1
- package/esm/parser/code_regions.d.ts +29 -0
- package/esm/parser/code_regions.d.ts.map +1 -0
- package/esm/parser/code_regions.js +38 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +110 -91
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +7 -1
- package/esm/parser/translate.d.ts.map +1 -1
- package/esm/parser/translate.js +5 -0
- package/esm/profile/manifest.d.ts.map +1 -1
- package/esm/profile/manifest.js +20 -3
- package/esm/profile/merge.js +7 -0
- package/esm/refs/mod.d.ts.map +1 -1
- package/esm/refs/mod.js +8 -19
- package/esm/reporter/mod.d.ts +11 -0
- package/esm/reporter/mod.d.ts.map +1 -1
- package/esm/reporter/mod.js +20 -9
- package/esm/typl/assemble.d.ts +53 -0
- package/esm/typl/assemble.d.ts.map +1 -0
- package/esm/typl/assemble.js +238 -0
- package/esm/typl/ast.d.ts +7 -1
- package/esm/typl/ast.d.ts.map +1 -1
- package/esm/typl/ast.js +3 -0
- package/esm/typl/bullet.d.ts +9 -7
- package/esm/typl/bullet.d.ts.map +1 -1
- package/esm/typl/bullet.js +6 -4
- package/esm/typl/citations.d.ts +27 -0
- package/esm/typl/citations.d.ts.map +1 -0
- package/esm/typl/citations.js +16 -0
- package/esm/typl/diagnostics.d.ts +2 -2
- package/esm/typl/diagnostics.d.ts.map +1 -1
- package/esm/typl/diagnostics.js +18 -0
- package/esm/typl/grammar.d.ts.map +1 -1
- package/esm/typl/grammar.js +6 -0
- package/esm/typl/lexer.d.ts.map +1 -1
- package/esm/typl/lexer.js +25 -4
- package/esm/typl/mod.d.ts +8 -2
- package/esm/typl/mod.d.ts.map +1 -1
- package/esm/typl/mod.js +5 -1
- package/esm/typl/recognize.js +2 -2
- package/esm/typl/registry.d.ts +1 -1
- package/esm/typl/resolve.d.ts +31 -0
- package/esm/typl/resolve.d.ts.map +1 -0
- package/esm/typl/resolve.js +27 -0
- package/esm/typl/table.d.ts +52 -0
- package/esm/typl/table.d.ts.map +1 -0
- package/esm/typl/table.js +69 -0
- package/esm/typl/validator.d.ts +24 -5
- package/esm/typl/validator.d.ts.map +1 -1
- package/esm/typl/validator.js +55 -75
- package/esm/upstream/mod.d.ts +45 -0
- package/esm/upstream/mod.d.ts.map +1 -0
- package/esm/upstream/mod.js +98 -0
- package/esm/upstream/project.d.ts +33 -0
- package/esm/upstream/project.d.ts.map +1 -0
- package/esm/upstream/project.js +38 -0
- package/esm/upstream/refs.d.ts +23 -0
- package/esm/upstream/refs.d.ts.map +1 -0
- package/esm/upstream/refs.js +71 -0
- package/esm/util/fence.d.ts +20 -29
- package/esm/util/fence.d.ts.map +1 -1
- package/esm/util/fence.js +42 -50
- package/esm/util/modals.d.ts +6 -0
- package/esm/util/modals.d.ts.map +1 -1
- package/esm/util/modals.js +37 -0
- package/esm/util/paths.d.ts +14 -0
- package/esm/util/paths.d.ts.map +1 -0
- package/esm/util/paths.js +22 -0
- package/esm/uxil/assemble.d.ts +38 -0
- package/esm/uxil/assemble.d.ts.map +1 -0
- package/esm/uxil/assemble.js +268 -0
- package/esm/uxil/ast.d.ts +63 -0
- package/esm/uxil/ast.d.ts.map +1 -0
- package/esm/uxil/ast.js +9 -0
- package/esm/uxil/citations.d.ts +27 -0
- package/esm/uxil/citations.d.ts.map +1 -0
- package/esm/uxil/citations.js +25 -0
- package/esm/uxil/diagnostics.d.ts +39 -0
- package/esm/uxil/diagnostics.d.ts.map +1 -0
- package/esm/uxil/diagnostics.js +135 -0
- package/esm/uxil/grammar.d.ts +72 -0
- package/esm/uxil/grammar.d.ts.map +1 -0
- package/esm/uxil/grammar.js +505 -0
- package/esm/uxil/lexer.d.ts +23 -0
- package/esm/uxil/lexer.d.ts.map +1 -0
- package/esm/uxil/lexer.js +58 -0
- package/esm/uxil/mod.d.ts +32 -0
- package/esm/uxil/mod.d.ts.map +1 -0
- package/esm/uxil/mod.js +11 -0
- package/esm/uxil/projection.d.ts +40 -0
- package/esm/uxil/projection.d.ts.map +1 -0
- package/esm/uxil/projection.js +41 -0
- package/esm/uxil/recognize.d.ts +16 -0
- package/esm/uxil/recognize.d.ts.map +1 -0
- package/esm/uxil/recognize.js +28 -0
- package/esm/uxil/registry.d.ts +37 -0
- package/esm/uxil/registry.d.ts.map +1 -0
- package/esm/uxil/registry.js +29 -0
- package/esm/uxil/surfaces.d.ts +36 -0
- package/esm/uxil/surfaces.d.ts.map +1 -0
- package/esm/uxil/surfaces.js +34 -0
- package/esm/uxil/validator.d.ts +36 -0
- package/esm/uxil/validator.d.ts.map +1 -0
- package/esm/uxil/validator.js +139 -0
- package/esm/uxil/vocab.d.ts +33 -0
- package/esm/uxil/vocab.d.ts.map +1 -0
- package/esm/uxil/vocab.js +36 -0
- package/esm/validator/body_blocks.d.ts +2 -1
- package/esm/validator/body_blocks.d.ts.map +1 -1
- package/esm/validator/body_blocks.js +80 -2
- package/esm/validator/caption_convention.d.ts +2 -1
- package/esm/validator/caption_convention.d.ts.map +1 -1
- package/esm/validator/caption_convention.js +2 -1
- package/esm/validator/corpus.d.ts +6 -0
- package/esm/validator/corpus.d.ts.map +1 -1
- package/esm/validator/corpus.js +55 -20
- package/esm/validator/discipline.d.ts +6 -4
- package/esm/validator/discipline.d.ts.map +1 -1
- package/esm/validator/discipline.js +6 -4
- package/esm/validator/mod.d.ts +1 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +29 -16
- package/esm/validator/pipeline.d.ts +11 -1
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +76 -23
- package/esm/validator/trace_types.d.ts +9 -2
- package/esm/validator/trace_types.d.ts.map +1 -1
- package/esm/validator/trace_types.js +21 -5
- package/esm/validator/traceability.d.ts +15 -3
- package/esm/validator/traceability.d.ts.map +1 -1
- package/esm/validator/traceability.js +39 -4
- package/esm/validator/types.d.ts.map +1 -1
- package/esm/validator/types.js +11 -1
- package/esm/validator/uxil_family.d.ts +43 -0
- package/esm/validator/uxil_family.d.ts.map +1 -0
- package/esm/validator/uxil_family.js +52 -0
- package/package.json +1 -1
- package/script/ast/normalize.d.ts +4 -5
- package/script/ast/normalize.d.ts.map +1 -1
- package/script/ast/normalize.js +5 -36
- package/script/collect/mod.d.ts +29 -9
- package/script/collect/mod.d.ts.map +1 -1
- package/script/collect/mod.js +38 -10
- package/script/compiler/deserialize.d.ts +49 -0
- package/script/compiler/deserialize.d.ts.map +1 -0
- package/script/compiler/deserialize.js +144 -0
- package/script/compiler/manifest.d.ts +3 -0
- package/script/compiler/manifest.d.ts.map +1 -1
- package/script/compiler/manifest.js +10 -3
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +16 -11
- package/script/config/markspec.d.ts +40 -1
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/markspec.js +129 -3
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +143 -147
- package/script/decl/duplicates.d.ts +29 -0
- package/script/decl/duplicates.d.ts.map +1 -0
- package/script/decl/duplicates.js +31 -0
- package/script/decl/mod.d.ts +4 -2
- package/script/decl/mod.d.ts.map +1 -1
- package/script/decl/mod.js +4 -2
- package/script/decl/surfaces.d.ts +29 -7
- package/script/decl/surfaces.d.ts.map +1 -1
- package/script/decl/surfaces.js +32 -19
- package/script/discovery/mod.d.ts +24 -8
- package/script/discovery/mod.d.ts.map +1 -1
- package/script/discovery/mod.js +56 -20
- package/script/discovery/projects.d.ts +109 -0
- package/script/discovery/projects.d.ts.map +1 -0
- package/script/discovery/projects.js +240 -0
- package/script/formatter/entry_body.d.ts +86 -0
- package/script/formatter/entry_body.d.ts.map +1 -0
- package/script/formatter/entry_body.js +292 -0
- package/script/formatter/mod.d.ts +13 -9
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +124 -48
- package/script/gates/mod.d.ts +13 -2
- package/script/gates/mod.d.ts.map +1 -1
- package/script/gates/mod.js +50 -22
- package/script/lint/runner.d.ts.map +1 -1
- package/script/lint/runner.js +6 -4
- package/script/lock/acquire_compile.d.ts +31 -0
- package/script/lock/acquire_compile.d.ts.map +1 -0
- package/script/lock/acquire_compile.js +86 -0
- package/script/lock/cache_check.d.ts +28 -0
- package/script/lock/cache_check.d.ts.map +1 -0
- package/script/lock/cache_check.js +54 -0
- package/script/lock/check.d.ts +14 -3
- package/script/lock/check.d.ts.map +1 -1
- package/script/lock/check.js +43 -4
- package/script/lock/edge_drift.d.ts +2 -0
- package/script/lock/edge_drift.d.ts.map +1 -1
- package/script/lock/edge_drift.js +5 -0
- package/script/lock/git_intent.d.ts +46 -0
- package/script/lock/git_intent.d.ts.map +1 -0
- package/script/lock/git_intent.js +115 -0
- package/script/lock/mod.d.ts +11 -4
- package/script/lock/mod.d.ts.map +1 -1
- package/script/lock/mod.js +17 -2
- package/script/lock/model.d.ts +24 -1
- package/script/lock/model.d.ts.map +1 -1
- package/script/lock/parser.d.ts.map +1 -1
- package/script/lock/parser.js +32 -0
- package/script/lock/pin_assurance.d.ts +20 -0
- package/script/lock/pin_assurance.d.ts.map +1 -0
- package/script/lock/pin_assurance.js +37 -0
- package/script/lock/resolve.d.ts +8 -17
- package/script/lock/resolve.d.ts.map +1 -1
- package/script/lock/resolve.js +7 -68
- package/script/lock/serializer.d.ts.map +1 -1
- package/script/lock/serializer.js +23 -0
- package/script/lock/upstream_common.d.ts +29 -0
- package/script/lock/upstream_common.d.ts.map +1 -0
- package/script/lock/upstream_common.js +42 -0
- package/script/lock/upstream_deps.d.ts +63 -0
- package/script/lock/upstream_deps.d.ts.map +1 -0
- package/script/lock/upstream_deps.js +175 -0
- package/script/lock/upstream_refs.d.ts +69 -0
- package/script/lock/upstream_refs.d.ts.map +1 -0
- package/script/lock/upstream_refs.js +244 -0
- package/script/mod.d.ts +23 -11
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +55 -7
- package/script/model/mod.d.ts +114 -28
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +81 -14
- package/script/model/profile.d.ts +13 -0
- package/script/model/profile.d.ts.map +1 -1
- package/script/parser/code_regions.d.ts +29 -0
- package/script/parser/code_regions.d.ts.map +1 -0
- package/script/parser/code_regions.js +41 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +108 -89
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +7 -1
- package/script/parser/translate.d.ts.map +1 -1
- package/script/parser/translate.js +5 -0
- package/script/profile/manifest.d.ts.map +1 -1
- package/script/profile/manifest.js +20 -3
- package/script/profile/merge.js +7 -0
- package/script/refs/mod.d.ts.map +1 -1
- package/script/refs/mod.js +7 -18
- package/script/reporter/mod.d.ts +11 -0
- package/script/reporter/mod.d.ts.map +1 -1
- package/script/reporter/mod.js +19 -8
- package/script/typl/assemble.d.ts +53 -0
- package/script/typl/assemble.d.ts.map +1 -0
- package/script/typl/assemble.js +241 -0
- package/script/typl/ast.d.ts +7 -1
- package/script/typl/ast.d.ts.map +1 -1
- package/script/typl/ast.js +3 -0
- package/script/typl/bullet.d.ts +9 -7
- package/script/typl/bullet.d.ts.map +1 -1
- package/script/typl/bullet.js +6 -4
- package/script/typl/citations.d.ts +27 -0
- package/script/typl/citations.d.ts.map +1 -0
- package/script/typl/citations.js +20 -0
- package/script/typl/diagnostics.d.ts +2 -2
- package/script/typl/diagnostics.d.ts.map +1 -1
- package/script/typl/diagnostics.js +18 -0
- package/script/typl/grammar.d.ts.map +1 -1
- package/script/typl/grammar.js +6 -0
- package/script/typl/lexer.d.ts.map +1 -1
- package/script/typl/lexer.js +25 -4
- package/script/typl/mod.d.ts +8 -2
- package/script/typl/mod.d.ts.map +1 -1
- package/script/typl/mod.js +14 -2
- package/script/typl/recognize.js +2 -2
- package/script/typl/registry.d.ts +1 -1
- package/script/typl/resolve.d.ts +31 -0
- package/script/typl/resolve.d.ts.map +1 -0
- package/script/typl/resolve.js +33 -0
- package/script/typl/table.d.ts +52 -0
- package/script/typl/table.d.ts.map +1 -0
- package/script/typl/table.js +75 -0
- package/script/typl/validator.d.ts +24 -5
- package/script/typl/validator.d.ts.map +1 -1
- package/script/typl/validator.js +55 -75
- package/script/upstream/mod.d.ts +45 -0
- package/script/upstream/mod.d.ts.map +1 -0
- package/script/upstream/mod.js +101 -0
- package/script/upstream/project.d.ts +33 -0
- package/script/upstream/project.d.ts.map +1 -0
- package/script/upstream/project.js +41 -0
- package/script/upstream/refs.d.ts +23 -0
- package/script/upstream/refs.d.ts.map +1 -0
- package/script/upstream/refs.js +74 -0
- package/script/util/fence.d.ts +20 -29
- package/script/util/fence.d.ts.map +1 -1
- package/script/util/fence.js +47 -54
- package/script/util/modals.d.ts +6 -0
- package/script/util/modals.d.ts.map +1 -1
- package/script/util/modals.js +38 -0
- package/script/util/paths.d.ts +14 -0
- package/script/util/paths.d.ts.map +1 -0
- package/script/util/paths.js +25 -0
- package/script/uxil/assemble.d.ts +38 -0
- package/script/uxil/assemble.d.ts.map +1 -0
- package/script/uxil/assemble.js +272 -0
- package/script/uxil/ast.d.ts +63 -0
- package/script/uxil/ast.d.ts.map +1 -0
- package/script/uxil/ast.js +10 -0
- package/script/uxil/citations.d.ts +27 -0
- package/script/uxil/citations.d.ts.map +1 -0
- package/script/uxil/citations.js +29 -0
- package/script/uxil/diagnostics.d.ts +39 -0
- package/script/uxil/diagnostics.d.ts.map +1 -0
- package/script/uxil/diagnostics.js +140 -0
- package/script/uxil/grammar.d.ts +72 -0
- package/script/uxil/grammar.d.ts.map +1 -0
- package/script/uxil/grammar.js +511 -0
- package/script/uxil/lexer.d.ts +23 -0
- package/script/uxil/lexer.d.ts.map +1 -0
- package/script/uxil/lexer.js +61 -0
- package/script/uxil/mod.d.ts +32 -0
- package/script/uxil/mod.d.ts.map +1 -0
- package/script/uxil/mod.js +37 -0
- package/script/uxil/projection.d.ts +40 -0
- package/script/uxil/projection.d.ts.map +1 -0
- package/script/uxil/projection.js +44 -0
- package/script/uxil/recognize.d.ts +16 -0
- package/script/uxil/recognize.d.ts.map +1 -0
- package/script/uxil/recognize.js +31 -0
- package/script/uxil/registry.d.ts +37 -0
- package/script/uxil/registry.d.ts.map +1 -0
- package/script/uxil/registry.js +32 -0
- package/script/uxil/surfaces.d.ts +36 -0
- package/script/uxil/surfaces.d.ts.map +1 -0
- package/script/uxil/surfaces.js +39 -0
- package/script/uxil/validator.d.ts +36 -0
- package/script/uxil/validator.d.ts.map +1 -0
- package/script/uxil/validator.js +142 -0
- package/script/uxil/vocab.d.ts +33 -0
- package/script/uxil/vocab.d.ts.map +1 -0
- package/script/uxil/vocab.js +41 -0
- package/script/validator/body_blocks.d.ts +2 -1
- package/script/validator/body_blocks.d.ts.map +1 -1
- package/script/validator/body_blocks.js +80 -2
- package/script/validator/caption_convention.d.ts +2 -1
- package/script/validator/caption_convention.d.ts.map +1 -1
- package/script/validator/caption_convention.js +2 -1
- package/script/validator/corpus.d.ts +6 -0
- package/script/validator/corpus.d.ts.map +1 -1
- package/script/validator/corpus.js +55 -19
- package/script/validator/discipline.d.ts +6 -4
- package/script/validator/discipline.d.ts.map +1 -1
- package/script/validator/discipline.js +6 -4
- package/script/validator/mod.d.ts +1 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +29 -15
- package/script/validator/pipeline.d.ts +11 -1
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +75 -22
- package/script/validator/trace_types.d.ts +9 -2
- package/script/validator/trace_types.d.ts.map +1 -1
- package/script/validator/trace_types.js +20 -4
- package/script/validator/traceability.d.ts +15 -3
- package/script/validator/traceability.d.ts.map +1 -1
- package/script/validator/traceability.js +38 -3
- package/script/validator/types.d.ts.map +1 -1
- package/script/validator/types.js +10 -0
- package/script/validator/uxil_family.d.ts +43 -0
- package/script/validator/uxil_family.d.ts.map +1 -0
- package/script/validator/uxil_family.js +56 -0
|
@@ -26,6 +26,16 @@ const feature_ac_js_1 = require("./feature_ac.js");
|
|
|
26
26
|
const caption_convention_js_1 = require("./caption_convention.js");
|
|
27
27
|
const discipline_js_1 = require("./discipline.js");
|
|
28
28
|
const discipline_registry_js_1 = require("../profile/discipline_registry.js");
|
|
29
|
+
const uxil_family_js_1 = require("./uxil_family.js");
|
|
30
|
+
/** Cross-entry uxil codes suppressed under file-local scope (#727): a
|
|
31
|
+
* subset registry cannot distinguish a dangling reference from an
|
|
32
|
+
* unchecked file — the same false-positive class the MSL-L006 filter
|
|
33
|
+
* guards. Entry-local UXIL codes are unaffected. */
|
|
34
|
+
const FILE_LOCAL_SUPPRESSED_UXIL = new Set([
|
|
35
|
+
"UXIL-016",
|
|
36
|
+
"UXIL-017",
|
|
37
|
+
"UXIL-018",
|
|
38
|
+
]);
|
|
29
39
|
/**
|
|
30
40
|
* Run the validator pipeline.
|
|
31
41
|
*
|
|
@@ -37,7 +47,8 @@ const discipline_registry_js_1 = require("../profile/discipline_registry.js");
|
|
|
37
47
|
* assignments).
|
|
38
48
|
*
|
|
39
49
|
* @param captionConventions - Optional project-configured caption-position
|
|
40
|
-
* conventions (from
|
|
50
|
+
* conventions (from `.markspec.yaml` `caption-conventions:`, via
|
|
51
|
+
* `ToolConfig.captionConventions`). When supplied
|
|
41
52
|
* and non-empty, MSL-C072 is checked for each entry. Defaults to no
|
|
42
53
|
* conventions (rule inactive).
|
|
43
54
|
* @param opts - Pipeline options. Pass `{ projectWide: false }` when
|
|
@@ -45,6 +56,14 @@ const discipline_registry_js_1 = require("../profile/discipline_registry.js");
|
|
|
45
56
|
*/
|
|
46
57
|
function runPipeline(entries, profile, captionConventions = {}, opts = {}) {
|
|
47
58
|
const diagnostics = [];
|
|
59
|
+
// Partition per orchestrator (#771): emit loops here iterate
|
|
60
|
+
// `emittable` / `finalEmittable`; resolution maps build from the full
|
|
61
|
+
// lists so upstream entries stay live link targets (ADR-031 §4.7).
|
|
62
|
+
// `validate()` (Stage 1) and `validateTypl` derive their own partitions
|
|
63
|
+
// for their standalone callers — the guarantee is convention plus the
|
|
64
|
+
// upstream-silence anchor test, not a distinct type. A new stage added
|
|
65
|
+
// to this pipeline must loop over the emittable list.
|
|
66
|
+
const emittable = (0, mod_js_1.emittableEntries)(entries);
|
|
48
67
|
// Stage 1 — core hygiene. When a profile is loaded, suppress MSL-R010
|
|
49
68
|
// warnings for attributes the profile actually declares (Stage 3's scope
|
|
50
69
|
// validates them directly — the core-only R010 check would be noise).
|
|
@@ -54,20 +73,20 @@ function runPipeline(entries, profile, captionConventions = {}, opts = {}) {
|
|
|
54
73
|
// included) so unknown `Type:` values fail fast regardless of profile.
|
|
55
74
|
// Also covers late-stage display-ID-shape inference (step 8 → MSL-T021)
|
|
56
75
|
// and caption-adjacency rules (§2.6 → MSL-C070).
|
|
57
|
-
for (const entry of
|
|
76
|
+
for (const entry of emittable) {
|
|
58
77
|
diagnostics.push(...(0, types_js_1.validateCoreTypeAttribute)(entry, profile));
|
|
59
78
|
diagnostics.push(...(0, types_js_1.inferTypeFromDisplayIdShape)(entry));
|
|
60
79
|
diagnostics.push(...(0, captions_js_1.validateCaptions)(entry));
|
|
61
80
|
diagnostics.push(...(0, caption_convention_js_1.validateCaptionConvention)(entry, captionConventions));
|
|
62
81
|
diagnostics.push(...(0, body_blocks_js_1.validateBodyBlocks)(entry));
|
|
63
82
|
diagnostics.push(...(0, feature_ac_js_1.validateFeatureAc)(entry));
|
|
64
|
-
diagnostics.push(...(0, per_type_attrs_js_1.validatePerTypeAttributes)(entry, profile ?? undefined));
|
|
65
83
|
diagnostics.push(...(0, modal_keywords_js_1.validateModalKeywords)(entry));
|
|
66
84
|
}
|
|
67
85
|
// Stage 1.6 — cross-file trace target-type compatibility (MSL-R083).
|
|
68
86
|
// Runs project-wide because targets may live in any entry; needs the
|
|
69
|
-
// whole batch indexed
|
|
70
|
-
|
|
87
|
+
// whole batch indexed (resolution side) while emitting only from the
|
|
88
|
+
// partition.
|
|
89
|
+
diagnostics.push(...(0, trace_types_js_1.validateTraceTargetTypes)(emittable, entries));
|
|
71
90
|
// Stage 1.7 — discipline attribute validation (ADR-017 Slice 3).
|
|
72
91
|
// Runs in both core-only and profile modes. In core-only mode the
|
|
73
92
|
// registry is CORE_DISCIPLINE_REGISTRY (kinds: system/software/hardware
|
|
@@ -76,21 +95,29 @@ function runPipeline(entries, profile, captionConventions = {}, opts = {}) {
|
|
|
76
95
|
? (0, discipline_registry_js_1.buildEffectiveDisciplineRegistry)(profile)
|
|
77
96
|
: mod_js_1.CORE_DISCIPLINE_REGISTRY;
|
|
78
97
|
const entriesByDisplayId = new Map(entries.map((e) => [(0, mod_js_1.makeDisplayId)(e.displayId), e]));
|
|
79
|
-
diagnostics.push(...(0, discipline_js_1.validateDiscipline)(
|
|
98
|
+
diagnostics.push(...(0, discipline_js_1.validateDiscipline)(emittable, entriesByDisplayId, disciplineRegistry));
|
|
80
99
|
// Stage 2 — classification (only when a profile is loaded).
|
|
100
|
+
// classifyEntriesStage handles upstream itself (pass-through, never
|
|
101
|
+
// re-classified) — it is a transform, not an emit loop; see types.ts.
|
|
81
102
|
let finalEntries = entries;
|
|
82
103
|
if (profile !== null) {
|
|
83
104
|
const stage2 = (0, types_js_1.classifyEntriesStage)(entries, profile);
|
|
84
105
|
finalEntries = stage2.entries;
|
|
85
106
|
diagnostics.push(...stage2.diagnostics);
|
|
86
107
|
}
|
|
87
|
-
// Stage 2.4 — late-stage inference warnings (MSL-T021 for steps 5/6)
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
|
|
108
|
+
// Stage 2.4 — late-stage inference warnings (MSL-T021 for steps 5/6)
|
|
109
|
+
// and per-type attribute compatibility (MSL-T022 / MSL-T024). Both run
|
|
110
|
+
// after Stage 2 so that a profile-classified `entry.type` (display-ID
|
|
111
|
+
// pattern match, no explicit `Type:`) resolves to its `extends:` core
|
|
112
|
+
// type — run before classification, MSL-T024 fired on every
|
|
113
|
+
// pattern-classified entry carrying `Satisfies:`/`Derived-from:`. In
|
|
114
|
+
// core-only mode `finalEntries === entries` and `entry.type` is always
|
|
115
|
+
// undefined, so this stage produces the same diagnostics regardless of
|
|
116
|
+
// mode. Partitions inline: `finalEmittable` below is derived from the
|
|
117
|
+
// post-normalization generation, which does not exist yet at this point.
|
|
118
|
+
for (const entry of (0, mod_js_1.emittableEntries)(finalEntries)) {
|
|
93
119
|
diagnostics.push(...(0, types_js_1.inferTypeFromLateStageChain)(entry));
|
|
120
|
+
diagnostics.push(...(0, per_type_attrs_js_1.validatePerTypeAttributes)(entry, profile ?? undefined));
|
|
94
121
|
}
|
|
95
122
|
// Stage 2.5 — normalize profile-declared list-value attributes. Splits
|
|
96
123
|
// comma-separated values for `id-list`/`tag-list` attributes the core parser
|
|
@@ -98,16 +125,25 @@ function runPipeline(entries, profile, captionConventions = {}, opts = {}) {
|
|
|
98
125
|
if (profile !== null) {
|
|
99
126
|
finalEntries = finalEntries.map((e) => (0, normalize_js_1.normalizeListValues)(e, profile));
|
|
100
127
|
}
|
|
101
|
-
//
|
|
128
|
+
// Final generation reached — Stages 2 and 2.5 both produced new Entry
|
|
129
|
+
// objects, so the emit partition for Stages 3/4 is derived here, once.
|
|
130
|
+
const finalEmittable = (0, mod_js_1.emittableEntries)(finalEntries);
|
|
131
|
+
// Stage 3 — typed attributes (only when a profile is loaded). Upstream
|
|
132
|
+
// entries are validation-exempt (design §4.7) — outside the emit
|
|
133
|
+
// partition, but they remain in `finalEntries` for Stage 4's resolution
|
|
134
|
+
// maps below.
|
|
102
135
|
if (profile !== null) {
|
|
103
|
-
for (const entry of
|
|
136
|
+
for (const entry of finalEmittable) {
|
|
104
137
|
const stage3 = (0, attributes_js_1.validateAttributesForEntry)(entry, profile);
|
|
105
138
|
diagnostics.push(...stage3);
|
|
106
139
|
}
|
|
107
140
|
}
|
|
108
141
|
// Stage 4 — traceability rules (only when a profile is loaded). Builds two
|
|
109
142
|
// indexes: by `entry.id` (ULID) and by `entry.displayId`, so trace values
|
|
110
|
-
// resolve in either form (issue #593).
|
|
143
|
+
// resolve in either form (issue #593). Upstream entries MUST stay in both
|
|
144
|
+
// indexes — a project entry's link targeting an upstream entry must still
|
|
145
|
+
// resolve (design §4.7) — so this map-building loop is never filtered.
|
|
146
|
+
const projectWide = opts.projectWide !== false;
|
|
111
147
|
if (profile !== null) {
|
|
112
148
|
const graph = new Map();
|
|
113
149
|
const byDisplayId = new Map();
|
|
@@ -117,15 +153,32 @@ function runPipeline(entries, profile, captionConventions = {}, opts = {}) {
|
|
|
117
153
|
if (!byDisplayId.has(e.displayId))
|
|
118
154
|
byDisplayId.set(e.displayId, e);
|
|
119
155
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
//
|
|
126
|
-
|
|
156
|
+
// Upstream entries are validation-exempt emitters (design §4.7): trace
|
|
157
|
+
// rules FROM an upstream entry are never checked. They remain
|
|
158
|
+
// resolution targets via the maps built above.
|
|
159
|
+
for (const entry of finalEmittable) {
|
|
160
|
+
const stage4 = (0, traceability_js_1.validateTraceabilityForEntry)(entry, profile, graph, byDisplayId, opts.declaredUpstreamIds);
|
|
161
|
+
// Suppress MSL-L006 ("link target does not resolve") and its
|
|
162
|
+
// federated-upstream replacement MSL-T014 when running file-locally:
|
|
163
|
+
// the checked subset cannot distinguish a typo from a valid
|
|
164
|
+
// cross-file/upstream target. Only emit when the full entry set is
|
|
165
|
+
// present.
|
|
166
|
+
diagnostics.push(...projectWide
|
|
167
|
+
? stage4
|
|
168
|
+
: stage4.filter((d) => d.code !== "MSL-L006" && d.code !== "MSL-T014"));
|
|
127
169
|
}
|
|
128
170
|
}
|
|
171
|
+
// Stage 5 — uxil diagnostics family (S9 #727). Inert unless some profile
|
|
172
|
+
// tier designates a declaring type (`declares: ux-surface`). Receives the
|
|
173
|
+
// FULL classified list on purpose: the family derives its own #771
|
|
174
|
+
// partition and its own declaring/citing split — registry scope is the
|
|
175
|
+
// module's contract, not this orchestrator's (mirrors validateTypl).
|
|
176
|
+
// File-local scope (projectWide: false) suppresses the cross-entry codes
|
|
177
|
+
// (UXIL-016/017/018) — a subset registry cannot distinguish a dangling
|
|
178
|
+
// reference from an unchecked file, the same false-positive class the
|
|
179
|
+
// MSL-L006 suppression guards (#727 review).
|
|
180
|
+
const uxilDiagnostics = (0, uxil_family_js_1.validateUxilFamily)(finalEntries, profile);
|
|
181
|
+
diagnostics.push(...(projectWide ? uxilDiagnostics : uxilDiagnostics.filter((d) => !FILE_LOCAL_SUPPRESSED_UXIL.has(d.code))));
|
|
129
182
|
const valid = !diagnostics.some((d) => d.severity === "error");
|
|
130
183
|
return { entries: finalEntries, diagnostics, valid };
|
|
131
184
|
}
|
|
@@ -20,7 +20,14 @@ import type { Diagnostic, Entry } from "../model/mod.js";
|
|
|
20
20
|
*
|
|
21
21
|
* Unresolved targets are silently skipped — they're caught elsewhere
|
|
22
22
|
* (MSL-R080 / MSL-T012 / MSL-T005). Targets without a resolvable core
|
|
23
|
-
* type are also skipped (no compat call to make).
|
|
23
|
+
* type are also skipped (no compat call to make). Upstream TARGETS are
|
|
24
|
+
* exempt from the MSL-R083 type-compat checks (#771) — their type comes
|
|
25
|
+
* from a foreign vocabulary, the target-side twin of #765's MSL-L004 fix.
|
|
26
|
+
*
|
|
27
|
+
* @param emittable The #771 emit partition — trace rules are never
|
|
28
|
+
* checked FROM an upstream entry.
|
|
29
|
+
* @param all The full entry set (upstream included) — resolution maps
|
|
30
|
+
* index it so links TO an upstream entry keep resolving.
|
|
24
31
|
*/
|
|
25
|
-
export declare function validateTraceTargetTypes(
|
|
32
|
+
export declare function validateTraceTargetTypes(emittable: readonly Entry[], all: readonly Entry[]): readonly Diagnostic[];
|
|
26
33
|
//# sourceMappingURL=trace_types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace_types.d.ts","sourceRoot":"","sources":["../../src/validator/trace_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"trace_types.d.ts","sourceRoot":"","sources":["../../src/validator/trace_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAwFzD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,KAAK,EAAE,EAC3B,GAAG,EAAE,SAAS,KAAK,EAAE,GACpB,SAAS,UAAU,EAAE,CA8HvB"}
|
|
@@ -86,19 +86,26 @@ function isTargetTypeCompatible(targetType, allowedTypes) {
|
|
|
86
86
|
*
|
|
87
87
|
* Unresolved targets are silently skipped — they're caught elsewhere
|
|
88
88
|
* (MSL-R080 / MSL-T012 / MSL-T005). Targets without a resolvable core
|
|
89
|
-
* type are also skipped (no compat call to make).
|
|
89
|
+
* type are also skipped (no compat call to make). Upstream TARGETS are
|
|
90
|
+
* exempt from the MSL-R083 type-compat checks (#771) — their type comes
|
|
91
|
+
* from a foreign vocabulary, the target-side twin of #765's MSL-L004 fix.
|
|
92
|
+
*
|
|
93
|
+
* @param emittable The #771 emit partition — trace rules are never
|
|
94
|
+
* checked FROM an upstream entry.
|
|
95
|
+
* @param all The full entry set (upstream included) — resolution maps
|
|
96
|
+
* index it so links TO an upstream entry keep resolving.
|
|
90
97
|
*/
|
|
91
|
-
function validateTraceTargetTypes(
|
|
98
|
+
function validateTraceTargetTypes(emittable, all) {
|
|
92
99
|
const byDisplayId = new Map();
|
|
93
100
|
const byId = new Map();
|
|
94
|
-
for (const e of
|
|
101
|
+
for (const e of all) {
|
|
95
102
|
if (!byDisplayId.has(e.displayId))
|
|
96
103
|
byDisplayId.set(e.displayId, e);
|
|
97
104
|
if (e.id && !byId.has(e.id))
|
|
98
105
|
byId.set(e.id, e);
|
|
99
106
|
}
|
|
100
107
|
const diagnostics = [];
|
|
101
|
-
for (const entry of
|
|
108
|
+
for (const entry of emittable) {
|
|
102
109
|
// MSL-R084: Supersedes target must be the same shape as the source.
|
|
103
110
|
for (const attr of entry.rawAttributes) {
|
|
104
111
|
if (attr.key !== "Supersedes")
|
|
@@ -126,6 +133,11 @@ function validateTraceTargetTypes(entries) {
|
|
|
126
133
|
const resolved = byId.get(target) ?? byDisplayId.get(target);
|
|
127
134
|
if (!resolved)
|
|
128
135
|
continue;
|
|
136
|
+
// Target-side exemption (#771, matching #765's MSL-L004 fix): an
|
|
137
|
+
// upstream target's type comes from a foreign vocabulary — never
|
|
138
|
+
// judge core-type compatibility against it.
|
|
139
|
+
if ((0, mod_js_1.isUpstreamEntry)(resolved))
|
|
140
|
+
continue;
|
|
129
141
|
const targetType = (0, type_resolution_js_1.resolvedCoreType)(resolved);
|
|
130
142
|
if (!targetType)
|
|
131
143
|
continue;
|
|
@@ -161,6 +173,10 @@ function validateTraceTargetTypes(entries) {
|
|
|
161
173
|
const resolved = byId.get(target) ?? byDisplayId.get(target);
|
|
162
174
|
if (!resolved)
|
|
163
175
|
continue;
|
|
176
|
+
// Target-side exemption (#771) — same rationale as the
|
|
177
|
+
// TRACE_RULES loop above.
|
|
178
|
+
if ((0, mod_js_1.isUpstreamEntry)(resolved))
|
|
179
|
+
continue;
|
|
164
180
|
const targetType = (0, type_resolution_js_1.resolvedCoreType)(resolved);
|
|
165
181
|
if (!targetType)
|
|
166
182
|
continue;
|
|
@@ -8,8 +8,13 @@
|
|
|
8
8
|
* attributes:
|
|
9
9
|
* - Required (MSL-L001)
|
|
10
10
|
* - Cardinality bounds (MSL-L002 upper / MSL-L003 lower)
|
|
11
|
-
* - Target match against the rule's target matchers (MSL-L004
|
|
12
|
-
*
|
|
11
|
+
* - Target match against the rule's target matchers (MSL-L004; skipped
|
|
12
|
+
* when the resolved target is an upstream entry — its `type` comes from
|
|
13
|
+
* the upstream's own profile, a vocabulary the consumer never
|
|
14
|
+
* re-classifies against, federated upstream slice 4)
|
|
15
|
+
* - Target existence (MSL-L006, warning; scheme-qualified URIs exempt) —
|
|
16
|
+
* or MSL-T014 (warning) instead of MSL-L006 when the caller declares a
|
|
17
|
+
* non-empty upstream set (federated upstream, slice 4)
|
|
13
18
|
*
|
|
14
19
|
* Referenced entries are skipped entirely — the profile manifest parser
|
|
15
20
|
* rejects `referenced.traceability` at load time, so referenced entries
|
|
@@ -45,6 +50,13 @@ export declare function matchesAnyTarget(target: Entry, matchers: readonly Targe
|
|
|
45
50
|
* @param graph - Index keyed by entry.id (ULID) for target lookup
|
|
46
51
|
* @param byDisplayId - Index keyed by entry.displayId for target lookup
|
|
47
52
|
* (issue #593 — display-ID targets). Defaults to empty.
|
|
53
|
+
* @param declaredUpstreamIds - Upstream ids the downstream project declares
|
|
54
|
+
* via `project.yaml` `dependencies:`/`references:`
|
|
55
|
+
* (federated upstream, slice 4). When non-empty, an
|
|
56
|
+
* otherwise-unresolved trace target fires MSL-T014
|
|
57
|
+
* (warning), naming the searched upstream set, instead
|
|
58
|
+
* of the generic MSL-L006. Defaults to empty — MSL-L006
|
|
59
|
+
* unchanged.
|
|
48
60
|
*/
|
|
49
|
-
export declare function validateTraceabilityForEntry(entry: Entry, profile: EffectiveProfile, graph: ReadonlyMap<string, Entry>, byDisplayId?: ReadonlyMap<string, Entry
|
|
61
|
+
export declare function validateTraceabilityForEntry(entry: Entry, profile: EffectiveProfile, graph: ReadonlyMap<string, Entry>, byDisplayId?: ReadonlyMap<string, Entry>, declaredUpstreamIds?: readonly string[]): Diagnostic[];
|
|
50
62
|
//# sourceMappingURL=traceability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceability.d.ts","sourceRoot":"","sources":["../../src/validator/traceability.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"traceability.d.ts","sourceRoot":"","sources":["../../src/validator/traceability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,KAAK,EAEV,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AAEzB;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,GACxB,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAehC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,SAAS,aAAa,EAAE,GACjC,OAAO,CAST;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,EACjC,WAAW,GAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAa,EACnD,mBAAmB,GAAE,SAAS,MAAM,EAAO,GAC1C,UAAU,EAAE,CA+Gd"}
|
|
@@ -9,8 +9,13 @@
|
|
|
9
9
|
* attributes:
|
|
10
10
|
* - Required (MSL-L001)
|
|
11
11
|
* - Cardinality bounds (MSL-L002 upper / MSL-L003 lower)
|
|
12
|
-
* - Target match against the rule's target matchers (MSL-L004
|
|
13
|
-
*
|
|
12
|
+
* - Target match against the rule's target matchers (MSL-L004; skipped
|
|
13
|
+
* when the resolved target is an upstream entry — its `type` comes from
|
|
14
|
+
* the upstream's own profile, a vocabulary the consumer never
|
|
15
|
+
* re-classifies against, federated upstream slice 4)
|
|
16
|
+
* - Target existence (MSL-L006, warning; scheme-qualified URIs exempt) —
|
|
17
|
+
* or MSL-T014 (warning) instead of MSL-L006 when the caller declares a
|
|
18
|
+
* non-empty upstream set (federated upstream, slice 4)
|
|
14
19
|
*
|
|
15
20
|
* Referenced entries are skipped entirely — the profile manifest parser
|
|
16
21
|
* rejects `referenced.traceability` at load time, so referenced entries
|
|
@@ -76,8 +81,15 @@ function matchesAnyTarget(target, matchers) {
|
|
|
76
81
|
* @param graph - Index keyed by entry.id (ULID) for target lookup
|
|
77
82
|
* @param byDisplayId - Index keyed by entry.displayId for target lookup
|
|
78
83
|
* (issue #593 — display-ID targets). Defaults to empty.
|
|
84
|
+
* @param declaredUpstreamIds - Upstream ids the downstream project declares
|
|
85
|
+
* via `project.yaml` `dependencies:`/`references:`
|
|
86
|
+
* (federated upstream, slice 4). When non-empty, an
|
|
87
|
+
* otherwise-unresolved trace target fires MSL-T014
|
|
88
|
+
* (warning), naming the searched upstream set, instead
|
|
89
|
+
* of the generic MSL-L006. Defaults to empty — MSL-L006
|
|
90
|
+
* unchanged.
|
|
79
91
|
*/
|
|
80
|
-
function validateTraceabilityForEntry(entry, profile, graph, byDisplayId = new Map()) {
|
|
92
|
+
function validateTraceabilityForEntry(entry, profile, graph, byDisplayId = new Map(), declaredUpstreamIds = []) {
|
|
81
93
|
const diagnostics = [];
|
|
82
94
|
if (entry.shape !== "Authored")
|
|
83
95
|
return diagnostics;
|
|
@@ -127,6 +139,20 @@ function validateTraceabilityForEntry(entry, profile, graph, byDisplayId = new M
|
|
|
127
139
|
// graph targets, so they are not "broken references".
|
|
128
140
|
if (mod_js_1.URI_SCHEME_RE.test(v))
|
|
129
141
|
continue;
|
|
142
|
+
// Federated upstream (slice 4): when the project declares an
|
|
143
|
+
// upstream set, an unresolved target replaces MSL-L006 with
|
|
144
|
+
// MSL-T014, naming the searched set — the same target fires
|
|
145
|
+
// exactly one of the two codes, never both.
|
|
146
|
+
if (declaredUpstreamIds.length > 0) {
|
|
147
|
+
diagnostics.push({
|
|
148
|
+
code: "MSL-T014",
|
|
149
|
+
severity: "warning",
|
|
150
|
+
message: `${entry.displayId}: link '${linkName}' target '${v}' not ` +
|
|
151
|
+
`found in project or upstreams: ${declaredUpstreamIds.join(", ")}`,
|
|
152
|
+
location: entry.location,
|
|
153
|
+
});
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
130
156
|
diagnostics.push({
|
|
131
157
|
code: "MSL-L006",
|
|
132
158
|
severity: "warning",
|
|
@@ -136,6 +162,15 @@ function validateTraceabilityForEntry(entry, profile, graph, byDisplayId = new M
|
|
|
136
162
|
});
|
|
137
163
|
continue;
|
|
138
164
|
}
|
|
165
|
+
// Federated upstream (slice 4): an upstream target's `type` is
|
|
166
|
+
// classified by the upstream's OWN profile — a foreign vocabulary the
|
|
167
|
+
// consumer's profile cannot map (design §4.5/D6: the consumer never
|
|
168
|
+
// re-classifies). The link still resolves (no L006/T014 — handled
|
|
169
|
+
// above); only the consumer's own target-type enforcement is skipped
|
|
170
|
+
// for this target. A project-authored target with a mismatched type
|
|
171
|
+
// still fires MSL-L004 below.
|
|
172
|
+
if ((0, mod_js_1.isUpstreamEntry)(target))
|
|
173
|
+
continue;
|
|
139
174
|
if (!matchesAnyTarget(target, rule.target)) {
|
|
140
175
|
diagnostics.push({
|
|
141
176
|
code: "MSL-L004",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/validator/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAEhB,KAAK,EAEN,MAAM,iBAAiB,CAAC;AAwBzB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,KAAK,GACX,SAAS,UAAU,EAAE,CAWvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,KAAK,GACX,SAAS,UAAU,EAAE,CAiBvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAC/B,SAAS,UAAU,EAAE,CAwBvB;AAED,4CAA4C;AAC5C,MAAM,WAAW,cAAc;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,GACxB,cAAc,CAiEhB;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/validator/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAEhB,KAAK,EAEN,MAAM,iBAAiB,CAAC;AAwBzB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,KAAK,GACX,SAAS,UAAU,EAAE,CAWvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,KAAK,GACX,SAAS,UAAU,EAAE,CAiBvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAC/B,SAAS,UAAU,EAAE,CAwBvB;AAED,4CAA4C;AAC5C,MAAM,WAAW,cAAc;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,GACxB,cAAc,CAiEhB;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,CAkCrB"}
|
|
@@ -220,6 +220,16 @@ function classifyEntriesStage(entries, profile) {
|
|
|
220
220
|
const diagnostics = [];
|
|
221
221
|
const out = [];
|
|
222
222
|
for (const entry of entries) {
|
|
223
|
+
// Deliberately NOT the #771 emittableEntries partition: this stage is
|
|
224
|
+
// a TRANSFORM, not an emit loop — upstream entries must pass through
|
|
225
|
+
// into the output (they stay in finalEntries as resolution targets,
|
|
226
|
+
// in original order for first-entry-wins ties), and their `type`
|
|
227
|
+
// comes from their OWN compile (design §4.5/D6) — the consumer never
|
|
228
|
+
// re-classifies. No MSL-T001..T004 emit, no type overwrite.
|
|
229
|
+
if ((0, mod_js_1.isUpstreamEntry)(entry)) {
|
|
230
|
+
out.push(entry);
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
223
233
|
const classified = classifyEntry(entry, profile);
|
|
224
234
|
diagnostics.push(...classified.diagnostics);
|
|
225
235
|
if (classified.type !== undefined) {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module validator/uxil_family
|
|
3
|
+
*
|
|
4
|
+
* The UXIL-0xx diagnostics family orchestrator (S9 #727). Bridges S8's
|
|
5
|
+
* uxil compiler into the profile-aware validation surfaces (`runPipeline`
|
|
6
|
+
* → `markspec check`; LSP `WorkspaceIndex.validateAll`).
|
|
7
|
+
*
|
|
8
|
+
* Gate: a profile type carrying `declares: ux-surface` (ADR-009: the
|
|
9
|
+
* mechanism is core, the designation is profile policy). With no
|
|
10
|
+
* designation anywhere in the chain the family is fully inert — uxil-
|
|
11
|
+
* looking code spans stay opaque (epic S1's Tier-1 guarantee), so a
|
|
12
|
+
* `.gitignore`-style prose bullet can never draw a diagnostic.
|
|
13
|
+
*
|
|
14
|
+
* With a designation:
|
|
15
|
+
* - entries of a declaring type run the full S8 validation (structure,
|
|
16
|
+
* vocabulary, corpus registry);
|
|
17
|
+
* - `ux:` citations are validated from EVERY non-upstream entry —
|
|
18
|
+
* journeys, tests, and specs cite surfaces from any type;
|
|
19
|
+
* - an unambiguous root declaration (`ux:… : kind` span) in a
|
|
20
|
+
* non-declaring entry is UXIL-023. Element/child bullets (`/`-led,
|
|
21
|
+
* `.`-led) in non-declaring entries stay opaque — they are ambiguous
|
|
22
|
+
* with ordinary prose code spans, deliberately.
|
|
23
|
+
*
|
|
24
|
+
* Upstream entries are uxil-inert (the #771 `emittableEntries` partition,
|
|
25
|
+
* mirroring validateTypl). Entries are gated by `entry.type` when the
|
|
26
|
+
* pipeline's Stage 2 already classified them, else by `classifyEntry` —
|
|
27
|
+
* so the LSP path (which never runs Stage 2) gates identically; the
|
|
28
|
+
* classification diagnostics are deliberately dropped here (the pipeline
|
|
29
|
+
* owns emitting those).
|
|
30
|
+
*/
|
|
31
|
+
import type { Diagnostic, EffectiveProfile, Entry } from "../model/mod.js";
|
|
32
|
+
/**
|
|
33
|
+
* Names of the profile types designated as uxil declaring entry types
|
|
34
|
+
* (`declares: ux-surface`). Empty when `profile` is `null` or no tier
|
|
35
|
+
* designates one — the family's inertness gate.
|
|
36
|
+
*/
|
|
37
|
+
export declare function uxilDeclaringTypes(profile: EffectiveProfile | null): ReadonlySet<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Run the UXIL-0xx family over `entries`. Returns file-anchored core
|
|
40
|
+
* diagnostics; `[]` when the gate is closed (see module doc).
|
|
41
|
+
*/
|
|
42
|
+
export declare function validateUxilFamily(entries: readonly Entry[], profile: EffectiveProfile | null): readonly Diagnostic[];
|
|
43
|
+
//# sourceMappingURL=uxil_family.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uxil_family.d.ts","sourceRoot":"","sources":["../../src/validator/uxil_family.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAS3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAC/B,WAAW,CAAC,MAAM,CAAC,CAOrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAC/B,SAAS,UAAU,EAAE,CA8BvB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uxilDeclaringTypes = uxilDeclaringTypes;
|
|
4
|
+
exports.validateUxilFamily = validateUxilFamily;
|
|
5
|
+
const mod_js_1 = require("../model/mod.js");
|
|
6
|
+
const mod_js_2 = require("../uxil/mod.js");
|
|
7
|
+
const types_js_1 = require("./types.js");
|
|
8
|
+
/**
|
|
9
|
+
* Names of the profile types designated as uxil declaring entry types
|
|
10
|
+
* (`declares: ux-surface`). Empty when `profile` is `null` or no tier
|
|
11
|
+
* designates one — the family's inertness gate.
|
|
12
|
+
*/
|
|
13
|
+
function uxilDeclaringTypes(profile) {
|
|
14
|
+
const out = new Set();
|
|
15
|
+
if (profile === null)
|
|
16
|
+
return out;
|
|
17
|
+
for (const [name, td] of profile.types) {
|
|
18
|
+
if (td.value.declares?.value === "ux-surface")
|
|
19
|
+
out.add(name);
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Run the UXIL-0xx family over `entries`. Returns file-anchored core
|
|
25
|
+
* diagnostics; `[]` when the gate is closed (see module doc).
|
|
26
|
+
*/
|
|
27
|
+
function validateUxilFamily(entries, profile) {
|
|
28
|
+
const declaring = uxilDeclaringTypes(profile);
|
|
29
|
+
if (declaring.size === 0)
|
|
30
|
+
return [];
|
|
31
|
+
const local = (0, mod_js_1.emittableEntries)(entries);
|
|
32
|
+
const declaringEntries = [];
|
|
33
|
+
const otherEntries = [];
|
|
34
|
+
const typeOf = new Map();
|
|
35
|
+
for (const e of local) {
|
|
36
|
+
const type = e.type ?? (0, types_js_1.classifyEntry)(e, profile).type;
|
|
37
|
+
typeOf.set(e, type);
|
|
38
|
+
if (type !== undefined && declaring.has(type))
|
|
39
|
+
declaringEntries.push(e);
|
|
40
|
+
else
|
|
41
|
+
otherEntries.push(e);
|
|
42
|
+
}
|
|
43
|
+
const diagnostics = [];
|
|
44
|
+
// UXIL-023 — an unambiguous root declaration outside a declaring type.
|
|
45
|
+
for (const e of otherEntries) {
|
|
46
|
+
for (const span of (0, mod_js_2.extractUxRootSpans)(e.bodyTokens)) {
|
|
47
|
+
diagnostics.push((0, mod_js_2.uxilDiagnosticAt)("UXIL-023", {
|
|
48
|
+
entry: e.displayId,
|
|
49
|
+
type: typeOf.get(e) ?? "unclassified",
|
|
50
|
+
}, span.location));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const result = (0, mod_js_2.validateUxil)(declaringEntries, { citationEntries: local });
|
|
54
|
+
diagnostics.push(...result.diagnostics);
|
|
55
|
+
return diagnostics;
|
|
56
|
+
}
|