@starci/eslint-canon-fe 9.1.11 → 9.1.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.1.12 - 2026-10-27
4
+
5
+ - Changed: owner ruling two-grammars: the bundled Grammar catalog names the core family `core` and carries the one alias table (`familyAliases`: `starci`, `starci-core` -> `core`); the bundled grammar-lint resolver answers by the canonical id, so a front end with `sides.fe.grammar: core` resolves its component contract and lint family. The runtime copy is refreshed from starci-academy-backend/.claude 180193f12 (canon pins: the Grammar family 0.12.15, hfs 4.7.48). No rule changes.
6
+
3
7
  ## 9.1.11 - 2026-10-27
4
8
 
5
9
  - Changed: licensed MIT (was UNLICENSED); the package metadata names the repository, homepage and bugs so npm can attach provenance. No rule or behaviour changed.
package/README.md CHANGED
@@ -51,6 +51,6 @@ Regression specs belong to this package. Application front ends and Grammar libr
51
51
 
52
52
  `runtime/` holds the StarCi runtime files the rules import (the slot manifest and view, the project graph and the
53
53
  architecture machine it runs, the Sonar syntax rules), byte for byte at their runtime paths. In this repository it is a
54
- committed snapshot taken from the legacy runtime (starci-academy-backend/.claude at 7424b89ca), where
54
+ committed snapshot taken from the legacy runtime (starci-academy-backend/.claude at 180193f12), where
55
55
  `scripts/hfs/sync-runtime.mjs` generates it; refresh it by running that generator there and copying
56
56
  `packages/eslint/fe/runtime/` over this folder. Nothing in this package edits it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-canon-fe",
3
- "version": "9.1.11",
3
+ "version": "9.1.12",
4
4
  "description": "Universal front-end lint laws for TypeScript and Next.js, independent of the selected Grammar family.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -66,6 +66,12 @@ topics:
66
66
  title: Heritage Grammar
67
67
  summary: |
68
68
  Generated snapshot of the Heritage family's parity declaration, arrangement, scoped tokens and Common renderers.
69
+ # The one alias table of Grammar family ids (ruling two-grammars, 2026-10-27): `core` is the canonical id of the
70
+ # legacy core grammar; the legacy catalog id `starci` and the DNA id `starci-core` are deprecated spellings that
71
+ # resolve to it. Every reader resolves a selection through scripts/lib/grammar-lint.mjs, never through its own list.
72
+ familyAliases:
73
+ starci: core
74
+ starci-core: core
69
75
  families:
70
76
  - id: heritage
71
77
  title: heritage
@@ -85,8 +91,8 @@ families:
85
91
  (`defineGrammarFamily`), not a family that ships a palette, so `authority`, `reusableStyle`,
86
92
  `productComposition` and `index` have nothing to name here. Universal semantics, renderer anatomy,
87
93
  state and accessibility remain owned by knowledge/ui.
88
- - id: starci
89
- title: starci
94
+ - id: core
95
+ title: core
90
96
  contractRef: common
91
97
  lint:
92
98
  package: '@starci/eslint-grammar-starci'
@@ -30,35 +30,35 @@ pins:
30
30
  source: packages/event-stream/package.json
31
31
  why: 'the one server-sent-events client of every front end (fe-stack event-stream, owner:event-stream-package): the transport client layer (modules/api/sse/clients) creates one instance for the app with the bearer token source and the stream operations follow on it; it carries Last-Event-ID resume, the capped doubling backoff, the heartbeat timeout, the single 401 renewal and the useSWRSubscription adapter, so no app keeps a hand-written reader.'
32
32
  '@starci/grammar':
33
- version: 0.12.13
33
+ version: 0.12.15
34
34
  group: starci
35
35
  install: registry
36
36
  side: fe
37
37
  source: packages/grammar/package.json
38
38
  why: 'the grammar front ends read: the brand layer sets `--font-sans` and `--font-mono` and the grammar reads them; it carries the Input tel kind, the copyable and read-only Input, the IconButton disclosure props and count badge, ChatBubble, FillViewport, Textarea mentions and Enter-to-send, the leading PrimaryRailLayout rail, the plate-less Image, ListRow, the soft Alert, Progress steps, the floating primary IconButton, FlowGraph, the STATE-8 loading views and the bordered selectable TagGroup chips. The runtime source version wins for a @starci package.'
