@starci/eslint-grammar-offset-pop 0.21.14 → 0.21.16

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.16 - 2026-11-03
4
+
5
+ - Changed: version stamp only, with `@starci/grammar` 0.21.16; requires `@starci/eslint-grammar-core` 0.21.16, and the runtime copy of the canon pins names the Grammar family at 0.21.16, `@starci/auth` 0.2.1, `@starci/auth-oidc` 0.1.1, `@starci/eslint-canon-be` 3.14.1, `@starci/eslint-canon-fe` 9.12.1 and `@starci/hfs` 5.4.0.
6
+
7
+ ## 0.21.15 - 2026-11-03
8
+
9
+ - Changed: requires `@starci/eslint-grammar-core` 0.21.15; the runtime copies carry the new pins.
10
+ - Added: `offsetPopGrammarPackagesConfig`: the inherited family rules over the front-end subpaths of the root workspace packages.
11
+ - Changed: the runtime copy of the slot manifest carries the slots `app.packages`, `app.module-registry` and `app.packages-lint`.
12
+
3
13
  ## 0.21.14 - 2026-11-03
4
14
 
5
15
  - Changed: requires `@starci/eslint-grammar-core` 0.21.14; the runtime copies carry the `@starci/auth` rows.
@@ -217,7 +227,6 @@ Follows the Grammar 0.21.0.
217
227
 
218
228
  - Changed: the peer moves to the 0.15.11 cohort; the bundled slot manifest 3.9.0 replaces the lite `app.supabase*` slots with `app.db` (`db/migrations`, `db/migrations/archive`, `db/seed.sql`, the managed `db/bootstrap.sql`), `be.integrations.supabase` with `be.integrations.passport` and `be.integrations.object-storage`, removes `fe.route.callback`, sets lite `schemaAuthority: sql`, gives lite TypeORM entities in `be.persistence`, adds `ruleParams.be.dbFunctions`, and moves the S3 SDKs to `integrations/object-storage` and the identity libraries to `integrations/passport` in `infraOwners` (`@supabase/*`, `minio` and `bcrypt` nowhere); the bundled rule catalog retires R216, R217, R219, R254 and R287 and adds R328-R334; the bundled canon pins name hfs 4.10.0, eslint-canon-be 3.7.0, eslint-canon-fe 9.5.0 and the Grammar family 0.15.11, pin `@nestjs/passport` 11.0.5 (CommonJS on the Nest 11 line), `passport` 0.7.0, `passport-google-oauth20` 2.0.0, `passport-local` 1.0.0, `bcryptjs` 3.0.3 and their types (tokens are signed and verified with `jose`; `@nestjs/jwt` stays allowed in `integrations/passport` but unpinned), and drop `@supabase/ssr`, `@supabase/supabase-js` and the `supabase` CLI. No rule changed.
219
229
 
220
-
221
230
  ## 0.15.10 - 2026-10-29
222
231
 
223
232
  - Changed: `@starci/eslint-grammar-core` 0.15.10 is the peer dependency; the bundled slot manifest gives the model libraries their owners in `ruleParams.be.infraOwners` (`@starci/ai-router` to `integrations/ai-gateway`, `@langchain/*` to `integrations/ai`; `openai`, `langchain`, `@langchain/langgraph`, `@langchain/community` and the provider SDKs nowhere) and lists R326 and R327 on `be.integrations`; the bundled canon pins name hfs 4.9.11, eslint-canon-be 3.6.8, eslint-canon-fe 9.4.9, the Grammar family 0.15.10 (grammar, eslint-grammar-core, eslint-grammar-offset-pop), and pin `@langchain/core` 1.3.1 and `@langchain/openai` 1.8.0. No rule changed.
@@ -275,7 +284,6 @@ Follows the Grammar 0.21.0.
275
284
  - Changed: versioned together with Grammar 0.13.0; `@starci/eslint-grammar-core` 0.13.0 is a peer dependency, installed by the app beside this package. Offset Pop is unchanged and refuses `core`.
276
285
  - Changed: the package lives in github.com/starci183/starci-harness under `packages/` and publishes from there; its bundled `runtime/` is committed source, edited in place (no generator, no `prepack`/`pretest` hook).
277
286
 
278
-
279
287
  ## 0.12.14 - 2026-10-27
280
288
 
281
289
  - Fixed: the bundled runtime copy now carries the static import closure of its slot view, so the slot modules it imports are present.
package/dist/config.d.ts CHANGED
@@ -8,3 +8,12 @@ import { coreGrammarConfig } from "@starci/eslint-grammar-core";
8
8
  export declare const offsetPopGrammarConfig: ({ hfs }: {
9
9
  hfs: Parameters<typeof coreGrammarConfig>[0]["hfs"];
10
10
  }) => ReturnType<typeof coreGrammarConfig>;
11
+ /**
12
+ * The same family rules for the front-end subpaths of an app's root workspace packages (`packages/<pkg>/src/workbench/**` and `src/public/**`).
13
+ *
14
+ * @param input - The package view of the app root from the universal canon's loadPackagesHfs.
15
+ * @returns Family rules at error under the shared starci-grammar namespace, over the package subpaths.
16
+ */
17
+ export declare const offsetPopGrammarPackagesConfig: ({ hfs }: {
18
+ hfs: Parameters<typeof coreGrammarConfig>[0]["hfs"];
19
+ }) => ReturnType<typeof coreGrammarConfig>;
package/dist/config.js CHANGED
@@ -1,4 +1,4 @@
1
- import { coreGrammarConfig } from "@starci/eslint-grammar-core";
1
+ import { coreGrammarConfig, coreGrammarPackagesConfig } from "@starci/eslint-grammar-core";
2
2
  /**
3
3
  * Attach the inherited Common API laws for a front end selecting Offset Pop.
4
4
  *
@@ -6,3 +6,10 @@ import { coreGrammarConfig } from "@starci/eslint-grammar-core";
6
6
  * @returns Family rules at error under the shared starci-grammar namespace.
7
7
  */
