@driftsys/markspec 0.4.0 → 0.6.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 +74 -20
- package/esm/ast/build.d.ts +60 -0
- package/esm/ast/build.d.ts.map +1 -0
- package/esm/ast/build.js +516 -0
- package/esm/ast/equivalence.d.ts +18 -0
- package/esm/ast/equivalence.d.ts.map +1 -0
- package/esm/ast/equivalence.js +56 -0
- package/esm/ast/nodes.d.ts +189 -0
- package/esm/ast/nodes.d.ts.map +1 -0
- package/esm/ast/nodes.js +17 -0
- package/esm/ast/normalize.d.ts +58 -0
- package/esm/ast/normalize.d.ts.map +1 -0
- package/esm/ast/normalize.js +197 -0
- package/esm/ast/render.d.ts +34 -0
- package/esm/ast/render.d.ts.map +1 -0
- package/esm/ast/render.js +215 -0
- package/esm/compiler/constants.d.ts +16 -0
- package/esm/compiler/constants.d.ts.map +1 -0
- package/esm/compiler/constants.js +26 -0
- package/esm/compiler/discipline_classifier.d.ts +55 -0
- package/esm/compiler/discipline_classifier.d.ts.map +1 -0
- package/esm/compiler/discipline_classifier.js +191 -0
- package/esm/compiler/inverses.d.ts +2 -1
- package/esm/compiler/inverses.d.ts.map +1 -1
- package/esm/compiler/inverses.js +33 -14
- package/esm/compiler/manifest.d.ts +59 -0
- package/esm/compiler/manifest.d.ts.map +1 -0
- package/esm/compiler/manifest.js +48 -0
- package/esm/compiler/mod.d.ts +38 -1
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +202 -50
- package/esm/compiler/ndjson_writer.d.ts +50 -0
- package/esm/compiler/ndjson_writer.d.ts.map +1 -0
- package/esm/compiler/ndjson_writer.js +73 -0
- package/esm/compiler/schema.d.ts +33 -1
- package/esm/compiler/schema.d.ts.map +1 -1
- package/esm/compiler/schema.js +30 -9
- package/esm/config/markspec.d.ts +5 -0
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/markspec.js +17 -2
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +54 -0
- package/esm/formatter/mod.d.ts +55 -4
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +423 -46
- package/esm/formatter/synth_ulid.d.ts +21 -0
- package/esm/formatter/synth_ulid.d.ts.map +1 -0
- package/esm/formatter/synth_ulid.js +64 -0
- package/esm/lexicons/loader.d.ts +35 -0
- package/esm/lexicons/loader.d.ts.map +1 -0
- package/esm/lexicons/loader.js +51 -0
- package/esm/lexicons/mod.d.ts +13 -0
- package/esm/lexicons/mod.d.ts.map +1 -0
- package/esm/lexicons/mod.js +12 -0
- package/esm/lint/glossary.d.ts +45 -0
- package/esm/lint/glossary.d.ts.map +1 -0
- package/esm/lint/glossary.js +85 -0
- package/esm/lint/mod.d.ts +14 -0
- package/esm/lint/mod.d.ts.map +1 -0
- package/esm/lint/mod.js +9 -0
- package/esm/lint/range_util.d.ts +25 -0
- package/esm/lint/range_util.d.ts.map +1 -0
- package/esm/lint/range_util.js +50 -0
- package/esm/lint/rules/ears.d.ts +39 -0
- package/esm/lint/rules/ears.d.ts.map +1 -0
- package/esm/lint/rules/ears.js +316 -0
- package/esm/lint/rules/incose_sentence.d.ts +46 -0
- package/esm/lint/rules/incose_sentence.d.ts.map +1 -0
- package/esm/lint/rules/incose_sentence.js +417 -0
- package/esm/lint/rules/lexicon.d.ts +24 -0
- package/esm/lint/rules/lexicon.d.ts.map +1 -0
- package/esm/lint/rules/lexicon.js +236 -0
- package/esm/lint/rules/modal_sentence.d.ts +46 -0
- package/esm/lint/rules/modal_sentence.d.ts.map +1 -0
- package/esm/lint/rules/modal_sentence.js +146 -0
- package/esm/lint/rules/passive.d.ts +64 -0
- package/esm/lint/rules/passive.d.ts.map +1 -0
- package/esm/lint/rules/passive.js +282 -0
- package/esm/lint/rules/struct.d.ts +17 -0
- package/esm/lint/rules/struct.d.ts.map +1 -0
- package/esm/lint/rules/struct.js +55 -0
- package/esm/lint/rules/suppression.d.ts +54 -0
- package/esm/lint/rules/suppression.d.ts.map +1 -0
- package/esm/lint/rules/suppression.js +129 -0
- package/esm/lint/rules/xref.d.ts +19 -0
- package/esm/lint/rules/xref.d.ts.map +1 -0
- package/esm/lint/rules/xref.js +248 -0
- package/esm/lint/runner.d.ts +59 -0
- package/esm/lint/runner.d.ts.map +1 -0
- package/esm/lint/runner.js +153 -0
- package/esm/lint/score.d.ts +64 -0
- package/esm/lint/score.d.ts.map +1 -0
- package/esm/lint/score.js +163 -0
- package/esm/lint/segmenter.d.ts +32 -0
- package/esm/lint/segmenter.d.ts.map +1 -0
- package/esm/lint/segmenter.js +79 -0
- package/esm/lint/types.d.ts +31 -0
- package/esm/lint/types.d.ts.map +1 -0
- package/esm/lint/types.js +9 -0
- package/esm/lock/canonical_edges.d.ts +31 -0
- package/esm/lock/canonical_edges.d.ts.map +1 -0
- package/esm/lock/canonical_edges.js +57 -0
- package/esm/lock/check.d.ts +24 -0
- package/esm/lock/check.d.ts.map +1 -0
- package/esm/lock/check.js +127 -0
- package/esm/lock/hash.d.ts +12 -0
- package/esm/lock/hash.d.ts.map +1 -0
- package/esm/lock/hash.js +32 -0
- package/esm/lock/mod.d.ts +19 -0
- package/esm/lock/mod.d.ts.map +1 -0
- package/esm/lock/mod.js +14 -0
- package/esm/lock/model.d.ts +81 -0
- package/esm/lock/model.d.ts.map +1 -0
- package/esm/lock/model.js +7 -0
- package/esm/lock/parser.d.ts +26 -0
- package/esm/lock/parser.d.ts.map +1 -0
- package/esm/lock/parser.js +195 -0
- package/esm/lock/resolve.d.ts +142 -0
- package/esm/lock/resolve.d.ts.map +1 -0
- package/esm/lock/resolve.js +389 -0
- package/esm/lock/serializer.d.ts +14 -0
- package/esm/lock/serializer.d.ts.map +1 -0
- package/esm/lock/serializer.js +104 -0
- package/esm/mod.d.ts +28 -8
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +23 -4
- package/esm/model/attributes.d.ts +6 -0
- package/esm/model/attributes.d.ts.map +1 -1
- package/esm/model/attributes.js +200 -2
- package/esm/model/discipline.d.ts +53 -0
- package/esm/model/discipline.d.ts.map +1 -0
- package/esm/model/discipline.js +50 -0
- package/esm/model/discriminating_attr.d.ts +33 -0
- package/esm/model/discriminating_attr.d.ts.map +1 -0
- package/esm/model/discriminating_attr.js +74 -0
- package/esm/model/mod.d.ts +267 -14
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +99 -3
- package/esm/model/profile.d.ts +102 -27
- package/esm/model/profile.d.ts.map +1 -1
- package/esm/model/source_introspection.d.ts +26 -0
- package/esm/model/source_introspection.d.ts.map +1 -0
- package/esm/model/source_introspection.js +77 -0
- package/esm/model/type_hierarchy.d.ts +51 -0
- package/esm/model/type_hierarchy.d.ts.map +1 -0
- package/esm/model/type_hierarchy.js +126 -0
- package/esm/model/uri_scheme_map.d.ts +21 -0
- package/esm/model/uri_scheme_map.d.ts.map +1 -0
- package/esm/model/uri_scheme_map.js +66 -0
- package/esm/parser/attributes.d.ts.map +1 -1
- package/esm/parser/attributes.js +10 -16
- package/esm/parser/body_tokens.d.ts +35 -0
- package/esm/parser/body_tokens.d.ts.map +1 -0
- package/esm/parser/body_tokens.js +232 -0
- package/esm/parser/glossary.d.ts +51 -0
- package/esm/parser/glossary.d.ts.map +1 -0
- package/esm/parser/glossary.js +219 -0
- package/esm/parser/grammars.d.ts +5 -3
- package/esm/parser/grammars.d.ts.map +1 -1
- package/esm/parser/grammars.js +12 -4
- package/esm/parser/language_spec.d.ts +55 -0
- package/esm/parser/language_spec.d.ts.map +1 -0
- package/esm/parser/language_spec.js +419 -0
- package/esm/parser/line_map.d.ts +60 -0
- package/esm/parser/line_map.d.ts.map +1 -0
- package/esm/parser/line_map.js +41 -0
- package/esm/parser/markdown.d.ts +9 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +317 -25
- package/esm/parser/mod.d.ts +5 -0
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +31 -8
- package/esm/parser/source.d.ts +53 -2
- package/esm/parser/source.d.ts.map +1 -1
- package/esm/parser/source.js +158 -68
- package/esm/parser/translate.d.ts +24 -0
- package/esm/parser/translate.d.ts.map +1 -0
- package/esm/parser/translate.js +99 -0
- package/esm/profile/chain.d.ts +8 -0
- package/esm/profile/chain.d.ts.map +1 -1
- package/esm/profile/chain.js +32 -14
- package/esm/profile/colors.js +1 -1
- package/esm/profile/default_profile.d.ts +25 -0
- package/esm/profile/default_profile.d.ts.map +1 -0
- package/esm/profile/default_profile.js +43 -0
- package/esm/profile/discipline_mode.d.ts +64 -0
- package/esm/profile/discipline_mode.d.ts.map +1 -0
- package/esm/profile/discipline_mode.js +133 -0
- package/esm/profile/discipline_registry.d.ts +41 -0
- package/esm/profile/discipline_registry.d.ts.map +1 -0
- package/esm/profile/discipline_registry.js +67 -0
- package/esm/profile/introspect.d.ts +135 -0
- package/esm/profile/introspect.d.ts.map +1 -0
- package/esm/profile/introspect.js +378 -0
- package/esm/profile/load.d.ts +3 -1
- package/esm/profile/load.d.ts.map +1 -1
- package/esm/profile/load.js +91 -5
- package/esm/profile/manifest.d.ts.map +1 -1
- package/esm/profile/manifest.js +512 -90
- package/esm/profile/merge.d.ts.map +1 -1
- package/esm/profile/merge.js +251 -39
- package/esm/profile/mod.d.ts +4 -4
- package/esm/profile/mod.d.ts.map +1 -1
- package/esm/profile/mod.js +7 -2
- package/esm/reporter/mod.js +4 -4
- package/esm/sync/locked_attributes.d.ts +19 -0
- package/esm/sync/locked_attributes.d.ts.map +1 -0
- package/esm/sync/locked_attributes.js +27 -0
- package/esm/sync/log.d.ts +34 -0
- package/esm/sync/log.d.ts.map +1 -0
- package/esm/sync/log.js +48 -0
- package/esm/sync/mapping.d.ts +66 -0
- package/esm/sync/mapping.d.ts.map +1 -0
- package/esm/sync/mapping.js +165 -0
- package/esm/sync/mod.d.ts +16 -0
- package/esm/sync/mod.d.ts.map +1 -0
- package/esm/sync/mod.js +12 -0
- package/esm/sync/status.d.ts +23 -0
- package/esm/sync/status.d.ts.map +1 -0
- package/esm/sync/status.js +21 -0
- package/esm/typl/ast.d.ts +87 -0
- package/esm/typl/ast.d.ts.map +1 -0
- package/esm/typl/ast.js +21 -0
- package/esm/typl/bridge.d.ts +32 -0
- package/esm/typl/bridge.d.ts.map +1 -0
- package/esm/typl/bridge.js +27 -0
- package/esm/typl/bullet.d.ts +34 -0
- package/esm/typl/bullet.d.ts.map +1 -0
- package/esm/typl/bullet.js +44 -0
- package/esm/typl/diagnostics.d.ts +43 -0
- package/esm/typl/diagnostics.d.ts.map +1 -0
- package/esm/typl/diagnostics.js +61 -0
- package/esm/typl/fence.d.ts +31 -0
- package/esm/typl/fence.d.ts.map +1 -0
- package/esm/typl/fence.js +24 -0
- package/esm/typl/grammar.d.ts +20 -0
- package/esm/typl/grammar.d.ts.map +1 -0
- package/esm/typl/grammar.js +471 -0
- package/esm/typl/inline.d.ts +34 -0
- package/esm/typl/inline.d.ts.map +1 -0
- package/esm/typl/inline.js +48 -0
- package/esm/typl/lexer.d.ts +37 -0
- package/esm/typl/lexer.d.ts.map +1 -0
- package/esm/typl/lexer.js +234 -0
- package/esm/typl/mod.d.ts +23 -0
- package/esm/typl/mod.d.ts.map +1 -0
- package/esm/typl/mod.js +16 -0
- package/esm/typl/registry.d.ts +42 -0
- package/esm/typl/registry.d.ts.map +1 -0
- package/esm/typl/registry.js +26 -0
- package/esm/typl/validator.d.ts +29 -0
- package/esm/typl/validator.d.ts.map +1 -0
- package/esm/typl/validator.js +141 -0
- package/esm/util/fence.d.ts +30 -0
- package/esm/util/fence.d.ts.map +1 -0
- package/esm/util/fence.js +40 -0
- package/esm/util/line_endings.d.ts +33 -0
- package/esm/util/line_endings.d.ts.map +1 -0
- package/esm/util/line_endings.js +53 -0
- package/esm/util/modals.d.ts +29 -0
- package/esm/util/modals.d.ts.map +1 -0
- package/esm/util/modals.js +38 -0
- package/esm/validator/attributes.d.ts +3 -3
- package/esm/validator/attributes.d.ts.map +1 -1
- package/esm/validator/attributes.js +1 -18
- package/esm/validator/body_blocks.d.ts +38 -0
- package/esm/validator/body_blocks.d.ts.map +1 -0
- package/esm/validator/body_blocks.js +218 -0
- package/esm/validator/caption_convention.d.ts +29 -0
- package/esm/validator/caption_convention.d.ts.map +1 -0
- package/esm/validator/caption_convention.js +58 -0
- package/esm/validator/captions.d.ts +22 -0
- package/esm/validator/captions.d.ts.map +1 -0
- package/esm/validator/captions.js +137 -0
- package/esm/validator/component_schemes.d.ts +73 -0
- package/esm/validator/component_schemes.d.ts.map +1 -0
- package/esm/validator/component_schemes.js +375 -0
- package/esm/validator/discipline.d.ts +35 -0
- package/esm/validator/discipline.d.ts.map +1 -0
- package/esm/validator/discipline.js +204 -0
- package/esm/validator/feature_ac.d.ts +28 -0
- package/esm/validator/feature_ac.d.ts.map +1 -0
- package/esm/validator/feature_ac.js +102 -0
- package/esm/validator/listing.d.ts +42 -0
- package/esm/validator/listing.d.ts.map +1 -0
- package/esm/validator/listing.js +295 -0
- package/esm/validator/mod.d.ts +3 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +275 -13
- package/esm/validator/modal_keywords.d.ts +25 -0
- package/esm/validator/modal_keywords.d.ts.map +1 -0
- package/esm/validator/modal_keywords.js +54 -0
- package/esm/validator/pattern.d.ts +15 -8
- package/esm/validator/pattern.d.ts.map +1 -1
- package/esm/validator/pattern.js +42 -19
- package/esm/validator/per_type_attrs.d.ts +29 -0
- package/esm/validator/per_type_attrs.d.ts.map +1 -0
- package/esm/validator/per_type_attrs.js +75 -0
- package/esm/validator/pipeline.d.ts +18 -2
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +76 -21
- package/esm/validator/trace_types.d.ts +26 -0
- package/esm/validator/trace_types.d.ts.map +1 -0
- package/esm/validator/trace_types.js +232 -0
- package/esm/validator/traceability.d.ts +3 -4
- package/esm/validator/traceability.d.ts.map +1 -1
- package/esm/validator/traceability.js +5 -10
- package/esm/validator/type_resolution.d.ts +67 -0
- package/esm/validator/type_resolution.d.ts.map +1 -0
- package/esm/validator/type_resolution.js +162 -0
- package/esm/validator/types.d.ts +45 -0
- package/esm/validator/types.d.ts.map +1 -1
- package/esm/validator/types.js +128 -16
- package/esm/validator/value_types.d.ts +8 -0
- package/esm/validator/value_types.d.ts.map +1 -1
- package/esm/validator/value_types.js +8 -1
- package/package.json +2 -2
- package/script/ast/build.d.ts +60 -0
- package/script/ast/build.d.ts.map +1 -0
- package/script/ast/build.js +521 -0
- package/script/ast/equivalence.d.ts +18 -0
- package/script/ast/equivalence.d.ts.map +1 -0
- package/script/ast/equivalence.js +59 -0
- package/script/ast/nodes.d.ts +189 -0
- package/script/ast/nodes.d.ts.map +1 -0
- package/script/ast/nodes.js +18 -0
- package/script/ast/normalize.d.ts +58 -0
- package/script/ast/normalize.d.ts.map +1 -0
- package/script/ast/normalize.js +200 -0
- package/script/ast/render.d.ts +34 -0
- package/script/ast/render.d.ts.map +1 -0
- package/script/ast/render.js +218 -0
- package/script/compiler/constants.d.ts +16 -0
- package/script/compiler/constants.d.ts.map +1 -0
- package/script/compiler/constants.js +29 -0
- package/script/compiler/discipline_classifier.d.ts +55 -0
- package/script/compiler/discipline_classifier.d.ts.map +1 -0
- package/script/compiler/discipline_classifier.js +196 -0
- package/script/compiler/inverses.d.ts +2 -1
- package/script/compiler/inverses.d.ts.map +1 -1
- package/script/compiler/inverses.js +33 -14
- package/script/compiler/manifest.d.ts +59 -0
- package/script/compiler/manifest.d.ts.map +1 -0
- package/script/compiler/manifest.js +51 -0
- package/script/compiler/mod.d.ts +38 -1
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +206 -54
- package/script/compiler/ndjson_writer.d.ts +50 -0
- package/script/compiler/ndjson_writer.d.ts.map +1 -0
- package/script/compiler/ndjson_writer.js +78 -0
- package/script/compiler/schema.d.ts +33 -1
- package/script/compiler/schema.d.ts.map +1 -1
- package/script/compiler/schema.js +30 -8
- package/script/config/markspec.d.ts +5 -0
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/markspec.js +17 -2
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +54 -0
- package/script/formatter/mod.d.ts +55 -4
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +426 -46
- package/script/formatter/synth_ulid.d.ts +21 -0
- package/script/formatter/synth_ulid.d.ts.map +1 -0
- package/script/formatter/synth_ulid.js +67 -0
- package/script/lexicons/loader.d.ts +35 -0
- package/script/lexicons/loader.d.ts.map +1 -0
- package/script/lexicons/loader.js +55 -0
- package/script/lexicons/mod.d.ts +13 -0
- package/script/lexicons/mod.d.ts.map +1 -0
- package/script/lexicons/mod.js +17 -0
- package/script/lint/glossary.d.ts +45 -0
- package/script/lint/glossary.d.ts.map +1 -0
- package/script/lint/glossary.js +88 -0
- package/script/lint/mod.d.ts +14 -0
- package/script/lint/mod.d.ts.map +1 -0
- package/script/lint/mod.js +17 -0
- package/script/lint/range_util.d.ts +25 -0
- package/script/lint/range_util.d.ts.map +1 -0
- package/script/lint/range_util.js +53 -0
- package/script/lint/rules/ears.d.ts +39 -0
- package/script/lint/rules/ears.d.ts.map +1 -0
- package/script/lint/rules/ears.js +320 -0
- package/script/lint/rules/incose_sentence.d.ts +46 -0
- package/script/lint/rules/incose_sentence.d.ts.map +1 -0
- package/script/lint/rules/incose_sentence.js +421 -0
- package/script/lint/rules/lexicon.d.ts +24 -0
- package/script/lint/rules/lexicon.d.ts.map +1 -0
- package/script/lint/rules/lexicon.js +240 -0
- package/script/lint/rules/modal_sentence.d.ts +46 -0
- package/script/lint/rules/modal_sentence.d.ts.map +1 -0
- package/script/lint/rules/modal_sentence.js +150 -0
- package/script/lint/rules/passive.d.ts +64 -0
- package/script/lint/rules/passive.d.ts.map +1 -0
- package/script/lint/rules/passive.js +286 -0
- package/script/lint/rules/struct.d.ts +17 -0
- package/script/lint/rules/struct.d.ts.map +1 -0
- package/script/lint/rules/struct.js +59 -0
- package/script/lint/rules/suppression.d.ts +54 -0
- package/script/lint/rules/suppression.d.ts.map +1 -0
- package/script/lint/rules/suppression.js +136 -0
- package/script/lint/rules/xref.d.ts +19 -0
- package/script/lint/rules/xref.d.ts.map +1 -0
- package/script/lint/rules/xref.js +251 -0
- package/script/lint/runner.d.ts +59 -0
- package/script/lint/runner.d.ts.map +1 -0
- package/script/lint/runner.js +157 -0
- package/script/lint/score.d.ts +64 -0
- package/script/lint/score.d.ts.map +1 -0
- package/script/lint/score.js +167 -0
- package/script/lint/segmenter.d.ts +32 -0
- package/script/lint/segmenter.d.ts.map +1 -0
- package/script/lint/segmenter.js +82 -0
- package/script/lint/types.d.ts +31 -0
- package/script/lint/types.d.ts.map +1 -0
- package/script/lint/types.js +10 -0
- package/script/lock/canonical_edges.d.ts +31 -0
- package/script/lock/canonical_edges.d.ts.map +1 -0
- package/script/lock/canonical_edges.js +61 -0
- package/script/lock/check.d.ts +24 -0
- package/script/lock/check.d.ts.map +1 -0
- package/script/lock/check.js +130 -0
- package/script/lock/hash.d.ts +12 -0
- package/script/lock/hash.d.ts.map +1 -0
- package/script/lock/hash.js +36 -0
- package/script/lock/mod.d.ts +19 -0
- package/script/lock/mod.d.ts.map +1 -0
- package/script/lock/mod.js +31 -0
- package/script/lock/model.d.ts +81 -0
- package/script/lock/model.d.ts.map +1 -0
- package/script/lock/model.js +10 -0
- package/script/lock/parser.d.ts +26 -0
- package/script/lock/parser.d.ts.map +1 -0
- package/script/lock/parser.js +198 -0
- package/script/lock/resolve.d.ts +142 -0
- package/script/lock/resolve.d.ts.map +1 -0
- package/script/lock/resolve.js +397 -0
- package/script/lock/serializer.d.ts +14 -0
- package/script/lock/serializer.d.ts.map +1 -0
- package/script/lock/serializer.js +107 -0
- package/script/mod.d.ts +28 -8
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +129 -32
- package/script/model/attributes.d.ts +6 -0
- package/script/model/attributes.d.ts.map +1 -1
- package/script/model/attributes.js +201 -3
- package/script/model/discipline.d.ts +53 -0
- package/script/model/discipline.d.ts.map +1 -0
- package/script/model/discipline.js +53 -0
- package/script/model/discriminating_attr.d.ts +33 -0
- package/script/model/discriminating_attr.d.ts.map +1 -0
- package/script/model/discriminating_attr.js +77 -0
- package/script/model/mod.d.ts +267 -14
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +111 -3
- package/script/model/profile.d.ts +102 -27
- package/script/model/profile.d.ts.map +1 -1
- package/script/model/source_introspection.d.ts +26 -0
- package/script/model/source_introspection.d.ts.map +1 -0
- package/script/model/source_introspection.js +80 -0
- package/script/model/type_hierarchy.d.ts +51 -0
- package/script/model/type_hierarchy.d.ts.map +1 -0
- package/script/model/type_hierarchy.js +130 -0
- package/script/model/uri_scheme_map.d.ts +21 -0
- package/script/model/uri_scheme_map.d.ts.map +1 -0
- package/script/model/uri_scheme_map.js +69 -0
- package/script/parser/attributes.d.ts.map +1 -1
- package/script/parser/attributes.js +10 -16
- package/script/parser/body_tokens.d.ts +35 -0
- package/script/parser/body_tokens.d.ts.map +1 -0
- package/script/parser/body_tokens.js +235 -0
- package/script/parser/glossary.d.ts +51 -0
- package/script/parser/glossary.d.ts.map +1 -0
- package/script/parser/glossary.js +224 -0
- package/script/parser/grammars.d.ts +5 -3
- package/script/parser/grammars.d.ts.map +1 -1
- package/script/parser/grammars.js +15 -8
- package/script/parser/language_spec.d.ts +55 -0
- package/script/parser/language_spec.d.ts.map +1 -0
- package/script/parser/language_spec.js +423 -0
- package/script/parser/line_map.d.ts +60 -0
- package/script/parser/line_map.d.ts.map +1 -0
- package/script/parser/line_map.js +44 -0
- package/script/parser/markdown.d.ts +9 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +315 -23
- package/script/parser/mod.d.ts +5 -0
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +36 -7
- package/script/parser/source.d.ts +53 -2
- package/script/parser/source.d.ts.map +1 -1
- package/script/parser/source.js +159 -69
- package/script/parser/translate.d.ts +24 -0
- package/script/parser/translate.d.ts.map +1 -0
- package/script/parser/translate.js +102 -0
- package/script/profile/chain.d.ts +8 -0
- package/script/profile/chain.d.ts.map +1 -1
- package/script/profile/chain.js +32 -14
- package/script/profile/colors.js +1 -1
- package/script/profile/default_profile.d.ts +25 -0
- package/script/profile/default_profile.d.ts.map +1 -0
- package/script/profile/default_profile.js +46 -0
- package/script/profile/discipline_mode.d.ts +64 -0
- package/script/profile/discipline_mode.d.ts.map +1 -0
- package/script/profile/discipline_mode.js +138 -0
- package/script/profile/discipline_registry.d.ts +41 -0
- package/script/profile/discipline_registry.d.ts.map +1 -0
- package/script/profile/discipline_registry.js +70 -0
- package/script/profile/introspect.d.ts +135 -0
- package/script/profile/introspect.d.ts.map +1 -0
- package/script/profile/introspect.js +381 -0
- package/script/profile/load.d.ts +3 -1
- package/script/profile/load.d.ts.map +1 -1
- package/script/profile/load.js +91 -5
- package/script/profile/manifest.d.ts.map +1 -1
- package/script/profile/manifest.js +511 -89
- package/script/profile/merge.d.ts.map +1 -1
- package/script/profile/merge.js +251 -39
- package/script/profile/mod.d.ts +4 -4
- package/script/profile/mod.d.ts.map +1 -1
- package/script/profile/mod.js +12 -6
- package/script/reporter/mod.js +4 -4
- package/script/sync/locked_attributes.d.ts +19 -0
- package/script/sync/locked_attributes.d.ts.map +1 -0
- package/script/sync/locked_attributes.js +30 -0
- package/script/sync/log.d.ts +34 -0
- package/script/sync/log.d.ts.map +1 -0
- package/script/sync/log.js +52 -0
- package/script/sync/mapping.d.ts +66 -0
- package/script/sync/mapping.d.ts.map +1 -0
- package/script/sync/mapping.js +169 -0
- package/script/sync/mod.d.ts +16 -0
- package/script/sync/mod.d.ts.map +1 -0
- package/script/sync/mod.js +21 -0
- package/script/sync/status.d.ts +23 -0
- package/script/sync/status.d.ts.map +1 -0
- package/script/sync/status.js +24 -0
- package/script/typl/ast.d.ts +87 -0
- package/script/typl/ast.d.ts.map +1 -0
- package/script/typl/ast.js +24 -0
- package/script/typl/bridge.d.ts +32 -0
- package/script/typl/bridge.d.ts.map +1 -0
- package/script/typl/bridge.js +30 -0
- package/script/typl/bullet.d.ts +34 -0
- package/script/typl/bullet.d.ts.map +1 -0
- package/script/typl/bullet.js +47 -0
- package/script/typl/diagnostics.d.ts +43 -0
- package/script/typl/diagnostics.d.ts.map +1 -0
- package/script/typl/diagnostics.js +65 -0
- package/script/typl/fence.d.ts +31 -0
- package/script/typl/fence.d.ts.map +1 -0
- package/script/typl/fence.js +27 -0
- package/script/typl/grammar.d.ts +20 -0
- package/script/typl/grammar.d.ts.map +1 -0
- package/script/typl/grammar.js +474 -0
- package/script/typl/inline.d.ts +34 -0
- package/script/typl/inline.d.ts.map +1 -0
- package/script/typl/inline.js +51 -0
- package/script/typl/lexer.d.ts +37 -0
- package/script/typl/lexer.d.ts.map +1 -0
- package/script/typl/lexer.js +237 -0
- package/script/typl/mod.d.ts +23 -0
- package/script/typl/mod.d.ts.map +1 -0
- package/script/typl/mod.js +29 -0
- package/script/typl/registry.d.ts +42 -0
- package/script/typl/registry.d.ts.map +1 -0
- package/script/typl/registry.js +29 -0
- package/script/typl/validator.d.ts +29 -0
- package/script/typl/validator.d.ts.map +1 -0
- package/script/typl/validator.js +144 -0
- package/script/util/fence.d.ts +30 -0
- package/script/util/fence.d.ts.map +1 -0
- package/script/util/fence.js +44 -0
- package/script/util/line_endings.d.ts +33 -0
- package/script/util/line_endings.d.ts.map +1 -0
- package/script/util/line_endings.js +58 -0
- package/script/util/modals.d.ts +29 -0
- package/script/util/modals.d.ts.map +1 -0
- package/script/util/modals.js +42 -0
- package/script/validator/attributes.d.ts +3 -3
- package/script/validator/attributes.d.ts.map +1 -1
- package/script/validator/attributes.js +1 -18
- package/script/validator/body_blocks.d.ts +38 -0
- package/script/validator/body_blocks.d.ts.map +1 -0
- package/script/validator/body_blocks.js +221 -0
- package/script/validator/caption_convention.d.ts +29 -0
- package/script/validator/caption_convention.d.ts.map +1 -0
- package/script/validator/caption_convention.js +61 -0
- package/script/validator/captions.d.ts +22 -0
- package/script/validator/captions.d.ts.map +1 -0
- package/script/validator/captions.js +140 -0
- package/script/validator/component_schemes.d.ts +73 -0
- package/script/validator/component_schemes.d.ts.map +1 -0
- package/script/validator/component_schemes.js +384 -0
- package/script/validator/discipline.d.ts +35 -0
- package/script/validator/discipline.d.ts.map +1 -0
- package/script/validator/discipline.js +207 -0
- package/script/validator/feature_ac.d.ts +28 -0
- package/script/validator/feature_ac.d.ts.map +1 -0
- package/script/validator/feature_ac.js +105 -0
- package/script/validator/listing.d.ts +42 -0
- package/script/validator/listing.d.ts.map +1 -0
- package/script/validator/listing.js +298 -0
- package/script/validator/mod.d.ts +3 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +278 -14
- package/script/validator/modal_keywords.d.ts +25 -0
- package/script/validator/modal_keywords.d.ts.map +1 -0
- package/script/validator/modal_keywords.js +57 -0
- package/script/validator/pattern.d.ts +15 -8
- package/script/validator/pattern.d.ts.map +1 -1
- package/script/validator/pattern.js +42 -19
- package/script/validator/per_type_attrs.d.ts +29 -0
- package/script/validator/per_type_attrs.d.ts.map +1 -0
- package/script/validator/per_type_attrs.js +78 -0
- package/script/validator/pipeline.d.ts +18 -2
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +78 -22
- package/script/validator/trace_types.d.ts +26 -0
- package/script/validator/trace_types.d.ts.map +1 -0
- package/script/validator/trace_types.js +235 -0
- package/script/validator/traceability.d.ts +3 -4
- package/script/validator/traceability.d.ts.map +1 -1
- package/script/validator/traceability.js +5 -10
- package/script/validator/type_resolution.d.ts +67 -0
- package/script/validator/type_resolution.d.ts.map +1 -0
- package/script/validator/type_resolution.js +168 -0
- package/script/validator/types.d.ts +45 -0
- package/script/validator/types.d.ts.map +1 -1
- package/script/validator/types.js +131 -16
- package/script/validator/value_types.d.ts +8 -0
- package/script/validator/value_types.d.ts.map +1 -1
- package/script/validator/value_types.js +10 -2
package/esm/model/mod.d.ts
CHANGED
|
@@ -3,10 +3,20 @@
|
|
|
3
3
|
*
|
|
4
4
|
* MarkSpec document model — AST types, ID types, and project configuration.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
import type { BodyBlock } from "../ast/nodes.js";
|
|
7
|
+
import type { Discipline } from "./discipline.js";
|
|
8
|
+
import type { TyplBlock } from "../typl/mod.js";
|
|
9
|
+
export { ATTRIBUTE_CATALOG, attributeSpec, CSV_SPLITTABLE_TYPES, UNIVERSAL_ATTRIBUTE_KEYS, } from "./attributes.js";
|
|
7
10
|
export type { AttributeSpec } from "./attributes.js";
|
|
8
11
|
export { COLOR_NAME_RE, PALETTE_HUES } from "./palette.js";
|
|
9
12
|
export type { PaletteHue } from "./palette.js";
|
|
13
|
+
export { attributesForType, CORE_TYPE_HIERARCHY, CORE_TYPE_SCOPED_ATTRS, } from "./type_hierarchy.js";
|
|
14
|
+
export type { CoreTypeDef } from "./type_hierarchy.js";
|
|
15
|
+
export { inferTypeFromUriScheme } from "./uri_scheme_map.js";
|
|
16
|
+
export { inferTypeFromSource } from "./source_introspection.js";
|
|
17
|
+
export { inferTypeFromDiscriminatingAttr } from "./discriminating_attr.js";
|
|
18
|
+
export { CORE_DISCIPLINE_REGISTRY, CORE_KINDS, MIXED_DISCIPLINE, } from "./discipline.js";
|
|
19
|
+
export type { Discipline, DisciplineRegistry } from "./discipline.js";
|
|
10
20
|
/**
|
|
11
21
|
* Human-readable entry identifier from the `[...]` bracket marker.
|
|
12
22
|
*
|
|
@@ -17,15 +27,40 @@ export type { PaletteHue } from "./palette.js";
|
|
|
17
27
|
* For referenced entries the display ID is a slug (pandoc/BibTeX cite-key
|
|
18
28
|
* convention, e.g., `ISO-26262-6`, `serde`, `smith2021`). The leading `@`
|
|
19
29
|
* in `[@slug]` is accepted as Pandoc sugar and stripped during parsing.
|
|
30
|
+
*
|
|
31
|
+
* Branded so a `Ulid` cannot be accidentally passed where a `DisplayId`
|
|
32
|
+
* is expected, and vice versa. Use {@linkcode makeDisplayId} to construct.
|
|
20
33
|
*/
|
|
21
|
-
export type DisplayId = string
|
|
34
|
+
export type DisplayId = string & {
|
|
35
|
+
readonly __brand: "DisplayId";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Cast a plain string to a branded `DisplayId`.
|
|
39
|
+
*
|
|
40
|
+
* This is a zero-cost assertion — no validation is performed. The caller
|
|
41
|
+
* asserts that `s` is a syntactically valid display ID.
|
|
42
|
+
*/
|
|
43
|
+
export declare function makeDisplayId(s: string): DisplayId;
|
|
22
44
|
/**
|
|
23
45
|
* Universally unique identifier, bare 26-character Crockford base32.
|
|
24
46
|
*
|
|
25
47
|
* Used as the `Id:` attribute value for identified entries. Assigned by
|
|
26
48
|
* tooling, never hand-authored, immutable once assigned.
|
|
49
|
+
*
|
|
50
|
+
* Branded so a `DisplayId` cannot be accidentally passed where a `Ulid`
|
|
51
|
+
* is expected, and vice versa. Use {@linkcode makeUlid} to construct.
|
|
27
52
|
*/
|
|
28
|
-
export type Ulid = string
|
|
53
|
+
export type Ulid = string & {
|
|
54
|
+
readonly __brand: "Ulid";
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Cast a plain string to a branded `Ulid`.
|
|
58
|
+
*
|
|
59
|
+
* This is a zero-cost assertion — no validation is performed. The caller
|
|
60
|
+
* asserts that `s` is a syntactically valid 26-character Crockford base32
|
|
61
|
+
* ULID.
|
|
62
|
+
*/
|
|
63
|
+
export declare function makeUlid(s: string): Ulid;
|
|
29
64
|
/** Points to a span within a source file. */
|
|
30
65
|
export interface SourceLocation {
|
|
31
66
|
/** Absolute or project-relative file path. */
|
|
@@ -35,6 +70,28 @@ export interface SourceLocation {
|
|
|
35
70
|
/** 1-based column number of the entry start. */
|
|
36
71
|
readonly column: number;
|
|
37
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Core abstract item types. Always valid as `Type:` values regardless of
|
|
75
|
+
* which profile is loaded (core-only mode included). Convention: TitleCase.
|
|
76
|
+
*
|
|
77
|
+
* - `Item` is the abstract root and serves as the bottom fallback in the
|
|
78
|
+
* type-resolution chain (§1.3.1 step 8).
|
|
79
|
+
* - `Specification`, `Component`, `Unit` are abstract+concrete parents:
|
|
80
|
+
* instantiable as direct fallbacks when no concrete subtype fits, and
|
|
81
|
+
* roots for both core concrete subtypes and profile-declared extensions.
|
|
82
|
+
*/
|
|
83
|
+
export declare const CORE_ABSTRACT_TYPES: readonly ["Item", "Specification", "Component", "Unit"];
|
|
84
|
+
/**
|
|
85
|
+
* Core concrete item types (ADR-003 §Part 1). Twelve subtypes plus three
|
|
86
|
+
* abstract+concrete parents from {@linkcode CORE_ABSTRACT_TYPES} make up
|
|
87
|
+
* the "15 concrete instantiable types" the spec describes.
|
|
88
|
+
*/
|
|
89
|
+
export declare const CORE_CONCRETE_TYPES: readonly ["Requirement", "Test", "Contract", "Record", "Risk", "SoftwareComponent", "HardwareComponent", "SoftwareInterface", "HardwareInterface", "SoftwareUnit", "HardwareUnit", "Definition"];
|
|
90
|
+
/**
|
|
91
|
+
* All core type names. Accepted as `Type:` values in core-only mode and
|
|
92
|
+
* when any profile is loaded. Profile-declared types extend this set.
|
|
93
|
+
*/
|
|
94
|
+
export declare const CORE_TYPES: ReadonlySet<string>;
|
|
38
95
|
/** A single `Key: Value` pair from an attribute block. */
|
|
39
96
|
export interface Attribute {
|
|
40
97
|
/** Attribute name (e.g., `Id`, `Satisfies`, `Labels`). */
|
|
@@ -57,8 +114,35 @@ export interface Attribute {
|
|
|
57
114
|
* for exact round-trip through `markspec format`.
|
|
58
115
|
*/
|
|
59
116
|
export type TypedAttributes = ReadonlyMap<string, readonly string[]>;
|
|
60
|
-
/**
|
|
61
|
-
export type
|
|
117
|
+
/** Supported source-file languages for doc-comment extraction. */
|
|
118
|
+
export type SupportedLanguage = "rust" | "kotlin" | "java" | "c" | "cpp" | "typescript" | "tsx" | "javascript" | "csharp";
|
|
119
|
+
/** Which extractor rule produced a doc-comment entry. Distinguishes the
|
|
120
|
+
* three lexical doc-comment styles MarkSpec recognises across grammars. */
|
|
121
|
+
export type ExtractorRule = "outer-doc-comment" | "inner-doc-comment" | "block-doc-comment";
|
|
122
|
+
/**
|
|
123
|
+
* Tagged union describing what produced an entry. Replaces the previous
|
|
124
|
+
* string discriminator ("markdown" | "doc-comment") to carry per-entry
|
|
125
|
+
* source metadata (language, enclosing function name, extractor rule) for
|
|
126
|
+
* code-extracted entries. See ADR-006 §1 and the source-properties spec.
|
|
127
|
+
*/
|
|
128
|
+
export type EntrySource = {
|
|
129
|
+
readonly kind: "markdown";
|
|
130
|
+
} | {
|
|
131
|
+
readonly kind: "doc-comment";
|
|
132
|
+
readonly language: SupportedLanguage;
|
|
133
|
+
/**
|
|
134
|
+
* Name of the enclosing function / class / struct / impl / mod /
|
|
135
|
+
* trait at the doc comment's source location. Absent means the
|
|
136
|
+
* extractor returned undefined for any reason — covers both
|
|
137
|
+
* "no enclosing item exists" (e.g., crate-root `//!` block) AND
|
|
138
|
+
* "extractor could not extract a name from the item it found"
|
|
139
|
+
* (anonymous structures, operator overloads, lambdas). Consumers
|
|
140
|
+
* must NOT treat absence as proof the entry is at file scope.
|
|
141
|
+
*/
|
|
142
|
+
readonly function?: string;
|
|
143
|
+
/** Which extractor rule matched. */
|
|
144
|
+
readonly rule: ExtractorRule;
|
|
145
|
+
};
|
|
62
146
|
/**
|
|
63
147
|
* Entry shape — one of two semantics-free categories the core recognizes.
|
|
64
148
|
*
|
|
@@ -73,7 +157,7 @@ export type EntrySource = "markdown" | "doc-comment";
|
|
|
73
157
|
* (`requirement`, `test`, `unit`, `standard`, `dependency`, …) are declared
|
|
74
158
|
* by the active profile, not by the core.
|
|
75
159
|
*/
|
|
76
|
-
export type EntryShape = "
|
|
160
|
+
export type EntryShape = "Authored" | "Reference";
|
|
77
161
|
/** Core-reserved identity attribute name. */
|
|
78
162
|
export declare const IDENTITY_KEY: "Id";
|
|
79
163
|
/** Regex matching a bare ULID (identified-entry `Id:` value). */
|
|
@@ -130,17 +214,25 @@ export interface EntryProperties {
|
|
|
130
214
|
readonly path: string;
|
|
131
215
|
readonly line?: number;
|
|
132
216
|
readonly column?: number;
|
|
217
|
+
/** ISO 8601 last-modified timestamp from the filesystem. */
|
|
218
|
+
readonly mtime?: string;
|
|
133
219
|
};
|
|
134
|
-
/** Version-control observations. */
|
|
220
|
+
/** Version-control observations from the file's git history. */
|
|
135
221
|
readonly git?: {
|
|
222
|
+
/** ISO 8601 — author date of the first commit that touched the file. */
|
|
136
223
|
readonly createdAt?: string;
|
|
224
|
+
/** ISO 8601 — author date of the last commit that touched the file. */
|
|
137
225
|
readonly modifiedAt?: string;
|
|
226
|
+
/** Distinct commit-author names, sorted. PII-adjacent — opt-in only. */
|
|
138
227
|
readonly contributors?: readonly string[];
|
|
228
|
+
/** Short SHA of the last commit that touched the file. */
|
|
139
229
|
readonly revision?: string;
|
|
140
230
|
};
|
|
141
231
|
/** External connector state. */
|
|
142
232
|
readonly sync?: {
|
|
143
233
|
readonly lastSyncedAt?: string;
|
|
234
|
+
/** RFC 3339 timestamp of the most recent conflict event for any binding on this entry (ADR-019). */
|
|
235
|
+
readonly lastConflictAt?: string;
|
|
144
236
|
readonly remoteState?: string;
|
|
145
237
|
readonly externalSource?: string;
|
|
146
238
|
};
|
|
@@ -148,6 +240,8 @@ export interface EntryProperties {
|
|
|
148
240
|
readonly build?: {
|
|
149
241
|
readonly resolutionSource?: string;
|
|
150
242
|
readonly registryOrigin?: string;
|
|
243
|
+
/** sha256:* hash recorded in markspec.lock for this entry's locked-attribute set at last lock (ADR-019). */
|
|
244
|
+
readonly lockHash?: string;
|
|
151
245
|
};
|
|
152
246
|
/**
|
|
153
247
|
* Entry-source provenance — set when an entry is produced by an adapter
|
|
@@ -158,6 +252,16 @@ export interface EntryProperties {
|
|
|
158
252
|
readonly type: string;
|
|
159
253
|
readonly adapter?: string;
|
|
160
254
|
readonly language?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Name of the enclosing function / class / struct / impl / mod /
|
|
257
|
+
* trait at the doc comment's source location. Absent means the
|
|
258
|
+
* extractor returned undefined — covers BOTH "no enclosing item
|
|
259
|
+
* exists" (crate-root `//!` block) AND "extractor could not extract
|
|
260
|
+
* a name from the item it found" (anonymous structures, operator
|
|
261
|
+
* overloads, lambdas). Consumers must NOT treat absence as proof
|
|
262
|
+
* the entry is at file scope.
|
|
263
|
+
*/
|
|
264
|
+
readonly function?: string;
|
|
161
265
|
readonly rule?: string;
|
|
162
266
|
readonly extractedAt?: string;
|
|
163
267
|
};
|
|
@@ -181,6 +285,8 @@ export interface Entry {
|
|
|
181
285
|
readonly title: string;
|
|
182
286
|
/** Body content (paragraphs, alerts, code blocks) between title and attributes. */
|
|
183
287
|
readonly body: string;
|
|
288
|
+
/** Canonical body AST (PR 2: additive, not yet consumed). */
|
|
289
|
+
readonly bodyAst?: readonly BodyBlock[];
|
|
184
290
|
/**
|
|
185
291
|
* Source-order raw attribute array. Used by the formatter for round-trip
|
|
186
292
|
* fidelity (preserving key casing, line order, and trailing backslashes).
|
|
@@ -210,10 +316,28 @@ export interface Entry {
|
|
|
210
316
|
* matches (e.g., free-form display ID with no `type:` attribute).
|
|
211
317
|
*/
|
|
212
318
|
readonly type?: string;
|
|
213
|
-
/** Entry shape — `
|
|
319
|
+
/** Entry shape — `Authored` or `Reference`. */
|
|
214
320
|
readonly shape: EntryShape;
|
|
215
321
|
/** Where the entry was found. */
|
|
216
322
|
readonly location: SourceLocation;
|
|
323
|
+
/**
|
|
324
|
+
* File-absolute 1-based line where the entry's body begins.
|
|
325
|
+
*
|
|
326
|
+
* Used by prose-analysis rules (MSL-Q500) to convert body-relative
|
|
327
|
+
* paragraph ranges (as produced by `buildBodyAst`) to file-absolute
|
|
328
|
+
* `LintDiagnostic.range` positions — the contract from slice 3.
|
|
329
|
+
*
|
|
330
|
+
* For `.md` entries this is `location.line + 1` (legacy convention
|
|
331
|
+
* shared with `bodyTokens`); for doc-comment entries it is the
|
|
332
|
+
* file-absolute line of the first non-title child after lineMap
|
|
333
|
+
* translation.
|
|
334
|
+
*
|
|
335
|
+
* Optional so existing test fixtures and pre-compiler pipeline
|
|
336
|
+
* stages that do not set this field can remain unchanged. Prose-analysis
|
|
337
|
+
* rules that need a file-absolute base line fall back to
|
|
338
|
+
* `location.line + 1` when absent.
|
|
339
|
+
*/
|
|
340
|
+
readonly bodyStartLine?: number;
|
|
217
341
|
/** Whether this came from a Markdown file or a doc comment. */
|
|
218
342
|
readonly source: EntrySource;
|
|
219
343
|
/**
|
|
@@ -221,6 +345,42 @@ export interface Entry {
|
|
|
221
345
|
* source-adapter provenance).
|
|
222
346
|
*/
|
|
223
347
|
readonly properties?: EntryProperties;
|
|
348
|
+
/**
|
|
349
|
+
* Inline-construct tokens recognised in the entry body prose
|
|
350
|
+
* (ADR-016). Eager, sorted by `(line, column)`, file-relative.
|
|
351
|
+
* Always present — empty array when no constructs are recognised.
|
|
352
|
+
*/
|
|
353
|
+
readonly bodyTokens: readonly BodyToken[];
|
|
354
|
+
/**
|
|
355
|
+
* typl declarations extracted from typl-info-string fences in the
|
|
356
|
+
* entry body, if any. Absent when the entry contains no typl fences.
|
|
357
|
+
*
|
|
358
|
+
* Populated by the parser via {@linkcode extractTyplFences} +
|
|
359
|
+
* {@linkcode parseTyplBlock} aggregated across all fences in the
|
|
360
|
+
* entry. Per-fence diagnostics are bridged to file-relative core
|
|
361
|
+
* diagnostics and surface in the parser's diagnostic stream.
|
|
362
|
+
*
|
|
363
|
+
* See ADR-019.
|
|
364
|
+
*/
|
|
365
|
+
readonly types?: TyplBlock;
|
|
366
|
+
/**
|
|
367
|
+
* Discipline kind resolved by the classifier per ADR-017 Invariant 1
|
|
368
|
+
* (channels 1–4 with default `system`).
|
|
369
|
+
*
|
|
370
|
+
* **Always set on entries returned from `compile()` after Phase 4** —
|
|
371
|
+
* external consumers reading the compiled output (reporter, serializer,
|
|
372
|
+
* LSP, MCP) can rely on this field being present. The optional `?:`
|
|
373
|
+
* modifier exists only because synthetic Entry literals (test fixtures)
|
|
374
|
+
* and parser-emitted entries before Phase 4 don't carry the field;
|
|
375
|
+
* these are internal pipeline states, not the public contract.
|
|
376
|
+
*
|
|
377
|
+
* Values are drawn from the active discipline registry (built-in
|
|
378
|
+
* `software` / `hardware` / `system` plus any profile-declared
|
|
379
|
+
* extensions); `"mixed"` is emitted when channel 4 sees `Allocated-to`
|
|
380
|
+
* targets resolving to more than one distinct kind. Authors never type
|
|
381
|
+
* this value directly.
|
|
382
|
+
*/
|
|
383
|
+
readonly derivedDiscipline?: Discipline;
|
|
224
384
|
}
|
|
225
385
|
/** Severity level for diagnostics. */
|
|
226
386
|
export type Severity = "error" | "warning" | "info";
|
|
@@ -237,6 +397,29 @@ export interface Diagnostic {
|
|
|
237
397
|
}
|
|
238
398
|
/** Default RefHub URL used as implicit fallback for parent registries. */
|
|
239
399
|
export declare const REFHUB_URL = "https://driftsys.github.io/refhub";
|
|
400
|
+
/**
|
|
401
|
+
* Caption-position convention for a specific caption keyword.
|
|
402
|
+
* `"above"` — caption must appear above its block.
|
|
403
|
+
* `"below"` — caption must appear below its block.
|
|
404
|
+
*/
|
|
405
|
+
export type CaptionPosition = "above" | "below";
|
|
406
|
+
/**
|
|
407
|
+
* Per-keyword caption-position conventions.
|
|
408
|
+
*
|
|
409
|
+
* Keys are caption keywords (e.g. `"Figure"`, `"Table"`, `"Listing"`,
|
|
410
|
+
* `"Feature"`, `"Equation"`, `"List"`). A missing key means no
|
|
411
|
+
* convention is configured for that keyword — MSL-C072 is inactive for
|
|
412
|
+
* unconfigured keywords.
|
|
413
|
+
*
|
|
414
|
+
* Authored in `project.yaml` under `caption-conventions:`:
|
|
415
|
+
*
|
|
416
|
+
* ```yaml
|
|
417
|
+
* caption-conventions:
|
|
418
|
+
* Figure: below
|
|
419
|
+
* Table: above
|
|
420
|
+
* ```
|
|
421
|
+
*/
|
|
422
|
+
export type CaptionConventions = Readonly<Partial<Record<string, CaptionPosition>>>;
|
|
240
423
|
/** MarkSpec project configuration from `project.yaml`. */
|
|
241
424
|
export interface ProjectConfig {
|
|
242
425
|
/** Project name (e.g., `io.driftsys.markspec`). */
|
|
@@ -249,6 +432,13 @@ export interface ProjectConfig {
|
|
|
249
432
|
readonly parents: readonly string[];
|
|
250
433
|
/** Fallback registry URL when parents don't resolve a reference. */
|
|
251
434
|
readonly parentFallback: string;
|
|
435
|
+
/**
|
|
436
|
+
* Per-keyword caption-position conventions (spec §4.7 MSL-C072).
|
|
437
|
+
* When a key is present, the validator emits MSL-C072 if a caption
|
|
438
|
+
* of that keyword appears on the wrong side of its block. An empty
|
|
439
|
+
* or absent map means all keywords are unconstrained.
|
|
440
|
+
*/
|
|
441
|
+
readonly captionConventions: CaptionConventions;
|
|
252
442
|
}
|
|
253
443
|
/** Default configuration used when no `project.yaml` is found. */
|
|
254
444
|
export declare const DEFAULT_PROJECT_CONFIG: ProjectConfig;
|
|
@@ -294,22 +484,85 @@ export interface InlineRef {
|
|
|
294
484
|
readonly refId: string;
|
|
295
485
|
readonly location: SourceLocation;
|
|
296
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* Case convention of a `$Identifier` token (spec §2.5.2). The convention
|
|
489
|
+
* determines which entity domain the reference resolves into.
|
|
490
|
+
*/
|
|
491
|
+
export type EntityRefConvention = "type" | "instance" | "constant";
|
|
492
|
+
/**
|
|
493
|
+
* Inline-construct token kinds recognised in entry body prose (ADR-016).
|
|
494
|
+
*
|
|
495
|
+
* Split where at least one consumer fans out behaviour at the kind level
|
|
496
|
+
* (`gherkin-section` → LSP `class` token vs `gherkin-step` → `keyword`),
|
|
497
|
+
* collapsed elsewhere into discriminator fields on the token variant
|
|
498
|
+
* (`modal.case`, `entity-ref.convention`).
|
|
499
|
+
*/
|
|
500
|
+
export type BodyTokenKind = "modal" | "ears-trigger" | "gherkin-section" | "gherkin-step" | "entity-ref" | "inline-code";
|
|
501
|
+
/** Case form of a modal token — MSL-M060 targets `"upper"`. */
|
|
502
|
+
export type ModalCase = "lower" | "upper";
|
|
503
|
+
/** EARS trigger word — captured as a discriminator on `ears-trigger` tokens. */
|
|
504
|
+
export type EarsTrigger = "When" | "While" | "If" | "Where" | "Then";
|
|
505
|
+
/**
|
|
506
|
+
* One inline-construct token emitted by the parser at extraction time.
|
|
507
|
+
*
|
|
508
|
+
* Discriminated union; consumers `switch` on `kind` for fan-out and read
|
|
509
|
+
* the discriminator field (`case`, `trigger`, `convention`) when more
|
|
510
|
+
* precision is needed. Locations are file-relative 1-based, matching
|
|
511
|
+
* every other {@linkcode SourceLocation} in the model.
|
|
512
|
+
*/
|
|
513
|
+
export type BodyToken = {
|
|
514
|
+
readonly kind: "modal";
|
|
515
|
+
readonly text: string;
|
|
516
|
+
readonly case: ModalCase;
|
|
517
|
+
readonly location: SourceLocation;
|
|
518
|
+
} | {
|
|
519
|
+
readonly kind: "ears-trigger";
|
|
520
|
+
readonly text: string;
|
|
521
|
+
readonly trigger: EarsTrigger;
|
|
522
|
+
readonly location: SourceLocation;
|
|
523
|
+
} | {
|
|
524
|
+
readonly kind: "gherkin-section";
|
|
525
|
+
readonly text: string;
|
|
526
|
+
readonly location: SourceLocation;
|
|
527
|
+
} | {
|
|
528
|
+
readonly kind: "gherkin-step";
|
|
529
|
+
readonly text: string;
|
|
530
|
+
readonly location: SourceLocation;
|
|
531
|
+
} | {
|
|
532
|
+
readonly kind: "entity-ref";
|
|
533
|
+
readonly text: string;
|
|
534
|
+
readonly convention: EntityRefConvention;
|
|
535
|
+
readonly location: SourceLocation;
|
|
536
|
+
} | {
|
|
537
|
+
readonly kind: "inline-code";
|
|
538
|
+
readonly text: string;
|
|
539
|
+
readonly location: SourceLocation;
|
|
540
|
+
};
|
|
297
541
|
/**
|
|
298
542
|
* Kind of directional link between entries — relation name lifted from the
|
|
299
543
|
* source attribute.
|
|
300
544
|
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
|
|
545
|
+
* Open `string` so profile-declared relation names (e.g., from a profile's
|
|
546
|
+
* `traceability:` declarations) can be used without changing core. The
|
|
547
|
+
* canonical built-in kinds are enumerated in {@linkcode KNOWN_LINK_KINDS}.
|
|
548
|
+
*/
|
|
549
|
+
export type LinkKind = string;
|
|
550
|
+
/**
|
|
551
|
+
* Built-in link kinds recognized by the core compiler and shipped profiles.
|
|
552
|
+
*
|
|
553
|
+
* Consumers that need to validate or enumerate the core-defined relation
|
|
554
|
+
* vocabulary should use this constant rather than hard-coding string literals.
|
|
555
|
+
* Profile-declared kinds extend this set at runtime.
|
|
305
556
|
*/
|
|
306
|
-
export
|
|
557
|
+
export declare const KNOWN_LINK_KINDS: readonly string[];
|
|
307
558
|
/** A directional link between two entries in the traceability graph. */
|
|
308
559
|
export interface Link {
|
|
309
560
|
readonly from: DisplayId;
|
|
310
561
|
readonly to: DisplayId;
|
|
311
562
|
readonly kind: LinkKind;
|
|
312
563
|
readonly location: SourceLocation;
|
|
564
|
+
/** How this link was produced. Absent means authored (default). */
|
|
565
|
+
readonly origin?: "authored" | "generated";
|
|
313
566
|
}
|
|
314
567
|
/**
|
|
315
568
|
* Document-level attributes authored in YAML front matter.
|
|
@@ -378,6 +631,6 @@ export interface Document {
|
|
|
378
631
|
/** Observed document properties. */
|
|
379
632
|
readonly properties: DocumentProperties;
|
|
380
633
|
}
|
|
381
|
-
export type { AttrDecl, Cardinality, DocTypeDef, EffectiveProfile,
|
|
634
|
+
export type { AttrDecl, Cardinality, DisciplineMode, DocTypeDef, EffectiveProfile, EffectiveTypeDef, EnforcementMode, InverseDecl, KindDecl, LabelConcern, LabelConcernKind, LabelValue, LoadedProfile, ProfileChain, ProfileConvention, ProfileId, ProfileManifest, ProfileSpecifier, ProvenancedMap, ProvenancedMapEntry, ProvenancedValue, TargetMatcher, TraceRule, TypeDef, ValueType, } from "./profile.js";
|
|
382
635
|
export { LIST_VALUE_TYPES, VALUE_TYPES } from "./profile.js";
|
|
383
636
|
//# sourceMappingURL=mod.d.ts.map
|
package/esm/model/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/model/mod.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/model/mod.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAG3E,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAMtE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,C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AC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,oCAAoC;IACpC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;CACzC;AAMD,YAAY,EACV,QAAQ,EACR,WAAW,EACX,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
package/esm/model/mod.js
CHANGED
|
@@ -3,8 +3,83 @@
|
|
|
3
3
|
*
|
|
4
4
|
* MarkSpec document model — AST types, ID types, and project configuration.
|
|
5
5
|
*/
|
|
6
|
-
export { ATTRIBUTE_CATALOG, attributeSpec, UNIVERSAL_ATTRIBUTE_KEYS, } from "./attributes.js";
|
|
6
|
+
export { ATTRIBUTE_CATALOG, attributeSpec, CSV_SPLITTABLE_TYPES, UNIVERSAL_ATTRIBUTE_KEYS, } from "./attributes.js";
|
|
7
7
|
export { COLOR_NAME_RE, PALETTE_HUES } from "./palette.js";
|
|
8
|
+
export { attributesForType, CORE_TYPE_HIERARCHY, CORE_TYPE_SCOPED_ATTRS, } from "./type_hierarchy.js";
|
|
9
|
+
export { inferTypeFromUriScheme } from "./uri_scheme_map.js";
|
|
10
|
+
export { inferTypeFromSource } from "./source_introspection.js";
|
|
11
|
+
export { inferTypeFromDiscriminatingAttr } from "./discriminating_attr.js";
|
|
12
|
+
// Re-export discipline primitives (ADR-017 / ADR-018).
|
|
13
|
+
export { CORE_DISCIPLINE_REGISTRY, CORE_KINDS, MIXED_DISCIPLINE, } from "./discipline.js";
|
|
14
|
+
/**
|
|
15
|
+
* Cast a plain string to a branded `DisplayId`.
|
|
16
|
+
*
|
|
17
|
+
* This is a zero-cost assertion — no validation is performed. The caller
|
|
18
|
+
* asserts that `s` is a syntactically valid display ID.
|
|
19
|
+
*/
|
|
20
|
+
export function makeDisplayId(s) {
|
|
21
|
+
return s;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Cast a plain string to a branded `Ulid`.
|
|
25
|
+
*
|
|
26
|
+
* This is a zero-cost assertion — no validation is performed. The caller
|
|
27
|
+
* asserts that `s` is a syntactically valid 26-character Crockford base32
|
|
28
|
+
* ULID.
|
|
29
|
+
*/
|
|
30
|
+
export function makeUlid(s) {
|
|
31
|
+
return s;
|
|
32
|
+
}
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
// Core type taxonomy (ADR-003 §Part 1, spec §1.3)
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
/**
|
|
37
|
+
* Core abstract item types. Always valid as `Type:` values regardless of
|
|
38
|
+
* which profile is loaded (core-only mode included). Convention: TitleCase.
|
|
39
|
+
*
|
|
40
|
+
* - `Item` is the abstract root and serves as the bottom fallback in the
|
|
41
|
+
* type-resolution chain (§1.3.1 step 8).
|
|
42
|
+
* - `Specification`, `Component`, `Unit` are abstract+concrete parents:
|
|
43
|
+
* instantiable as direct fallbacks when no concrete subtype fits, and
|
|
44
|
+
* roots for both core concrete subtypes and profile-declared extensions.
|
|
45
|
+
*/
|
|
46
|
+
export const CORE_ABSTRACT_TYPES = [
|
|
47
|
+
"Item",
|
|
48
|
+
"Specification",
|
|
49
|
+
"Component",
|
|
50
|
+
"Unit",
|
|
51
|
+
];
|
|
52
|
+
/**
|
|
53
|
+
* Core concrete item types (ADR-003 §Part 1). Twelve subtypes plus three
|
|
54
|
+
* abstract+concrete parents from {@linkcode CORE_ABSTRACT_TYPES} make up
|
|
55
|
+
* the "15 concrete instantiable types" the spec describes.
|
|
56
|
+
*/
|
|
57
|
+
export const CORE_CONCRETE_TYPES = [
|
|
58
|
+
// Specification subtypes
|
|
59
|
+
"Requirement",
|
|
60
|
+
"Test",
|
|
61
|
+
"Contract",
|
|
62
|
+
"Record",
|
|
63
|
+
"Risk",
|
|
64
|
+
// Component subtypes
|
|
65
|
+
"SoftwareComponent",
|
|
66
|
+
"HardwareComponent",
|
|
67
|
+
"SoftwareInterface",
|
|
68
|
+
"HardwareInterface",
|
|
69
|
+
// Unit subtypes
|
|
70
|
+
"SoftwareUnit",
|
|
71
|
+
"HardwareUnit",
|
|
72
|
+
// Definition (standalone under Item)
|
|
73
|
+
"Definition",
|
|
74
|
+
];
|
|
75
|
+
/**
|
|
76
|
+
* All core type names. Accepted as `Type:` values in core-only mode and
|
|
77
|
+
* when any profile is loaded. Profile-declared types extend this set.
|
|
78
|
+
*/
|
|
79
|
+
export const CORE_TYPES = new Set([
|
|
80
|
+
...CORE_ABSTRACT_TYPES,
|
|
81
|
+
...CORE_CONCRETE_TYPES,
|
|
82
|
+
]);
|
|
8
83
|
/** Core-reserved identity attribute name. */
|
|
9
84
|
export const IDENTITY_KEY = "Id";
|
|
10
85
|
/** Regex matching a bare ULID (identified-entry `Id:` value). */
|
|
@@ -25,9 +100,9 @@ export const URI_SCHEME_RE = /^[A-Za-z][A-Za-z0-9+\-.]*:/;
|
|
|
25
100
|
*/
|
|
26
101
|
export function shapeFromIdValue(value) {
|
|
27
102
|
if (ULID_RE.test(value))
|
|
28
|
-
return "
|
|
103
|
+
return "Authored";
|
|
29
104
|
if (URI_SCHEME_RE.test(value))
|
|
30
|
-
return "
|
|
105
|
+
return "Reference";
|
|
31
106
|
return undefined;
|
|
32
107
|
}
|
|
33
108
|
// ---------------------------------------------------------------------------
|
|
@@ -42,6 +117,7 @@ export const DEFAULT_PROJECT_CONFIG = {
|
|
|
42
117
|
labels: [],
|
|
43
118
|
parents: [],
|
|
44
119
|
parentFallback: REFHUB_URL,
|
|
120
|
+
captionConventions: {},
|
|
45
121
|
};
|
|
46
122
|
/** Error thrown when `project.yaml` is invalid. */
|
|
47
123
|
export class ConfigError extends Error {
|
|
@@ -71,4 +147,24 @@ export class ConfigError extends Error {
|
|
|
71
147
|
this.fieldErrors = fieldErrors;
|
|
72
148
|
}
|
|
73
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Built-in link kinds recognized by the core compiler and shipped profiles.
|
|
152
|
+
*
|
|
153
|
+
* Consumers that need to validate or enumerate the core-defined relation
|
|
154
|
+
* vocabulary should use this constant rather than hard-coding string literals.
|
|
155
|
+
* Profile-declared kinds extend this set at runtime.
|
|
156
|
+
*/
|
|
157
|
+
export const KNOWN_LINK_KINDS = [
|
|
158
|
+
"satisfies",
|
|
159
|
+
"derived-from",
|
|
160
|
+
"references",
|
|
161
|
+
"allocated-to",
|
|
162
|
+
"realizes",
|
|
163
|
+
"verifies",
|
|
164
|
+
"tests",
|
|
165
|
+
"depends-on",
|
|
166
|
+
"part-of",
|
|
167
|
+
"generated-from",
|
|
168
|
+
"supersedes",
|
|
169
|
+
];
|
|
74
170
|
export { LIST_VALUE_TYPES, VALUE_TYPES } from "./profile.js";
|