39
39
  '@starci/eslint-canon-be':
40
- version: 3.4.55
40
+ version: 3.4.56
41
41
  group: starci
42
42
  install: registry
43
43
  side: be
44
44
  source: packages/eslint/be/package.json
45
45
  why: 'the back-end ESLint canon: `loadHfs(import.meta.url)` of be/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the be side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; `starciBeConfig({ hfs: loadHfs(import.meta.url) })` is the typed factory and the BE-CONVENTION laws are its rules.'
46
46
  '@starci/eslint-canon-fe':
47
- version: 9.1.9
47
+ version: 9.1.10
48
48
  group: starci
49
49
  install: registry
50
50
  side: fe
51
51
  source: packages/eslint/fe/package.json
52
52
  why: 'the front-end ESLint canon: `loadHfs(import.meta.url)` of fe/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the fe side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; the front end has no tests (FE_NO_TESTS R97 in hfs) and no-vietnamese-in-source (R91) applies.'
53
53
  '@starci/eslint-grammar-starci':
54
- version: 0.12.13
54
+ version: 0.12.15
55
55
  group: starci
56
56
  install: registry
57
57
  side: fe
58
58
  source: packages/eslint/grammar-starci/package.json
59
59
  why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
60
60
  '@starci/eslint-grammar-offset-pop':
61
- version: 0.12.13
61
+ version: 0.12.15
62
62
  group: starci
63
63
  install: registry
64
64
  side: fe
@@ -98,14 +98,14 @@ pins:
98
98
  source: packages/test-world/package.json
99
99
  why: 'the shared e2e library of every back end (R47, R48), a devDependency of every back end: the warm stack behind toxiproxy, the network-edge fakes, the Nest boot, the typed useTestWorld handle, useSandbox for contract specs and the outage lock. Kafka is real own infra (the one digest-pinned apache/kafka KRaft image, a broker listener and proxy per slot, slot-prefixed topics, consumer groups and client ids) and Postgres is schema-per-context (a schema and a login role per context in a shared database). Each worker has its own data slot (<ns>_w<k>) with its own databases, Keycloak realm, leased Redis DB, bucket/collection/topic prefixes, fakes host, toxiproxy proxies and outage lock; a run provisions min(jest workers, workers cap, default 2) slots, and state file protocol 2 pairs exactly with @starci/jest-preset (TEST_WORLD_PAIR_MISMATCH otherwise). A modules world boots real peer apps beside its modules, world.apps.<name>.during(fn) is the outage of a peer app, w.keycloak.clientSecret(client) answers the run-generated secret of a confidential realm client, world.keycloak.events/sessions read the realm user events and live sessions, world.infra.postgresql.connection(name) takes one database connection down while the others serve, and world.resolve and scope.resolve take any Nest token. Every path a declaration names (`stack`, seeds, the realm, Dockerfiles) resolves from the app root (the directory of hfs.json); the globalSetup registers the path aliases as TypeScript resolves them. Its CLI main is exported at ./cli for starci app stack.'
100
100
  '@starci/cli':
101
- version: 1.7.46
101
+ version: 1.7.47
102
102
  group: starci
103
103
  install: registry
104
104
  side: both
105
105
  source: packages/cli/package.json
106
106
  why: 'the only StarCi command package; product repositories install it for starci app, while @starci/hfs remains its pinned transitive implementation.'
107
107
  '@starci/hfs':
108
- version: 4.7.46
108
+ version: 4.7.48
109
109
  group: starci
110
110
  install: registry
111
111
  side: both
@@ -4,33 +4,66 @@ import { parseYamlCached } from './yaml-cached.mjs';
4
4
 
5
5
  const CATALOG_FILE = new URL('../../knowledge/grammars/index.yaml', import.meta.url);
6
6
 
