@driftsys/markspec 0.6.0 → 0.6.2

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.
Files changed (109) hide show
  1. package/esm/lint/mod.d.ts +2 -0
  2. package/esm/lint/mod.d.ts.map +1 -1
  3. package/esm/lint/mod.js +1 -0
  4. package/esm/lint/rules/xref.d.ts +32 -5
  5. package/esm/lint/rules/xref.d.ts.map +1 -1
  6. package/esm/lint/rules/xref.js +40 -0
  7. package/esm/lint/runner.d.ts.map +1 -1
  8. package/esm/lint/runner.js +6 -2
  9. package/esm/lint/score_text.d.ts +67 -0
  10. package/esm/lint/score_text.d.ts.map +1 -0
  11. package/esm/lint/score_text.js +74 -0
  12. package/esm/lock/compare.d.ts +34 -0
  13. package/esm/lock/compare.d.ts.map +1 -0
  14. package/esm/lock/compare.js +64 -0
  15. package/esm/lock/mod.d.ts +2 -1
  16. package/esm/lock/mod.d.ts.map +1 -1
  17. package/esm/lock/mod.js +1 -0
  18. package/esm/lock/model.d.ts +13 -0
  19. package/esm/lock/model.d.ts.map +1 -1
  20. package/esm/lock/parser.d.ts +3 -0
  21. package/esm/lock/parser.d.ts.map +1 -1
  22. package/esm/lock/parser.js +37 -1
  23. package/esm/lock/serializer.d.ts.map +1 -1
  24. package/esm/lock/serializer.js +4 -0
  25. package/esm/mod.d.ts +7 -3
  26. package/esm/mod.d.ts.map +1 -1
  27. package/esm/mod.js +6 -2
  28. package/esm/parser/grammars.d.ts.map +1 -1
  29. package/esm/parser/grammars.js +8 -2
  30. package/esm/parser/markdown.js +11 -21
  31. package/esm/profile/display_id.d.ts +60 -0
  32. package/esm/profile/display_id.d.ts.map +1 -0
  33. package/esm/profile/display_id.js +80 -0
  34. package/esm/profile/mod.d.ts +3 -0
  35. package/esm/profile/mod.d.ts.map +1 -1
  36. package/esm/profile/mod.js +2 -0
  37. package/esm/profile/trace_targets.d.ts +43 -0
  38. package/esm/profile/trace_targets.d.ts.map +1 -0
  39. package/esm/profile/trace_targets.js +74 -0
  40. package/esm/self_upgrade/compare.d.ts +19 -0
  41. package/esm/self_upgrade/compare.d.ts.map +1 -0
  42. package/esm/self_upgrade/compare.js +35 -0
  43. package/esm/self_upgrade/manifest.d.ts +21 -0
  44. package/esm/self_upgrade/manifest.d.ts.map +1 -0
  45. package/esm/self_upgrade/manifest.js +27 -0
  46. package/esm/self_upgrade/mod.d.ts +12 -0
  47. package/esm/self_upgrade/mod.d.ts.map +1 -0
  48. package/esm/self_upgrade/mod.js +11 -0
  49. package/esm/self_upgrade/pm_detect.d.ts +27 -0
  50. package/esm/self_upgrade/pm_detect.d.ts.map +1 -0
  51. package/esm/self_upgrade/pm_detect.js +55 -0
  52. package/esm/self_upgrade/target.d.ts +25 -0
  53. package/esm/self_upgrade/target.d.ts.map +1 -0
  54. package/esm/self_upgrade/target.js +34 -0
  55. package/package.json +1 -1
  56. package/script/lint/mod.d.ts +2 -0
  57. package/script/lint/mod.d.ts.map +1 -1
  58. package/script/lint/mod.js +3 -1
  59. package/script/lint/rules/xref.d.ts +32 -5
  60. package/script/lint/rules/xref.d.ts.map +1 -1
  61. package/script/lint/rules/xref.js +42 -0
  62. package/script/lint/runner.d.ts.map +1 -1
  63. package/script/lint/runner.js +5 -1
  64. package/script/lint/score_text.d.ts +67 -0
  65. package/script/lint/score_text.d.ts.map +1 -0
  66. package/script/lint/score_text.js +77 -0
  67. package/script/lock/compare.d.ts +34 -0
  68. package/script/lock/compare.d.ts.map +1 -0
  69. package/script/lock/compare.js +67 -0
  70. package/script/lock/mod.d.ts +2 -1
  71. package/script/lock/mod.d.ts.map +1 -1
  72. package/script/lock/mod.js +3 -1
  73. package/script/lock/model.d.ts +13 -0
  74. package/script/lock/model.d.ts.map +1 -1
  75. package/script/lock/parser.d.ts +3 -0
  76. package/script/lock/parser.d.ts.map +1 -1
  77. package/script/lock/parser.js +37 -1
  78. package/script/lock/serializer.d.ts.map +1 -1
  79. package/script/lock/serializer.js +4 -0
  80. package/script/mod.d.ts +7 -3
  81. package/script/mod.d.ts.map +1 -1
  82. package/script/mod.js +82 -63
  83. package/script/parser/grammars.d.ts.map +1 -1
  84. package/script/parser/grammars.js +8 -2
  85. package/script/parser/markdown.js +11 -21
  86. package/script/profile/display_id.d.ts +60 -0
  87. package/script/profile/display_id.d.ts.map +1 -0
  88. package/script/profile/display_id.js +86 -0
  89. package/script/profile/mod.d.ts +3 -0
  90. package/script/profile/mod.d.ts.map +1 -1
  91. package/script/profile/mod.js +10 -1
  92. package/script/profile/trace_targets.d.ts +43 -0
  93. package/script/profile/trace_targets.d.ts.map +1 -0
  94. package/script/profile/trace_targets.js +79 -0
  95. package/script/self_upgrade/compare.d.ts +19 -0
  96. package/script/self_upgrade/compare.d.ts.map +1 -0
  97. package/script/self_upgrade/compare.js +38 -0
  98. package/script/self_upgrade/manifest.d.ts +21 -0
  99. package/script/self_upgrade/manifest.d.ts.map +1 -0
  100. package/script/self_upgrade/manifest.js +31 -0
  101. package/script/self_upgrade/mod.d.ts +12 -0
  102. package/script/self_upgrade/mod.d.ts.map +1 -0
  103. package/script/self_upgrade/mod.js +20 -0
  104. package/script/self_upgrade/pm_detect.d.ts +27 -0
  105. package/script/self_upgrade/pm_detect.d.ts.map +1 -0
  106. package/script/self_upgrade/pm_detect.js +58 -0
  107. package/script/self_upgrade/target.d.ts +25 -0
  108. package/script/self_upgrade/target.d.ts.map +1 -0
  109. package/script/self_upgrade/target.js +38 -0
