@starci/hfs 4.9.4 → 4.9.6
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 +10 -0
- package/package.json +1 -1
- package/runtime/knowledge/hfs/canon-pins.yaml +7 -7
- package/runtime/knowledge/hfs/rules.yaml +47 -1
- package/runtime/modules/kernel/failure-codes.yaml +21 -0
- package/runtime/scripts/hfs/runtime-rules/hook-shape.mjs +4 -3
- package/templates/app/hooks/husky/pre-push +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.9.6 - 2026-10-28
|
|
4
|
+
|
|
5
|
+
- Changed: the bundled canon pins name hfs 4.9.6, the Grammar family 0.15.5 (grammar, eslint-grammar-core, eslint-grammar-offset-pop) and eslint-canon-fe 9.4.5.
|
|
6
|
+
- Changed: the app pre-push hook runs `node node_modules/starci-harness/dist/main.js deps check` after the bundled push gate (under `set -e`), so a push whose committed @starci pins npm cannot install, or whose local package copies run ahead of npm, is refused; RT_HOOK_SHAPE (R225) requires the call. Spec: `src/pre-push-hook.spec.mjs`.
|
|
7
|
+
|
|
8
|
+
## 4.9.5 - 2026-10-28
|
|
9
|
+
|
|
10
|
+
- Added: the bundled rule catalog carries R324 (`FE_PAGE_TABS_OUTSIDE_HEADER`, `page-tabs-in-header`) and R325 (`FE_ROUTE_PAGE_OUTSIDE_PAGE`, `route-page-is-one-page`), both enforced by `@starci/eslint-grammar-core`, and their failure-code guidance.
|
|
11
|
+
- Changed: the bundled canon pins follow release G (Grammar family 0.15.4, hfs 4.9.5, canon-fe 9.4.4, canon-be 3.6.4, ai-router 0.3.0); the mermaid pin names Grammar's MermaidDiagram as its owner.
|
|
12
|
+
|
|
3
13
|
## 4.9.4 - 2026-10-28
|
|
4
14
|
|
|
5
15
|
- Added: the bundled rule catalog carries R323 (`FE_PAGE_HEADER_HAND_ROLLED`, enforced by `@starci/eslint-grammar-core` `no-hand-rolled-page-header`) and its failure-code guidance.
|
package/package.json
CHANGED
|
@@ -31,35 +31,35 @@ pins:
|
|
|
31
31
|
source: packages/event-stream/package.json
|
|
32
32
|
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.'
|
|
33
33
|
'@starci/grammar':
|
|
34
|
-
version: 0.15.
|
|
34
|
+
version: 0.15.5
|
|
35
35
|
group: starci
|
|
36
36
|
install: registry
|
|
37
37
|
side: fe
|
|
38
38
|
source: packages/grammar/package.json
|
|
39
39
|
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.'
|
|
40
40
|
'@starci/eslint-canon-be':
|
|
41
|
-
version: 3.6.
|
|
41
|
+
version: 3.6.4
|
|
42
42
|
group: starci
|
|
43
43
|
install: registry
|
|
44
44
|
side: be
|
|
45
45
|
source: packages/eslint-canon-be/package.json
|
|
46
46
|
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.'
|
|
47
47
|
'@starci/eslint-canon-fe':
|
|
48
|
-
version: 9.4.
|
|
48
|
+
version: 9.4.5
|
|
49
49
|
group: starci
|
|
50
50
|
install: registry
|
|
51
51
|
side: fe
|
|
52
52
|
source: packages/eslint-canon-fe/package.json
|
|
53
53
|
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.'
|
|
54
54
|
'@starci/eslint-grammar-core':
|
|
55
|
-
version: 0.15.
|
|
55
|
+
version: 0.15.5
|
|
56
56
|
group: starci
|
|
57
57
|
install: registry
|
|
58
58
|
side: fe
|
|
59
59
|
source: packages/eslint-grammar-core/package.json
|
|
60
60
|
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
61
61
|
'@starci/eslint-grammar-offset-pop':
|
|
62
|
-
version: 0.15.
|
|
62
|
+
version: 0.15.5
|
|
63
63
|
group: starci
|
|
64
64
|
install: registry
|
|
65
65
|
side: fe
|
|
@@ -106,7 +106,7 @@ pins:
|
|
|
106
106
|
source: packages/ai-router/package.json
|
|
107
107
|
why: 'the AI pool router of a back end: a NestJS module that routes OpenAI-compatible chat, stream and embeddings calls across keys, models and providers, with @starci/ai-router/testing for its specs; @starci/jest-preset compiles it as an ESM-only dependency.'
|
|
108
108
|
'@starci/hfs':
|
|
109
|
-
version: 4.9.
|
|
109
|
+
version: 4.9.6
|
|
110
110
|
group: starci
|
|
111
111
|
install: registry
|
|
112
112
|
side: both
|
|
@@ -487,7 +487,7 @@ pins:
|
|
|
487
487
|
version: 11.16.0
|
|
488
488
|
group: ui
|
|
489
489
|
side: fe
|
|
490
|
-
why: '
|
|
490
|
+
why: 'runtime dependency of @starci/grammar for MermaidDiagram (fe-stack diagrams), imported lazily on the first diagram and themed from the grammar root; apps render diagrams through MermaidDiagram and never import mermaid.'
|
|
491
491
|
'react-dropzone':
|
|
492
492
|
version: 15.0.0
|
|
493
493
|
group: ui
|
|
@@ -3894,7 +3894,7 @@ rules:
|
|
|
3894
3894
|
- {kind: runtime, id: protected-zone, at: scripts/hfs/runtime-rules/rights-policy.mjs}
|
|
3895
3895
|
- id: R225
|
|
3896
3896
|
code: "RT_HOOK_SHAPE"
|
|
3897
|
-
law: "The app hook templates keep the gate model: pre-commit is L0 only (no typecheck or test run); pre-push invokes the bundled scripts/guards/release-push-gate.mjs policy for fast-forward main, a clean outgoing secret scan and annotated v* tags. It runs no build, test, typecheck or lint."
|
|
3897
|
+
law: "The app hook templates keep the gate model: pre-commit is L0 only (no typecheck or test run); pre-push invokes the bundled scripts/guards/release-push-gate.mjs policy for fast-forward main, a clean outgoing secret scan and annotated v* tags, then the harness's `starci deps check` (every committed @starci pin installable from npm, no local package copy ahead of npm). It runs no build, test, typecheck or lint."
|
|
3898
3898
|
scope: runtime
|
|
3899
3899
|
kinds: [check]
|
|
3900
3900
|
gates: [land, runtime]
|
|
@@ -5710,3 +5710,49 @@ rules:
|
|
|
5710
5710
|
source: owner
|
|
5711
5711
|
quote: "Publish Grammar 0.15.3 with PageHeader now, then move all 18 pages to it before deploying. (translated from Vietnamese)"
|
|
5712
5712
|
ruling: "A page is headed by Grammar's PageHeader (owner ruling page-header-band): a surface band whose content shares the page content's edges and which ends in its own full-width separator, page tabs standing on it; the lint refuses a page head composed by hand from Breadcrumbs and SectionHeader."
|
|
5713
|
+
- id: R324
|
|
5714
|
+
code: "FE_PAGE_TABS_OUTSIDE_HEADER"
|
|
5715
|
+
law: "Page tabs are the header's tabs; a Tabs that is the first element of a Page body or the next element after a PageHeader is a page tab bar drawn outside the band."
|
|
5716
|
+
kinds: [lint]
|
|
5717
|
+
gates: [pre-commit, settle, land, ci]
|
|
5718
|
+
failureCodes: ["FE_PAGE_TABS_OUTSIDE_HEADER"]
|
|
5719
|
+
enforcers:
|
|
5720
|
+
- {kind: eslint-grammar-core, id: page-tabs-in-header}
|
|
5721
|
+
editions: [lite, full]
|
|
5722
|
+
docs: [knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP]
|
|
5723
|
+
templateNa: "A template states no page; the pages are the app's."
|
|
5724
|
+
proves:
|
|
5725
|
+
- packages/eslint-grammar-core/src/page.spec.ts
|
|
5726
|
+
exemplifiedBy:
|
|
5727
|
+
- {path: packages/eslint-grammar-core/src/page.spec.ts, editions: [lite, full], codes: [FE_PAGE_TABS_OUTSIDE_HEADER]}
|
|
5728
|
+
witness:
|
|
5729
|
+
- {path: packages/eslint-grammar-core/src/page.spec.ts, editions: [lite, full], codes: [FE_PAGE_TABS_OUTSIDE_HEADER]}
|
|
5730
|
+
cases:
|
|
5731
|
+
- id: case-1
|
|
5732
|
+
date: "2026-10-28"
|
|
5733
|
+
source: owner
|
|
5734
|
+
quote: "ok trò"
|
|
5735
|
+
ruling: "A route page is one Grammar Page (owner ruling page-frame); page tabs are its header's tabs, and the lint refuses a Tabs at the top of the Page body or right after a PageHeader."
|
|
5736
|
+
- id: R325
|
|
5737
|
+
code: "FE_ROUTE_PAGE_OUTSIDE_PAGE"
|
|
5738
|
+
law: "A page owner draws one Grammar Page with nothing beside it; a sibling of the Page, or a bare PageHeader or PageContainer in the page owner, re-decides the inset and rhythm Page owns."
|
|
5739
|
+
kinds: [lint]
|
|
5740
|
+
gates: [pre-commit, settle, land, ci]
|
|
5741
|
+
failureCodes: ["FE_ROUTE_PAGE_OUTSIDE_PAGE"]
|
|
5742
|
+
enforcers:
|
|
5743
|
+
- {kind: eslint-grammar-core, id: route-page-is-one-page}
|
|
5744
|
+
editions: [lite, full]
|
|
5745
|
+
docs: [knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP]
|
|
5746
|
+
templateNa: "A template states no page; the pages are the app's."
|
|
5747
|
+
proves:
|
|
5748
|
+
- packages/eslint-grammar-core/src/page.spec.ts
|
|
5749
|
+
exemplifiedBy:
|
|
5750
|
+
- {path: packages/eslint-grammar-core/src/page.spec.ts, editions: [lite, full], codes: [FE_ROUTE_PAGE_OUTSIDE_PAGE]}
|
|
5751
|
+
witness:
|
|
5752
|
+
- {path: packages/eslint-grammar-core/src/page.spec.ts, editions: [lite, full], codes: [FE_ROUTE_PAGE_OUTSIDE_PAGE]}
|
|
5753
|
+
cases:
|
|
5754
|
+
- id: case-1
|
|
5755
|
+
date: "2026-10-28"
|
|
5756
|
+
source: owner
|
|
5757
|
+
quote: "ok trò"
|
|
5758
|
+
ruling: "A route page is one Grammar Page (owner ruling page-frame): the single owner of the page inset and rhythm; the lint refuses a sibling beside the Page and a bare PageHeader or PageContainer in a page owner."
|
|
@@ -2734,6 +2734,16 @@ FE_PAGE_METADATA_MISSING:
|
|
|
2734
2734
|
owner: op-retry
|
|
2735
2735
|
kind: check-finding
|
|
2736
2736
|
|
|
2737
|
+
FE_PAGE_TABS_OUTSIDE_HEADER:
|
|
2738
|
+
title: "Page tabs are drawn outside the page header band"
|
|
2739
|
+
title_vi: "Tab của trang nằm ngoài dải đầu trang"
|
|
2740
|
+
meaning_vi: "Tại <file>, một Tabs đứng đầu thân Page hoặc ngay sau PageHeader: thanh tab của trang không đứng trên đường phân cách của dải đầu trang mà lấy khoảng đệm và khoảng cách của thân trang."
|
|
2741
|
+
causes_vi:
|
|
2742
|
+
- "Đặt Tabs làm phần tử đầu tiên trong Page hoặc ngay sau PageHeader."
|
|
2743
|
+
nextStep_vi: "Truyền tab qua header.tabs của Page (hoặc tabs của PageHeader): { label, items, selectedKey, onSelect } (quy định page-frame)."
|
|
2744
|
+
owner: op-retry
|
|
2745
|
+
kind: check-finding
|
|
2746
|
+
|
|
2737
2747
|
FE_PROPS_MUTABLE:
|
|
2738
2748
|
title: "Component props can be written"
|
|
2739
2749
|
title_vi: "Props của component có thể bị ghi"
|
|
@@ -2874,6 +2884,17 @@ FE_ROUTE_ONE_PAGE:
|
|
|
2874
2884
|
owner: other-op:interface.implement
|
|
2875
2885
|
kind: check-finding
|
|
2876
2886
|
|
|
2887
|
+
FE_ROUTE_PAGE_OUTSIDE_PAGE:
|
|
2888
|
+
title: "A page owner draws something outside its Page"
|
|
2889
|
+
title_vi: "Trang vẽ nội dung nằm ngoài Page"
|
|
2890
|
+
meaning_vi: "Tại <file>, page owner vẽ một phần tử bên cạnh Page, hoặc tự dùng PageHeader hay PageContainer: khoảng đệm và nhịp dọc của trang bị quyết định lại ngoài Page."
|
|
2891
|
+
causes_vi:
|
|
2892
|
+
- "Đặt banner, footer hay khối khác cạnh Page trong page owner."
|
|
2893
|
+
- "Ghép PageHeader và PageContainer bằng tay thay vì dùng Page."
|
|
2894
|
+
nextStep_vi: "Vẽ đúng một Page: dải đầu trang là header, mọi thứ khác trong thân, measure là measure của Page (quy định page-frame)."
|
|
2895
|
+
owner: op-retry
|
|
2896
|
+
kind: check-finding
|
|
2897
|
+
|
|
2877
2898
|
FE_SERVER_ACTION_FORBIDDEN:
|
|
2878
2899
|
title: "A front-end file carries a `\"use server\"` directive"
|
|
2879
2900
|
title_vi: "Front end có Server Action (\"use server\")"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// hook-shape.mjs - RT_HOOK_SHAPE (knowledge/hfs/rules.yaml, gate runtime): the app hook templates keep the gate model.
|
|
2
2
|
// pre-commit L0 only: no typecheck and no test run (`test:` scripts, npm test, jest, vitest, a spec). Types and the targeted specs
|
|
3
3
|
// belong to the op gate.
|
|
4
|
-
// pre-push the bundled push gate owns fast-forward main, annotated tags and the secret scan
|
|
4
|
+
// pre-push the bundled push gate owns fast-forward main, annotated tags and the secret scan, then `starci deps check` the
|
|
5
|
+
// app's @starci pins; no build, test or lint run.
|
|
5
6
|
// Guard hooks keep their host timeout above the runtime's own input, verdict, cleanup and output budgets.
|
|
6
7
|
// Comments are not judged (the templates explain what they do not run). Pure apart from ctx.read.
|
|
7
8
|
import { shellCommandSource } from '../../lib/shell-source.mjs';
|
|
@@ -23,7 +24,7 @@ const PRE_PUSH_FORBIDDEN = [
|
|
|
23
24
|
[/\btypecheck\b/, 'a typecheck'],
|
|
24
25
|
[/\blint\b/, 'a lint run'],
|
|
25
26
|
];
|
|
26
|
-
const PRE_PUSH_MARKERS = ["node --input-type=module -e", "import { main } from '@starci/hfs/runtime/scripts/guards/release-push-gate.mjs'", 'process.exit(await main())'];
|
|
27
|
+
const PRE_PUSH_MARKERS = ["node --input-type=module -e", "import { main } from '@starci/hfs/runtime/scripts/guards/release-push-gate.mjs'", 'process.exit(await main())', 'node node_modules/starci-harness/dist/main.js deps check'];
|
|
27
28
|
|
|
28
29
|
const finding = (file, message) => ({ code: CODE, level: 'error', path: file, message: `${CODE} ${file}: ${message}` });
|
|
29
30
|
|
|
@@ -39,7 +40,7 @@ function fileHookShapeFindings({ path: file, name, text }) {
|
|
|
39
40
|
const missing = PRE_PUSH_MARKERS.filter((marker) => !body.includes(marker));
|
|
40
41
|
if (missing.length) {
|
|
41
42
|
const markers = missing.map((m) => `\`${m}\``).join(', ');
|
|
42
|
-
found.push(finding(file, `the push gate lacks the bundled gate marker${missing.length === 1 ? '' : 's'} ${markers}; it must invoke the shared fast-forward, annotation and secret-scan policy`));
|
|
43
|
+
found.push(finding(file, `the push gate lacks the bundled gate marker${missing.length === 1 ? '' : 's'} ${markers}; it must invoke the shared fast-forward, annotation and secret-scan policy and the dependency push gate`));
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
return found;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{{header}}
|
|
2
2
|
# Push gate: fast-forward main with a clean secret scan, annotated v* tags, and bounded ref input.
|
|
3
|
-
# The bundled gate owns the policy; backups and lane refs use the same policy as the runtime.
|
|
3
|
+
# The bundled gate owns the policy; backups and lane refs use the same policy as the runtime. Then the harness refuses a
|
|
4
|
+
# committed @starci pin npm cannot install, or a local package copy ahead of npm (starci deps check).
|
|
5
|
+
set -e
|
|
4
6
|
node --input-type=module -e "import { main } from '@starci/hfs/runtime/scripts/guards/release-push-gate.mjs'; process.exit(await main());"
|
|
7
|
+
node node_modules/starci-harness/dist/main.js deps check
|