7
+ function readCatalog() {
8
+ return parseYamlCached(fs.readFileSync(CATALOG_FILE, 'utf8'));
9
+ }
10
+
11
+ /** The catalog's one alias table: a deprecated id names exactly one canonical family and is never itself a family. */
12
+ function aliasTarget(catalog, family) {
13
+ const aliases = catalog.familyAliases ?? {};
14
+ if (!Object.hasOwn(aliases, family)) return null;
15
+ const target = aliases[family];
16
+ if (typeof target !== 'string' || Object.hasOwn(aliases, target)
17
+ || (catalog.families ?? []).some(entry => entry.id === family)) {
18
+ throw new Error(`Grammar family alias ${family} in knowledge/grammars/index.yaml must name one canonical family`);
19
+ }
20
+ return target;
21
+ }
22
+
7
23
  function selectedFamily(family) {
8
24
  if (typeof family !== 'string' || !family.trim()) throw new Error('sides.fe.grammar must explicitly name the selected Grammar family');
9
- const catalog = parseYamlCached(fs.readFileSync(CATALOG_FILE, 'utf8'));
10
- const matches = (catalog.families ?? []).filter(entry => entry.id === family);
25
+ const catalog = readCatalog();
26
+ const id = aliasTarget(catalog, family) ?? family;
27
+ const matches = (catalog.families ?? []).filter(entry => entry.id === id);
11
28
  if (matches.length !== 1) throw new Error(`Grammar family ${family} has no declared lint contract in knowledge/grammars/index.yaml`);
12
29
  return { catalog, selected: matches[0] };
13
30
  }
14
31
 
32
+ /**
33
+ * Resolve a selection to its canonical family id through the catalog's alias table.
34
+ * @param {string} family - The id an app or caller names (sides.fe.grammar).
35
+ * @returns {{ id: string, alias: string | null, note: string | null }} The canonical id; for a deprecated alias, the alias and a note naming the canonical id.
36
+ */
37
+ export function resolveGrammarFamily(family) {
38
+ const { selected } = selectedFamily(family);
39
+ if (selected.id === family) return Object.freeze({ id: family, alias: null, note: null });
40
+ return Object.freeze({
41
+ id: selected.id,
42
+ alias: family,
43
+ note: `Grammar family id ${family} is a deprecated alias of ${selected.id}; write sides.fe.grammar: ${selected.id}`,
44
+ });
45
+ }
46
+
15
47
  /** The explicitly selected authored family entry; callers share the catalog lookup rather than inferring a family. */
16
48
  export function grammarFamilyFor(family) {
17
49
  return Object.freeze(selectedFamily(family).selected);
18
50
  }
19
51
 
20
- /** The declared family's lint contract, including an explicit null package when that family has no rules. */
52
+ /** The declared family's lint contract (keyed by the canonical id), including an explicit null package when that family has no rules. */
21
53
  export function grammarLintFor(family) {
22
54
  const { selected } = selectedFamily(family);
23
55
  if (!selected.lint || !Object.hasOwn(selected.lint, 'package')) {
24
56
  throw new Error(`Grammar family ${family} has no declared lint contract in knowledge/grammars/index.yaml`);
25
57
  }
26
58
  const lint = selected.lint;
27
- if (lint.package === null) return Object.freeze({ family, package: null });
59
+ const canonical = selected.id;
60
+ if (lint.package === null) return Object.freeze({ family: canonical, package: null });
28
61
  if (typeof lint.package !== 'string' || !lint.package.startsWith('@starci/eslint-grammar-')
29
62
  || typeof lint.factory !== 'string' || !/^[a-zA-Z][a-zA-Z0-9]*$/.test(lint.factory)
30
63
  || typeof lint.prefix !== 'string' || !/^[a-z][a-z0-9-]*$/.test(lint.prefix)) {
31
64
  throw new Error(`Grammar family ${family} has an invalid lint contract in knowledge/grammars/index.yaml`);
32
65
  }
33
- return Object.freeze({ family, package: lint.package, factory: lint.factory, prefix: lint.prefix });
66
+ return Object.freeze({ family: canonical, package: lint.package, factory: lint.factory, prefix: lint.prefix });
34
67
  }
35
68
 
36
69
  /** The selected family's shared component/export contract, resolved through its catalog reference. */