package/esm/lint/mod.d.ts CHANGED
@@ -9,6 +9,8 @@ export { isProseScope, runLint } from "./runner.js";
9
9
  export type { LintOptions, LintResult } from "./runner.js";
10
10
  export { ANTI_PATTERN_NOTE, computeScoreRollup } from "./score.js";
11
11
  export type { EntryScore, RuleContribution, ScoreRollup } from "./score.js";
12
+ export { scoreText } from "./score_text.js";
13
+ export type { ScoreTextOptions, ScoreTextResult } from "./score_text.js";
12
14
  export { segmentSentences } from "./segmenter.js";
13
15
  export type { Sentence } from "./segmenter.js";
14
16
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lint/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lint/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
package/esm/lint/mod.js CHANGED
@@ -6,4 +6,5 @@
6
6
  */
7
7
  export { isProseScope, runLint } from "./runner.js";
8
8
  export { ANTI_PATTERN_NOTE, computeScoreRollup } from "./score.js";
9
+ export { scoreText } from "./score_text.js";
9
10
  export { segmentSentences } from "./segmenter.js";
@@ -8,12 +8,39 @@
8
8
  import type { Entry } from "../../model/mod.js";
9
9
  import type { LintDiagnostic } from "../types.js";
10
10
  import type { GlossaryIndex } from "../glossary.js";
11
- /** Hook signature for the deferred $Identifier registry leg. Returns
12
- * true when the token is a resolvable $Identifier (i.e. should be
13
- * skipped by Q500). Today, always returns false; ADR-016's marker
14
- * pass replaces this with a real registry lookup. See ADR-021
15
- * Decision 1. */
11
+ /** Hook signature for the $Identifier registry leg. Returns true when
12
+ * the token is a resolvable $Identifier (i.e. should be skipped by
13
+ * Q500). See ADR-021 Decision 1 for the integration seam, and
14
+ * {@linkcode buildIdentifierIndex} + {@linkcode buildIsIdentifierHook}
15
+ * for the corpus-scan implementation that backs it today. */
16
16
  export type IsIdentifierHook = (token: string) => boolean;
17
+ /**
18
+ * Build a corpus-wide `$Identifier` index from every entry's `bodyTokens`.
19
+ *
20
+ * Aggregates the bare name (text with leading `$` stripped) of every
21
+ * `entity-ref` token across `entries` into a `Set<string>`. The set is
22
+ * the data backing the {@linkcode IsIdentifierHook} closure produced by
23
+ * {@linkcode buildIsIdentifierHook}.
24
+ *
25
+ * Behavioural contract (ADR-021 Decision 1, additive-enrichment invariant):
26
+ * - Every name in the index is observed in the corpus as `$Name`.
27
+ * - The index is purely additive: more entries → more silenced phrases,
28
+ * never more diagnostics.
29
+ *
30
+ * Scope note: this is the pragmatic minimal resolver leg per issue #502.
31
+ * The formal `MSL-M050`/`MSL-M051` entity-resolution model (definition
32
+ * vs. use, typed identifiers, profile Aliases) is deferred to a
33
+ * follow-up story — the closure body changes but the hook signature
34
+ * stays the same.
35
+ */
36
+ export declare function buildIdentifierIndex(entries: readonly Entry[]): ReadonlySet<string>;
37
+ /**
38
+ * Build the {@linkcode IsIdentifierHook} closure from a precomputed
39
+ * index. Separated from {@linkcode buildIdentifierIndex} so the index
40
+ * can be computed once per `runLint` invocation and reused across
41
+ * every in-scope entry.
42
+ */
43
+ export declare function buildIsIdentifierHook(index: ReadonlySet<string>): IsIdentifierHook;
17
44
  /** Public entry point: run Q500 against an entry's paragraph bodies. */
