@starci/eslint-canon-be 3.4.43 → 3.4.45
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 +6 -0
- package/feature-thin.mjs +4 -4
- package/idempotency.mjs +147 -38
- package/package.json +1 -1
- package/runtime/knowledge/grammars/index.yaml +111 -0
- package/runtime/knowledge/hfs/canon-pins.yaml +22 -8
- package/runtime/knowledge/hfs/fe-stack.yaml +12 -4
- package/runtime/knowledge/hfs/rules.yaml +163 -83
- package/runtime/knowledge/hfs/slots.yaml +3 -3
- package/runtime/modules/kernel/removed-vocabulary.yaml +29 -0
- package/runtime/scripts/hfs/architecture/config.mjs +8 -8
- package/runtime/scripts/hfs/declaration-shape.mjs +8 -2
- package/runtime/scripts/hfs/rule-catalog.mjs +2 -2
- package/runtime/scripts/hfs/slots.mjs +1 -0
- package/runtime/scripts/hfs/view.mjs +1 -0
- package/runtime/scripts/lib/grammar-lint.mjs +48 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.45 - 2026-10-26
|
|
4
|
+
- Changed: the bundled runtime copies (canon pins, front-end stack, rules and the Grammar index) follow the alpha.31.1 sources. No rule changes.
|
|
5
|
+
|
|
6
|
+
## 3.4.44 - 2026-10-26
|
|
7
|
+
- Fixed: R80 delegated claims map arguments over runtime parameters and reject spreads, effects hidden in `const` preparation, protected or replaced helpers, and runner or manager unions containing lookalikes. Private helpers (including `#private`) and independently judged public delivery helpers retain the transaction proof; public overrides preserve the claim's manager binding and prelude restrictions, including widened parameters and arrow properties. Every declared runner and manager origin must match its owner.
|
|
8
|
+
|
|
3
9
|
## 3.4.43 - 2026-10-26
|
|
4
10
|
- Changed: `inbox-dedupe-required` (R80 `BE_INBOX_DEDUPE_MISSING`) accepts a delivery whose one write transaction hands its work to a typed helper: the sole `.transaction(...)` runs on typeorm's `EntityManager` or on a port the `platform/database` owner declares, its arrow callback returns `this.<method>(..., tx, ...)` of the same class (resolved by the checker), and that async helper claims first with the never-reassigned manager parameter and returns on `false`. The database port also runs the inline claim callback. A helper that never claims, claims after other work or under a condition, claims with another manager, a lookalike runner, a callback that hands work to another object or detaches it, and an ignored claim answer stay refused; every form refused before stays refused.
|
|
5
11
|
|
package/feature-thin.mjs
CHANGED
|
@@ -154,11 +154,11 @@ export const featureThin = {
|
|
|
154
154
|
return injectedNamesOf(classNode).has(member) ? member : null
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
/** True for
|
|
157
|
+
/** True for an imported pure `*.mapper.ts` function, resolved through any facade re-exports to its declaration. */
|
|
158
158
|
const isMapperCall = (callee) => {
|
|
159
|
-
if (callee.type !== "Identifier") return false
|
|
160
|
-
const
|
|
161
|
-
return
|
|
159
|
+
if (callee.type !== "Identifier" || importOf(context, callee) === null) return false
|
|
160
|
+
const declarations = aliasTarget(context, callee)?.getDeclarations() ?? []
|
|
161
|
+
return declarations.length > 0 && declarations.every((declaration) => roleOf(declaration.getSourceFile().fileName) === "mapper")
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/** True for a call `f(...)` where `f` is imported and its declaration lives outside the feature tier (a function of the modules). */
|
package/idempotency.mjs
CHANGED
|
@@ -24,23 +24,26 @@
|
|
|
24
24
|
* `EntityManager` or as a port the `platform/database` owner declares; the callback's one parameter is typed `EntityManager`.
|
|
25
25
|
* Either the actual selected inline async callback claims with that manager in its first statement, then returns on false,
|
|
26
26
|
* or an arrow callback hands its whole work to one `this.<method>(..., tx, ...)` of the same class, resolved by the checker:
|
|
27
|
-
* that async helper receives the manager in a never-reassigned
|
|
28
|
-
*
|
|
27
|
+
* that async helper is private or a public delivery method judged in its own right, receives the manager in a never-reassigned
|
|
28
|
+
* `EntityManager` runtime parameter, and prepares only `const` arguments without this/manager access, writes, construction,
|
|
29
|
+
* awaits or calls other than free functions. Its first await is the claim with that parameter at its top level, followed by
|
|
30
|
+
* the return on false:
|
|
29
31
|
* return this.manager.transaction((tx) => this.recordInTransaction(delivery, tx))
|
|
30
32
|
* async recordInTransaction(delivery: Delivery, manager: EntityManager) {
|
|
31
33
|
* const key = keyOf(delivery)
|
|
32
34
|
* if (!(await this.inbox.claim(source, key, manager))) return this.readRepeat(delivery, manager)
|
|
33
35
|
* return this.write(delivery, manager)
|
|
34
36
|
* }
|
|
35
|
-
* No outer work runs after a duplicate.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
37
|
+
* No outer work runs after a duplicate. Every runner and manager type origin must match its declared owner; unions with
|
|
38
|
+
* lookalikes, spread handoffs, protected or replaced helpers, and callbacks handing work to another object are refused.
|
|
39
|
+
* Effects hidden inside free functions or getters and helpers called past the first one stay review questions.
|
|
38
40
|
*/
|
|
41
|
+
import ts from "typescript"
|
|
39
42
|
import { hfsOf } from "./lib/hfs.mjs"
|
|
40
|
-
import { walk } from "./lib/ast.mjs"
|
|
43
|
+
import { keyName, walk } from "./lib/ast.mjs"
|
|
41
44
|
import { baseName, isOwnedType, ownerNameOf } from "./lib/ports.mjs"
|
|
42
45
|
import { resolveVariable } from "./lib/transactions.mjs"
|
|
43
|
-
import {
|
|
46
|
+
import { typeOrigins, typed } from "./lib/types.mjs"
|
|
44
47
|
import { mutationIdempotent } from "./lib/client-idempotency.mjs"
|
|
45
48
|
|
|
46
49
|
/** The `Inbox` port of `platform/inbox`. */
|
|
@@ -102,10 +105,20 @@ const hasPriorEffect = (expression, call) => {
|
|
|
102
105
|
/** A transaction port the `platform/database` owner declares: a receiver typed by that owner, never by its name. */
|
|
103
106
|
const isDatabasePort = (context, node) => {
|
|
104
107
|
const hfs = hfsOf(context)
|
|
105
|
-
|
|
108
|
+
const origins = typeOrigins(context, node)
|
|
109
|
+
return origins.length > 0 && origins.every((origin) =>
|
|
106
110
|
origin.module === null && hfs.tierOf(origin.file) === "platform" && ownerNameOf(hfs, origin.file) === "database")
|
|
107
111
|
}
|
|
108
112
|
|
|
113
|
+
/** Every declared alternative must be TypeORM's manager: one genuine union member cannot vouch for a lookalike. */
|
|
114
|
+
const isEntityManager = (context, node) => {
|
|
115
|
+
const origins = typeOrigins(context, node)
|
|
116
|
+
return origins.length > 0 && origins.every((origin) => origin.name === "EntityManager" && origin.module === "typeorm")
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** TypeScript erases a `this` parameter, so only these parameters receive call arguments at runtime. */
|
|
120
|
+
const runtimeParams = (method) => method.value.params.filter((param) => !(param.type === "Identifier" && param.name === "this"))
|
|
121
|
+
|
|
109
122
|
/** The callback a sole, returned or awaited `.transaction(...)` runs on an EntityManager or the database port, and its manager parameter. */
|
|
110
123
|
const soleTransactionCallback = (context, body) => {
|
|
111
124
|
if (body.body.length !== 1) return null
|
|
@@ -117,7 +130,7 @@ const soleTransactionCallback = (context, body) => {
|
|
|
117
130
|
if (call?.type !== "CallExpression" || callee.type !== "MemberExpression" || callee.computed
|
|
118
131
|
|| callee.property.type !== "Identifier" || callee.property.name !== "transaction" || hasPriorEffect(call, call)) return null
|
|
119
132
|
let callback = null
|
|
120
|
-
if (
|
|
133
|
+
if (isEntityManager(context, callee.object)) {
|
|
121
134
|
// TypeORM runs arg0 when it is a function, otherwise arg1. Never accept a later, ignored callback.
|
|
122
135
|
const isolation = call.arguments[0]
|
|
123
136
|
callback = call.arguments.length === 1 ? isolation
|
|
@@ -127,7 +140,7 @@ const soleTransactionCallback = (context, body) => {
|
|
|
127
140
|
} else if (isDatabasePort(context, callee.object) && call.arguments.length === 1) callback = call.arguments[0]
|
|
128
141
|
if (!callback || !["ArrowFunctionExpression", "FunctionExpression"].includes(callback.type) || callback.params.length !== 1) return null
|
|
129
142
|
const manager = callback.params[0]
|
|
130
|
-
if (manager.type !== "Identifier" || !
|
|
143
|
+
if (manager.type !== "Identifier" || !isEntityManager(context, manager)) return null
|
|
131
144
|
return { callback, manager }
|
|
132
145
|
}
|
|
133
146
|
|
|
@@ -173,7 +186,48 @@ const handedCall = (callback) => {
|
|
|
173
186
|
const call = expression?.type === "AwaitExpression" ? expression.argument : expression
|
|
174
187
|
const callee = call?.callee
|
|
175
188
|
return call?.type === "CallExpression" && callee.type === "MemberExpression" && !callee.computed
|
|
176
|
-
&& callee.object.type === "ThisExpression" && callee.property.type
|
|
189
|
+
&& callee.object.type === "ThisExpression" && ["Identifier", "PrivateIdentifier"].includes(callee.property.type) ? call : null
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Argument preparation cannot start instance or transactional work before the inbox claim. */
|
|
193
|
+
const preparesArguments = (context, statement, manager) => {
|
|
194
|
+
if (statement.type !== "VariableDeclaration" || statement.kind !== "const") return false
|
|
195
|
+
let safe = true
|
|
196
|
+
walk(statement, (node) => {
|
|
197
|
+
if (node.type === "ThisExpression" || (node.type === "Identifier" && isParameter(context, node, manager))
|
|
198
|
+
|| ["AwaitExpression", "NewExpression", "AssignmentExpression", "UpdateExpression"].includes(node.type)
|
|
199
|
+
|| (node.type === "CallExpression" && node.callee.type !== "Identifier")) safe = false
|
|
200
|
+
}, { intoFunctions: false })
|
|
201
|
+
return safe
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** An assignment anywhere in the class can replace the method that the checker resolved for the handoff. */
|
|
205
|
+
const replacesHelper = (classBody, helper) => {
|
|
206
|
+
let replaced = false
|
|
207
|
+
walk(classBody, (node) => {
|
|
208
|
+
if (node.type !== "AssignmentExpression") return
|
|
209
|
+
const target = node.left
|
|
210
|
+
if (target.type === "MemberExpression" && target.object.type === "ThisExpression"
|
|
211
|
+
&& (!target.computed || target.property.type === "Literal")
|
|
212
|
+
&& (target.property.type === "PrivateIdentifier") === (helper.key.type === "PrivateIdentifier")
|
|
213
|
+
&& keyName(target.property) === keyName(helper.key)) replaced = true
|
|
214
|
+
})
|
|
215
|
+
return replaced
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** The helper body must claim first with its unchanged runtime manager, after only argument preparation. */
|
|
219
|
+
const helperClaim = (context, helper, param) => {
|
|
220
|
+
if (!helper.value?.async || helper.value.body?.type !== "BlockStatement"
|
|
221
|
+
|| param?.type !== "Identifier" || !isEntityManager(context, param)) return null
|
|
222
|
+
const body = helper.value.body
|
|
223
|
+
const found = claimStatement(body)
|
|
224
|
+
if (!found) return null
|
|
225
|
+
const before = body.body.slice(0, body.body.indexOf(found.statement))
|
|
226
|
+
if (before.some((statement) => !preparesArguments(context, statement, param))) return null
|
|
227
|
+
const claim = found.awaited.argument
|
|
228
|
+
if (claim?.type !== "CallExpression" || !isParameter(context, claim.arguments[2], param, { unwritten: true })
|
|
229
|
+
|| hasPriorEffect(found.statement, claim)) return null
|
|
230
|
+
return found.awaited
|
|
177
231
|
}
|
|
178
232
|
|
|
179
233
|
/**
|
|
@@ -183,7 +237,7 @@ const handedCall = (callback) => {
|
|
|
183
237
|
*/
|
|
184
238
|
const delegatedClaim = (context, delivery, { callback, manager }) => {
|
|
185
239
|
const call = handedCall(callback)
|
|
186
|
-
if (!call || hasPriorEffect(call, call)) return null
|
|
240
|
+
if (!call || call.arguments.some((argument) => argument.type === "SpreadElement") || hasPriorEffect(call, call)) return null
|
|
187
241
|
const position = call.arguments.findIndex((argument) => argument.type === "Identifier" && argument.name === manager.name)
|
|
188
242
|
if (position < 0 || !isParameter(context, call.arguments[position], manager)) return null
|
|
189
243
|
const { checker, toTs } = typed(context)
|
|
@@ -191,17 +245,11 @@ const delegatedClaim = (context, delivery, { callback, manager }) => {
|
|
|
191
245
|
const helper = declarations.length === 1
|
|
192
246
|
? delivery.parent.body.find((member) => member.type === "MethodDefinition" && toTs(member) === declarations[0]) : undefined
|
|
193
247
|
if (!helper || helper === delivery || helper.kind !== "method" || helper.static || !helper.value.async || !helper.value.body) return null
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const before = body.body.slice(0, body.body.indexOf(found.statement))
|
|
200
|
-
if (before.some((statement) => statement.type !== "VariableDeclaration" || statement.kind !== "const")) return null
|
|
201
|
-
const claim = found.awaited.argument
|
|
202
|
-
if (claim?.type !== "CallExpression" || !isParameter(context, claim.arguments[2], param, { unwritten: true })
|
|
203
|
-
|| hasPriorEffect(found.statement, claim)) return null
|
|
204
|
-
return found.awaited
|
|
248
|
+
const params = runtimeParams(helper)
|
|
249
|
+
// A public delivery contract carries its claim and manager obligations into every override.
|
|
250
|
+
if (helper.accessibility === "protected" || (helper.accessibility !== "private" && helper.key.type !== "PrivateIdentifier"
|
|
251
|
+
&& (!params[0] || !isDeliveryParam(context, params[0]))) || replacesHelper(delivery.parent, helper)) return null
|
|
252
|
+
return helperClaim(context, helper, params[position])
|
|
205
253
|
}
|
|
206
254
|
|
|
207
255
|
/** The first awaited claim of a delivery that runs as one transaction: inline in its callback, or in the typed helper that callback delegates to. */
|
|
@@ -210,14 +258,61 @@ const transactionClaim = (context, delivery) => {
|
|
|
210
258
|
if (!transaction) return null
|
|
211
259
|
return inlineClaim(context, transaction) ?? delegatedClaim(context, delivery, transaction)
|
|
212
260
|
}
|
|
261
|
+
|
|
262
|
+
/** A delivery's type, including a union alternative, exposes the sender's `eventId`. */
|
|
263
|
+
const hasEventId = (checker, type) =>
|
|
264
|
+
(type.isUnion() ? type.types : [type]).some((part) => checker.getPropertyOfType(part, "eventId") !== undefined)
|
|
265
|
+
|
|
213
266
|
/** Whether a parameter's type has an `eventId` property: the shape of a delivery. */
|
|
214
267
|
const isDeliveryParam = (context, param) => {
|
|
215
268
|
const target = param.type === "TSParameterProperty" ? param.parameter : param.type === "AssignmentPattern" ? param.left : param
|
|
216
269
|
const { checker, toTs } = typed(context)
|
|
217
270
|
const tsNode = toTs(target)
|
|
218
271
|
if (!tsNode) return false
|
|
219
|
-
|
|
220
|
-
|
|
272
|
+
return hasEventId(checker, checker.getTypeAtLocation(tsNode))
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** The runtime parameter the declared signature's first awaited claim uses, including declarations in another source file. */
|
|
276
|
+
const claimedManagerPosition = (checker, signature) => {
|
|
277
|
+
let awaited = null
|
|
278
|
+
const visit = (node) => {
|
|
279
|
+
if (ts.isAwaitExpression(node) && (!awaited || node.end < awaited.end)) awaited = node
|
|
280
|
+
ts.forEachChild(node, (child) => { if (!ts.isFunctionLike(child)) visit(child) })
|
|
281
|
+
}
|
|
282
|
+
const body = signature.getDeclaration()?.body
|
|
283
|
+
if (body) visit(body)
|
|
284
|
+
const claim = awaited?.expression
|
|
285
|
+
if (!claim || !ts.isCallExpression(claim) || !ts.isPropertyAccessExpression(claim.expression)
|
|
286
|
+
|| claim.expression.name.text !== "claim" || !claim.arguments[2]) return -1
|
|
287
|
+
const manager = checker.getSymbolAtLocation(claim.arguments[2])
|
|
288
|
+
return manager ? signature.parameters.indexOf(manager) : -1
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/** An override preserves inherited delivery and transaction-manager obligations even when it widens its own parameter. */
|
|
292
|
+
const inheritedDelivery = (context, method) => {
|
|
293
|
+
const name = keyName(method.key)
|
|
294
|
+
const result = { delivery: false, managers: new Set() }
|
|
295
|
+
if (name === null) return result
|
|
296
|
+
const { checker, toTs } = typed(context)
|
|
297
|
+
const location = toTs(method)
|
|
298
|
+
const seen = new Set()
|
|
299
|
+
const visit = (type) => {
|
|
300
|
+
if (seen.has(type)) return
|
|
301
|
+
seen.add(type)
|
|
302
|
+
const member = checker.getPropertyOfType(type, name)
|
|
303
|
+
const signatures = member ? checker.getTypeOfSymbolAtLocation(member, location).getCallSignatures() : []
|
|
304
|
+
for (const signature of signatures) {
|
|
305
|
+
const param = signature.parameters[0]
|
|
306
|
+
if (!param || !hasEventId(checker, checker.getTypeOfSymbolAtLocation(param, location))) continue
|
|
307
|
+
result.delivery = true
|
|
308
|
+
const manager = claimedManagerPosition(checker, signature)
|
|
309
|
+
if (manager >= 0) result.managers.add(manager)
|
|
310
|
+
}
|
|
311
|
+
for (const base of checker.getBaseTypes(type) ?? []) visit(base)
|
|
312
|
+
}
|
|
313
|
+
const owner = checker.getTypeAtLocation(toTs(method.parent.parent))
|
|
314
|
+
for (const base of checker.getBaseTypes(owner) ?? []) visit(base)
|
|
315
|
+
return result
|
|
221
316
|
}
|
|
222
317
|
|
|
223
318
|
/** A service method that takes a delivery claims the event through the shared inbox before it acts. */
|
|
@@ -238,23 +333,37 @@ export const inboxDedupeRequired = {
|
|
|
238
333
|
if (!baseName(filename).endsWith(".service.ts") || !slot || slot.startsWith("be.tests.")) return {}
|
|
239
334
|
// The event bus publishes events (their shape carries an `eventId`) and its runtime claims the inbox before a consumer runs: no delivery method here.
|
|
240
335
|
if (slot.startsWith("be.platform") && ownerNameOf(hfs, filename) === "event-bus") return {}
|
|
336
|
+
const judgeClaim = (node, inherited) => {
|
|
337
|
+
const body = node.value?.body
|
|
338
|
+
let awaited = body?.type === "BlockStatement" ? transactionClaim(context, node) ?? firstAwait(body) : null
|
|
339
|
+
if (inherited.managers.size > 0) {
|
|
340
|
+
const params = node.value?.params ? runtimeParams(node) : []
|
|
341
|
+
if (![...inherited.managers].every((position) => helperClaim(context, node, params[position]) === awaited)) awaited = null
|
|
342
|
+
}
|
|
343
|
+
const call = awaited?.argument
|
|
344
|
+
const claims = call?.type === "CallExpression"
|
|
345
|
+
&& call.callee.type === "MemberExpression"
|
|
346
|
+
&& !call.callee.computed
|
|
347
|
+
&& call.callee.property.type === "Identifier"
|
|
348
|
+
&& call.callee.property.name === "claim"
|
|
349
|
+
&& call.arguments.length >= 2
|
|
350
|
+
&& isInboxType(context, call.callee.object)
|
|
351
|
+
if (!claims) context.report({ node: node.key, messageId: "noClaim" })
|
|
352
|
+
else if (!returnsOnFalse(awaited)) context.report({ node: node.key, messageId: "noEarlyReturn" })
|
|
353
|
+
}
|
|
241
354
|
return {
|
|
242
355
|
MethodDefinition(node) {
|
|
243
356
|
if (node.kind !== "method" || node.static || node.key.type === "PrivateIdentifier" || !node.value.body) return
|
|
244
357
|
if (node.accessibility === "private" || node.accessibility === "protected") return
|
|
245
|
-
const first = node
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
&& call.arguments.length >= 2
|
|
255
|
-
&& isInboxType(context, call.callee.object)
|
|
256
|
-
if (!claims) context.report({ node: node.key, messageId: "noClaim" })
|
|
257
|
-
else if (!returnsOnFalse(awaited)) context.report({ node: node.key, messageId: "noEarlyReturn" })
|
|
358
|
+
const first = runtimeParams(node)[0]
|
|
359
|
+
const inherited = inheritedDelivery(context, node)
|
|
360
|
+
if (!(first && isDeliveryParam(context, first)) && !inherited.delivery) return
|
|
361
|
+
judgeClaim(node, inherited)
|
|
362
|
+
},
|
|
363
|
+
PropertyDefinition(node) {
|
|
364
|
+
if (node.static || node.key.type === "PrivateIdentifier" || node.accessibility === "private" || node.accessibility === "protected") return
|
|
365
|
+
const inherited = inheritedDelivery(context, node)
|
|
366
|
+
if (inherited.delivery) judgeClaim(node, inherited)
|
|
258
367
|
},
|
|
259
368
|
}
|
|
260
369
|
},
|
package/package.json
CHANGED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
schema: starci/knowledge-source@1
|
|
2
|
+
id: grammars
|
|
3
|
+
title: Grammar families
|
|
4
|
+
purpose: |
|
|
5
|
+
Catalog of authored UI Grammar families. Inventory only — not a default-family rule.
|
|
6
|
+
The selected design specification names the applicable installed family. The app binds that choice
|
|
7
|
+
explicitly in sides.fe.grammar; the catalog resolves its lint package and component contract.
|
|
8
|
+
A missing or ambiguous family never silently resolves to a family. DNA snapshots describe the
|
|
9
|
+
observed implementation; they do not install packages or prove current rendered behavior.
|
|
10
|
+
appliesTo:
|
|
11
|
+
- grammar
|
|
12
|
+
provenance:
|
|
13
|
+
limitations: |
|
|
14
|
+
Component names, tokens and gap tables describe the reference family at observation time.
|
|
15
|
+
Verify actual package identity/version, exported types, CSS and renderer source in the selected
|
|
16
|
+
repository before using snapshot APIs or gaps. Record current source references in the selected
|
|
17
|
+
.starciwork node; an old source census is not current UAT evidence. The current public consumer
|
|
18
|
+
entry observed for FE work is @starci/grammar/common — confirm installed exports before import.
|
|
19
|
+
The `common` entry is a DNA snapshot of that semantic entry and nothing more: it declares no palette,
|
|
20
|
+
no family boundary and no composition playbook, because the entry itself ships none of them.
|
|
21
|
+
guidance:
|
|
22
|
+
- id: catalog-not-default
|
|
23
|
+
requirement: |
|
|
24
|
+
Do not treat this catalog as selecting a default Grammar family. Family choice belongs to the
|
|
25
|
+
current design specification and its explicit sides.fe.grammar declaration.
|
|
26
|
+
rationale: |
|
|
27
|
+
Silent fallback to StarCi would invent product direction and override an absent/ambiguous design.
|
|
28
|
+
- id: verify-before-use
|
|
29
|
+
requirement: |
|
|
30
|
+
Before applying snapshot APIs or recorded gaps, inspect the selected repository's package
|
|
31
|
+
identity/version, exported types, CSS and renderer source.
|
|
32
|
+
rationale: |
|
|
33
|
+
Snapshots are historical; installed exports may differ. Inventing missing APIs is forbidden.
|
|
34
|
+
- id: ui-owns-universal
|
|
35
|
+
requirement: |
|
|
36
|
+
Common semantics, renderer anatomy, state and accessibility remain owned by knowledge/ui.
|
|
37
|
+
A family owns its scoped visual realization and promoted idioms; the product owns its facts,
|
|
38
|
+
content, routes and approved composition.
|
|
39
|
+
Apply FE-RULE-OWNERSHIP in knowledge/patterns/fe/index.yaml when placing requirements and checks.
|
|
40
|
+
rationale: |
|
|
41
|
+
Keeps universal UI law separate from family-scoped DNA and product composition.
|
|
42
|
+
topics:
|
|
43
|
+
- id: common
|
|
44
|
+
path: common/DNA.yaml
|
|
45
|
+
title: Common Grammar — DNA
|
|
46
|
+
summary: |
|
|
47
|
+
Generated DNA snapshot of the `@starci/grammar/common` public entry: custom properties,
|
|
48
|
+
the 110 renderers of its registry, their classes, stamped rule ids and recorded gaps. The DNA owns the observed package
|
|
49
|
+
version and source inventory. Common supplies anatomy, not colour. The snapshot is drift-checked.
|
|
50
|
+
- id: starci
|
|
51
|
+
path: starci/index.yaml
|
|
52
|
+
title: StarCi Core Grammar
|
|
53
|
+
summary: |
|
|
54
|
+
Historical snapshot of the StarCi Core family — DNA, idioms, playbook (including composing the
|
|
55
|
+
0.5.0 forms, overlays and navigation chrome) and family boundaries.
|
|
56
|
+
- id: offset-pop
|
|
57
|
+
path: offset-pop/index.yaml
|
|
58
|
+
title: Offset Pop Grammar
|
|
59
|
+
summary: |
|
|
60
|
+
Snapshot of the product-neutral Offset Pop family — cream canvas, ink outline plus hard offset
|
|
61
|
+
shadow, one pink decision accent with a text-safe accent for text — with DNA, idioms, a
|
|
62
|
+
mobile-first playbook for playful learning or consumer apps, and family boundaries including two
|
|
63
|
+
decisions flagged for the family owner.
|
|
64
|
+
- id: heritage
|
|
65
|
+
path: heritage/DNA.yaml
|
|
66
|
+
title: Heritage Grammar
|
|
67
|
+
summary: |
|
|
68
|
+
Generated snapshot of the Heritage family's parity declaration, arrangement, scoped tokens and Common renderers.
|
|
69
|
+
families:
|
|
70
|
+
- id: heritage
|
|
71
|
+
title: heritage
|
|
72
|
+
contractRef: common
|
|
73
|
+
packageSnapshot: heritage/DNA.yaml
|
|
74
|
+
- id: common
|
|
75
|
+
title: common
|
|
76
|
+
componentContract:
|
|
77
|
+
package: '@starci/grammar'
|
|
78
|
+
entry: '@starci/grammar/common'
|
|
79
|
+
styleEntry: '@starci/grammar/common.css'
|
|
80
|
+
peers: [react, '@heroui/react', '@xyflow/react']
|
|
81
|
+
packageSnapshot: common/DNA.yaml
|
|
82
|
+
scope: |
|
|
83
|
+
DNA snapshot only. This catalog carries no Common-side family boundary, idiom set or composition
|
|
84
|
+
playbook: `@starci/grammar/common` is the semantic/props entry every visual family is defined over
|
|
85
|
+
(`defineGrammarFamily`), not a family that ships a palette, so `authority`, `reusableStyle`,
|
|
86
|
+
`productComposition` and `index` have nothing to name here. Universal semantics, renderer anatomy,
|
|
87
|
+
state and accessibility remain owned by knowledge/ui.
|
|
88
|
+
- id: starci
|
|
89
|
+
title: starci
|
|
90
|
+
contractRef: common
|
|
91
|
+
lint:
|
|
92
|
+
package: '@starci/eslint-grammar-starci'
|
|
93
|
+
factory: starciGrammarConfig
|
|
94
|
+
prefix: starci-grammar
|
|
95
|
+
authority: starci/family.yaml
|
|
96
|
+
packageSnapshot: starci/DNA.yaml
|
|
97
|
+
reusableStyle: starci/idioms.yaml
|
|
98
|
+
productComposition: starci/playbook.yaml
|
|
99
|
+
index: starci/index.yaml
|
|
100
|
+
- id: offset-pop
|
|
101
|
+
title: offset-pop
|
|
102
|
+
contractRef: common
|
|
103
|
+
lint:
|
|
104
|
+
package: '@starci/eslint-grammar-offset-pop'
|
|
105
|
+
factory: offsetPopGrammarConfig
|
|
106
|
+
prefix: starci-grammar
|
|
107
|
+
authority: offset-pop/family.yaml
|
|
108
|
+
packageSnapshot: offset-pop/DNA.yaml
|
|
109
|
+
reusableStyle: offset-pop/idioms.yaml
|
|
110
|
+
productComposition: offset-pop/playbook.yaml
|
|
111
|
+
index: offset-pop/index.yaml
|
|
@@ -21,30 +21,44 @@ pins:
|
|
|
21
21
|
install: registry
|
|
22
22
|
side: fe
|
|
23
23
|
source: packages/heroicons/package.json
|
|
24
|
-
why: 'StarCi custom Heroicons-compatible cuts; eslint-
|
|
24
|
+
why: 'StarCi custom Heroicons-compatible cuts; eslint-grammar-starci (icon.mjs) admits @starci/heroicons/24/outline and /16/solid as icon sources, so an app that uses them gets this exact version.'
|
|
25
25
|
'@starci/grammar':
|
|
26
|
-
version: 0.12.
|
|
26
|
+
version: 0.12.4
|
|
27
27
|
group: starci
|
|
28
28
|
install: registry
|
|
29
29
|
side: fe
|
|
30
30
|
source: packages/grammar/package.json
|
|
31
31
|
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.'
|
|
32
32
|
'@starci/eslint-canon-be':
|
|
33
|
-
version: 3.4.
|
|
33
|
+
version: 3.4.45
|
|
34
34
|
group: starci
|
|
35
35
|
install: registry
|
|
36
36
|
side: be
|
|
37
37
|
source: packages/eslint/be/package.json
|
|
38
38
|
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.'
|
|
39
39
|
'@starci/eslint-canon-fe':
|
|
40
|
-
version:
|
|
40
|
+
version: 9.1.0
|
|
41
41
|
group: starci
|
|
42
42
|
install: registry
|
|
43
43
|
side: fe
|
|
44
44
|
source: packages/eslint/fe/package.json
|
|
45
45
|
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.'
|
|
46
|
+
'@starci/eslint-grammar-starci':
|
|
47
|
+
version: 0.12.4
|
|
48
|
+
group: starci
|
|
49
|
+
install: registry
|
|
50
|
+
side: fe
|
|
51
|
+
source: packages/eslint/grammar-starci/package.json
|
|
52
|
+
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
53
|
+
'@starci/eslint-grammar-offset-pop':
|
|
54
|
+
version: 0.12.4
|
|
55
|
+
group: starci
|
|
56
|
+
install: registry
|
|
57
|
+
side: fe
|
|
58
|
+
source: packages/eslint/grammar-offset-pop/package.json
|
|
59
|
+
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.'
|
|
46
60
|
'@starci/stylelint-canon':
|
|
47
|
-
version: 2.0.
|
|
61
|
+
version: 2.0.12
|
|
48
62
|
group: starci
|
|
49
63
|
install: registry
|
|
50
64
|
side: fe
|
|
@@ -77,14 +91,14 @@ pins:
|
|
|
77
91
|
source: packages/test-world/package.json
|
|
78
92
|
why: 'the shared e2e library of every back end (R47, R48), a devDependency of every back end: the warm stack behind toxiproxy, the network-edge fakes, the Nest boot, the typed useTestWorld handle, useSandbox for contract specs and the outage lock. Kafka is real own infra (the one digest-pinned apache/kafka KRaft image, a broker listener and proxy per slot, slot-prefixed topics, consumer groups and client ids) and Postgres is schema-per-context (a schema and a login role per context in a shared database). Each worker has its own data slot (<ns>_w<k>) with its own databases, Keycloak realm, leased Redis DB, bucket/collection/topic prefixes, fakes host, toxiproxy proxies and outage lock; a run provisions min(jest workers, workers cap, default 2) slots, and state file protocol 2 pairs exactly with @starci/jest-preset (TEST_WORLD_PAIR_MISMATCH otherwise). A modules world boots real peer apps beside its modules, world.apps.<name>.during(fn) is the outage of a peer app, w.keycloak.clientSecret(client) answers the run-generated secret of a confidential realm client, world.keycloak.events/sessions read the realm user events and live sessions, world.infra.postgresql.connection(name) takes one database connection down while the others serve, and world.resolve and scope.resolve take any Nest token. Every path a declaration names (`stack`, seeds, the realm, Dockerfiles) resolves from the app root (the directory of hfs.json); the globalSetup registers the path aliases as TypeScript resolves them. Its CLI main is exported at ./cli for starci app stack.'
|
|
79
93
|
'@starci/cli':
|
|
80
|
-
version: 1.7.
|
|
94
|
+
version: 1.7.36
|
|
81
95
|
group: starci
|
|
82
96
|
install: registry
|
|
83
97
|
side: both
|
|
84
98
|
source: packages/cli/package.json
|
|
85
99
|
why: 'the only StarCi command package; product repositories install it for starci app, while @starci/hfs remains its pinned transitive implementation.'
|
|
86
100
|
'@starci/hfs':
|
|
87
|
-
version: 4.7.
|
|
101
|
+
version: 4.7.36
|
|
88
102
|
group: starci
|
|
89
103
|
install: registry
|
|
90
104
|
side: both
|
|
@@ -380,7 +394,7 @@ pins:
|
|
|
380
394
|
version: 2.2.0
|
|
381
395
|
group: ui
|
|
382
396
|
side: fe
|
|
383
|
-
why: 'the base of the one application icon set (fe-stack icons, with @starci/heroicons for the glyphs it lacks); eslint-
|
|
397
|
+
why: 'the base of the one application icon set (fe-stack icons, with @starci/heroicons for the glyphs it lacks); eslint-grammar-starci (icon.mjs) admits @heroicons/react/24/outline and /16/solid.'
|
|
384
398
|
'@dicebear/core':
|
|
385
399
|
version: 10.4.0
|
|
386
400
|
group: ui
|
|
@@ -121,10 +121,11 @@ concerns:
|
|
|
121
121
|
pattern: FE-UI
|
|
122
122
|
forbids: ['@dicebear/*', boring-avatars, 'react-nice-avatar', multiavatar]
|
|
123
123
|
why: >-
|
|
124
|
-
Grammar owns
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
Grammar owns avatars: pass the uploaded avatar as src and the user or identity id as seed on Avatar, AvatarButton
|
|
125
|
+
or AvatarGroup members. Without src, Grammar renders bundled DiceBear initials using the first and last words of
|
|
126
|
+
name, with colour seeded by seed when present and by name otherwise. kind="agent" adds the Grammar-owned bot badge
|
|
127
|
+
without changing the name rule. @dicebear/core and @dicebear/styles are Grammar runtime dependencies pinned in
|
|
128
|
+
canon-pins.yaml. Apps declare and import @starci/grammar, never @dicebear/*, and draw no avatar visuals.
|
|
128
129
|
- id: theme
|
|
129
130
|
tier: core
|
|
130
131
|
packages: [next-themes]
|
|
@@ -237,6 +238,13 @@ concerns:
|
|
|
237
238
|
pattern: FE-LINT
|
|
238
239
|
forbids: []
|
|
239
240
|
why: the canon lint and format configuration.
|
|
241
|
+
- id: grammar-lint
|
|
242
|
+
tier: opt
|
|
243
|
+
packages: ['@starci/eslint-grammar-starci', '@starci/eslint-grammar-offset-pop']
|
|
244
|
+
home: [fe.source-root-pinned]
|
|
245
|
+
pattern: FE-RULE-OWNERSHIP
|
|
246
|
+
forbids: []
|
|
247
|
+
why: The selected Grammar family's lint package runs beside the universal front-end canon; the family catalog declares the package and factory.
|
|
240
248
|
- id: auth-supabase
|
|
241
249
|
tier: opt
|
|
242
250
|
packages: ['@supabase/supabase-js', '@supabase/ssr']
|