@starci/eslint-grammar-core 0.21.12 → 0.21.14

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,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.14 - 2026-11-03
4
+
5
+ - Changed: requires `@starci/eslint-canon-fe` 9.11.0; the runtime copies of the slot manifest, stack and pins carry the `@starci/auth` rows.
6
+
7
+ ## 0.21.13
8
+
9
+ - Changed: Require the updated FE canon, carry the rule catalog of @starci/hfs 5.1.0 (R368) and align the Grammar family.
10
+ - Changed: `navbar-cluster` (FE-APP-SHELL-3) requires notifications only where the shell has a notification source (a `use...Notification...` call in its file).
11
+ - Fixed: `route-page-is-one-page` declares the blocks its page proof reads as cross-file inputs, so a changed block re-judges the route and the page owner.
12
+ - Changed: `pane-grid-children` (R345) follows a `const` that holds a Pane.
13
+
3
14
  ## 0.21.12
4
15
 
5
16
  - Changed: Require the updated FE canon, carry the rule texts of @starci/hfs 5.0.8 and align the Grammar family.
package/dist/app-shell.js CHANGED
@@ -12,6 +12,10 @@ import { walk } from "@starci/eslint-canon-fe/lib/ast.mjs";
12
12
  const CANON = "knowledge/ui/composition/app-shell.yaml";
13
13
  const BOTTOM_TABS = /^(?:BottomNavigation|BottomTabBar|MobileBottomNav|MobileTabBar)$/;
14
14
  const EXPECTED_CLUSTER = ["language:IconButton", "theme:Switch", "notifications:IconButton", "account:AvatarButton"];
