@starci/eslint-grammar-offset-pop 0.15.32 → 0.16.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +2 -2
  3. package/runtime/bundle.json +52 -0
  4. package/runtime/engine/by-code-unit.mjs +6 -6
  5. package/runtime/engine/model-config.mjs +98 -76
  6. package/runtime/engine/orca-config.mjs +22 -17
  7. package/runtime/engine/release-config.mjs +22 -18
  8. package/runtime/engine/removed-vocabulary.mjs +21 -20
  9. package/runtime/engine/resources-config.mjs +42 -35
  10. package/runtime/engine/runtime-root.mjs +11 -13
  11. package/runtime/engine/secrets.mjs +170 -102
  12. package/runtime/engine/sonar-config.mjs +16 -13
  13. package/runtime/knowledge/hfs/canon-pins.yaml +10 -10
  14. package/runtime/knowledge/hfs/slots.yaml +2 -2
  15. package/runtime/scripts/hfs/allows.mjs +37 -38
  16. package/runtime/scripts/hfs/declaration-shape.mjs +140 -103
  17. package/runtime/scripts/hfs/declaration-slots.mjs +64 -61
  18. package/runtime/scripts/hfs/edition-slots.mjs +43 -40
  19. package/runtime/scripts/hfs/param-names.mjs +6 -11
  20. package/runtime/scripts/hfs/rule-catalog.mjs +353 -257
  21. package/runtime/scripts/hfs/rule-params-shape.mjs +60 -47
  22. package/runtime/scripts/hfs/slot-app-view.mjs +69 -74
  23. package/runtime/scripts/hfs/slot-classify.mjs +42 -38
  24. package/runtime/scripts/hfs/slot-errors.mjs +8 -7
  25. package/runtime/scripts/hfs/slot-imports.mjs +70 -63
  26. package/runtime/scripts/hfs/slot-manifest-shape.mjs +74 -52
  27. package/runtime/scripts/hfs/slot-match.mjs +122 -111
  28. package/runtime/scripts/hfs/slot-path.mjs +0 -2
  29. package/runtime/scripts/hfs/slot-required.mjs +65 -59
  30. package/runtime/scripts/hfs/slot-semantic-problems.mjs +138 -112
  31. package/runtime/scripts/hfs/slot-side-problems.mjs +23 -19
  32. package/runtime/scripts/hfs/slots.mjs +175 -152
  33. package/runtime/scripts/hfs/view.mjs +38 -40
  34. package/runtime/scripts/lib/glob.mjs +23 -14
  35. package/runtime/scripts/lib/i18n.mjs +32 -35
  36. package/runtime/scripts/lib/json-clone.mjs +45 -36
  37. package/runtime/scripts/lib/list.mjs +9 -14
  38. package/runtime/scripts/lib/path-key.mjs +53 -38
  39. package/runtime/scripts/lib/regex.mjs +1 -2
  40. package/runtime/scripts/lib/yaml-cached.mjs +4 -4
@@ -1,134 +1,202 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
-
4
3
  /** The host-local credential filename, resolved only against a verified runtime main root. */
5
- export const SECRET_ENV_FILE='secret.env';
4
+ export const SECRET_ENV_FILE = 'secret.env';
6
5
  /** The configured credential variable grammar shared by validation and secret resolution. */
7
- export const ENV_NAME=/^[A-Z_][A-Z0-9_]{0,63}$/;
8
- export const CREDENTIAL_FILE_MAX_BYTES=1024*1024;
6
+ export const ENV_NAME = /^[A-Z_][A-Z0-9_]{0,63}$/;
7
+ export const CREDENTIAL_FILE_MAX_BYTES = 1024 * 1024;
9
8
  const resolvedValues = new Set();