8
8
  export const offsetPopGrammarConfig = ({ hfs }) => coreGrammarConfig({ hfs, family: "offset-pop" });
9
+ /**
10
+ * The same family rules for the front-end subpaths of an app's root workspace packages (`packages/<pkg>/src/workbench/**` and `src/public/**`).
11
+ *
12
+ * @param input - The package view of the app root from the universal canon's loadPackagesHfs.
13
+ * @returns Family rules at error under the shared starci-grammar namespace, over the package subpaths.
14
+ */
15
+ export const offsetPopGrammarPackagesConfig = ({ hfs }) => coreGrammarPackagesConfig({ hfs, family: "offset-pop" });
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Offset Pop inherits the Common component checks from the exact matching Grammar lint release. */
2
2
  export { default, rules, recommended, ruleOwners, lawOwners, ruleDeclarations, why, } from "@starci/eslint-grammar-core";
3
- export { offsetPopGrammarConfig } from "./config.js";
3
+ export { offsetPopGrammarConfig, offsetPopGrammarPackagesConfig } from "./config.js";
4
4
  export { crossFileInputs } from "@starci/eslint-grammar-core";
5
5
  export type { CrossFileInput } from "@starci/eslint-grammar-core";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Offset Pop inherits the Common component checks from the exact matching Grammar lint release. */
2
2
  export { default, rules, recommended, ruleOwners, lawOwners, ruleDeclarations, why, } from "@starci/eslint-grammar-core";
3
- export { offsetPopGrammarConfig } from "./config.js";
3
+ export { offsetPopGrammarConfig, offsetPopGrammarPackagesConfig } from "./config.js";
4
4
  // Offset Pop runs the Common rules of the matching Grammar lint release, so it reads the disk exactly where that release declares it does.
5
5
  export { crossFileInputs } from "@starci/eslint-grammar-core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-grammar-offset-pop",
3
- "version": "0.21.14",
3
+ "version": "0.21.16",
4
4
  "description": "Offset Pop Grammar lint: the inherited Common component contract over its own visual family.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -44,7 +44,7 @@