18
45
  export declare function runXrefRules(entry: Entry, glossary: GlossaryIndex, capitalizedAllow: ReadonlySet<string>, isIdentifier: IsIdentifierHook): LintDiagnostic[];
19
46
  //# sourceMappingURL=xref.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xref.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/xref.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;;iBAIiB;AACjB,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;AAmN1D,wEAAwE;AACxE,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,EACvB,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,EACrC,YAAY,EAAE,gBAAgB,GAC7B,cAAc,EAAE,CAsElB"}
1
+ {"version":3,"file":"xref.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/xref.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;;6DAI6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;AAE1D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,KAAK,EAAE,GACxB,WAAW,CAAC,MAAM,CAAC,CAUrB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,gBAAgB,CAElB;AAmND,wEAAwE;AACxE,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,EACvB,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,EACrC,YAAY,EAAE,gBAAgB,GAC7B,cAAc,EAAE,CAsElB"}
@@ -7,6 +7,46 @@
7
7
  */
8
8
  import { deriveTermSlug } from "../../parser/glossary.js";
9
9
  import { offsetToRange } from "../range_util.js";
10
+ /**
11
+ * Build a corpus-wide `$Identifier` index from every entry's `bodyTokens`.
12
+ *
13
+ * Aggregates the bare name (text with leading `$` stripped) of every
14
+ * `entity-ref` token across `entries` into a `Set<string>`. The set is
15
+ * the data backing the {@linkcode IsIdentifierHook} closure produced by
16
+ * {@linkcode buildIsIdentifierHook}.
17
+ *
18
+ * Behavioural contract (ADR-021 Decision 1, additive-enrichment invariant):
19
+ * - Every name in the index is observed in the corpus as `$Name`.
20
+ * - The index is purely additive: more entries → more silenced phrases,
21
+ * never more diagnostics.
22
+ *
23
+ * Scope note: this is the pragmatic minimal resolver leg per issue #502.
24
+ * The formal `MSL-M050`/`MSL-M051` entity-resolution model (definition
25
+ * vs. use, typed identifiers, profile Aliases) is deferred to a
26
+ * follow-up story — the closure body changes but the hook signature
27
+ * stays the same.
28
+ */
29
+ export function buildIdentifierIndex(entries) {
30
+ const out = new Set();
31
+ for (const entry of entries) {
32
+ for (const token of entry.bodyTokens) {
33
+ if (token.kind !== "entity-ref")
34
+ continue;
35
+ // `token.text` is the full `$Identifier` form; strip the leading `$`.
36
+ out.add(token.text.slice(1));
37
+ }
38
+ }
39
+ return out;
40
+ }
41
+ /**
42
+ * Build the {@linkcode IsIdentifierHook} closure from a precomputed
43
+ * index. Separated from {@linkcode buildIdentifierIndex} so the index
44
+ * can be computed once per `runLint` invocation and reused across
45
+ * every in-scope entry.
46
+ */
47
+ export function buildIsIdentifierHook(index) {
48
+ return (phrase) => index.has(phrase);
49
+ }
10
50
  /** RFC 2119 modal verbs + EARS leading-clause keywords that must never
11
51
  * trigger Q500 mid-sentence. Sentence-initial exclusion is handled
12
52
  * separately by position; this set catches keyword uses elsewhere. */
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lint/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAUjD,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,eAAe,CAAC;AAS/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgB9C;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAKlD;AAMD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAoBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA0EvE"}
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lint/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAUjD,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,eAAe,CAAC;AAY/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgB9C;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAKlD;AAMD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAoBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA8EvE"}
@@ -12,7 +12,7 @@ import { runLexiconRules } from "./rules/lexicon.js";
12
12
  import { runStructRules } from "./rules/struct.js";
13
13
  import { hasRationale, parseDisableValue, runSuppressionRules, runUnusedSuppressionCheck, } from "./rules/suppression.js";
14
14
  import { buildGlossaryIndex } from "./glossary.js";
15
- import { runXrefRules } from "./rules/xref.js";
15
+ import { buildIdentifierIndex, buildIsIdentifierHook, runXrefRules, } from "./rules/xref.js";
16
16
  import { runEarsRules } from "./rules/ears.js";
17
17
  import { runModalSentenceRules } from "./rules/modal_sentence.js";
18
18
  import { runIncoseSentenceRules } from "./rules/incose_sentence.js";