15
+ /** The cluster of a shell with no notification source (a platform-admin shell with no workspace): notifications are required only where a read feeds them, so a shell without one may omit them. */
16
+ const NO_SOURCE_CLUSTER = EXPECTED_CLUSTER.filter((kind) => !kind.startsWith("notifications:"));
17
+ /** A notification source: a call of a hook that reads notifications (`useNotifications`, `useWorkspaceNotificationFeed`). */
18
+ const NOTIFICATION_READ = /use\w*Notification\w*\s*\(/;
15
19
  const meta = (code, description, messages) => ({
16
20
  type: "problem",
17
21
  docs: { description: `${code}: ${description}`, url: CANON },
@@ -179,10 +183,11 @@ export const navbarCluster = defineRule({
179
183
  return;
180
184
  if (shellHeader && delegatesImportedBar(context, actions.value))
181
185
  return;
182
- const desktop = EXPECTED_CLUSTER.join("|");
183
- const mobile = EXPECTED_CLUSTER.slice(2).join("|");
186
+ const shapes = [EXPECTED_CLUSTER, ...(NOTIFICATION_READ.test(context.sourceCode.text) ? [] : [NO_SOURCE_CLUSTER])];
184
187
  const sequences = alternatives.map((sequence) => sequence.join("|"));
185
- if (!sequences.includes(desktop) || sequences.some((sequence) => sequence !== desktop && sequence !== mobile))
188
+ const desktop = shapes.map((shape) => shape.join("|"));
189
+ const mobile = shapes.map((shape) => shape.slice(2).join("|"));
190
+ if (!sequences.some((sequence) => desktop.includes(sequence)) || sequences.some((sequence) => !desktop.includes(sequence) && !mobile.includes(sequence)))
186
191
  context.report({ node, messageId: "cluster" });
187
192
  } };
188
193
  },
@@ -26,6 +26,8 @@ export const crossFileInputs = [
26
26
  { rule: "page-tabs-in-header", kind: "exists", relativeTo: "side", globs: ["**/src/app", "**/src/app/**"], appliesTo: ["**/src/features/pages/**/*.{ts,tsx}"], reader: "lib/page-frame.ts" },
27
27
  { rule: "route-page-is-one-page", kind: "exists", relativeTo: "side", globs: ["**/src/app", "**/src/app/**"], appliesTo: ["**/src/features/pages/**/*.{ts,tsx}"], reader: "lib/page-frame.ts" },
28
28
  { rule: "route-page-is-one-page", kind: "content", relativeTo: "side", globs: ["**/src/app/**/*.{ts,tsx,js,jsx,mjs,cjs,mts,cts}"], appliesTo: ["**/src/features/pages/**/*.{ts,tsx}"], reader: "lib/page-frame.ts" },
29
+ // the page owner is judged by the blocks it renders as its root (a block that draws the Page, its own sub-blocks and the feature files it imports): a changed block re-judges the owner
30
+ { rule: "route-page-is-one-page", kind: "content", relativeTo: "side", globs: ["**/src/components/{blocks,frames,composites,branches,leaves}/**/*.{ts,tsx}", "**/src/features/**/*.{ts,tsx}"], appliesTo: ["**/src/features/pages/**/*.{ts,tsx}", "**/src/app/**/*.{ts,tsx}"], reader: "lib/page-frame.ts" },
29
31
  // the theme an app defines its tokens in: the route slot's globals.css and the brand slot's brand.css
30
32
  { rule: "no-unresolved-token-class", kind: "content", relativeTo: "side", globs: ["**/globals.css", "**/brand.css"], appliesTo: ["**/*.{ts,tsx}"], reader: "tokens.ts" },
31
33
  ];
package/dist/pane.js CHANGED
@@ -76,8 +76,19 @@ const returnedExpressions = (context, fn) => {
76
76
  };
77
77
  /** True for a function-shaped node. */
78
78
  const isFunction = (node) => node !== undefined && (node.type === "ArrowFunctionExpression" || node.type === "FunctionExpression");
79
+ /**
80
+ * The initializer of a `const` the identifier names in this file: a variable that holds a Pane (`const side = <Pane area="side" />`) renders that Pane, so it is
81
+ * followed to what it holds. A `let`, a parameter, an import or a destructured name holds nothing that can be proved here.
82
+ */
83
+ const constInitializer = (context, identifier) => {
84
+ const definition = variableOf(context, identifier)?.defs.find((entry) => entry.type === "Variable");
85
+ const declarator = definition?.node;
86
+ if (declarator?.type !== "VariableDeclarator" || declarator.id.type !== "Identifier" || declarator.init === null)
87
+ return null;
88
+ return declarator.parent.type === "VariableDeclaration" && declarator.parent.kind === "const" ? declarator.init : null;
89
+ };
79
90
  /** The leaves an expression can render. */
80
- const leavesOfExpression = (context, expression) => {
91
+ const leavesOfExpression = (context, expression, followed = new Set()) => {
81
92
  switch (expression.type) {
82
93
  case "JSXEmptyExpression":
83
94
  return [];
@@ -91,26 +102,33 @@ const leavesOfExpression = (context, expression) => {
91
102
  if (typeof expression.value === "string" && expression.value.trim() === "")
92
103
  return [];
93
104
  return [{ kind: "opaque", node: expression }];
94
- case "Identifier":
95
- return expression.name === "undefined" ? [] : [{ kind: "opaque", node: expression }];
105
+ case "Identifier": {
106
+ if (expression.name === "undefined")
107
+ return [];
108
+ const init = constInitializer(context, expression);
109
+ if (init === null || followed.has(init))
110
+ return [{ kind: "opaque", node: expression }];
111
+ // a named value reports on the name, where the author wrote it in the grid, however deep the initializer is followed
112
+ return leavesOfExpression(context, init, new Set([...followed, init])).map((leaf) => (leaf.kind === "opaque" ? { kind: "opaque", node: expression } : leaf.kind === "element" && nameOf(leaf.node.openingElement.name) === "Pane" ? leaf : { kind: "opaque", node: expression }));
113
+ }
96
114
  case "TSAsExpression":
97
115
  case "TSNonNullExpression":
98
116
  case "TSSatisfiesExpression":
99
- return leavesOfExpression(context, expression.expression);
117
+ return leavesOfExpression(context, expression.expression, followed);
100
118
  case "ConditionalExpression":
101
- return [...leavesOfExpression(context, expression.consequent), ...leavesOfExpression(context, expression.alternate)];
119
+ return [...leavesOfExpression(context, expression.consequent, followed), ...leavesOfExpression(context, expression.alternate, followed)];
102
120
  case "LogicalExpression":
103
121
  return expression.operator === "&&"
104
- ? leavesOfExpression(context, expression.right)
105
- : [...leavesOfExpression(context, expression.left), ...leavesOfExpression(context, expression.right)];
122
+ ? leavesOfExpression(context, expression.right, followed)
123
+ : [...leavesOfExpression(context, expression.left, followed), ...leavesOfExpression(context, expression.right, followed)];
106
124
  case "ArrayExpression":
107
- return expression.elements.flatMap((element) => (element === null ? [] : leavesOfExpression(context, element)));
125
+ return expression.elements.flatMap((element) => (element === null ? [] : leavesOfExpression(context, element, followed)));
108
126
  case "CallExpression": {
109
127
  const callee = expression.callee;
110
128
  const method = callee.type === "MemberExpression" && !callee.computed && callee.property.type === "Identifier" ? callee.property.name : null;
111
129
  const callback = expression.arguments[0];
112
130
  if ((method === "map" || method === "flatMap") && isFunction(callback))
113
- return returnedExpressions(context, callback).flatMap((returned) => leavesOfExpression(context, returned));
131
+ return returnedExpressions(context, callback).flatMap((returned) => leavesOfExpression(context, returned, followed));
114
132
  return [{ kind: "opaque", node: expression }];
115
133
  }
116
134
  default:
@@ -135,7 +153,7 @@ const leavesOf = (context, parent) => renderedChildren(parent.children).flatMap(
135
153
  export const paneGridChildren = exemptFreestyle(defineRule({
136
154
  meta: {
137
155
  type: "problem",
138
- docs: { description: "R345: a PaneGrid child is a Pane element (directly, in a conditional or in a map), never a wrapper component, a fragment or a variable.", url: "knowledge/hfs/rules.yaml#R345" },
156
+ docs: { description: "R345: a PaneGrid child is a Pane element (directly, in a conditional or in a map, or a `const` that holds one), never a wrapper component, a fragment or a variable the file cannot prove holds a Pane.", url: "knowledge/hfs/rules.yaml#R345" },
139
157
  schema: [],
140
158
  messages: {
141
159
  notPane: "{{what}} is a child of `PaneGrid`, which places only `Pane` elements by their `area` and drops the rest: this cell renders blank. Write the `<Pane area=\"...\">` here (inline it, or return a `Pane` element from a `cond ? <Pane/> : null`, `cond && <Pane/>` or `.map` expression), and move the wrapper's content into that Pane's PaneSections.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-grammar-core",
3
- "version": "0.21.12",
3
+ "version": "0.21.14",
4
4
  "description": "ESLint rules for the core Grammar's component, token and composition contracts.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -41,7 +41,7 @@
41
41
  "node": ">=22"
42
42
  },
43
43
  "peerDependencies": {
44
- "@starci/eslint-canon-fe": "9.9.12",
44
+ "@starci/eslint-canon-fe": "9.11.0",
45
45
  "eslint": ">=9",
46
46
  "typescript": ">=5.9"
47
47
  },
@@ -30,36 +30,43 @@ pins:
30
30
  side: fe
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
+ '@starci/next-data':
34
+ version: 0.1.0
35
+ group: starci
36
+ install: registry
37
+ side: fe
38
+ source: packages/next-data/package.json
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.'
33
40
  '@starci/grammar':
34
- version: 0.21.12
41
+ version: 0.21.14
35
42
  group: starci
36
43
  install: registry
37
44
  side: fe
38
45
  source: packages/grammar/package.json
39
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.'
40
47
  '@starci/eslint-canon-be':
41
- version: 3.11.19
48
+ version: 3.13.0
42
49
  group: starci
43
50
  install: registry
44
51
  side: be
45
52
  source: packages/eslint-canon-be/package.json
46
53
  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
54
  '@starci/eslint-canon-fe':
48
- version: 9.9.12
55
+ version: 9.11.0
49
56
  group: starci
50
57
  install: registry
51
58
  side: fe
52
59
  source: packages/eslint-canon-fe/package.json
53
60
  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
61
  '@starci/eslint-grammar-core':
55
- version: 0.21.12
62
+ version: 0.21.14
56
63
  group: starci
57
64
  install: registry
58
65
  side: fe
59
66
  source: packages/eslint-grammar-core/package.json
60
67
  why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
61
68
  '@starci/eslint-grammar-offset-pop':
62
- version: 0.21.12
69
+ version: 0.21.14
63
70
  group: starci
64
71
  install: registry
65
72
  side: fe
@@ -85,14 +92,14 @@ pins:
85
92
  side: both
86
93
  source: packages/prettier-config/package.json
87
94
  '@starci/jest-preset':
88
- version: 2.6.0
95
+ version: 2.6.1
89
96
  group: starci
90
97
  install: registry
91
98
  side: be
92
99
  source: packages/jest-preset/package.json
93
100
  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
101
  '@starci/test-world':
95
- version: 1.3.3
102
+ version: 1.3.4
96
103
  group: starci
97
104
  install: registry
98
105
  side: be
@@ -105,8 +112,22 @@ pins:
105
112
  side: be
106
113
  source: packages/ai-router/package.json
107
114
  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':
116
+ version: 0.1.0
117
+ group: starci
118
+ install: registry
119
+ side: both
120
+ source: packages/auth/package.json
121
+ 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.'
122
+ '@starci/object-storage':
123
+ version: 0.1.0
124
+ group: starci
125
+ install: registry
126
+ side: be
127
+ source: packages/object-storage/package.json
128
+ 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).'
108
129
  '@starci/hfs':
109
- version: 5.0.8
130
+ version: 5.2.0
110
131
  group: starci
111
132
  install: registry
112
133
  side: both
@@ -543,12 +564,12 @@ pins:
543
564
  version: 3.1150.0
544
565
  group: framework
545
566
  side: be
546
- why: 'the S3 transport of integrations/object-storage, the one ObjectStorage adapter of both editions (MinIO, S3, Spaces); 3.1150.0 is the release of 2026-10-12, chosen over newer ones that had not aged two weeks.'
567
+ why: 'the S3 transport inside @starci/object-storage, the one ObjectStorage adapter of both editions (MinIO, S3, Spaces), which depends on it at exactly this version and which no app file imports; 3.1150.0 is the release of 2026-10-12, chosen over newer ones that had not aged two weeks.'
547
568
  '@aws-sdk/s3-request-presigner':
548
569
  version: 3.1150.0
549
570
  group: framework
550
571
  side: be
551
- why: 'signs the presigned PUT and GET of integrations/object-storage locally, the same release as client-s3.'
572
+ why: 'signs the presigned PUT and GET inside @starci/object-storage locally, the same release as client-s3; no app file imports it.'
552
573
  '@apollo/server':
553
574
  version: 5.5.1
554
575
  group: framework
@@ -924,7 +924,7 @@ rules:
924
924
  code: "BE_TEST_TOPOLOGY"
925
925
  editions: [lite, full]
926
926
  docs: [docs/quality-bar.md#r47-test-topology]
927
- law: "One jest config, projects `unit`, `integration`, `e2e` and `contract`, live by folder, `diagnostics: false`; unit specs are `<name>.<role>.spec.ts` beside the file they test: required for the roles of `ruleParams.be.unitRoles` (`<name>.service.spec.ts` beside a `<name>.service.ts`, `<name>.cli.spec.ts` beside a cli command `<name>.cli.ts` of `src/features/cli`), optional for any other logic role (`ruleParams.be.logicRoles`) inside a slot whose `coverage` is required and beside a logic file such a slot declares (`logic`: `passport.tokens.spec.ts` beside `passport.tokens.ts`), except that the commit adding a measured logic file stages its `<name>.<role>.spec.ts` beside it (owner 2026-10-20, judged by `starci app check --staged` in the pre-commit hook), and nowhere else but beside a webhook or realtime door that has no service of its own (`<provider>.webhook.spec.ts`, `<channel>.gateway.spec.ts`, `<x>.subscription.spec.ts`) (every unit-tested subject has exactly one; any other `*.spec.ts` outside `be/src/tests/{world,integration,e2e,contract}` is a finding, including specs in apps), and the unit project collects coverage from the logic roles of the measured roots and the logic files their slots declare only (the scope derived from the slot manifest, R204) with a per-file threshold of 100 on lines, branches, functions and statements (`test` runs `--coverage`; `importHelpers` and `tslib`); `be/src/tests/world/` is the ONLY test infrastructure: `global-setup.ts` starts the app's own stack (`.starcistacks/<env>`, named by `stack` in `test-world.config.ts`, the declaration of the test-world library in its one named form `export const { useTestWorld, useSandbox } = defineTestWorld({...})` (a default export is not read): every service it declares runs REAL, behind toxiproxy, images and versions read from the stack at run time, never spelled in test source) or attaches to a warm one that answers, and runs the migrations once over the cli app's connections (the runner of the cli migrate command); `global-teardown.ts` stops only what its setup started; `use-test-world.ts` exports `useTestWorld({ apps } | { modules })` (`world.apps.<name>.api`, `world.db.<connection>`, `world.infra.<service>` with `latency(ms)`, `cut()` and `restore()` on the real service, `world.fake.<provider>`, `world.waitFor`) and `fakes/<provider>/` holds the network-edge fakes (`failNext`, `replayWebhook`, `delay`, payload fixtures) of external SaaS the team does not operate ONLY: a fake of a service the stack declares is refused, except stateless compute that needs special hardware or an external model (GPU inference, a self-hosted embedding model), whose `stacks` entry in `test-world.config.ts` declares `{ fakedBy: <fake>, reason }` with a non-empty `reason` (a stateful service, or one with a persistent volume, is never accepted); it alone owns containers, DataSource, migrations and `process.env`; nothing under `be/src/tests` overrides a provider or DI token; `be/src/tests/integration/<capability>/*.integration-spec.ts` (`{ modules }`, with the real peer apps its client calls beside them as `apps`; real infrastructure, no HTTP door of ours), `be/src/tests/e2e/<area>/*.e2e-spec.ts` (`{ apps }`) and `be/src/tests/contract/<provider>/*.contract-spec.ts` (provider sandboxes, skipped without sandbox config, run only by `test:contract`, never by `test` or `test:e2e`) agree folder with suffix; an integration or e2e spec passes `useTestWorld` one object literal with plain keys (no variable, spread or computed key) and calls it; the contract layer has no skip either: a contract spec writes `sandbox.describe(...)` from the test-world library's `useSandbox(...)`, and when the sandbox config is absent that describe registers one failing test naming the missing keys (the body never runs), and every `fakes/<provider>/` that serves payload fixtures (`payloads/*.json`) has a `contract/<provider>/*.contract-spec.ts` that references those fixtures and asserts `shapeOf(real)` equals `shapeOf(fixture)` (the helper `shapeOf` is named by `ruleParams.be.contractShape` of the slot manifest; fakes the test-world library provides are guarded by the library); no `.test.ts`, `int-spec` or `harness-spec`, no `live/` and no `be/src/tests/e2e/world`."
927
+ law: "One jest config, projects `unit`, `integration`, `e2e` and `contract`, live by folder, `diagnostics: false`; unit specs are `<name>.<role>.spec.ts` beside the file they test: required for the roles of `ruleParams.be.unitRoles` (`<name>.service.spec.ts` beside a `<name>.service.ts`, `<name>.cli.spec.ts` beside a cli command `<name>.cli.ts` of `src/features/cli`), optional for any other logic role (`ruleParams.be.logicRoles`) inside a slot whose `coverage` is required and beside a logic file such a slot declares (`logic`: `passport.tokens.spec.ts` beside `passport.tokens.ts`), except that the commit adding a measured logic file stages its `<name>.<role>.spec.ts` beside it (owner 2026-10-20, judged by `starci app check --staged` in the pre-commit hook), and nowhere else but beside a webhook or realtime door that has no service of its own (`<provider>.webhook.spec.ts`, `<channel>.gateway.spec.ts`, `<x>.subscription.spec.ts`) (every unit-tested subject has exactly one; any other `*.spec.ts` outside `be/src/tests/{world,integration,e2e,contract}` is a finding, including specs in apps), and the unit project collects coverage from the logic roles of the measured roots and the logic files their slots declare only (the scope derived from the slot manifest, R204) with a per-file threshold of 100 on lines, branches, functions and statements (`test` runs `--coverage`; `importHelpers` and `tslib`); `be/src/tests/world/` is the ONLY test infrastructure: `global-setup.ts` starts the app's own stack (`.starcistacks/<env>`, named by `stack` in `test-world.config.ts`, the declaration of the test-world library in a named form: `export const { useTestWorld, useSandbox } = defineTestWorld({...})`, or `const world: TestWorldApi = defineTestWorld({...})` with `useTestWorld` and `useSandbox` exported typed from it (a default export is not read): every service it declares runs REAL, behind toxiproxy, images and versions read from the stack at run time, never spelled in test source) or attaches to a warm one that answers, and runs the migrations once over the cli app's connections (the runner of the cli migrate command); `global-teardown.ts` stops only what its setup started; `use-test-world.ts` exports `useTestWorld({ apps } | { modules })` (`world.apps.<name>.api`, `world.db.<connection>`, `world.infra.<service>` with `latency(ms)`, `cut()` and `restore()` on the real service, `world.fake.<provider>`, `world.waitFor`) and `fakes/<provider>/` holds the network-edge fakes (`failNext`, `replayWebhook`, `delay`, payload fixtures) of external SaaS the team does not operate ONLY: a fake of a service the stack declares is refused, except stateless compute that needs special hardware or an external model (GPU inference, a self-hosted embedding model), whose `stacks` entry in `test-world.config.ts` declares `{ fakedBy: <fake>, reason }` with a non-empty `reason` (a stateful service, or one with a persistent volume, is never accepted); it alone owns containers, DataSource, migrations and `process.env`; nothing under `be/src/tests` overrides a provider or DI token; `be/src/tests/integration/<capability>/*.integration-spec.ts` (`{ modules }`, with the real peer apps its client calls beside them as `apps`; real infrastructure, no HTTP door of ours), `be/src/tests/e2e/<area>/*.e2e-spec.ts` (`{ apps }`) and `be/src/tests/contract/<provider>/*.contract-spec.ts` (provider sandboxes, skipped without sandbox config, run only by `test:contract`, never by `test` or `test:e2e`) agree folder with suffix; an integration or e2e spec passes `useTestWorld` one object literal with plain keys (no variable, spread or computed key) and calls it; the contract layer has no skip either: a contract spec writes `sandbox.describe(...)` from the test-world library's `useSandbox(...)`, and when the sandbox config is absent that describe registers one failing test naming the missing keys (the body never runs), and every `fakes/<provider>/` that serves payload fixtures (`payloads/*.json`) has a `contract/<provider>/*.contract-spec.ts` that references those fixtures and asserts `shapeOf(real)` equals `shapeOf(fixture)` (the helper `shapeOf` is named by `ruleParams.be.contractShape` of the slot manifest; fakes the test-world library provides are guarded by the library); no `.test.ts`, `int-spec` or `harness-spec`, no `live/` and no `be/src/tests/e2e/world`."
928
928
  kinds: [check, codemod, lint]
929
929
  gates: [land, ci]
930
930
  failureCodes: ["BE_TEST_TOPOLOGY", "BE_CONTRACT_UNGUARDED", "BE_UNIT_SPEC_NOT_STAGED"]
@@ -4084,6 +4084,7 @@ rules:
4084
4084
  enforcers:
4085
4085
  - {kind: hfs, id: fe-stack, at: scripts/hfs/rules/fe-stack.mjs}
4086
4086
  - {kind: eslint-fe, id: fe-stack-import}
4087
+ - {kind: eslint-fe, id: swr-extension-from-package}
4087
4088
  proves:
4088
4089
  - {path: packages/eslint/fe/frontend-boundary-coverage.spec.mjs, editions: [lite, full], codes: [FE_STACK_FORBIDDEN]}
4089
4090
  - {path: packages/hfs/src/frontend-boundary-coverage.spec.mjs, editions: [lite, full], codes: [FE_STACK_FORBIDDEN]}
@@ -5696,7 +5697,7 @@ rules:
5696
5697
  ruling: "A model call made straight from code uses LangChain with retrieved context, through the ai-router gateway (owner ruling be-ai-langchain-gateway): the LangChain clients point at the gateway's base URL with its virtual key."
5697
5698
  - id: R328
5698
5699
  code: "BE_AUTH_PASSPORT_OWNER"
5699
- law: "The identity libraries (@nestjs/passport, passport, passport-google-oauth20, passport-local, @nestjs/jwt, jose and bcryptjs) are imported only by integrations/passport, the one owner of the Google OAuth 2.0 strategy (state and PKCE), the local email and password strategy (bcrypt) and the app's own access tokens; bcrypt and every Supabase client are owned nowhere."
5700
+ law: "The identity libraries (@nestjs/passport, passport, passport-google-oauth20, passport-local, @nestjs/jwt, jose and bcryptjs) are the dependencies of @starci/auth and are imported by no app file; @starci/auth/server is imported only by integrations/passport, its one glue. bcrypt and every Supabase client are owned nowhere."
5700
5701
  kinds: [lint]
5701
5702
  gates: [pre-commit, settle, land, ci]
5702
5703
  failureCodes: ["BE_AUTH_PASSPORT_OWNER"]
@@ -5718,7 +5719,7 @@ rules:
5718
5719
  ruling: "Lite leaves Supabase: its identity is the app own Passport integration (Google OAuth and email/password) on its self-hosted PostgreSQL; full keeps Keycloak."
5719
5720
  - id: R329
5720
5721
  code: "BE_AUTH_JWT_OWN_JWKS"
5721
- law: "A lite back-end principal comes only from the app's own access token verified by integrations/passport against its own key set (jose jwtVerify over createLocalJWKSet, issuer, audience and algorithms pinned), never from a remote JWKS, an unverified decode or a request body claim; domain/identity builds the principal from that verification."
5722
+ law: "A lite back-end principal comes only from the app's own access token, verified by @starci/auth (EdDSA pinned, issuer and audience checked, a local key set that may hold several keys), never from a remote JWKS, a token decoded without its signature check, a jwtVerify call in the app or a body claim."
5722
5723
  kinds: [check, lint]
5723
5724
  gates: [pre-commit, settle, land, ci]
5724
5725
  failureCodes: ["BE_AUTH_JWT_OWN_JWKS"]
@@ -5742,7 +5743,7 @@ rules:
5742
5743
  ruling: "The lite back end verifies its own asymmetric access tokens against its own JWKS; it trusts no remote identity provider."
5743
5744
  - id: R330
5744
5745
  code: "BE_AUTH_REFRESH_COOKIE"
5745
- law: "A refresh token travels only in an httpOnly, Secure, SameSite=Strict cookie scoped to the refresh door (set and cleared only through integrations/passport), is rotated on every use with reuse detection, and never appears as a field of a request or response body."
5746
+ law: "A refresh token travels only in the httpOnly, Secure cookie that @starci/auth sets, rotates (with a reuse grace window and reuse detection) and clears; no app file writes that cookie, and the token never appears as a field of a request or response body."
5746
5747
  kinds: [lint]
5747
5748
  gates: [pre-commit, settle, land, ci]
5748
5749
  failureCodes: ["BE_AUTH_REFRESH_COOKIE"]
@@ -5764,7 +5765,7 @@ rules:
5764
5765
  ruling: "The refresh token of the lite identity rotates and lives only in an httpOnly cookie; the browser holds no credential."
5765
5766
  - id: R331
5766
5767
  code: "BE_STORAGE_OWNER"
5767
- law: "The S3 client (@aws-sdk/client-s3 and @aws-sdk/s3-request-presigner) is imported only by integrations/object-storage, the ObjectStorage port over S3-compatible storage (MinIO in lite) with presigned PUT and GET; no module imports minio."
5768
+ law: "The S3 client libraries (@aws-sdk/client-s3 and @aws-sdk/s3-request-presigner) are the dependencies of @starci/object-storage, the ObjectStorage port over S3-compatible storage (MinIO in lite) with presigned PUT and GET, and are imported by no app file; @starci/object-storage is imported only by integrations/object-storage, its one glue; no module imports minio."
5768
5769
  kinds: [lint]
5769
5770
  gates: [pre-commit, settle, land, ci]
5770
5771
  failureCodes: ["BE_STORAGE_OWNER"]
@@ -5773,11 +5774,11 @@ rules:
5773
5774
  editions: [lite, full]
5774
5775
  docs: [contexts/code/be/infra.md]
5775
5776
  proves:
5776
- - packages/eslint-canon-be/src/auth-passport.spec.ts
5777
+ - packages/eslint-canon-be/src/object-storage-package.spec.ts
5777
5778
  exemplifiedBy:
5778
- - {path: packages/hfs/templates/be/skeleton-lite/src/modules/integrations/object-storage/object-storage.client.ts, edition: lite}
5779
+ - {path: packages/hfs/templates/be/skeleton-lite/src/modules/integrations/object-storage/object-storage.module.ts, edition: lite}
5779
5780
  witness:
5780
- - {path: packages/eslint-canon-be/src/auth-passport.spec.ts, editions: [lite, full], codes: [BE_STORAGE_OWNER]}
5781
+ - {path: packages/eslint-canon-be/src/object-storage-package.spec.ts, editions: [lite, full], codes: [BE_STORAGE_OWNER]}
5781
5782
  cases:
5782
5783
  - id: case-1
5783
5784
  date: "2026-10-29"
@@ -6525,3 +6526,101 @@ rules:
6525
6526
  source: owner
6526
6527
  quote: "The skeleton is the ready structure with its data missing; it is drawn from isLoading alone and from the reads the region shows."
6527
6528
  ruling: "Several reads feed one frame: loading is any read loading with no data; a key change reloads only the region keyed by it; a refresh keeps the content."
6529
+ - id: R368
6530
+ code: "HFS_EXPLICIT_EXPORT_SURFACE"
6531
+ law: "An exported declaration states its type where it is exported: the return type of an exported function, the type of an exported variable and the type of its parameters are written, not inferred from a body or from other files, because the isolated declaration emit must be able to write the file's surface alone. A component that returns only JSX is explicit. Each export that cannot be written is reported at its place with what to annotate, in a front-end and a back-end file alike."
6532
+ kinds: [lint]
6533
+ gates: [pre-commit, settle, land, ci]
6534
+ failureCodes: ["HFS_EXPLICIT_EXPORT_SURFACE"]
6535
+ enforcers:
6536
+ - {kind: eslint-fe, id: explicit-export-surface}
6537
+ - {kind: eslint-be, id: explicit-export-surface}
6538
+ editions: [lite, full]
6539
+ docs: [contexts/code/shared/typing.md]
6540
+ templateNa: "A template exports nothing the lint result cache keys on."
6541
+ proves:
6542
+ - {path: packages/eslint-canon-fe/src/explicit-surface.spec.ts, editions: [lite, full], codes: [HFS_EXPLICIT_EXPORT_SURFACE]}
6543
+ - {path: packages/eslint-canon-be/src/explicit-surface.spec.ts, editions: [lite, full], codes: [HFS_EXPLICIT_EXPORT_SURFACE]}
6544
+ - {path: packages/hfs/src/explicit-surface.spec.mts, editions: [lite, full], codes: [HFS_EXPLICIT_EXPORT_SURFACE]}
6545
+ exemplifiedBy:
6546
+ - {path: packages/eslint-canon-fe/src/explicit-surface.spec.ts, editions: [lite, full], codes: [HFS_EXPLICIT_EXPORT_SURFACE]}
6547
+ witness:
6548
+ - {path: packages/eslint-canon-fe/src/explicit-surface.spec.ts, editions: [lite, full], codes: [HFS_EXPLICIT_EXPORT_SURFACE]}
6549
+ - {path: packages/eslint-canon-be/src/explicit-surface.spec.ts, editions: [lite, full], codes: [HFS_EXPLICIT_EXPORT_SURFACE]}
6550
+ - {path: packages/hfs/src/explicit-surface.spec.mts, editions: [lite, full], codes: [HFS_EXPLICIT_EXPORT_SURFACE]}
6551
+ cases:
6552
+ - id: case-1
6553
+ date: "2026-11-03"
6554
+ source: owner
6555
+ quote: "enforce it by lint"
6556
+ ruling: "A file whose exported surface is inferred is open in the lint result cache: one body edit lints every importer again. The exported surface is written out, and the rule reports exactly what the cache counts as open."
6557
+ - id: R369
6558
+ code: "FE_DIRECTIVE_FIRST"
6559
+ law: "A `use client` or `use server` directive is the first statement of its module, above every import: below another statement it is an expression that does nothing (Prettier writes it as a parenthesised string) and next build refuses the file."
6560
+ kinds: [lint]
6561
+ gates: [pre-commit, settle, land, ci]
6562
+ failureCodes: ["FE_DIRECTIVE_FIRST"]
6563
+ enforcers:
6564
+ - {kind: eslint-fe, id: directive-first}
6565
+ editions: [lite, full]
6566
+ docs: [contexts/code/fe/boundaries.md]
6567
+ templateNa: "A template places its directives first."
6568
+ proves:
6569
+ - {path: packages/eslint-canon-fe/src/directive-first.spec.ts, editions: [lite, full], codes: [FE_DIRECTIVE_FIRST]}
6570
+ exemplifiedBy:
6571
+ - {path: packages/eslint-canon-fe/src/directive-first.spec.ts, editions: [lite, full], codes: [FE_DIRECTIVE_FIRST]}
6572
+ witness:
6573
+ - {path: packages/eslint-canon-fe/src/directive-first.spec.ts, editions: [lite, full], codes: [FE_DIRECTIVE_FIRST]}
6574
+ cases:
6575
+ - id: case-1
6576
+ date: "2026-11-03"
6577
+ source: owner
6578
+ quote: "no lint caught it"
6579
+ ruling: "A directive below an import broke Nivo's CI build on 2026-11-02; the directive is the first statement of its module and a lint reports it elsewhere."
6580
+ - id: R372
6581
+ code: "STACKS_LOCAL_CONFIG_INVALID"
6582
+ law: "In lite and full apps, every docker-compose environment of .starcistacks/application-stacks.yaml declares a coherent `local` block, judged by the same normalizeLocal the dev verbs of `starci app stack` (doctor, prepare, up, status, logs, verify, down) use: closed fields, one loopback port each, compose services that exist in the compose files, an environment-owned database role (never postgres, never the app role), dev-only custody generators and loopback probes; and a lite app declares at least one such dev environment, so `starci app stack up --env dev` has something to run."
6583
+ kinds: [check]
6584
+ gates: [settle, land, ci]
6585
+ failureCodes: ["STACKS_LOCAL_CONFIG_INVALID", "STACKS_DEV_UNDECLARED"]
6586
+ enforcers:
6587
+ - {kind: hfs, id: stacks-local, at: scripts/hfs/rules/stacks-local.mjs}
6588
+ editions: [lite, full]
6589
+ docs:
6590
+ - {path: contexts/project/stacks.md#project-stacks-6-every-runbook-declares-the-same-operations, editions: [lite, full]}
6591
+ proves:
6592
+ - {path: packages/hfs/src/stack-local.spec.mjs, editions: [lite, full]}
6593
+ exemplifiedBy:
6594
+ - {path: packages/hfs/templates/app/skeleton-lite/.starcistacks, edition: lite}
6595
+ witness:
6596
+ - {path: packages/hfs/src/stack-local.spec.mjs, editions: [lite, full]}
6597
+ - id: R373
6598
+ code: "STACKS_RUNBOOK_DOCKER_COMMAND"
6599
+ law: "The runbook of a docker-compose environment names `starci app stack up --env <env>` and carries no `docker build|run|compose|create|start|stop|pull|push` or `docker stack deploy` command: Docker is run by the harness verb, never by hand (hard rule 8)."
6600
+ kinds: [check]
6601
+ gates: [settle, land, ci]
6602
+ failureCodes: ["STACKS_RUNBOOK_DOCKER_COMMAND"]
6603
+ enforcers:
6604
+ - {kind: hfs, id: stacks-local, at: scripts/hfs/rules/stacks-local.mjs}
6605
+ editions: [lite, full]
6606
+ docs:
6607
+ - {path: contexts/project/stacks.md#project-stacks-10-local-runs, editions: [lite, full]}
6608
+ proves:
6609
+ - {path: packages/hfs/src/stack-local.spec.mjs, editions: [lite, full]}
6610
+ exemplifiedBy:
6611
+ - {path: packages/hfs/templates/app/skeleton-lite/.starcistacks, edition: lite}
6612
+ witness:
6613
+ - {path: packages/hfs/src/stack-local.spec.mjs, editions: [lite, full]}
6614
+ - id: R374
6615
+ code: "STACKS_CODE_BIND_MOUNT"
6616
+ law: "A service the app customises runs from an image built out of `.starcistacks/images/<name>/` (a Dockerfile whose every FROM is digest-pinned and whose final stage is the harness's image for that service, the fork or its runtime layer, when the harness owns one), the same image in every environment; no stack or compose file bind-mounts code, plugins or scripts into a service container (data volumes, secrets, least grants and read-only plain config data files stay allowed)."
6617
+ kinds: [check]
6618
+ gates: [settle, land, ci]
6619
+ failureCodes: ["STACKS_CODE_BIND_MOUNT", "STACKS_IMAGE_BASE_UNPINNED", "STACKS_IMAGE_BASE_NOT_FORK", "STACKS_IMAGE_ENV_DIVERGES"]
6620
+ enforcers:
6621
+ - {kind: hfs, id: stacks-service-images, at: scripts/hfs/rules/stacks-service-images.mjs}
6622
+ editions: [lite, full]
6623
+ docs:
6624
+ - {path: contexts/project/stacks.md#project-stacks-11-a-customised-service-is-an-image-the-app-builds-the-same-in-every-environment, editions: [lite, full]}
6625
+ proves:
6626
+ - {path: packages/hfs/src/stacks-service-images.spec.mjs, editions: [lite, full]}
@@ -236,17 +236,20 @@ ruleParams:
236
236
  "node:https": [platform/http]
237
237
  http: [platform/http]
238
238
  https: [platform/http]
239
- "@aws-sdk/client-s3": [integrations/object-storage] # the ObjectStorage port: one S3 adapter for MinIO, S3 and Spaces (R331)
240
- "@aws-sdk/s3-request-presigner": [integrations/object-storage]
241
- minio: [] # storage goes through the S3 client of integrations/object-storage
239
+ "@aws-sdk/client-s3": [] # the S3 client is a dependency of @starci/object-storage, imported by no app file (R331)
240
+ "@aws-sdk/s3-request-presigner": []
241
+ "@starci/object-storage": [integrations/object-storage] # the ObjectStorage port: one S3 adapter for MinIO, S3 and Spaces (R331)
242
+ minio: [] # storage goes through @starci/object-storage
242
243
  "@supabase": [] # no Supabase client in a back end
243
- "@nestjs/passport": [integrations/passport] # the identity libraries (R328)
244
- passport: [integrations/passport]
245
- passport-google-oauth20: [integrations/passport]
246
- passport-local: [integrations/passport]
247
- "@nestjs/jwt": [integrations/passport]
248
- jose: [integrations/passport]
249
- bcryptjs: [integrations/passport]
244
+ "@nestjs/passport": [] # the identity libraries are @starci/auth's dependencies, never an app's (R328)
245
+ passport: []
246
+ passport-google-oauth20: []
247
+ passport-local: []
248
+ "@nestjs/jwt": []
249
+ jose: []
250
+ bcryptjs: []
251
+ "@starci/auth": [integrations/passport] # the lite sign-in package: its server entry is reached only through integrations/passport (R328)
252
+ "@starci/auth/testing": [integrations/passport] # its test doubles, for the glue's specs
250
253
  bcrypt: []
251
254
  cache-manager: [integrations/cache, integrations/redis]
252
255
  "@nestjs/cache-manager": [integrations/cache, integrations/redis] # the CACHE_MANAGER token: caching goes through the cache capability
@@ -1978,36 +1981,68 @@ slots:
1978
1981
  editions: [lite]
1979
1982
  exemplifiedBy:
1980
1983
  - packages/hfs/templates/be/skeleton-lite/src/modules/integrations/passport/
1981
- # The one owner of the lite identity libraries (ruleParams.be.infraOwners: @nestjs/passport, passport, passport-google-oauth20,
1982
- # passport-local, @nestjs/jwt, jose, bcryptjs): the Google OAuth 2.0 strategy (state and PKCE), the local email and password
1983
- # strategy (bcrypt), the app's own asymmetric access tokens and their JWKS, and the rotating refresh cookie. domain/identity
1984
- # verifies a token through this integration's verifier and builds the principal (contexts/code/be/api-auth.md).
1984
+ # The glue of @starci/auth, the lite sign-in package (Google OAuth with state and PKCE, email and password, EdDSA access tokens with
1985
+ # their JWKS, rotating refresh sessions): the one importer of the package (ruleParams.be.infraOwners), which owns the identity
1986
+ # libraries (@nestjs/passport, passport, passport-google-oauth20, passport-local, @nestjs/jwt, jose, bcryptjs) that no app imports.
1987
+ # It parses the typed options, builds the verifier and names the injectors; domain/identity verifies a token through the kit and
1988
+ # builds the principal (contexts/code/be/api-auth.md).
1985
1989
  path: "src/modules/integrations/passport/"
1986
1990
  presence: required
1987
1991
  tracked: tracked
1988
1992
  tier: integrations
1989
1993
  owner: true
1990
- requires: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.tokens.ts, passport.password.ts, passport.cookie.ts] # Secrets, no defaults (R44); options and named injectors (R83); tokens and JWKS; bcrypt; the refresh cookie
1991
- allows: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.tokens.ts, passport.password.ts, passport.cookie.ts, strategies/, errors/]
1992
- logic: [passport.tokens.ts, passport.password.ts, passport.cookie.ts] # JWT sign and verify over the own JWKS, bcrypt, the refresh cookie: measured at 100 per file
1994
+ requires: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.kit.ts, passport.registration.ts] # Secrets, no defaults (R44); options and named injectors (R83); the kit and the module over @starci/auth
1995
+ allows: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.kit.ts, passport.registration.ts, errors/]
1996
+ logic: [passport.kit.ts] # the verifier mapping over the package: measured at 100 per file
1993
1997
  tests: unit-beside
1994
1998
  rules: [BE_TIER_DIRECTION, BE_ERROR_HOME, BE_SECRET_DEFAULT, BE_INFRA_OWNER, BE_AUTH_PASSPORT_OWNER, BE_AUTH_JWT_OWN_JWKS, BE_AUTH_REFRESH_COOKIE]
1995
1999
  coverage: required
1996
2000
  since: 3.9.0
2001
+ - id: be.identity.sign-in
2002
+ since: 3.16.0
2003
+ profiles: [be]
2004
+ editions: [lite]
2005
+ 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}"
2008
+ presence: optional
2009
+ tracked: tracked
2010
+ tier: inherit
2011
+ tests: unit-beside
2012
+ coverage: none
2013
+ managedBy: auth-lite
2014
+ managedOnly: true # lists files sync renders; the slot owning the path judges them
2015
+ rules: [HFS_MANAGED_FILE_DRIFT]
2016
+ - id: be.feature.auth
2017
+ since: 3.16.0
2018
+ profiles: [be]
2019
+ editions: [lite]
2020
+ 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
+ # 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}"
2023
+ presence: optional
2024
+ tracked: tracked
2025
+ tier: inherit
2026
+ tests: none
2027
+ coverage: none
2028
+ managedBy: auth-lite
2029
+ managedOnly: true # lists files sync renders; the slot owning the path judges them
2030
+ rules: [HFS_MANAGED_FILE_DRIFT]
1997
2031
  - id: be.integrations.object-storage
1998
2032
  profiles: [be]
1999
2033
  exemplifiedBy:
2000
2034
  - packages/hfs/templates/be/skeleton-lite/src/modules/integrations/object-storage/
2001
- # The one owner of the S3 client (@aws-sdk/client-s3 and @aws-sdk/s3-request-presigner) over S3-compatible storage (MinIO in
2002
- # lite): the ObjectStorage port with presigned PUT and GET; no other module imports an S3 SDK or minio.
2035
+ # The glue of @starci/object-storage, the owner of the S3 client (@aws-sdk/client-s3 and @aws-sdk/s3-request-presigner) over
2036
+ # S3-compatible storage (MinIO in lite): this folder keeps the bucket, parses the settings and registers the module; no app
2037
+ # file imports an S3 SDK or minio, and no other module imports the package.
2003
2038
  path: "src/modules/integrations/object-storage/"
2004
2039
  presence: optional
2005
2040
  litePresence: required
2006
2041
  tracked: tracked
2007
2042
  tier: integrations
2008
2043
  owner: true
2009
- requires: [index.ts, object-storage.config.ts, object-storage.options.ts, object-storage.decorators.ts, object-storage.client.ts]
2010
- allows: [index.ts, object-storage.module.ts, object-storage.module-definition.ts, object-storage.config.ts, object-storage.options.ts, object-storage.decorators.ts, object-storage.client.ts, errors/]
2044
+ requires: [index.ts, object-storage.config.ts, object-storage.options.ts, object-storage.decorators.ts, object-storage.module-definition.ts, object-storage.module.ts]
2045
+ allows: [index.ts, object-storage.config.ts, object-storage.options.ts, object-storage.decorators.ts, object-storage.module-definition.ts, object-storage.module.ts, errors/]
2011
2046
  tests: unit-beside
2012
2047
  rules: [BE_TIER_DIRECTION, BE_ERROR_HOME, BE_SECRET_DEFAULT, BE_INFRA_OWNER, BE_STORAGE_OWNER]
2013
2048
  coverage: required
@@ -2541,7 +2576,7 @@ slots:
2541
2576
  profiles: [fe]
2542
2577
  # The identity-provider client (fe-stack auth, FE-AUTH): the session, the access token the Apollo link attaches and the
2543
2578
  # sign-in/sign-out calls. It talks only to the app's own back-end auth doors and holds no credential: the refresh token lives in
2544
- # the back end's httpOnly cookie and the access token in memory (ruling:lite-self-hosted-postgres-passport-minio).
2579
+ # the back end's httpOnly cookie and the access token in the memory of the one @starci/auth client (ruling:lite-self-hosted-postgres-passport-minio).
2545
2580
  path: "apps/<app>/src/modules/auth/"
2546
2581
  presence: optional
2547
2582
  tracked: tracked
@@ -2551,6 +2586,20 @@ slots:
2551
2586
  tests: none
2552
2587
  since: 3.0.0
2553
2588
  rules: [FE_STACK_FORBIDDEN]
2589
+ - id: fe.modules.auth.client
2590
+ since: 3.16.0
2591
+ profiles: [fe]
2592
+ editions: [lite]
2593
+ 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
+ # 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"
2596
+ presence: optional
2597
+ tracked: tracked
2598
+ tier: inherit
2599
+ tests: none
2600
+ managedBy: auth-lite
2601
+ managedOnly: true # lists files sync renders; the slot owning the path judges them
2602
+ rules: [HFS_MANAGED_FILE_DRIFT]
2554
2603
  - id: fe.modules.toast
2555
2604
  profiles: [fe]
2556
2605
  # Mutation feedback (fe-stack toast, FE-TOAST): the HeroUI toast wrapper, showGraphQLToast over a GraphQLResponse and the
@@ -121,7 +121,7 @@ export const MANIFEST_KINDS = [APP_KIND, RUNTIME_KIND];
121
121
  export const manifestKind = (m) => (isPlainObject(m) && m.kind !== undefined ? m.kind : APP_KIND);
122
122
  const strList = (v) => stringList(v);
123
123
 
124
- const APP_SLOT_KEYS = ['id', 'profiles', 'path', 'presence', 'tracked', 'tier', 'tests', 'owner', 'appKind', 'minInstances', 'requiredWhen', 'requiredInstances', 'requires', 'pattern', 'trigger', 'allows', 'forbids', 'layers', 'kinds', 'roles', 'composedBy', 'budget', 'managedBy', 'liteManagedBy', 'rules', 'goesTo', 'why', 'since', 'perConnection', 'parent', 'editions', 'editionWhy', 'litePresence', 'lite', 'provider', 'coverage', 'entries', 'outcomeHome', 'templateNa', 'exemplifiedBy', 'role', 'importedBy', 'logic'];
124
+ const APP_SLOT_KEYS = ['id', 'profiles', 'path', 'presence', 'tracked', 'tier', 'tests', 'owner', 'appKind', 'minInstances', 'requiredWhen', 'requiredInstances', 'requires', 'pattern', 'trigger', 'allows', 'forbids', 'layers', 'kinds', 'roles', 'composedBy', 'budget', 'managedBy', 'liteManagedBy', 'rules', 'goesTo', 'why', 'since', 'perConnection', 'parent', 'editions', 'editionWhy', 'litePresence', 'lite', 'provider', 'coverage', 'entries', 'outcomeHome', 'templateNa', 'exemplifiedBy', 'role', 'importedBy', 'logic', 'managedOnly'];
125
125
  /** The roles a file slot may play that a rule reads (`role`): the entity registry of persistence.md BE-PERSISTENCE-3 (architecture/entity-registry.mjs). */
126
126
  const SLOT_ROLES = ['entity-registry'];
127
127
  /** The fields a slot's `lite` overlay may hold: the same keys it would carry in the slot body, resolved under edition lite. */
@@ -232,7 +232,7 @@ export function readRepoDeclaration(manifest, repoRoot) {
232
232
  function createScopeResolver(manifest, repo) {
233
233
  const profile = repo.profile;
234
234
  const edition = repo.edition ?? 'full';
235
- const slots = manifest.slots.filter((s) => s.profiles.includes(profile) && slotInEdition(manifest, s, edition)).map((s) => effectiveSlot(s, profile, edition));
235
+ const slots = manifest.slots.filter((s) => s.managedOnly !== true && s.profiles.includes(profile) && slotInEdition(manifest, s, edition)).map((s) => effectiveSlot(s, profile, edition));
236
236
  const scope = { manifest, repo, profile, slots, byId: new Map(slots.map((s) => [s.id, s])), variants: slots.flatMap(variantsOf), appKind: new Map(repo.apps.map((a) => [a.name, a.kind])) };
237
237
  const classifyPath = (input) => classifyIn(scope, input);
238
238
  /** tracked | ignored | external for the slot owning `p`, or null when no slot owns it. */