44
44
  "peerDependencies": {
45
45
  "eslint": ">=9",
46
46
  "typescript": ">=5.9",
47
- "@starci/eslint-grammar-core": "0.21.14"
47
+ "@starci/eslint-grammar-core": "0.21.16"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@starci/eslint-canon-fe": "file:../eslint-canon-fe",
@@ -17,6 +17,7 @@
17
17
  "modules/models/runtimes.yaml",
18
18
  "modules/models/tiers.yaml",
19
19
  "scripts/hfs/allows.mjs",
20
+ "scripts/hfs/architecture/root-packages.mjs",
20
21
  "scripts/hfs/declaration-shape.mjs",
21
22
  "scripts/hfs/declaration-slots.mjs",
22
23
  "scripts/hfs/edition-slots.mjs",
@@ -38,42 +38,49 @@ pins:
38
38
  source: packages/next-data/package.json
39
39
  why: 'the SWR data helpers of every front end (fe-stack data, owner:next-data-package): pollingRestart, the viewer and tenant key helpers, viewerSwrConfig and the viewer cache; each operation hook stays in the app and the package holds no component.'
40
40
  '@starci/grammar':
41
- version: 0.21.14
41
+ version: 0.21.16
42
42
  group: starci
43
43
  install: registry
44
44
  side: fe
45
45
  source: packages/grammar/package.json
46
46
  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.'
47
+ '@starci/next-i18n':
48
+ version: 0.1.0
49
+ group: starci
50
+ install: registry
51
+ side: fe
52
+ source: packages/next-i18n/package.json
53
+ why: 'the next-intl stack of every front end (fe-stack i18n, owner:next-i18n-package): defineI18n over the locales of the app, the locale-negotiating proxy, the locale-aware navigation, the request config that loads the catalogs of the app and the locale read of the [locale] layout; the app keeps its message catalogs and writes none of the stack.'
47
54
  '@starci/eslint-canon-be':
48
- version: 3.13.0
55
+ version: 3.14.1
49
56
  group: starci
50
57
  install: registry
51
58
  side: be
52
59
  source: packages/eslint-canon-be/package.json
53
60
  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.'
54
61
  '@starci/eslint-canon-fe':
55
- version: 9.11.0
62
+ version: 9.12.1
56
63
  group: starci
57
64
  install: registry
58
65
  side: fe
59
66
  source: packages/eslint-canon-fe/package.json
60
67
  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.'
61
68
  '@starci/eslint-grammar-core':
62
- version: 0.21.14
69
+ version: 0.21.16
63
70
  group: starci
64
71
  install: registry
65
72
  side: fe
66
73
  source: packages/eslint-grammar-core/package.json
67
74
  why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
68
75
  '@starci/eslint-grammar-offset-pop':
69
- version: 0.21.14
76
+ version: 0.21.16
70
77
  group: starci
71
78
  install: registry
72
79
  side: fe
73
80
  source: packages/eslint-grammar-offset-pop/package.json
74
81
  why: 'the Offset Pop Grammar component API lint, versioned with @starci/grammar; its shared component contract comes from the StarCi family lint without copying rules.'
75
82
  '@starci/stylelint-canon':
76
- version: 2.5.1
83
+ version: 2.6.0
77
84
  group: starci
78
85
  install: registry
79
86
  side: fe
@@ -92,7 +99,7 @@ pins:
92
99
  side: both
93
100
  source: packages/prettier-config/package.json
94
101
  '@starci/jest-preset':
95
- version: 2.6.1
102
+ version: 2.6.2
96
103
  group: starci
97
104
  install: registry
98
105
  side: be
@@ -112,13 +119,27 @@ pins:
112
119
  side: be
113
120
  source: packages/ai-router/package.json
114
121
  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.'
115
- '@starci/auth':
122
+ '@starci/nest-kit':
116
123
  version: 0.1.0
117
124
  group: starci
118
125
  install: registry
126
+ side: be
127
+ source: packages/nest-kit/package.json
128
+ why: 'the module definition of every back-end module: defineConfigurableModule and defineCapabilityModule return the module base class, the options token and the options types with their types stated, so a <x>.module-definition.ts is one call that the lint on stated export types (R368) and the duplicate-code check (R21) both accept; @starci/jest-preset compiles it as an ESM-only dependency.'
129
+ '@starci/auth':
130
+ version: 0.2.1
131
+ group: starci
132
+ install: registry
119
133
  side: both
120
134
  source: packages/auth/package.json
121
135
  why: 'the lite sign-in: the NestJS module (EdDSA access tokens with a multi-key JWKS, passwords, Google OAuth with state and PKCE, rotating refresh sessions, the sign-in budget, the refresh cookie), the front-end client and its React bindings, the door contracts and test doubles; the one importer of the identity libraries, reached by a back end only through integrations/passport; @starci/jest-preset compiles it as an ESM-only dependency.'
136
+ '@starci/auth-oidc':
137
+ version: 0.1.1
138
+ group: starci
139
+ install: registry
140
+ side: both
141
+ source: packages/auth-oidc/package.json
142
+ why: 'the full sign-in: the OIDC client of the identity provider (Keycloak) behind the PrincipalVerifier of @starci/auth, so guards do not change between editions: the NestJS module (issuer discovery, the JWKS with caching and rotation, algorithm-pinned token checks, role mapping, the authorization code flow with PKCE and nonce), the front-end client (PKCE redirect, one shared refresh, tokens in memory) and the fake issuer for tests; the one importer of jose in a full app, reached by a back end only through integrations/keycloak; @starci/jest-preset compiles it as an ESM-only dependency.'
122
143
  '@starci/object-storage':
123
144
  version: 0.1.0
124
145
  group: starci
@@ -126,8 +147,15 @@ pins:
126
147
  side: be
127
148
  source: packages/object-storage/package.json
128
149
  why: 'object storage of a back end: a NestJS module and the ObjectStorage port over S3-compatible storage (presigned PUT and GET that sign the content type and size, head, get, put, list, delete, bucket setup, size and content-type limits, coded errors), with @starci/object-storage/testing for its specs; the only importer of @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner (R331).'
150
+ '@starci/mail':
151
+ version: 0.1.0
152
+ group: starci
153
+ install: registry
154
+ side: be
155
+ source: packages/mail/package.json
156
+ why: 'outgoing mail of a back end: a NestJS module and the Mailer port over SMTP (connect, greeting, socket and total timeouts, STARTTLS required by default, recipient, message and attachment checks, a shared SMTP target policy, coded errors, typed escaping render helpers returning { subject, text, html }), with @starci/mail/testing for its specs; the only importer of nodemailer (R90).'
129
157
  '@starci/hfs':
130
- version: 5.2.0
158
+ version: 5.4.0
131
159
  group: starci
132
160
  install: registry
133
161
  side: both
@@ -570,6 +598,11 @@ pins:
570
598
  group: framework
571
599
  side: be
572
600
  why: 'signs the presigned PUT and GET inside @starci/object-storage locally, the same release as client-s3; no app file imports it.'
601
+ nodemailer:
602
+ version: 10.1.7
603
+ group: framework
604
+ side: be
605
+ why: 'the SMTP client inside @starci/mail, which depends on it at exactly this version and which no app file imports; 10.1.7 is the release of 2026-10-18, chosen over newer ones that had not aged two weeks.'
573
606
  '@apollo/server':
574
607
  version: 5.5.1
575
608
  group: framework
@@ -670,7 +703,7 @@ pins:
670
703
  version: 6.2.12
671
704
  group: framework
672
705
  side: be
673
- why: signs the app's own ES256 access tokens and verifies them against its own key set (createLocalJWKSet) in integrations/passport.
706
+ why: signs the app's own access tokens and verifies them against its own key set inside @starci/auth, and verifies the identity provider's tokens against its JWKS inside @starci/auth-oidc; no app file imports it.
674
707
  class-transformer:
675
708
  version: 0.5.1
676
709
  group: framework
@@ -240,6 +240,8 @@ ruleParams:
240
240
  "@aws-sdk/s3-request-presigner": []
241
241
  "@starci/object-storage": [integrations/object-storage] # the ObjectStorage port: one S3 adapter for MinIO, S3 and Spaces (R331)
242
242
  minio: [] # storage goes through @starci/object-storage
243
+ nodemailer: [] # the SMTP client is a dependency of @starci/mail alone; no app file imports it
244
+ "@starci/mail": [integrations/mail] # outgoing mail: the Mailer port, parsed and registered by its one glue
243
245
  "@supabase": [] # no Supabase client in a back end
244
246
  "@nestjs/passport": [] # the identity libraries are @starci/auth's dependencies, never an app's (R328)
245
247
  passport: []
@@ -248,8 +250,15 @@ ruleParams:
248
250
  "@nestjs/jwt": []
249
251
  jose: []
250
252
  bcryptjs: []
253
+ jsonwebtoken: [] # no other JWT or OIDC client library in a back end: the tokens of an identity provider are verified by @starci/auth-oidc (R328)
254
+ jwks-rsa: []
255
+ jwt-decode: []
256
+ passport-jwt: []
257
+ openid-client: []
251
258
  "@starci/auth": [integrations/passport] # the lite sign-in package: its server entry is reached only through integrations/passport (R328)
252
259
  "@starci/auth/testing": [integrations/passport] # its test doubles, for the glue's specs
260
+ "@starci/auth-oidc": [integrations/keycloak] # the full sign-in package (jose is its dependency, imported by no app file): its server entry is reached only through integrations/keycloak (R328)
261
+ "@starci/auth-oidc/testing": [integrations/keycloak] # its fake issuer, for the glue's specs
253
262
  bcrypt: []
254
263
  cache-manager: [integrations/cache, integrations/redis]
255
264
  "@nestjs/cache-manager": [integrations/cache, integrations/redis] # the CACHE_MANAGER token: caching goes through the cache capability
@@ -463,6 +472,14 @@ ruleParams:
463
472
  - {name: public.event_bus_bury, reason: "platform/event-bus (add webhook, lite): the move of an exhausted or malformed message to its consumer's dead-letter queue"}
464
473
  - {name: public.event_bus_dead_letters, reason: "platform/event-bus (add webhook, lite): the operator read of a consumer's dead-letter queue"}
465
474
  - {name: public.event_bus_requeue, reason: "platform/event-bus (add webhook, lite): the operator requeue of one dead letter"}
475
+ - {name: public.be_auth_user_by_email, reason: "domain/identity (lite sign-in): the account of an exact sign-in address with its bcrypt hash, through the account-doors definer of the baseline"}
476
+ - {name: public.be_auth_user_by_id, reason: "domain/identity (lite sign-in): the standing of one account by id (a refresh), through the account-doors definer"}
477
+ - {name: public.be_auth_user_by_google, reason: "domain/identity (lite sign-in): the account a Google subject is linked to, through the account-doors definer"}
478
+ - {name: public.be_auth_create_user, reason: "domain/identity (lite sign-in): the account a first Google sign-in creates, through the account-doors definer"}
479
+ - {name: public.be_auth_link_google, reason: "domain/identity (lite sign-in): the link of a Google subject to an account, through the account-doors definer"}
480
+ - {name: public.be_auth_touch_user, reason: "domain/identity (lite sign-in): the sign-in record of an account and its profile keys, through the account-doors definer"}
481
+ - {name: public.be_auth_confirm_user, reason: "domain/identity (lite sign-in): the confirmation stamp of a mailbox whose link was spent, through the account-doors definer"}
482
+ - {name: public.be_auth_set_password, reason: "domain/identity (lite sign-in): the new password hash of a spent reset link (and the mailbox it proved), through the account-doors definer"}
466
483
  # R334 (lite): the only `.query(` outside platform/database's composer and the test world is the pass-through of a file listed here
467
484
  # (or in hfs.json sides.be.sqlPassThrough), whose SQL text is not the app's own. Paths are relative to the side folder.
468
485
  sqlPassThrough:
@@ -590,13 +607,24 @@ slots:
590
607
  - id: app.tool-config-local
591
608
  since: 3.1.0
592
609
  profiles: [app]
593
- path: "{tsconfig.json,.eslintrc,.eslintrc.*,.eslintignore,eslint.config.*,.stylelintrc,.stylelintrc.*,.stylelintignore,stylelint.config.*,.prettierrc.*,prettier.config.*,jest.config.*,lint-staged.config.*,.lintstagedrc*}"
610
+ path: "{tsconfig.json,.eslintrc,.eslintrc.*,.eslintignore,eslint.config.js,eslint.config.cjs,eslint.config.ts,eslint.config.mts,eslint.config.cts,.stylelintrc,.stylelintrc.*,.stylelintignore,stylelint.config.*,.prettierrc.*,prettier.config.*,jest.config.*,lint-staged.config.*,.lintstagedrc*}"
594
611
  presence: forbidden
595
612
  tracked: external
596
613
  tier: none
597
614
  tests: none
598
- goesTo: "nowhere at the app root: each side holds exactly its managed tool configuration (be.tool-config, fe.tool-config) and the root only the formatter (app.format-config)"
615
+ goesTo: "nowhere at the app root: each side holds exactly its managed tool configuration (be.tool-config, fe.tool-config) and the root only the formatter (app.format-config) and the eslint config of its root packages (app.packages-lint)"
599
616
  rules: [HFS_TOOL_CONFIG_LOCAL]
617
+ - id: app.packages-lint
618
+ since: 3.17.0
619
+ profiles: [app]
620
+ # The one eslint config at the app root: `starci app sync` renders it when the app has root workspace packages (app.packages), and it lints their
621
+ # source by subpath (the back-end canon, the front-end canon and the Grammar family each over their own subpaths). No other tool config lives here.
622
+ path: eslint.config.mjs
623
+ presence: optional
624
+ tracked: tracked
625
+ tier: none
626
+ tests: none
627
+ rules: [HFS_MANAGED_FILE_DRIFT]
600
628
  - id: app.quality-config
601
629
  since: 3.1.0
602
630
  profiles: [app]
@@ -828,6 +856,31 @@ slots:
828
856
  rules: [HFS_PLAINTEXT_SECRET, HFS_SCRIPT_ONE_OFF, BE_SPEC_PLACEMENT, HFS_REPO_LOCAL_CHECK]
829
857
  exemplifiedBy:
830
858
  - {path: packages/hfs/src/hfs-slot-ownership.spec.mjs, editions: [lite, full]}
859
+ - id: app.packages
860
+ since: 3.17.0
861
+ profiles: [app]
862
+ editionWhy: Lite and full share the slot; a product's agent SDK and its agent modules are workspace packages in both.
863
+ # A workspace package of the app ROOT (packages/agent-sdk, packages/module-<name>): first-party source that both sides import through its
864
+ # package entry points and never past them (ARCH_INTERNAL_IMPORT_OUTSIDE), linted by the root eslint config by subpath.
865
+ path: "packages/{agent-sdk,module-<name>}/"
866
+ presence: optional
867
+ tracked: tracked
868
+ tier: none
869
+ requires: [package.json, tsconfig.json, src/index.ts]
870
+ tests: unit-beside
871
+ rules: [HFS_UNUSED_EXPORT]
872
+ - id: app.module-registry
873
+ since: 3.17.0
874
+ profiles: [app]
875
+ editionWhy: Lite and full share the slot; the registry lists the module packages of the app.
876
+ path: packages/modules/
877
+ presence: optional
878
+ tracked: tracked
879
+ tier: none
880
+ requires: [package.json, src/index.ts]
881
+ allows: [package.json, tsconfig.json, tsconfig.build.json, src/index.ts, src/template/index.ts, src/manifest/index.ts]
882
+ tests: none
883
+ rules: [HFS_MANAGED_FILE_DRIFT]
831
884
  - id: app.sides
832
885
  since: 3.1.0
833
886
  profiles: [app]
@@ -2003,8 +2056,8 @@ slots:
2003
2056
  profiles: [be]
2004
2057
  editions: [lite]
2005
2058
  editionWhy: "lite signs people in with the package @starci/auth, so its sign-in glue is rendered, not written (owner ruling auth-package); full uses its identity provider."
2006
- # The identity capability's sign-in glue over @starci/auth: the entities of the session, attempt and user tables, the stores the package asks for (sessions, accounts, rate counter), the authenticator and the service the doors call, with their specs. `starci app sync` renders them; a hand edit is drift.
2007
- path: "{src/modules/domain/identity/account-directory.service.spec.ts,src/modules/domain/identity/account-directory.service.ts,src/modules/domain/identity/authenticator.service.spec.ts,src/modules/domain/identity/authenticator.service.ts,src/modules/domain/identity/persistence/entities/auth-identity.entity.ts,src/modules/domain/identity/persistence/entities/auth-user.entity.ts,src/modules/domain/identity/persistence/entities/identity-attempt.entity.ts,src/modules/domain/identity/persistence/entities/identity-refresh-token.entity.ts,src/modules/domain/identity/persistence/entities/identity-session.entity.ts,src/modules/domain/identity/persistence/entities/index.ts,src/modules/domain/identity/rate-counter.service.spec.ts,src/modules/domain/identity/rate-counter.service.ts,src/modules/domain/identity/session-store.service.spec.ts,src/modules/domain/identity/session-store.service.ts,src/modules/domain/identity/sign-in.service.spec.ts,src/modules/domain/identity/sign-in.service.ts,src/tests/fixtures/builders/identity.builder.ts}"
2059
+ # The identity capability's sign-in glue over @starci/auth: the entities of the session, attempt, refresh-token and email-token tables, the account doors over auth.users and auth.identities, the stores the package asks for (sessions, accounts, rate counter), the authenticator and the service the doors call, with their specs. `starci app sync` renders them; a hand edit is drift.
2060
+ path: "{src/modules/domain/identity/account-directory.service.spec.ts,src/modules/domain/identity/account-directory.service.ts,src/modules/domain/identity/authenticator.service.spec.ts,src/modules/domain/identity/authenticator.service.ts,src/modules/domain/identity/identity-email.log-events.ts,src/modules/domain/identity/identity-email.service.spec.ts,src/modules/domain/identity/identity-email.service.ts,src/modules/domain/identity/identity-sign-in.log-events.ts,src/modules/domain/identity/persistence/account-doors.port.ts,src/modules/domain/identity/persistence/entities/identity-attempt.entity.ts,src/modules/domain/identity/persistence/entities/identity-email-token.entity.ts,src/modules/domain/identity/persistence/entities/identity-refresh-token.entity.ts,src/modules/domain/identity/persistence/entities/identity-session.entity.ts,src/modules/domain/identity/persistence/entities/index.ts,src/modules/domain/identity/rate-counter.service.spec.ts,src/modules/domain/identity/rate-counter.service.ts,src/modules/domain/identity/session-store.service.spec.ts,src/modules/domain/identity/session-store.service.ts,src/modules/domain/identity/sign-in.service.spec.ts,src/modules/domain/identity/sign-in.service.ts,src/tests/fixtures/builders/identity.builder.ts}"
2008
2061
  presence: optional
2009
2062
  tracked: tracked
2010
2063
  tier: inherit
@@ -2019,7 +2072,7 @@ slots:
2019
2072
  editions: [lite]
2020
2073
  editionWhy: "lite signs people in with the package @starci/auth, so its sign-in glue is rendered, not written (owner ruling auth-package); full uses its identity provider."
2021
2074
  # The auth feature: the REST doors under /auth (login, refresh, session, logout, Google start and callback, jwks) over IdentitySignInService, one command or query and handler per door.
2022
- path: "{src/features/api/auth/application/auth.contracts.ts,src/features/api/auth/application/get-jwks.handler.ts,src/features/api/auth/application/get-jwks.query.ts,src/features/api/auth/application/google-begin.command.ts,src/features/api/auth/application/google-begin.handler.ts,src/features/api/auth/application/google-complete.command.ts,src/features/api/auth/application/google-complete.handler.ts,src/features/api/auth/application/login.command.ts,src/features/api/auth/application/login.handler.ts,src/features/api/auth/application/logout.command.ts,src/features/api/auth/application/logout.handler.ts,src/features/api/auth/application/refresh.command.ts,src/features/api/auth/application/refresh.handler.ts,src/features/api/auth/application/session.command.ts,src/features/api/auth/application/session.handler.ts,src/features/api/auth/auth.module-definition.ts,src/features/api/auth/auth.module.ts,src/features/api/auth/auth.options.ts,src/features/api/auth/index.ts,src/features/api/auth/transport/http/auth-http.module-definition.ts,src/features/api/auth/transport/http/auth-http.module.ts,src/features/api/auth/transport/http/auth-http.options.ts,src/features/api/auth/transport/http/auth.controller.ts,src/features/api/auth/transport/http/dto/google-start.request.ts,src/features/api/auth/transport/http/dto/login.request.ts}"
2075
+ path: "{src/features/api/auth/application/auth.contracts.ts,src/features/api/auth/application/confirm.command.ts,src/features/api/auth/application/confirm.handler.ts,src/features/api/auth/application/forgot.command.ts,src/features/api/auth/application/forgot.handler.ts,src/features/api/auth/application/get-jwks.handler.ts,src/features/api/auth/application/get-jwks.query.ts,src/features/api/auth/application/google-begin.command.ts,src/features/api/auth/application/google-begin.handler.ts,src/features/api/auth/application/google-complete.command.ts,src/features/api/auth/application/google-complete.handler.ts,src/features/api/auth/application/login.command.ts,src/features/api/auth/application/login.handler.ts,src/features/api/auth/application/logout.command.ts,src/features/api/auth/application/logout.handler.ts,src/features/api/auth/application/refresh.command.ts,src/features/api/auth/application/refresh.handler.ts,src/features/api/auth/application/resend.command.ts,src/features/api/auth/application/resend.handler.ts,src/features/api/auth/application/reset.command.ts,src/features/api/auth/application/reset.handler.ts,src/features/api/auth/application/session.command.ts,src/features/api/auth/application/session.handler.ts,src/features/api/auth/application/signup.command.ts,src/features/api/auth/application/signup.handler.ts,src/features/api/auth/auth.module-definition.ts,src/features/api/auth/auth.module.ts,src/features/api/auth/auth.options.ts,src/features/api/auth/index.ts,src/features/api/auth/transport/http/auth-http.module-definition.ts,src/features/api/auth/transport/http/auth-http.module.ts,src/features/api/auth/transport/http/auth-http.options.ts,src/features/api/auth/transport/http/auth.controller.ts,src/features/api/auth/transport/http/dto/forgot.request.ts,src/features/api/auth/transport/http/dto/google-start.request.ts,src/features/api/auth/transport/http/dto/login.request.ts,src/features/api/auth/transport/http/dto/resend.request.ts,src/features/api/auth/transport/http/dto/reset.request.ts,src/features/api/auth/transport/http/dto/signup.request.ts,src/features/api/auth/transport/http/dto/token.request.ts}"
2023
2076
  presence: optional
2024
2077
  tracked: tracked
2025
2078
  tier: inherit
@@ -2028,6 +2081,25 @@ slots:
2028
2081
  managedBy: auth-lite
2029
2082
  managedOnly: true # lists files sync renders; the slot owning the path judges them
2030
2083
  rules: [HFS_MANAGED_FILE_DRIFT]
2084
+ - id: be.integrations.mail
2085
+ profiles: [be]
2086
+ editions: [lite]
2087
+ exemplifiedBy:
2088
+ - packages/hfs/templates/be/skeleton-lite/src/modules/integrations/mail/
2089
+ # The glue of @starci/mail, the owner of the SMTP client (nodemailer): this folder parses the settings (the server, the sender and the
2090
+ # link lifetimes of the confirmation and reset mails), registers the module and names the injectors; no app file imports nodemailer,
2091
+ # and no other module imports the package. The words and layout of each mail belong to the domain that sends it.
2092
+ path: "src/modules/integrations/mail/"
2093
+ presence: required
2094
+ tracked: tracked
2095
+ tier: integrations
2096
+ owner: true
2097
+ requires: [index.ts, mail.config.ts, mail.options.ts, mail.decorators.ts, mail.module-definition.ts, mail.module.ts]
2098
+ allows: [index.ts, mail.config.ts, mail.options.ts, mail.decorators.ts, mail.module-definition.ts, mail.module.ts, errors/]
2099
+ tests: unit-beside
2100
+ rules: [BE_TIER_DIRECTION, BE_ERROR_HOME, BE_SECRET_DEFAULT, BE_INFRA_OWNER]
2101
+ coverage: required
2102
+ since: 5.3.0
2031
2103
  - id: be.integrations.object-storage
2032
2104
  profiles: [be]
2033
2105
  exemplifiedBy:
@@ -2047,6 +2119,25 @@ slots:
2047
2119
  rules: [BE_TIER_DIRECTION, BE_ERROR_HOME, BE_SECRET_DEFAULT, BE_INFRA_OWNER, BE_STORAGE_OWNER]
2048
2120
  coverage: required
2049
2121
  since: 3.9.0
2122
+ - id: be.integrations.keycloak
2123
+ profiles: [be]
2124
+ editions: [full]
2125
+ # The glue of @starci/auth-oidc, the OIDC client of the full edition's identity provider (Keycloak): discovery, the provider's JWKS,
2126
+ # algorithm-pinned token checks and the authorization code flow with PKCE and nonce behind the PrincipalVerifier of @starci/auth.
2127
+ # This folder parses the typed options, hands the package the app's bounded HTTP client and clock, and names the injectors;
2128
+ # no app file imports jose, and no other module imports the package (ruleParams.be.infraOwners).
2129
+ path: "src/modules/integrations/keycloak/"
2130
+ presence: optional
2131
+ tracked: tracked
2132
+ tier: integrations
2133
+ owner: true
2134
+ requires: [index.ts, keycloak.config.ts, keycloak.options.ts, keycloak.decorators.ts, keycloak.registration.ts]
2135
+ allows: [index.ts, keycloak.config.ts, keycloak.options.ts, keycloak.decorators.ts, keycloak.registration.ts, errors/, messages/]
2136
+ tests: unit-beside
2137
+ rules: [BE_TIER_DIRECTION, BE_ERROR_HOME, BE_SECRET_DEFAULT, BE_INFRA_OWNER, BE_AUTH_PASSPORT_OWNER, BE_INTEGRATION_SPEC_MISSING]
2138
+ coverage: required
2139
+ since: 3.17.0
2140
+
2050
2141
 
2051
2142
  # ----- BE: tests (owner test layout 2026-09-30). Unit specs are <name>.service.spec.ts beside their service and nothing else; everything else
2052
2143
  # lives under src/tests/, one folder per kind, and the folder and the file suffix always agree (a file whose suffix does
@@ -2520,9 +2611,9 @@ slots:
2520
2611
  presence: required
2521
2612
  tracked: tracked
2522
2613
  tier: foundation
2523
- # The app's routing, request config and catalogs, or its adapter to the shared i18n factory. A single app
2524
- # owns createNavigation in fe.modules.routes, keeping this public entry safe for its proxy. Shared stacks
2525
- # belong to fe.package.i18n and expose a routing-only proxy entry separately from navigation.
2614
+ # The app's description of its languages (defineI18n of @starci/next-i18n), its request config and catalogs, or its adapter to the
2615
+ # shared i18n workspace package. A single app builds its navigation (createI18nNavigation) in fe.modules.routes, keeping this
2616
+ # public entry safe for its proxy. A description shared by several apps belongs to fe.package.i18n.
2526
2617
  requires: [index.ts]
2527
2618
  tests: none
2528
2619
  rules: [FE_I18N_PLACEMENT, FE_I18N_CATALOG]
@@ -2592,7 +2683,7 @@ slots:
2592
2683
  editions: [lite]
2593
2684
  editionWhy: "lite signs people in with the package @starci/auth, so its auth client is rendered, not written (owner ruling auth-package); full wires its identity provider."
2594
2685
  # The AuthClient every edition shares, implemented by one @starci/auth/client instance over the app's own back-end auth doors.
2595
- path: "apps/web/src/modules/auth/client.ts"
2686
+ path: "apps/web/src/modules/auth/{client.ts,email-doors.ts,index.ts}"
2596
2687
  presence: optional
2597
2688
  tracked: tracked
2598
2689
  tier: inherit
@@ -2674,7 +2765,7 @@ slots:
2674
2765
  owner: true
2675
2766
  requires: [package.json, src/index.ts, tsconfig.json]
2676
2767
  tests: none
2677
- why: the next-intl stack (routing, navigation, request config) written once, exported as the createAppI18n factory every app calls
2768
+ why: the product's languages (defineI18n of @starci/next-i18n) written once and composed into the createAppI18n factory every app calls; the next-intl stack itself is the package's
2678
2769
  rules: [FE_I18N_PLACEMENT, FE_PACKAGE_SHAPE, HFS_UNUSED_EXPORT]
2679
2770
 
2680
2771
  # Checks that read this manifest (all ship from .claude; none keeps its own path list)
@@ -0,0 +1,78 @@
1
+ // root-packages.mjs - the workspace packages of an app ROOT (packages/agent-sdk, packages/module-<name>, the managed packages/modules).
2
+ // They lie outside both side folders and belong to no side; both sides import them by package name, through their package entry points
3
+ // (the `exports` of the manifest), so the import graph reads them as first-party packages and the back-end canon never reads them as
4
+ // a third-party library. The app root's one package.json lists them in `workspaces`; the patterns that start with a side folder
5
+ // (`fe/apps/*`) are that side's own workspaces and are not read here.
6
+ import fs from 'node:fs';
7
+ import path from 'node:path';
8
+ import { readJsonFile as readJson } from '../../lib/json.mjs';
9
+ import { byCodeUnit } from '../../lib/list.mjs';
10
+ import { isInside } from '../../lib/walk.mjs';
11
+ import { slash } from '../../lib/path-key.mjs';
12
+ /** The slots whose directories at the app root are first-party packages of the app (agent SDK, module packages, the managed registry). */
13
+ export const ROOT_PACKAGE_SLOTS = new Set(['app.packages', 'app.module-registry']);
14
+ const SIDE_PREFIX = /^(?:be|fe)\//;
15
+ /** A workspace pattern this reader expands (a literal path, or `*` as a whole segment); the others are judged by the workspace rules. */
16
+ const expandablePattern = (written) => !path.isAbsolute(written) && written.split('/').every(segment => segment !== '..' && (!segment.includes('*') || segment === '*'));
17
+ function expandSegment(base, segment) {
18
+ if (segment !== '*')
19
+ return [path.join(base, segment)];
20
+ if (!fs.existsSync(base) || !fs.lstatSync(base).isDirectory())
21
+ return [];
22
+ return fs.readdirSync(base, { withFileTypes: true }).filter(item => item.isDirectory()).sort((a, b) => byCodeUnit(a.name, b.name)).map(item => path.join(base, item.name));
23
+ }
24
+ /** A package folder with a regular package.json (a link is not one). */
25
+ export function packageDirectory(absolute) {
26
+ try {
27
+ if (!fs.lstatSync(absolute).isDirectory())
28
+ return false;
29
+ const manifest = fs.lstatSync(path.join(absolute, 'package.json'));
30
+ return manifest.isFile() && !manifest.isSymbolicLink();
31
+ }
32
+ catch {
33
+ return false;
34
+ }
35
+ }
36
+ /** The folders the `workspaces` of the app root's package.json name that no side owns, as absolute paths in code-unit order. */
37
+ export function rootWorkspaceDirectories(packageRoot) {
38
+ const manifest = readJson(path.join(packageRoot, 'package.json'));
39
+ const declared = manifest?.workspaces;
40
+ const patterns = Array.isArray(declared) ? declared : declared?.packages;
41
+ const found = new Set();
42
+ for (const pattern of Array.isArray(patterns) ? patterns : []) {
43
+ if (typeof pattern !== 'string' || !pattern.trim())
44
+ continue;
45
+ const written = slash(pattern.trim()).replace(/^\.\//, '');
46
+ if (SIDE_PREFIX.test(written) || !expandablePattern(written))
47
+ continue;
48
+ let bases = [packageRoot];
49
+ for (const segment of written.split('/'))
50
+ bases = bases.flatMap(base => expandSegment(base, segment));
51
+ for (const base of bases)
52
+ found.add(path.resolve(base));
53
+ }
54
+ return [...found].sort(byCodeUnit);
55
+ }
56
+ /**
57
+ * The record of one package folder of the app root, or null when it is no named package inside the app root.
58
+ * `canonical` is the file-identity function of the caller (the real path), so a record agrees with the files the graph reads.
59
+ */
60
+ export function rootPackageRecord(packageRoot, directory, canonical) {
61
+ if (!packageDirectory(directory) || !isInside(packageRoot, directory))
62
+ return null;
63
+ const manifest = readJson(path.join(directory, 'package.json'));
64
+ const name = manifest?.['name'];
65
+ if (manifest === null || typeof name !== 'string' || !name)
66
+ return null;
67
+ return { root: canonical(directory), relative: slash(path.relative(packageRoot, directory)), name, exports: manifest['exports'], manifest, workspace: true, app: false };
68
+ }
69
+ /** The names of the workspace packages of the app root: what the back-end canon must not read as third-party libraries. */
70
+ export function rootPackageNames(packageRoot) {
71
+ const names = new Set();
72
+ for (const directory of rootWorkspaceDirectories(packageRoot)) {
73
+ const record = rootPackageRecord(packageRoot, directory, (file) => file);
74
+ if (record !== null)
75
+ names.add(record.name);
76
+ }
77
+ return names;
78
+ }
@@ -5,6 +5,7 @@
5
5
  import path from 'node:path';
6
6
  import { allowsFile } from './allows.mjs';
7
7
  import { openHfs } from './slots.mjs';
8
+ import { ROOT_PACKAGE_SLOTS } from './architecture/root-packages.mjs';
8
9
  const posix = (p) => String(p).replaceAll('\\', '/');
9
10
  const isAbsoluteAny = (text) => path.isAbsolute(text) || /^[A-Za-z]:\//.test(text);
10
11
  /**
@@ -69,3 +70,70 @@ export const openHfsView = ({ runtimeRoot, repoRoot }) => hfsView(openHfs({ root
69
70
  * @returns {object} The frozen view.
70
71
  */
71
72
  export const declaredHfsView = ({ runtimeRoot, declaration, repoRoot, side }) => hfsView(openHfs({ root: runtimeRoot, declaration, side }), repoRoot);
73
+ /**
74
+ * The view of the root workspace packages of an app (`packages/<pkg>/src/**`, slots app.packages and app.module-registry), as the lint of one
75
+ * side sees them: the rule parameters, the apps and the Grammar of `side` (a package is judged by the laws of the side whose subpath a file
76
+ * sits in), and the paths of the APP ROOT (`repoRoot` is the app root, not a side folder). The slots answer for the root paths; a file of a
77
+ * package is of the tier `package` and has no owner: the owner laws (one `index.ts` per owner root) are the module folders', a package's public
78
+ * surface being the `exports` of its manifest.
79
+ *
80
+ * @param {object} opened - The result of `openHfs` for the app root (profile app, both sides resolved).
81
+ * @param {string} repoRoot - The absolute app root.
82
+ * @param {string} side - `be` or `fe`: the side whose laws the file is judged by.
83
+ * @returns {object} The frozen view: the profile of the side over the paths of the app root.
84
+ */
85
+ function packagesView(opened, repoRoot, side) {
86
+ const scope = opened.sides?.[side];
87
+ const sideRepo = opened.repo.sides?.[side];
88
+ if (scope === undefined || sideRepo === undefined)
89
+ throw new Error('the view of the root packages needs the declaration of an app with both sides');
90
+ const rel = (file) => {
91
+ const text = posix(file);
92
+ return isAbsoluteAny(text) ? posix(path.relative(repoRoot, file)) : text.replace(/^\.\//, '');
93
+ };
94
+ const cache = new Map();
95
+ const classify = (file) => {
96
+ const key = rel(file);
97
+ if (!cache.has(key))
98
+ cache.set(key, opened.classifyPath(key));
99
+ return cache.get(key);
100
+ };
101
+ const packageOf = (file) => {
102
+ const slot = classify(file).slot;
103
+ const relative = rel(file);
104
+ return slot !== undefined && ROOT_PACKAGE_SLOTS.has(slot) ? relative.split('/').slice(0, 2).join('/') : null;
105
+ };
106
+ return Object.freeze({
107
+ repoRoot,
108
+ profile: side,
109
+ side,
110
+ edition: opened.repo.edition ?? 'full',
111
+ ...(sideRepo.grammar === undefined ? {} : { grammar: sideRepo.grammar }),
112
+ apps: sideRepo.apps,
113
+ connections: sideRepo.connections,
114
+ patterns: Object.freeze([...(sideRepo.patterns ?? [])]),
115
+ ruleParams: scope.ruleParams(),
116
+ relative: rel,
117
+ classify,
118
+ slotOf: (file) => classify(file).slot ?? null,
119
+ tierOf: (file) => (packageOf(file) === null ? null : 'package'),
120
+ // A package is no owner of the module laws (one index.ts at the owner root): its public surface is the `exports` of its manifest, so no file of it has an owner.
121
+ ownerOf: () => null,
122
+ allows: (file) => allowsFile(opened, rel(file)),
123
+ slot: (id) => opened.slot(id),
124
+ });
125
+ }
126
+ /**
127
+ * The view of the root packages of the app at `repoRoot` (the app root, where the root `eslint.config.mjs` lives), for the laws of `side`.
128
+ *
129
+ * @param {{ runtimeRoot: string, repoRoot: string, side: string }} input - Where the manifest copy lives, the app root, and the side whose laws apply.
130
+ * @returns {object} The frozen view.
131
+ */
132
+ export const openPackagesHfsView = ({ runtimeRoot, repoRoot, side }) => packagesView(openHfs({ root: runtimeRoot, repoRoot }), repoRoot, side);
133
+ /**
134
+ * The view of the root packages of an in-memory app declaration (rule tests): no file is read except the manifest.
135
+ *
136
+ * @param {{ runtimeRoot: string, declaration: object, repoRoot: string, side: string }} input - Manifest root, the app hfs.json object, the app root and the side.
137
+ * @returns {object} The frozen view.
138
+ */
139
+ export const declaredPackagesHfsView = ({ runtimeRoot, declaration, repoRoot, side }) => packagesView(openHfs({ root: runtimeRoot, declaration }), repoRoot, side);