@@ -90,7 +90,11 @@ export async function runLint(options) {
90
90
  const { entries } = options;
91
91
  const allow = options.capitalizedAllow ?? loadLexicon("capitalized-allow");
92
92
  const glossary = await buildGlossaryIndex(entries, options.readFile ?? (() => Promise.resolve(undefined)), options.glossaryFilePaths ?? []);
93
- const isIdHook = () => false;
93
+ // Corpus-scan resolver leg (issue #502, ADR-021 Decision 1). Built once
94
+ // per invocation; reused across every in-scope entry. Honors the
95
+ // additive-enrichment invariant — Q500 fires *less* as the resolver
96
+ // grows, never *more*.
97
+ const isIdHook = buildIsIdentifierHook(buildIdentifierIndex(entries));
94
98
  // Steps 1–9: collect diagnostics keyed by entry
95
99
  const inScopeDiags = new Map();
96
100
  for (const entry of entries) {
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @module core/lint/score_text
3
+ *
4
+ * Score a single piece of requirement prose using the PA-3 lint
5
+ * pipeline. Wraps the input text in a synthetic `Entry` (type
6
+ * `Requirement`, body = text, bodyAst = parsed) and runs `runLint`
7
+ * against a one-entry corpus.
8
+ *
9
+ * Two non-obvious wrapping choices:
10
+ * - `bodyAst` is populated via `buildBodyAst(text)`. Most PA-3
11
+ * rules (modal, EARS, INCOSE, passive, lexicon) walk `bodyAst`,
12
+ * not the raw `body` string — without the AST, ~95% of the
13
+ * rule catalog silently no-ops.
14
+ * - `title` is set to the resolved id. Q400 (`struct-title-length`)
15
+ * fires when title length is outside [3, 120]; reusing the id
16
+ * (always ≥ 3 chars) keeps Q400 silent so the score reflects
17
+ * prose quality, not the absence of an authored title.
18
+ *
19
+ * Corpus-dependent rules (Q500 xref-glossary, xref-undefined,
20
+ * suppression hygiene) self-skip because there is nothing for them
21
+ * to cross-reference on a one-entry corpus. Note specifically:
22
+ * `bodyTokens` is left empty here, which means any `$Identifier`
23
+ * style entity references inside `text` are NOT extracted and so
24
+ * Q500 cannot fire on them in either direction. External requirement
25
+ * prose (DOORS / Word / PDF) does not use MarkSpec's `$Identifier`
26
+ * syntax, so this is the right trade for v1; a caller that does want
27
+ * `$Identifier` resolution should run the prose through `parseFile`
28
+ * to get a real entry and use the normal `runLint` path instead.
29
+ */
30
+ import type { LintDiagnostic } from "./types.js";
31
+ import type { RuleContribution } from "./score.js";
32
+ /** Options for {@linkcode scoreText}. */
33
+ export interface ScoreTextOptions {
34
+ /**
35
+ * Caller-supplied identifier carried through to the result so a
36
+ * batch caller can correlate inputs and outputs. Defaults to
37
+ * `"EXT_0001"` when absent or empty.
38
+ */
39
+ readonly id?: string;
40
+ }
41
+ /**
42
+ * Result returned by {@linkcode scoreText}.
43
+ *
44
+ * `warningCount + infoCount === diagnostics.length` by convention:
45
+ * every PA-3 rule emits `warning` or `info` only. The `Severity` type
46
+ * permits `error`, but no current rule produces one; if that ever
47
+ * changes the partition will need a third counter.
48
+ */
49
+ export interface ScoreTextResult {
50
+ readonly id: string;
51
+ /** Sum of `weight × occurrences` across all firings. */
52
+ readonly score: number;
53
+ /** Number of diagnostics with severity `"warning"`. */
54
+ readonly warningCount: number;
55
+ /** Number of diagnostics with severity `"info"`. */
56
+ readonly infoCount: number;
57
+ /** Sorted by weight DESC, code ASC. */
58
+ readonly contributions: readonly RuleContribution[];
59
+ /** Full lint diagnostics, in pipeline order. */
60
+ readonly diagnostics: readonly LintDiagnostic[];
61
+ }
62
+ /**
63
+ * Score a single piece of requirement prose against the PA-3 rule
64
+ * catalog. See module doc for the wrapping strategy.
65
+ */
66
+ export declare function scoreText(text: string, opts?: ScoreTextOptions): Promise<ScoreTextResult>;
67
+ //# sourceMappingURL=score_text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score_text.d.ts","sourceRoot":"","sources":["../../src/lint/score_text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKnD,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,QAAQ,CAAC,aAAa,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpD,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;CACjD;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,eAAe,CAAC,CAqC1B"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @module core/lint/score_text
3
+ *
4
+ * Score a single piece of requirement prose using the PA-3 lint
5
+ * pipeline. Wraps the input text in a synthetic `Entry` (type
6
+ * `Requirement`, body = text, bodyAst = parsed) and runs `runLint`
7
+ * against a one-entry corpus.
8
+ *
9
+ * Two non-obvious wrapping choices:
10
+ * - `bodyAst` is populated via `buildBodyAst(text)`. Most PA-3
11
+ * rules (modal, EARS, INCOSE, passive, lexicon) walk `bodyAst`,
12
+ * not the raw `body` string — without the AST, ~95% of the
13
+ * rule catalog silently no-ops.
14
+ * - `title` is set to the resolved id. Q400 (`struct-title-length`)
15
+ * fires when title length is outside [3, 120]; reusing the id
16
+ * (always ≥ 3 chars) keeps Q400 silent so the score reflects
17
+ * prose quality, not the absence of an authored title.
18
+ *
19
+ * Corpus-dependent rules (Q500 xref-glossary, xref-undefined,
20
+ * suppression hygiene) self-skip because there is nothing for them
21
+ * to cross-reference on a one-entry corpus. Note specifically:
22
+ * `bodyTokens` is left empty here, which means any `$Identifier`
23
+ * style entity references inside `text` are NOT extracted and so
24
+ * Q500 cannot fire on them in either direction. External requirement
25
+ * prose (DOORS / Word / PDF) does not use MarkSpec's `$Identifier`
26
+ * syntax, so this is the right trade for v1; a caller that does want
27
+ * `$Identifier` resolution should run the prose through `parseFile`
28
+ * to get a real entry and use the normal `runLint` path instead.
29
+ */
30
+ import { makeDisplayId } from "../model/mod.js";
31
+ import { buildBodyAst } from "../ast/build.js";
32
+ import { runLint } from "./runner.js";
33
+ const SYNTHETIC_FILE = "<scoreText>";
34
+ const DEFAULT_ID = "EXT_0001";
35
+ /**
36
+ * Score a single piece of requirement prose against the PA-3 rule
37
+ * catalog. See module doc for the wrapping strategy.
38
+ */
39
+ export async function scoreText(text, opts) {
40
+ const id = typeof opts?.id === "string" && opts.id.length > 0
41
+ ? opts.id
42
+ : DEFAULT_ID;
43
+ const entry = {
44
+ displayId: makeDisplayId(id),
45
+ title: id,
46
+ body: text,
47
+ bodyAst: buildBodyAst(text),
48
+ rawAttributes: [],
49
+ typedAttributes: new Map(),
50
+ type: "Requirement",
51
+ shape: "Authored",
52
+ location: { file: SYNTHETIC_FILE, line: 1, column: 1 },
53
+ source: { kind: "markdown" },
54
+ bodyTokens: [],
55
+ };
56
+ const lintResult = await runLint({ entries: [entry] });
57
+ let warningCount = 0;
58
+ let infoCount = 0;
59
+ for (const d of lintResult.diagnostics) {
60
+ if (d.severity === "warning")
61
+ warningCount++;
62
+ else if (d.severity === "info")
63
+ infoCount++;
64
+ }
65
+ const entryScore = lintResult.score.perEntry[0];
66
+ return {
67
+ id,
68
+ score: entryScore?.score ?? 0,
69
+ warningCount,
70
+ infoCount,
71
+ contributions: entryScore?.contributions ?? [],
72
+ diagnostics: lintResult.diagnostics,
73
+ };
74
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @module core/lock/compare
3
+ *
4
+ * Pure comparison utilities for lockfile-related version data.
5
+ * Consumed by the LSP extension (slice C) and `markspec doctor`
6
+ * (slice F) to surface skew between the project's declared
7
+ * `[meta.toolchain].min-version` floor and the running CLI's release
8
+ * version.
9
+ *
10
+ * Keeping this in the lock module makes the comparison the SSOT —
11
+ * downstream consumers import one function rather than reinventing
12
+ * parsing + comparison logic each time.
13
+ */
14
+ /**
15
+ * Returns `true` when `actualVersion` is strictly below `floor`,
16
+ * compared as `(major, minor)` tuples. The patch component of
17
+ * `actualVersion` is ignored.
18
+ *
19
+ * Returns `false` when `floor` is `undefined` (project declares no
20
+ * floor) or when `actualVersion >= floor`.
21
+ *
22
+ * Throws `Error` if either argument is not in the expected grammar.
23
+ * Callers should pass values that originated from the parsed lockfile
24
+ * model (`LockfileToolchain.minVersion`, already validated at parse
25
+ * time) and from `VERSION` (a known-good semver constant).
26
+ *
27
+ * @example
28
+ * isBelowFloor("0.6.1", "0.6") // false
29
+ * isBelowFloor("0.5.99", "0.6") // true
30
+ * isBelowFloor("0.7.0", "0.6") // false
31
+ * isBelowFloor("0.6.1", undefined) // false (no floor)
32
+ */
33
+ export declare function isBelowFloor(actualVersion: string, floor: string | undefined): boolean;
34
+ //# sourceMappingURL=compare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/lock/compare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAeH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAmBT"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @module core/lock/compare
3
+ *
4
+ * Pure comparison utilities for lockfile-related version data.
5
+ * Consumed by the LSP extension (slice C) and `markspec doctor`
6
+ * (slice F) to surface skew between the project's declared
7
+ * `[meta.toolchain].min-version` floor and the running CLI's release
8
+ * version.
9
+ *
10
+ * Keeping this in the lock module makes the comparison the SSOT —
11
+ * downstream consumers import one function rather than reinventing
12
+ * parsing + comparison logic each time.
13
+ */
14
+ /**
15
+ * Strict MAJOR.MINOR grammar — must match the parser's MIN_VERSION_RE.
16
+ * Used to validate the `floor` argument.
17
+ */
18
+ const FLOOR_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
19
+ /**
20
+ * Prefix-match grammar for the running binary's VERSION string. Accepts
21
+ * standard semver (MAJOR.MINOR.PATCH and optional pre-release/build),
22
+ * extracting only the major + minor pair.
23
+ */
24
+ const ACTUAL_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\.|[-+]|$)/;
25
+ /**
26
+ * Returns `true` when `actualVersion` is strictly below `floor`,
27
+ * compared as `(major, minor)` tuples. The patch component of
28
+ * `actualVersion` is ignored.
29
+ *
30
+ * Returns `false` when `floor` is `undefined` (project declares no
31
+ * floor) or when `actualVersion >= floor`.
32
+ *
33
+ * Throws `Error` if either argument is not in the expected grammar.
34
+ * Callers should pass values that originated from the parsed lockfile
35
+ * model (`LockfileToolchain.minVersion`, already validated at parse
36
+ * time) and from `VERSION` (a known-good semver constant).
37
+ *
38
+ * @example
39
+ * isBelowFloor("0.6.1", "0.6") // false
40
+ * isBelowFloor("0.5.99", "0.6") // true
41
+ * isBelowFloor("0.7.0", "0.6") // false
42
+ * isBelowFloor("0.6.1", undefined) // false (no floor)
43
+ */
44
+ export function isBelowFloor(actualVersion, floor) {
45
+ if (floor === undefined)
46
+ return false;
47
+ const f = FLOOR_RE.exec(floor);
48
+ if (!f) {
49
+ throw new Error(`isBelowFloor: invalid floor ${JSON.stringify(floor)}`);
50
+ }
51
+ const a = ACTUAL_RE.exec(actualVersion);
52
+ if (!a) {
53
+ throw new Error(`isBelowFloor: invalid actualVersion ${JSON.stringify(actualVersion)}`);
54
+ }
55
+ const fMajor = parseInt(f[1], 10);
56
+ const fMinor = parseInt(f[2], 10);
57
+ const aMajor = parseInt(a[1], 10);
58
+ const aMinor = parseInt(a[2], 10);
59
+ if (aMajor < fMajor)
60
+ return true;
61
+ if (aMajor > fMajor)
62
+ return false;
63
+ return aMinor < fMinor;
64
+ }
package/esm/lock/mod.d.ts CHANGED
@@ -5,11 +5,12 @@
5
5
  * model, upstream resolution, drift detection. The public boundary
6
6
  * for both `markspec lock` and `markspec compile --frozen`.
7
7
  */
8
- export type { BoundEntry, BoundEntryBinding, GeneratedCache, LockedAttributes, Lockfile, LockfileMeta, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./model.js";
8
+ export type { BoundEntry, BoundEntryBinding, GeneratedCache, LockedAttributes, Lockfile, LockfileMeta, LockfileToolchain, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./model.js";
9
9
  export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
10
10
  export { serializeLockfile } from "./serializer.js";
11
11
  export { parseLockfile } from "./parser.js";
12
12
  export type { ParseLockfileResult } from "./parser.js";
13
+ export { isBelowFloor } from "./compare.js";
13
14
  export { checkDrift } from "./check.js";
14
15
  export { sha256Bytes, sha256String } from "./hash.js";
15
16
  export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lock/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,M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kB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,cAAc,CAAC"}
package/esm/lock/mod.js CHANGED
@@ -8,6 +8,7 @@
8
8
  export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
9
9
  export { serializeLockfile } from "./serializer.js";
10
10
  export { parseLockfile } from "./parser.js";
11
+ export { isBelowFloor } from "./compare.js";
11
12
  export { checkDrift } from "./check.js";
12
13
  export { sha256Bytes, sha256String } from "./hash.js";
13
14
  export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
@@ -62,11 +62,24 @@ export interface GeneratedCache {
62
62
  readonly edgesHash: string;
63
63
  readonly edgesCount: number;
64
64
  }
65
+ /** Toolchain requirements declared by the project. */
66
+ export interface LockfileToolchain {
67
+ /**
68
+ * Minimum required markspec release version at minor granularity
69
+ * (e.g. "0.6" means "any 0.6.x or later"). Compared as a
70
+ * (major, minor) tuple against the running binary's VERSION.
71
+ * Format: /^(0|[1-9]\d*)\.(0|[1-9]\d*)$/ — exactly two components,
72
+ * no leading zeros, no prefix, no operator.
73
+ */
74
+ readonly minVersion: string;
75
+ }
65
76
  /** Lockfile metadata. */
66
77
  export interface LockfileMeta {
67
78
  readonly markspecSchema: number;
68
79
  /** Timestamp the lockfile was written, RFC 3339 UTC (e.g. "2026-05-25T12:00:00Z"). */
69
80
  readonly lockedAt: string;
81
+ /** Toolchain requirements; omitted when no floor is declared. */
82
+ readonly toolchain?: LockfileToolchain;
70
83
  }
71
84
  /** Top-level lockfile model. */
72
85
  export interface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AQ,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAED,uCAAuC;AACvC,eAAO,MAAM,uBAAuB,IAAI,CAAC"}
@@ -8,6 +8,9 @@
8
8
  * - MSL-L001 — malformed TOML or missing required field
9
9
  * - MSL-L002 — lockfile schema is newer than this binary supports
10
10
  * - MSL-L003 — lockfile schema is unrecognised (< 1)
11
+ * - MSL-L030 — `[meta.toolchain].min-version` is malformed
12
+ * - MSL-L031 — `[meta.toolchain].min-version` is not a string
13
+ * - MSL-L032 — `meta.toolchain` is a scalar instead of a table
11
14
  */
12
15
  import type { Diagnostic } from "../model/mod.js";
13
16
  import { type Lockfile } from "./model.js";
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/lock/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAGL,KAAK,QAAQ,EAGd,MAAM,YAAY,CAAC;AAEpB,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CA+L/D"}
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/lock/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAGL,KAAK,QAAQ,EAId,MAAM,YAAY,CAAC;AAUpB,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAkO/D"}
@@ -8,9 +8,19 @@
8
8
  * - MSL-L001 — malformed TOML or missing required field
9
9
  * - MSL-L002 — lockfile schema is newer than this binary supports
10
10
  * - MSL-L003 — lockfile schema is unrecognised (< 1)
11
+ * - MSL-L030 — `[meta.toolchain].min-version` is malformed
12
+ * - MSL-L031 — `[meta.toolchain].min-version` is not a string
13
+ * - MSL-L032 — `meta.toolchain` is a scalar instead of a table
11
14
  */
12
15
  import { parse as parseToml } from "@std/toml";
13
16
  import { LOCKFILE_SCHEMA_VERSION, } from "./model.js";
17
+ /**
18
+ * Strict MAJOR.MINOR grammar for `[meta.toolchain].min-version`. Exactly
19
+ * two components, no leading zeros (except `0` itself), no `v` prefix,
20
+ * no operator. See spec 2026-05-27-markspec-lock-toolchain-minversion.
21
+ * Must stay in sync with FLOOR_RE in `./compare.ts`.
22
+ */
23
+ const MIN_VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
14
24
  /**
15
25
  * Parse a `markspec.lock` document. Returns the model when valid, or a
16
26
  * single `MSL-L###` diagnostic when not. Schema-validation errors are
@@ -46,6 +56,30 @@ export function parseLockfile(toml) {
46
56
  if (typeof markspecSchema !== "number") {
47
57
  return diag("MSL-L001", "Missing [meta].markspec-schema");
48
58
  }
59
+ // [meta.toolchain] — optional minimum CLI version floor (slice B).
60
+ // Validates strictly: malformed values are rejected with single-shot
61
+ // diagnostics; unknown sub-keys are silently ignored for forward-compat.
62
+ let toolchain;
63
+ const toolchainRaw = meta.toolchain;
64
+ if (toolchainRaw !== undefined) {
65
+ if (typeof toolchainRaw !== "object" || toolchainRaw === null ||
66
+ Array.isArray(toolchainRaw)) {
67
+ return diag("MSL-L032", "[meta.toolchain] must be a table");
68
+ }
69
+ const tc = toolchainRaw;
70
+ const rawMinVersion = tc["min-version"];
71
+ if (rawMinVersion !== undefined) {
72
+ if (typeof rawMinVersion !== "string") {
73
+ return diag("MSL-L031", "[meta.toolchain].min-version must be a string");
74
+ }
75
+ if (!MIN_VERSION_RE.test(rawMinVersion)) {
76
+ return diag("MSL-L030", `[meta.toolchain].min-version is malformed: ` +
77
+ `${JSON.stringify(rawMinVersion)} ` +
78
+ `(expected MAJOR.MINOR like "0.6")`);
79
+ }
80
+ toolchain = { minVersion: rawMinVersion };
81
+ }
82
+ }
49
83
  const upstreams = [];
50
84
  const upstreamRoot = raw.upstream;
51
85
  if (upstreamRoot) {
@@ -157,7 +191,9 @@ export function parseLockfile(toml) {
157
191
  }
158
192
  const lockfile = {
159
193
  schema,
160
- meta: { markspecSchema, lockedAt },
194
+ meta: toolchain
195
+ ? { markspecSchema, lockedAt, toolchain }
196
+ : { markspecSchema, lockedAt },
161
197
  upstreams,
162
198
  boundEntries,
163
199
  generatedCache: { edgesHash, edgesCount },
@@ -1 +1 @@
1
- {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/lock/serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,YAAY,CAAC;AAMpB,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,CAwFtD"}
1
+ {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/lock/serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,YAAY,CAAC;AAMpB,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,CA4FtD"}
@@ -17,6 +17,10 @@ export function serializeLockfile(lf) {
17
17
  parts.push("[meta]\n");
18
18
  parts.push(`markspec-schema = ${lf.meta.markspecSchema}\n`);
19
19
  parts.push(`locked-at = ${tomlString(lf.meta.lockedAt)}\n`);
20
+ if (lf.meta.toolchain !== undefined) {
21
+ parts.push("\n[meta.toolchain]\n");
22
+ parts.push(`min-version = ${tomlString(lf.meta.toolchain.minVersion)}\n`);
23
+ }
20
24
  const refs = lf.upstreams
21
25
  .filter((u) => u.kind === "reference")
22
26
  .slice()
package/esm/mod.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  * from core/mod.ts, never from internal paths.
9
9
  */
10
10
  import "./_dnt.polyfills.js";
11
- export declare const VERSION = "0.6.0";
11
+ export declare const VERSION = "0.6.2";
12
12
  export declare const CORE_SCHEMA_VERSION = 1;
13
13
  export { ConfigError, CORE_DISCIPLINE_REGISTRY, CORE_KINDS, DEFAULT_PROJECT_CONFIG, KNOWN_LINK_KINDS, makeDisplayId, makeUlid, MIXED_DISCIPLINE, PALETTE_HUES, REFHUB_URL, } from "./model/mod.js";
14
14
  export type { Attribute, BodyToken, BodyTokenKind, Caption, CaptionConventions, CaptionPosition, ConfigFieldError, Diagnostic, Directive, Discipline, DisciplineRegistry, DisplayId, EarsTrigger, EffectiveProfile, EffectiveTypeDef, EntityRefConvention, Entry, EntryShape, EntrySource, ExtractorRule, InlineRef, KindDecl, LabelConcern, LabelConcernKind, LabelValue, Link, LinkKind, LoadedProfile, ModalCase, PaletteHue, ProfileChain, ProfileConvention, ProjectConfig, ProvenancedMap, ProvenancedMapEntry, ProvenancedValue, Severity, SourceLocation, Ulid, } from "./model/mod.js";
@@ -24,6 +24,9 @@ export { computeCacheKey, computeCacheLocation, defaultAppendFile, defaultRunGit
24
24
  export type { AppendFile, CacheLocation, GitCacheKeyInput, LoadChainOptions, LoadChainResult, LoadProfileForCommandResult, MergeResult, ParseManifestResult, ResolvedProfileSource, ResolveGitOptions, RunGit, RunGitResult, } from "./profile/mod.js";
25
25
  export { buildEffectiveDisciplineRegistry } from "./profile/mod.js";
26
26
  export { inferDisciplineMode, resolveDisciplineMode } from "./profile/mod.js";
27
+ export { formatDisplayId, highestDisplayIdNumber, padDisplayIdNumber, parseDisplayIdPattern, } from "./profile/mod.js";
28
+ export type { DisplayIdPatternShape } from "./profile/mod.js";
29
+ export { entryMatchesTargets, filterEntriesByTraceTargets, targetsForRelation, } from "./profile/mod.js";
27
30
  export { buildProfileIntrospection } from "./profile/mod.js";
28
31
  export type { AttributeDetail, ConventionDetail, LabelConcernDetail, ProfileElementDetail, ProfileElementKind, ProfileElementRef, ProfileIntrospection, ProfileOverview, ProvenancedDescription, RelationDetail, TypeDetail, } from "./profile/mod.js";
29
32
  export { detectCaptions, detectDirectives, detectInlineRefs, isSupportedExtension, loadGrammar, parse, parseFile, parseSource, } from "./parser/mod.js";
@@ -43,8 +46,9 @@ export type { ReportFormat, ReportKind, ReportOptions, } from "./reporter/mod.js
43
46
  export { ANTI_PATTERN_NOTE, computeScoreRollup, isProseScope, runLint, } from "./lint/mod.js";
44
47
  export type { EntryScore, LintDiagnostic, LintOptions, LintResult, RuleContribution, ScoreRollup, } from "./lint/mod.js";
45
48
  export * as typl from "./typl/mod.js";
46
- export { canonicalEdgeJson, checkDrift, extractEdgeQuads, hashCanonicalEdges, LOCKFILE_SCHEMA_VERSION, parseLockfile, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, serializeLockfile, sha256Bytes, sha256String, } from "./lock/mod.js";
47
- export type { BoundEntry as LockBoundEntry, BoundEntryBinding as LockBinding, EdgeQuad, FetchUrl, GeneratedCache, LockedAttributes, Lockfile, LockfileMeta, ParseLockfileResult, ReadFile as LockReadFile, ResolvedBoundEntry, ResolvedProfile, ResolvedReference, ResolvedRegistry, ResolvedUpstreams, ResolveUpstreamsOptions, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./lock/mod.js";
49
+ export { canonicalEdgeJson, checkDrift, extractEdgeQuads, hashCanonicalEdges, isBelowFloor, LOCKFILE_SCHEMA_VERSION, parseLockfile, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, serializeLockfile, sha256Bytes, sha256String, } from "./lock/mod.js";
50
+ export type { BoundEntry as LockBoundEntry, BoundEntryBinding as LockBinding, EdgeQuad, FetchUrl, GeneratedCache, LockedAttributes, Lockfile, LockfileMeta, LockfileToolchain, ParseLockfileResult, ReadFile as LockReadFile, ResolvedBoundEntry, ResolvedProfile, ResolvedReference, ResolvedRegistry, ResolvedUpstreams, ResolveUpstreamsOptions, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./lock/mod.js";
48
51
  export { aggregateStatusByState, encodeLogLine, inferLockedAttributes, parseLogLine, parseMapping, validateMappings, } from "./sync/mod.js";
49
52
  export type { AttributeMapping, BoundEntryStatus, ConflictPolicy, Direction as SyncDirection, Mapping, ParseMappingResult, RemoteState, SyncLogEntry, } from "./sync/mod.js";
53
+ export { type Arch as SelfUpgradeArch, classifyInstallPath, type ClassifyResult as SelfUpgradeClassifyResult, compareVersions, type Comparison, detectTarget, type InstallSource, type Os as SelfUpgradeOs, parseSha256Line, type Platform as SelfUpgradePlatform, platformFromBuild, type ReleaseAssets, releaseAssets, type Target as SelfUpgradeTarget, } from "./self_upgrade/mod.js";
50
54
  //# sourceMappingURL=mod.d.ts.map
package/esm/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,qBAAqB,CAAC;AAG7B,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV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AY,EACV,UAAU,IAAI,cAAc,EAC5B,iBAAiB,IAAI,WAAW,EAChC,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,QAAQ,IAAI,YAAY,EACxB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,SAAS,IAAI,aAAa,EAC1B,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,qBAAqB,CAAC;AAG7B,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,QAAQ,EACR,YAAY,EACZ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