10
- const remember = value => {
11
- if (typeof value === 'string' && value.length >= 6) resolvedValues.add(value);
12
- return value;
9
+ const remember = (value) => {
10
+ if (typeof value === 'string' && value.length >= 6)
11
+ resolvedValues.add(value);
12
+ return value;
13
13
  };
14
-
15
14
  /** Filter credentials resolved by this process; the values never leave their resolution owner. */
16
15
  export function redactResolvedSecrets(text) {
17
- let clean = text;
18
- for (const value of resolvedValues) if (clean.includes(value)) clean = clean.split(value).join('[redacted:resolved-secret]');
19
- return clean;
16
+ let clean = text;
17
+ for (const value of resolvedValues)
18
+ if (clean.includes(value))
19
+ clean = clean.split(value).join('[redacted:resolved-secret]');
20
+ return clean;
20
21
  }
21
-
22
22
  /** Check lexical availability only; blank and conventional template markers never prove provider validity. */
23
- export function credentialPresent(value){
24
- if(typeof value!=='string'||!value.trim())return false;
25
- return !/^(?:CHANGE_ME|REPLACE_ME|PLACEHOLDER|TODO|<[^>]*>|YOUR_[A-Z0-9_]+)$/i.test(value.trim());
23
+ export function credentialPresent(value) {
24
+ if (typeof value !== 'string' || !value.trim())
25
+ return false;
26
+ return !/^(?:CHANGE_ME|REPLACE_ME|PLACEHOLDER|TODO|<[^>]*>|YOUR_[A-Z0-9_]+)$/i.test(value.trim());
26
27
  }
27
-
28
28
  /** Read one configured credential file with a finite byte budget; no effects beyond the read. */
29
- export function readSecretBytes(file){
30
- const before=fs.lstatSync(file);
31
- if(!before.isFile()||before.isSymbolicLink())throw new Error('credential file must be a regular file');
32
- if(before.size>CREDENTIAL_FILE_MAX_BYTES)throw new Error('credential file exceeds the byte budget');
33
- const fd=fs.openSync(file,fs.constants.O_RDONLY|(fs.constants.O_NOFOLLOW??0));
34
- let bytes;
35
- try{
36
- const stat=fs.fstatSync(fd);
37
- if(!stat.isFile()||stat.dev!==before.dev||stat.ino!==before.ino)throw new Error('credential file changed during resolution');
38
- bytes=Buffer.alloc(CREDENTIAL_FILE_MAX_BYTES+1);
39
- let count=0;
40
- while(count<bytes.length){const n=fs.readSync(fd,bytes,count,bytes.length-count,null);if(n===0){break;}count+=n;}
41
- if(count>CREDENTIAL_FILE_MAX_BYTES)throw new Error('credential file exceeds the byte budget');
42
- return bytes.subarray(0,count);
43
- }catch(error){bytes?.fill(0);throw error;}finally{fs.closeSync(fd);}
29
+ export function readSecretBytes(file) {
30
+ const before = fs.lstatSync(file);
31
+ if (!before.isFile() || before.isSymbolicLink())
32
+ throw new Error('credential file must be a regular file');
33
+ if (before.size > CREDENTIAL_FILE_MAX_BYTES)
34
+ throw new Error('credential file exceeds the byte budget');
35
+ const fd = fs.openSync(file, fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW ?? 0));
36
+ let bytes;
37
+ try {
38
+ const stat = fs.fstatSync(fd);
39
+ if (!stat.isFile() || stat.dev !== before.dev || stat.ino !== before.ino)
40
+ throw new Error('credential file changed during resolution');
41
+ bytes = Buffer.alloc(CREDENTIAL_FILE_MAX_BYTES + 1);
42
+ let count = 0;
43
+ while (count < bytes.length) {
44
+ const n = fs.readSync(fd, bytes, count, bytes.length - count, null);
45
+ if (n === 0) {
46
+ break;
47
+ }
48
+ count += n;
49
+ }
50
+ if (count > CREDENTIAL_FILE_MAX_BYTES)
51
+ throw new Error('credential file exceeds the byte budget');
52
+ return bytes.subarray(0, count);
53
+ }
54
+ catch (error) {
55
+ bytes?.fill(0);
56
+ throw error;
57
+ }
58
+ finally {
59
+ fs.closeSync(fd);
60
+ }
44
61
  }
45
-
46
- const readCredentialFile = file => { const bytes=readSecretBytes(file); try{return bytes.toString('utf8');}finally{bytes.fill(0);} };
47
-
48
- const DOTENV_LINE_PARTS = [String.raw`^\s*`, String.raw`(?:export\s+)?`, String.raw`([A-Za-z_]\w*)`, String.raw`\s*=\s*`, String.raw`([^\r\n\u2028\u2029]*)`, String.raw`\s*$`];
62
+ const readCredentialFile = (file) => { const bytes = readSecretBytes(file); try {
63
+ return bytes.toString('utf8');
64
+ }
65
+ finally {
66
+ bytes.fill(0);
67
+ } };
68
+ const DOTENV_LINE_PARTS = [String.raw `^\s*`, String.raw `(?:export\s+)?`, String.raw `([A-Za-z_]\w*)`, String.raw `\s*=\s*`, String.raw `([^\r\n\u2028\u2029]*)`, String.raw `\s*$`];
49
69
  const DOTENV_LINE = new RegExp(DOTENV_LINE_PARTS.join(''));
50
-
51
70
  /** Parse a dotenv file (KEY=VALUE lines, # comments, optional export/quotes). An absent file is {}. */
52
- export function readDotenv(file){
53
- let text='';try{text=readCredentialFile(file);}catch(error){if(error?.code==='ENOENT'){return {};}throw error;}
54
- const out={};
55
- for(const line of text.split(/\r?\n/)){
56
- const m=DOTENV_LINE.exec(line);
57
- if(!m)continue;
58
- let value=m[2].trimEnd();
59
- if(value.length>=2&&(value.startsWith('"')||value.startsWith("'"))&&value.at(-1)===value[0])value=value.slice(1,-1);
60
- out[m[1]]=value;
61
- }
62
- return out;
71
+ export function readDotenv(file) {
72
+ let text = '';
73
+ try {
74
+ text = readCredentialFile(file);
75
+ }
76
+ catch (error) {
77
+ if (error?.code === 'ENOENT') {
78
+ return {};
79
+ }
80
+ throw error;
81
+ }
82
+ const out = {};
83
+ for (const line of text.split(/\r?\n/)) {
84
+ const m = DOTENV_LINE.exec(line);
85
+ if (!m)
86
+ continue;
87
+ const name = m[1];
88
+ let value = m[2].trimEnd();
89
+ if (value.length >= 2 && (value.startsWith('"') || value.startsWith("'")) && value.at(-1) === value[0])
90
+ value = value.slice(1, -1);
91
+ out[name] = value;
92
+ }
93
+ return out;
63
94
  }
64
-
65
95
  /**
66
96
  * Resolve a configured variable or its supported NAME_FILE custody pointer. An explicitly supplied
67
97
  * blank variable disables the value; it must not resurrect a file value. Never print the result.
68
98
  */
69
- export function connectorSecret(name,env=process.env){
70
- if(typeof name!=='string'||!ENV_NAME.test(name))return null;
71
- if(Object.hasOwn(env,name))return typeof env[name]==='string'?remember(env[name].trim()||null):null;
72
- const pointer=typeof env[`${name}_FILE`]==='string'?env[`${name}_FILE`].trim():'';
73
- if(!pointer)return null;
74
- try{const value=readCredentialFile(pointer).trim();return remember(value||null);}catch{return null;}
99
+ export function connectorSecret(name, env = process.env) {
100
+ if (typeof name !== 'string' || !ENV_NAME.test(name))
101
+ return null;
102
+ const direct = env[name];
103
+ if (Object.hasOwn(env, name))
104
+ return typeof direct === 'string' ? remember(direct.trim() || null) : null;
105
+ const filePointer = env[`${name}_FILE`];
106
+ const pointer = typeof filePointer === 'string' ? filePointer.trim() : '';
107
+ if (!pointer)
108
+ return null;
109
+ try {
110
+ const value = readCredentialFile(pointer).trim();
111
+ return remember(value || null);
112
+ }
113
+ catch {
114
+ return null;
115
+ }
75
116
  }
76
-
77
117
  /**
78
118
  * Load the verified runtime main's local credentials below the actual environment without mutating
79
119
  * either input. The caller owns repository identity; this base-tier reader never infers a root from cwd.
80
120
  * Absence is allowed so the action-specific gate can name only the credentials that action requires.
81
121
  */
82
- export function secretEnv(verifiedRuntimeRoot,env=process.env){
83
- if(typeof verifiedRuntimeRoot!=='string'||!path.isAbsolute(verifiedRuntimeRoot))
84
- throw new TypeError('secretEnv requires an absolute verified runtime root');
85
- if(env===null||typeof env!=='object'||Array.isArray(env))throw new TypeError('secretEnv requires an environment mapping');
86
- const root=fs.lstatSync(verifiedRuntimeRoot);
87
- if(!root.isDirectory()||root.isSymbolicLink())throw new Error('secretEnv runtime root must be a regular directory');
88
- const file=path.join(verifiedRuntimeRoot,SECRET_ENV_FILE);
89
- let stat;
90
- try{stat=fs.lstatSync(file);}catch(error){if(error?.code==='ENOENT'){return {...env};}throw error;}
91
- if(!stat.isFile()||stat.isSymbolicLink())throw new Error('secret.env must be a regular file');
92
- const local = readDotenv(file);
93
- const resolved = {...local,...env};
94
- for (const name of Object.keys(local)) if (typeof resolved[name] === 'string') remember(resolved[name]);
95
- return resolved;
122
+ export function secretEnv(verifiedRuntimeRoot, env = process.env) {
123
+ if (typeof verifiedRuntimeRoot !== 'string' || !path.isAbsolute(verifiedRuntimeRoot))
124
+ throw new TypeError('secretEnv requires an absolute verified runtime root');
125
+ if (env === null || typeof env !== 'object' || Array.isArray(env))
126
+ throw new TypeError('secretEnv requires an environment mapping');
127
+ const root = fs.lstatSync(verifiedRuntimeRoot);
128
+ if (!root.isDirectory() || root.isSymbolicLink())
129
+ throw new Error('secretEnv runtime root must be a regular directory');
130
+ const file = path.join(verifiedRuntimeRoot, SECRET_ENV_FILE);
131
+ let stat;
132
+ try {
133
+ stat = fs.lstatSync(file);
134
+ }
135
+ catch (error) {
136
+ if (error?.code === 'ENOENT') {
137
+ return { ...env };
138
+ }
139
+ throw error;
140
+ }
141
+ if (!stat.isFile() || stat.isSymbolicLink())
142
+ throw new Error('secret.env must be a regular file');
143
+ const local = readDotenv(file);
144
+ const resolved = { ...local, ...env };
145
+ for (const name of Object.keys(local))
146
+ if (typeof resolved[name] === 'string')
147
+ remember(resolved[name]);
148
+ return resolved;
96
149
  }
97
-
98
- const sopsRefuse=(reason,message)=>{
99
- const error=new Error(`SOPS identity [${reason}]: ${message}`);
100
- error.name='SopsIdentityRefusal';error.identityRefusal=reason;
101
- return {mode:'refused',env:null,error};
150
+ const sopsRefuse = (reason, message) => {
151
+ const error = new Error(`SOPS identity [${reason}]: ${message}`);
152
+ error.name = 'SopsIdentityRefusal';
153
+ error.identityRefusal = reason;
154
+ return { mode: 'refused', env: null, error };
102
155
  };
103
- const sopsInlineIdentity=(env,name)=>{
104
- if(!credentialPresent(env[name]))return sopsRefuse('disabled-inline','SOPS_AGE_KEY is explicitly empty or invalid');
105
- remember(env[name].trim());
106
- return {...sopsRefuse('inline-context-unqualified','the supplied SOPS_AGE_KEY awaits an owned selected-identity isolation capability; no SOPS process was launched'),inlineName:name};
156
+ const sopsInlineIdentity = (env, name) => {
157
+ const inline = env[name];
158
+ if (!credentialPresent(inline))
159
+ return sopsRefuse('disabled-inline', 'SOPS_AGE_KEY is explicitly empty or invalid');
160
+ remember(inline.trim());
161
+ return { ...sopsRefuse('inline-context-unqualified', 'the supplied SOPS_AGE_KEY awaits an owned selected-identity isolation capability; no SOPS process was launched'), inlineName: name };
107
162
  };
108
- const sopsFileIdentity=(env,file)=>{
109
- if(!credentialPresent(file))return sopsRefuse('invalid-file','the original identity file selection is empty or invalid');
110
- if(!path.isAbsolute(file))return sopsRefuse('identity-file-location-unqualified','select the original identity by its absolute path; caller and SOPS working directories may differ');
111
- try{
112
- const stat=fs.lstatSync(file);
113
- if(!stat.isFile()||stat.isSymbolicLink())return sopsRefuse('identity-file-unavailable','the explicitly selected original identity must be a regular non-symlink file');
114
- }catch{return sopsRefuse('identity-file-unavailable','the explicitly selected original identity file is unavailable');}
115
- return {mode:'file',env:{...env,SOPS_AGE_KEY_FILE:file},error:null};
163
+ const sopsFileIdentity = (env, file) => {
164
+ if (!credentialPresent(file))
165
+ return sopsRefuse('invalid-file', 'the original identity file selection is empty or invalid');
166
+ if (!path.isAbsolute(file))
167
+ return sopsRefuse('identity-file-location-unqualified', 'select the original identity by its absolute path; caller and SOPS working directories may differ');
168
+ try {
169
+ const stat = fs.lstatSync(file);
170
+ if (!stat.isFile() || stat.isSymbolicLink())
171
+ return sopsRefuse('identity-file-unavailable', 'the explicitly selected original identity must be a regular non-symlink file');
172
+ }
173
+ catch {
174
+ return sopsRefuse('identity-file-unavailable', 'the explicitly selected original identity file is unavailable');
175
+ }
176
+ return { mode: 'file', env: { ...env, SOPS_AGE_KEY_FILE: file }, error: null };
116
177
  };
117
178
  /** Select a supplied age identity without inventing custody or running a key tool. Inline execution awaits its owned isolation capability. */
118
- export function sopsIdentityEnv(env,{identity=null,required=false,platform=process.platform}={}){
119
- if(!env||typeof env!=='object'||Array.isArray(env))return sopsRefuse('invalid-environment','an environment mapping is required');
120
- const names=name=>Object.keys(env).filter(key=>platform==='win32'?key.toUpperCase()===name:key===name);
121
- const inline=names('SOPS_AGE_KEY'),files=names('SOPS_AGE_KEY_FILE');
122
- if(inline.length>1||files.length>1)return sopsRefuse('ambiguous-environment','multiple Windows aliases select an age identity');
123
- if(inline.length)return sopsInlineIdentity(env,inline[0]);
124
- let file=identity;
125
- if(files.length){
126
- const value=env[files[0]];
127
- if(!credentialPresent(value))return sopsRefuse('disabled-file','SOPS_AGE_KEY_FILE is explicitly empty or invalid');
128
- if(identity!==null&&identity!==undefined&&identity!==value)return sopsRefuse('conflicting-files','two different original identity files were explicitly selected');
129
- file=value;
130
- }
131
- if(file!==null&&file!==undefined)return sopsFileIdentity(env,file);
132
- if(required)return sopsRefuse('identity-not-supplied','supply SOPS_AGE_KEY locally or select the original SOPS_AGE_KEY_FILE; no home default was inferred');
133
- return {mode:'public-recipient',env:{...env},error:null};
179
+ export function sopsIdentityEnv(env, { identity = null, required = false, platform = process.platform } = {}) {
180
+ if (!env || typeof env !== 'object' || Array.isArray(env))
181
+ return sopsRefuse('invalid-environment', 'an environment mapping is required');
182
+ const names = (name) => Object.keys(env).filter(key => platform === 'win32' ? key.toUpperCase() === name : key === name);
183
+ const inline = names('SOPS_AGE_KEY'), files = names('SOPS_AGE_KEY_FILE');
184
+ if (inline.length > 1 || files.length > 1)
185
+ return sopsRefuse('ambiguous-environment', 'multiple Windows aliases select an age identity');
186
+ if (inline.length)
187
+ return sopsInlineIdentity(env, inline[0]);
188
+ let file = identity;
189
+ if (files.length) {
190
+ const value = env[files[0]];
191
+ if (!credentialPresent(value))
192
+ return sopsRefuse('disabled-file', 'SOPS_AGE_KEY_FILE is explicitly empty or invalid');
193
+ if (identity !== null && identity !== undefined && identity !== value)
194
+ return sopsRefuse('conflicting-files', 'two different original identity files were explicitly selected');
195
+ file = value;
196
+ }
197
+ if (file !== null && file !== undefined)
198
+ return sopsFileIdentity(env, file);
199
+ if (required)
200
+ return sopsRefuse('identity-not-supplied', 'supply SOPS_AGE_KEY locally or select the original SOPS_AGE_KEY_FILE; no home default was inferred');
201
+ return { mode: 'public-recipient', env: { ...env }, error: null };
134
202
  }
@@ -1,21 +1,24 @@
1
- import {isPlainObject as plain} from './plain-object.mjs';
2
- import {invalid} from './invalid-config.mjs';
3
-
1
+ import { isPlainObject as plain } from './plain-object.mjs';
2
+ import { invalid } from './invalid-config.mjs';
4
3
  /** The keys of the sonar block. */
5
- const SONAR_KEYS=Object.freeze(['organization']);
4
+ const SONAR_KEYS = Object.freeze(['organization']);
6
5
  /** A SonarCloud organization key: lowercase letters, digits, hyphens and underscores, starting with a letter or a digit. */
7
- const ORGANIZATION=/^[a-z0-9][a-z0-9_-]*$/;
8
-
6
+ const ORGANIZATION = /^[a-z0-9][a-z0-9_-]*$/;
9
7
  /**
10
8
  * config.yaml `sonar` - {organization?}: the key of the SonarCloud organization the release's Sonar proof of the example apps analyses in
11
9
  * (the project key is <organization>_<key the example declares>). It is configuration, not a secret; the environment variable
12
10
  * SONAR_ORGANIZATION wins over it, the repository variable of the same name is what CI reads. Null or absent means "not set yet".
13
11
  */
14
- export function validateSonar(sonar){
15
- if(sonar===null)return;
16
- const bad=invalid('sonar');
17
- if(!plain(sonar))bad(' must be {organization?: <SonarCloud organization key>} or null.');
18
- for(const key of Object.keys(sonar))if(!SONAR_KEYS.includes(key))bad(` has unknown key ${key} (allowed: ${SONAR_KEYS.join(', ')}).`);
19
- const value=sonar.organization;
20
- if(value!==undefined&&value!==null&&!(typeof value==='string'&&ORGANIZATION.test(value)))bad('.organization must be a SonarCloud organization key (lowercase letters, digits, - and _) or null.');
12
+ export function validateSonar(sonar) {
13
+ if (sonar === null)
14
+ return;
15
+ const bad = invalid('sonar');
16
+ if (!plain(sonar))
17
+ return bad(' must be {organization?: <SonarCloud organization key>} or null.');
18
+ for (const key of Object.keys(sonar))
19
+ if (!SONAR_KEYS.includes(key))
20
+ bad(` has unknown key ${key} (allowed: ${SONAR_KEYS.join(', ')}).`);
21
+ const value = sonar.organization;
22
+ if (value !== undefined && value !== null && !(typeof value === 'string' && ORGANIZATION.test(value)))
23
+ bad('.organization must be a SonarCloud organization key (lowercase letters, digits, - and _) or null.');
21
24
  }
@@ -17,7 +17,7 @@ pins:
17
17
  # --- @starci packages. Every @starci package is a PUBLISHED npm package (install: registry): a product repository
18
18
  # installs the exact pinned version from the npm registry in the root and every workspace package.json, never `file:`.
19
19
  '@starci/heroicons':
20
- version: 0.3.4
20
+ version: 0.3.5
21
21
  group: starci
22
22
  install: registry
23
23
  side: fe
@@ -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.32
34
+ version: 0.16.0
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.8.19
41
+ version: 3.9.0
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.5.21
48
+ version: 9.6.0
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.32
55
+ version: 0.16.0
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.32
62
+ version: 0.16.0
63
63
  group: starci
64
64
  install: registry
65
65
  side: fe
@@ -85,28 +85,28 @@ pins:
85
85
  side: both
86
86
  source: packages/prettier-config/package.json
87
87
  '@starci/jest-preset':
88
- version: 2.5.2
88
+ version: 2.5.3
89
89
  group: starci
90
90
  install: registry
91
91
  side: be
92
92
  source: packages/jest-preset/package.json
93
93
  why: 'the Jest preset of a back end: the world runner runs up to min(--maxWorkers, slots) world files at once, each in its own process bound to one data slot of the test world (STARCI_TEST_WORLD_SLOT), and reads test-world state protocol 2 only: it pairs exactly with @starci/test-world, and any other state file is JEST_PRESET_WORLD_PAIR_MISMATCH. The unit run writes the lcov Sonar and Codecov import (services only); the integration, e2e and contract projects run every spec file in a worker process of its own (world-runner.cjs), so a process-global framework registry (@nestjs/graphql type metadata) never leaks between e2e files; it ships the unit kit (mockEntityManager, fakeTransaction, fakeQueryBuilder, queueQueryBuilders, fakeIds, FakeClock, Outcome matchers) and the recordingOutbox claim side.'
94
94
  '@starci/test-world':
95
- version: 1.3.2
95
+ version: 1.3.3
96
96
  group: starci
97
97
  install: registry
98
98
  side: be
99
99
  source: packages/test-world/package.json
100
100
  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. A fake declared https (defineHttpFake) serves TLS with the run''s ephemeral in-memory fake CA and publishes its PEM as w.fake.<name>.ca for the app''s own client to trust; verification is never turned off. 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.'
101
101
  '@starci/ai-router':
102
- version: 0.4.0
102
+ version: 0.4.1
103
103
  group: starci
104
104
  install: registry
105
105
  side: be
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.11.20
109
+ version: 4.12.0
110
110
  group: starci
111
111
  install: registry
112
112
  side: both
@@ -51,7 +51,7 @@ versioning:
51
51
  # 3.10.0 is a minor (2026-10-29): it ADDS the lite be.platform.database.entities slot, the entity registry (slot fields role and importedBy), so the
52
52
  # tier matrix and the public-entry rules admit exactly its <c>Entities imports and its deep importers (persistence.md BE-PERSISTENCE-3).
53
53
  # 3.11.0 (ruling:lite-official-postgres-image, 2026-10-29) is, like 3.9.0, a change for lite only: it ADDS the managed app.db.image slot
54
- # (db/Dockerfile, written by `starci app sync --write`), narrows ruleParams.db.extensions to the extensions that image carries, and gives
54
+ # (db/Dockerfile, written by `starci app sync --execute`), narrows ruleParams.db.extensions to the extensions that image carries, and gives
55
55
  # @nestjs/schedule and cron one owner, platform/jobs (R335).
56
56
  # 3.13.0 (rulings lite-pgmq-bus-bullmq-jobs and lite-db-image-in-stacks, 2026-10-29) is a change for lite only: ruleParams.db.extensions
57
57
  # admits pgmq, the event bus, ruleParams.db.queueOutbox is retired with the pg_cron half of R258, the lite event-bus functions replace
@@ -940,7 +940,7 @@ slots:
940
940
 
941
941
  # ----- app root: the database of a lite app (ruling:lite-self-hosted-postgres-passport-minio): a self-hosted PostgreSQL in the app's
942
942
  # stack (the `db` service, built from the managed .starcistacks/images/db/Dockerfile: the official postgres image plus pgvector and pgmq, ruling:lite-db-image-in-stacks), migrated by
943
- # `starci app db migrate --url-env <NAME>`. A full app keeps its TypeORM migrations under be/ and has no such folder.
943
+ # `starci app db migrate --db-url-env <NAME>`. A full app keeps its TypeORM migrations under be/ and has no such folder.
944
944
  - id: app.db
945
945
  profiles: [app]
946
946
  editions: [lite]
@@ -1,7 +1,6 @@
1
1
  import path from 'node:path';
2
2
  import { braceVariants, globExpression } from '../lib/glob.mjs';
3
3
  import { declaredLogicOf } from './manifest-shape.mjs';
4
-
5
4
  /**
6
5
  * What a slot's `requires`, `allows` and `forbids` entries (knowledge/hfs/slots.yaml) say about a file, read through the
7
6
  * resolver of scripts/hfs/slots.mjs. The machine checks that judge "this folder holds only what its slot allows"
@@ -14,65 +13,65 @@ import { declaredLogicOf } from './manifest-shape.mjs';
14
13
  */
15
14
  const VAR = /<([A-Za-z][A-Za-z0-9-]*)>/g;
16
15
  const SPEC = /\.spec\.ts$/;
17
-
18
16
  /**
19
17
  * Whether `relative` is the unit spec `<stem>.spec.ts` of a measured file beside it that the slot names: a file the slot declares in
20
18
  * `logic`, or a `requires`/`allows` file of a logic role (ruleParams.be.logicRoles), in a slot whose coverage is required and whose tests
21
19
  * are unit-beside. The slot admits that spec without listing it, as unit-test-colocated (R47) accepts it.
22
20
  */
23
21
  function isMeasuredSpec(resolver, classified, slot, relative, named) {
24
- if (!SPEC.test(relative) || slot.coverage !== 'required' || slot.tests !== 'unit-beside') return false;
25
- const subject = relative.replace(SPEC, '.ts');
26
- if (declaredLogicOf(slot).includes(subject)) return true;
27
- const role = /\.([a-z0-9-]+)\.ts$/.exec(subject)?.[1];
28
- // An app resolver keeps no rule parameters of its own: a path on a side reads that side's.
29
- const params = classified.side ? resolver.sides?.[classified.side]?.ruleParams() : resolver.ruleParams?.();
30
- return (params?.logicRoles ?? []).includes(role) && named.some(matcher => matcher.expression.test(subject));
22
+ if (!SPEC.test(relative) || slot.coverage !== 'required' || slot.tests !== 'unit-beside')
23
+ return false;
24
+ const subject = relative.replace(SPEC, '.ts');
25
+ if (declaredLogicOf(slot).includes(subject))
26
+ return true;
27
+ const role = /\.([a-z0-9-]+)\.ts$/.exec(subject)?.[1];
28
+ // An app resolver keeps no rule parameters of its own: a path on a side reads that side's.
29
+ const params = classified.side ? resolver.sides?.[classified.side]?.ruleParams() : resolver.ruleParams?.();
30
+ return (params?.logicRoles ?? []).includes(role) && named.some((matcher) => matcher.expression.test(subject));
31
31
  }
32
-
33
32
  function matchersOf(entries, bindings) {
34
- return (entries ?? []).flatMap(entry => {
35
- const directory = entry.endsWith('/');
36
- const body = directory ? entry.slice(0, -1) : entry;
37
- const filled = body.replace(VAR, (whole, name) => bindings[name] ?? '*');
38
- return braceVariants(filled).map(variant => ({ entry, directory, expression: globExpression(directory ? `${variant}/**` : variant) }));
39
- });
33
+ return (entries ?? []).flatMap((entry) => {
34
+ const directory = entry.endsWith('/');
35
+ const body = directory ? entry.slice(0, -1) : entry;
36
+ const filled = body.replace(VAR, (_whole, name) => bindings[name] ?? '*');
37
+ return braceVariants(filled).map((variant) => ({ entry, directory, expression: globExpression(directory ? `${variant}/**` : variant) }));
38
+ });
40
39
  }
41
-
42
40
  /** The path of `file` below the instance root of the slot that owns it. */
43
41
  export function relativeToRoot(file, root) {
44
- return root && file.startsWith(`${root}/`) ? file.slice(root.length + 1) : path.posix.basename(file);
42
+ return root && file.startsWith(`${root}/`) ? file.slice(root.length + 1) : path.posix.basename(file);
45
43
  }
46
-
47
44
  /**
48
45
  * Whether the slot that owns `file` names it in `requires` or `allows` (and does not forbid it); null when no enabled slot
49
46
  * owns it. Unlike allowsFile it judges a slot that lists only `requires` too, so a folder closed by its slot (an app's
50
47
  * src/) is read from the slot and never from a check's own list.
51
48
  */
52
49
  export function slotAdmitsFile(resolver, file) {
53
- const classified = resolver.classifyPath(file);
54
- if (classified.status === 'no-slot' || classified.status === 'ambiguous' || !classified.slot) return null;
55
- const slot = resolver.slot(classified.slot);
56
- const relative = relativeToRoot(classified.path, classified.root);
57
- const named = matchersOf([...(slot.requires ?? []), ...(slot.allows ?? [])], classified.bindings);
58
- const hit = named.some(matcher => matcher.expression.test(relative)) || isMeasuredSpec(resolver, classified, slot, relative, named);
59
- const forbidden = matchersOf(slot.forbids, classified.bindings).some(matcher => matcher.expression.test(relative) || matcher.expression.test(`${relative}/`));
60
- return hit && !forbidden;
50
+ const classified = resolver.classifyPath(file);
51
+ if (classified.status === 'no-slot' || classified.status === 'ambiguous' || !classified.slot)
52
+ return null;
53
+ const slot = resolver.slot(classified.slot);
54
+ const relative = relativeToRoot(classified.path, classified.root);
55
+ const named = matchersOf([...(slot.requires ?? []), ...(slot.allows ?? [])], classified.bindings);
56
+ const hit = named.some(matcher => matcher.expression.test(relative)) || isMeasuredSpec(resolver, classified, slot, relative, named);
57
+ const forbidden = matchersOf(slot.forbids, classified.bindings).some(matcher => matcher.expression.test(relative) || matcher.expression.test(`${relative}/`));
58
+ return hit && !forbidden;
61
59
  }
62
-
63
60
  /**
64
61
  * {slot, root, relative, allowed, entry?, forbiddenBy?} for a repository-relative file, or null when no enabled slot owns
65
62
  * it or the slot names no `allows`. `allowed` is true when the relative path matches a `requires` or `allows` entry.
66
63
  */
67
64
  export function allowsFile(resolver, file) {
68
- const classified = resolver.classifyPath(file);
69
- if (classified.status === 'no-slot' || classified.status === 'ambiguous' || !classified.slot) return null;
70
- const slot = resolver.slot(classified.slot);
71
- if (!slot?.allows?.length) return null;
72
- const relative = relativeToRoot(classified.path, classified.root);
73
- const named = matchersOf([...(slot.requires ?? []), ...slot.allows], classified.bindings);
74
- const hit = named.find(matcher => matcher.expression.test(relative));
75
- const spec = !hit && isMeasuredSpec(resolver, classified, slot, relative, named);
76
- const forbidden = matchersOf(slot.forbids, classified.bindings).find(matcher => matcher.expression.test(relative) || matcher.expression.test(`${relative}/`));
77
- return { slot: slot.id, root: classified.root, relative, allowed: (Boolean(hit) || spec) && !forbidden, entry: hit?.entry, forbiddenBy: forbidden?.entry, allows: slot.allows };
65
+ const classified = resolver.classifyPath(file);
66
+ if (classified.status === 'no-slot' || classified.status === 'ambiguous' || !classified.slot)
67
+ return null;
68
+ const slot = resolver.slot(classified.slot);
69
+ if (!slot?.allows?.length)
70
+ return null;
71
+ const relative = relativeToRoot(classified.path, classified.root);
72
+ const named = matchersOf([...(slot.requires ?? []), ...slot.allows], classified.bindings);
73
+ const hit = named.find(matcher => matcher.expression.test(relative));
74
+ const spec = !hit && isMeasuredSpec(resolver, classified, slot, relative, named);
75
+ const forbidden = matchersOf(slot.forbids, classified.bindings).find(matcher => matcher.expression.test(relative) || matcher.expression.test(`${relative}/`));
76
+ return { slot: slot.id, root: classified.root, relative, allowed: (Boolean(hit) || spec) && !forbidden, entry: hit?.entry, forbiddenBy: forbidden?.entry, allows: slot.allows };
78
77
  }