cabloy 5.1.50 → 5.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/.claude/skills/cabloy-backend-scaffold/SKILL.md +207 -0
  2. package/.claude/skills/cabloy-backend-scaffold/evals/evals.json +29 -0
  3. package/.claude/skills/cabloy-backend-scaffold/references/backend-thread-map.md +52 -0
  4. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +39 -0
  5. package/.claude/skills/cabloy-contract-loop/SKILL.md +201 -0
  6. package/.claude/skills/cabloy-contract-loop/evals/evals.json +29 -0
  7. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +47 -0
  8. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -0
  9. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +230 -0
  10. package/.claude/skills/cabloy-frontend-scaffold/evals/evals.json +35 -0
  11. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +41 -0
  12. package/.claude/skills/cabloy-frontend-scaffold/references/frontend-thread-map.md +54 -0
  13. package/.claude/skills/cabloy-workflow/SKILL.md +292 -0
  14. package/.claude/skills/cabloy-workflow/evals/evals.json +35 -0
  15. package/.claude/skills/cabloy-workflow/references/cli-strategy.md +39 -0
  16. package/.claude/skills/cabloy-workflow/references/edition-detection.md +30 -0
  17. package/.github/workflows/docs-pages.yml +56 -0
  18. package/.gitignore +1 -0
  19. package/CHANGELOG.md +54 -0
  20. package/CLAUDE.md +59 -0
  21. package/README.md +152 -0
  22. package/cabloy-docs/.vitepress/config.mjs +255 -0
  23. package/cabloy-docs/.vitepress/public/CNAME +1 -0
  24. package/cabloy-docs/.vitepress/theme/custom.css +64 -0
  25. package/cabloy-docs/.vitepress/theme/edition-badges.md +5 -0
  26. package/cabloy-docs/.vitepress/theme/index.js +5 -0
  27. package/cabloy-docs/ai/class-placement-rule.md +139 -0
  28. package/cabloy-docs/ai/cli-for-agents.md +56 -0
  29. package/cabloy-docs/ai/cli-to-skill-map.md +165 -0
  30. package/cabloy-docs/ai/docs-skills-rules-mapping.md +168 -0
  31. package/cabloy-docs/ai/edition-consistency-checklist.md +150 -0
  32. package/cabloy-docs/ai/edition-detection.md +30 -0
  33. package/cabloy-docs/ai/future-skill-roadmap.md +135 -0
  34. package/cabloy-docs/ai/global-bean-lookup.md +158 -0
  35. package/cabloy-docs/ai/introduction.md +62 -0
  36. package/cabloy-docs/ai/playbook-backend-module.md +111 -0
  37. package/cabloy-docs/ai/playbook-contract-regeneration.md +100 -0
  38. package/cabloy-docs/ai/playbook-frontend-page.md +99 -0
  39. package/cabloy-docs/ai/playbook-metadata-refresh.md +67 -0
  40. package/cabloy-docs/ai/repo-guidance.md +58 -0
  41. package/cabloy-docs/ai/rules-and-config.md +29 -0
  42. package/cabloy-docs/ai/skills.md +37 -0
  43. package/cabloy-docs/ai/verification.md +31 -0
  44. package/cabloy-docs/ai/virtual-decorator-guidance.md +206 -0
  45. package/cabloy-docs/backend/aop-overview.md +128 -0
  46. package/cabloy-docs/backend/auth-guide.md +151 -0
  47. package/cabloy-docs/backend/backend-essentials.md +128 -0
  48. package/cabloy-docs/backend/broadcast-guide.md +138 -0
  49. package/cabloy-docs/backend/cache-guide.md +70 -0
  50. package/cabloy-docs/backend/captcha-guide.md +162 -0
  51. package/cabloy-docs/backend/cli.md +173 -0
  52. package/cabloy-docs/backend/config-guide.md +249 -0
  53. package/cabloy-docs/backend/controller-aop-guide.md +270 -0
  54. package/cabloy-docs/backend/controller-guide.md +347 -0
  55. package/cabloy-docs/backend/crud-workflow.md +118 -0
  56. package/cabloy-docs/backend/dto-guide.md +161 -0
  57. package/cabloy-docs/backend/dto-infer-generation.md +153 -0
  58. package/cabloy-docs/backend/dynamic-datasource-guide.md +70 -0
  59. package/cabloy-docs/backend/election-guide.md +141 -0
  60. package/cabloy-docs/backend/entity-guide.md +150 -0
  61. package/cabloy-docs/backend/error-guide.md +108 -0
  62. package/cabloy-docs/backend/event-guide.md +183 -0
  63. package/cabloy-docs/backend/external-aop-guide.md +149 -0
  64. package/cabloy-docs/backend/field-indexes.md +79 -0
  65. package/cabloy-docs/backend/foundation.md +281 -0
  66. package/cabloy-docs/backend/i18n-guide.md +211 -0
  67. package/cabloy-docs/backend/internal-aop-guide.md +181 -0
  68. package/cabloy-docs/backend/introduction.md +95 -0
  69. package/cabloy-docs/backend/jwt-guide.md +276 -0
  70. package/cabloy-docs/backend/logger-guide.md +223 -0
  71. package/cabloy-docs/backend/mail-guide.md +189 -0
  72. package/cabloy-docs/backend/menu-guide.md +80 -0
  73. package/cabloy-docs/backend/migration-and-changes.md +192 -0
  74. package/cabloy-docs/backend/model-guide.md +274 -0
  75. package/cabloy-docs/backend/multi-database-datasource.md +171 -0
  76. package/cabloy-docs/backend/multi-instance-and-instance-resolution.md +196 -0
  77. package/cabloy-docs/backend/openapi-guide.md +118 -0
  78. package/cabloy-docs/backend/orm-aggregate-group-guide.md +210 -0
  79. package/cabloy-docs/backend/orm-configuration-guide.md +165 -0
  80. package/cabloy-docs/backend/orm-guide.md +109 -0
  81. package/cabloy-docs/backend/orm-mutation-guide.md +195 -0
  82. package/cabloy-docs/backend/orm-select-guide.md +243 -0
  83. package/cabloy-docs/backend/queue-guide.md +271 -0
  84. package/cabloy-docs/backend/quickstart.md +141 -0
  85. package/cabloy-docs/backend/redis-guide.md +70 -0
  86. package/cabloy-docs/backend/redlock-guide.md +60 -0
  87. package/cabloy-docs/backend/relations-guide.md +250 -0
  88. package/cabloy-docs/backend/runtime-and-flavors.md +304 -0
  89. package/cabloy-docs/backend/schedule-guide.md +81 -0
  90. package/cabloy-docs/backend/scripts.md +116 -0
  91. package/cabloy-docs/backend/serialization-guide.md +192 -0
  92. package/cabloy-docs/backend/service-guide.md +166 -0
  93. package/cabloy-docs/backend/sharding-guide.md +49 -0
  94. package/cabloy-docs/backend/startup-guide.md +326 -0
  95. package/cabloy-docs/backend/transaction-guide.md +82 -0
  96. package/cabloy-docs/backend/unit-testing.md +209 -0
  97. package/cabloy-docs/backend/upload-guide.md +160 -0
  98. package/cabloy-docs/backend/user-access-guide.md +157 -0
  99. package/cabloy-docs/backend/validation-guide.md +80 -0
  100. package/cabloy-docs/backend/worker-guide.md +59 -0
  101. package/cabloy-docs/editions/cabloy-basic.md +26 -0
  102. package/cabloy-docs/editions/cabloy-start.md +55 -0
  103. package/cabloy-docs/editions/choosing-between-basic-and-start.md +84 -0
  104. package/cabloy-docs/editions/detection.md +31 -0
  105. package/cabloy-docs/editions/overview.md +107 -0
  106. package/cabloy-docs/frontend/api-guide.md +93 -0
  107. package/cabloy-docs/frontend/api-schema-guide.md +43 -0
  108. package/cabloy-docs/frontend/app-startup-guide.md +185 -0
  109. package/cabloy-docs/frontend/cli.md +78 -0
  110. package/cabloy-docs/frontend/component-guide.md +105 -0
  111. package/cabloy-docs/frontend/component-props-guide.md +97 -0
  112. package/cabloy-docs/frontend/component-v-model-guide.md +110 -0
  113. package/cabloy-docs/frontend/css-in-js-guide.md +151 -0
  114. package/cabloy-docs/frontend/design-principles.md +55 -0
  115. package/cabloy-docs/frontend/environment-config-guide.md +250 -0
  116. package/cabloy-docs/frontend/foundation.md +58 -0
  117. package/cabloy-docs/frontend/generic-component-guide.md +35 -0
  118. package/cabloy-docs/frontend/icon-engine-guide.md +88 -0
  119. package/cabloy-docs/frontend/introduction.md +33 -0
  120. package/cabloy-docs/frontend/ioc-and-beans.md +211 -0
  121. package/cabloy-docs/frontend/mock-guide.md +109 -0
  122. package/cabloy-docs/frontend/model-architecture.md +87 -0
  123. package/cabloy-docs/frontend/model-state-guide.md +70 -0
  124. package/cabloy-docs/frontend/module-scope.md +168 -0
  125. package/cabloy-docs/frontend/modules-and-suites.md +179 -0
  126. package/cabloy-docs/frontend/navigation-guards-guide.md +68 -0
  127. package/cabloy-docs/frontend/openapi-sdk-guide.md +102 -0
  128. package/cabloy-docs/frontend/page-guide.md +223 -0
  129. package/cabloy-docs/frontend/page-params-guide.md +87 -0
  130. package/cabloy-docs/frontend/page-query-guide.md +96 -0
  131. package/cabloy-docs/frontend/page-route-guide.md +147 -0
  132. package/cabloy-docs/frontend/quickstart.md +202 -0
  133. package/cabloy-docs/frontend/route-alias-guide.md +61 -0
  134. package/cabloy-docs/frontend/scripts.md +86 -0
  135. package/cabloy-docs/frontend/sdk-guide.md +45 -0
  136. package/cabloy-docs/frontend/server-data.md +74 -0
  137. package/cabloy-docs/frontend/ssr-client-only.md +40 -0
  138. package/cabloy-docs/frontend/ssr-env.md +51 -0
  139. package/cabloy-docs/frontend/ssr-init-data.md +46 -0
  140. package/cabloy-docs/frontend/ssr-overview.md +48 -0
  141. package/cabloy-docs/frontend/ssr-seo-meta.md +52 -0
  142. package/cabloy-docs/frontend/system-startup-guide.md +186 -0
  143. package/cabloy-docs/frontend/theme-guide.md +154 -0
  144. package/cabloy-docs/frontend/zod-guide.md +161 -0
  145. package/cabloy-docs/fullstack/cli.md +118 -0
  146. package/cabloy-docs/fullstack/comparison-with-other-frameworks.md +117 -0
  147. package/cabloy-docs/fullstack/edition-collaboration-differences.md +62 -0
  148. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +64 -0
  149. package/cabloy-docs/fullstack/introduction.md +81 -0
  150. package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -0
  151. package/cabloy-docs/fullstack/quickstart.md +89 -0
  152. package/cabloy-docs/fullstack/vona-zova-integration.md +86 -0
  153. package/cabloy-docs/fullstack/vscode-extensions.md +126 -0
  154. package/cabloy-docs/index.md +72 -0
  155. package/cabloy-docs/package.json +16 -0
  156. package/cabloy-docs/pnpm-lock.yaml +1607 -0
  157. package/cabloy-docs/reference/backend-directory-structure.md +88 -0
  158. package/cabloy-docs/reference/cli-reference.md +49 -0
  159. package/cabloy-docs/reference/glossary.md +38 -0
  160. package/cabloy-docs/reference/package-map.md +105 -0
  161. package/cabloy-docs/reference/repo-scripts.md +36 -0
  162. package/package.json +4 -1
  163. package/scripts/init.ts +12 -0
  164. package/scripts/upgrade.ts +31 -3
  165. package/vona/README.md +4 -4
  166. package/vona/README.zh-CN.md +4 -4
  167. package/vona/packages-vona/vona/package.json +1 -1
  168. package/vona/pnpm-lock.yaml +383 -38
  169. package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/package.json +1 -1
  170. package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/src/bean/summerCache.datasourceWrite.ts +2 -2
  171. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/package.json +1 -1
  172. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/.metadata/index.ts +49 -1
  173. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/controller/memoryDiag.ts +97 -0
  174. package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
  175. package/vona/src/suite-vendor/a-captcha/modules/a-captcha/package.json +1 -1
  176. package/vona/src/suite-vendor/a-captcha/modules/a-captcha/src/bean/cacheRedis.captcha.ts +2 -2
  177. package/vona/src/suite-vendor/a-captcha/package.json +1 -1
  178. package/vona/src/suite-vendor/a-vona/modules/a-bean/cli/bean/metadata/generate.ts +5 -6
  179. package/vona/src/suite-vendor/a-vona/modules/a-bean/package.json +1 -1
  180. package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheMem/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  181. package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheRedis/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  182. package/vona/src/suite-vendor/a-vona/modules/a-cache/package.json +1 -1
  183. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/.metadata/index.ts +13 -2
  184. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/bean/bean.cache.ts +6 -7
  185. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheMemBase.ts → service/cacheMemBase_.ts} +3 -3
  186. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheRedisBase.ts → service/cacheRedisBase_.ts} +3 -3
  187. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/package.json +1 -1
  188. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.emailConfirm.ts +2 -2
  189. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.passwordReset.ts +2 -2
  190. package/vona/src/suite-vendor/a-vona/modules/a-openapi/package.json +1 -1
  191. package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/bean/summerCache.json.ts +2 -2
  192. package/vona/src/suite-vendor/a-vona/modules/a-orm/cli/databaseDialect/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  193. package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
  194. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/.metadata/index.ts +4 -3
  195. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.database.ts +3 -3
  196. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.model.ts +1 -1
  197. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/schedule.softDeletionPrune.ts +1 -1
  198. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/common/utils.ts +1 -1
  199. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/index.ts +1 -1
  200. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_cache.ts +1 -1
  201. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_meta.ts +1 -1
  202. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.modelBase.ts +0 -5
  203. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoAggregate.ts +1 -1
  204. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoCreate.ts +1 -1
  205. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGet.ts +1 -1
  206. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGroup.ts +1 -1
  207. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoMutate.ts +1 -1
  208. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoSelectAndCount.ts +1 -1
  209. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoUpdate.ts +1 -1
  210. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/index.ts +1 -0
  211. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/modelCacheBase.ts +3 -3
  212. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relations.ts +1 -1
  213. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsDynamic.ts +1 -1
  214. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsMutate.ts +1 -1
  215. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsStatic.ts +1 -1
  216. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheEntity_.ts +1 -1
  217. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheQuery_.ts +1 -1
  218. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/database.ts +2 -2
  219. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean/bean.databaseDialectBase.ts → service/databaseDialectBase_.ts} +38 -41
  220. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/db_.ts +2 -2
  221. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/relations_.ts +3 -3
  222. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/database.ts +0 -5
  223. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoGet.ts +1 -1
  224. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoMutate.ts +1 -1
  225. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoSelectAndCount.ts +1 -1
  226. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/model.ts +1 -1
  227. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelAggr.ts +1 -1
  228. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelCount.ts +1 -1
  229. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGeneral.ts +1 -1
  230. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGroup.ts +1 -1
  231. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelIncrement.ts +1 -1
  232. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relations.ts +1 -1
  233. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsColumns.ts +1 -1
  234. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDef.ts +1 -1
  235. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefDynamic.ts +1 -1
  236. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefMutate.ts +1 -1
  237. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsMutate.ts +1 -1
  238. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsTables.ts +1 -1
  239. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/package.json +1 -1
  240. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.betterSqlite3.ts +2 -2
  241. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.mysql.ts +2 -2
  242. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.pg.ts +2 -2
  243. package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
  244. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +109 -40
  245. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +2 -2
  246. package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
  247. package/vona/src/suite-vendor/a-vona/modules/a-startup/src/bean/cacheRedis.startupDebounce.ts +2 -2
  248. package/vona/src/suite-vendor/a-vona/modules/a-summer/cli/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  249. package/vona/src/suite-vendor/a-vona/modules/a-summer/package.json +1 -1
  250. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/.metadata/index.ts +1 -1
  251. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/bean/bean.summer.ts +3 -3
  252. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localMem_.ts +3 -3
  253. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localRedis_.ts +3 -3
  254. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/{bean/bean.summerCacheBase.ts → service/summerCacheBase_.ts} +3 -3
  255. package/vona/src/suite-vendor/a-vona/modules/a-swagger/package.json +1 -1
  256. package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.rapidoc.ts +2 -2
  257. package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.swagger.ts +2 -2
  258. package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
  259. package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/cacheRedis.authToken.ts +2 -2
  260. package/vona/src/suite-vendor/a-vona/modules/a-worker/package.json +1 -1
  261. package/vona/src/suite-vendor/a-vona/modules/a-worker/src/bean/cacheRedis.workerAlive.ts +2 -2
  262. package/vona/src/suite-vendor/a-vona/package.json +1 -1
  263. package/zova/README.md +5 -5
  264. package/zova/README.zh-CN.md +4 -4
  265. package/zova/package.original.json +4 -4
  266. package/zova/packages-cli/cli/package.json +2 -2
  267. package/zova/packages-cli/cli-set-front/package.json +2 -2
  268. package/zova/packages-utils/zova-jsx/package.json +2 -2
  269. package/zova/packages-utils/zova-vite/package.json +2 -2
  270. package/zova/packages-utils/zova-vite/templates/app/controller.tsx_ +3 -3
  271. package/zova/packages-zova/zova/package.json +3 -3
  272. package/zova/packages-zova/zova-core/package.json +2 -2
  273. package/zova/packages-zova/zova-core/src/bean/beanContainer.ts +3 -3
  274. package/zova/packages-zova/zova-core/src/bean/beanControllerPageBase.ts +1 -0
  275. package/zova/packages-zova/zova-core/src/core/component/module.ts +16 -16
  276. package/zova/packages-zova/zova-core/src/core/context/component.ts +35 -3
  277. package/zova/packages-zova/zova-core/src/core/context/util.ts +15 -11
  278. package/zova/pnpm-lock.yaml +1596 -1679
  279. package/zova/src/suite/a-demo/modules/demo-basic/src/.metadata/index.ts +11 -0
  280. package/zova/src/suite/a-demo/modules/demo-basic/src/.metadata/page/toolMinimal.ts +9 -0
  281. package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolMinimal/controller.tsx +11 -0
  282. package/zova/src/suite/a-demo/modules/demo-basic/src/routes.ts +10 -0
  283. package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +1 -1
  284. package/zova/src/suite-vendor/a-zova/modules/a-model/src/service/storage.ts +4 -5
  285. package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
  286. package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/monkey.ts +1 -1
  287. package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +1 -1
  288. package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssr.ts +36 -1
  289. package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssrMetaStore.ts +7 -2
  290. package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/monkey.ts +3 -0
  291. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
  292. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +70 -29
  293. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
  294. package/zova/src/suite-vendor/a-zova/package.json +6 -6
  295. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud.ts +0 -0
  296. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_inner.ts +0 -0
  297. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_table.ts +0 -0
  298. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_knex.ts +0 -0
  299. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_utils.ts +0 -0
  300. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_view.ts +0 -0
@@ -0,0 +1,100 @@
1
+ # Playbook: Update a Backend Contract and Regenerate the Frontend
2
+
3
+ This playbook documents one of the highest-value fullstack AI workflows in Cabloy.
4
+
5
+ ## When to use this playbook
6
+
7
+ Use this playbook when a backend API contract changes and the frontend should be brought back into sync.
8
+
9
+ Typical triggers include:
10
+
11
+ - DTO field changes
12
+ - controller parameter or response changes
13
+ - validation changes
14
+ - OpenAPI metadata changes
15
+ - relation or DTO inference changes that affect API shape
16
+
17
+ ## Step 1: Update the backend contract at the correct layer
18
+
19
+ Inspect which backend layer actually owns the change:
20
+
21
+ - controller
22
+ - dto
23
+ - entity
24
+ - validation rule
25
+ - inferred DTO path
26
+ - OpenAPI configuration
27
+
28
+ Relevant docs:
29
+
30
+ - [Validation Guide](/backend/validation-guide)
31
+ - [OpenAPI Guide](/backend/openapi-guide)
32
+ - [DTO Guide](/backend/dto-guide)
33
+ - [DTO Infer and Generation](/backend/dto-infer-generation)
34
+
35
+ ## Step 2: Verify the backend contract output
36
+
37
+ Before touching the frontend, verify that the backend-side contract change is really reflected in the generated OpenAPI output.
38
+
39
+ That may include:
40
+
41
+ - rebuilding or running the backend
42
+ - checking Swagger / OpenAPI JSON
43
+ - confirming the contract shape matches intent
44
+
45
+ ## Step 3: Detect the edition and frontend target
46
+
47
+ Before regenerating frontend artifacts:
48
+
49
+ 1. detect Basic vs Start
50
+ 2. verify the relevant frontend flavor
51
+ 3. confirm whether the change affects Admin, Web, or both
52
+
53
+ ## Step 4: Regenerate the frontend-side contract artifacts
54
+
55
+ Use the Zova OpenAPI and REST-generation path rather than manually updating request code first.
56
+
57
+ Representative commands may include:
58
+
59
+ ```bash
60
+ npm run zova :openapi:generate ...
61
+ cd zova && npm run build:rest:cabloyBasicAdmin
62
+ cd zova && npm run build:rest:cabloyBasicWeb
63
+ ```
64
+
65
+ For Start, use the Start-specific flavor paths from that repo.
66
+
67
+ ## Step 5: Inspect affected frontend layers
68
+
69
+ After regeneration, inspect which frontend layers need follow-up changes:
70
+
71
+ - API services
72
+ - generated SDK
73
+ - model-managed data access
74
+ - schema-driven UI
75
+ - page or component assumptions
76
+
77
+ ## Step 6: Verify the end-to-end loop
78
+
79
+ Use a verification path that checks both sides:
80
+
81
+ - backend contract correctness
82
+ - regenerated frontend artifacts
83
+ - typecheck/build for the affected frontend edition or flavor
84
+
85
+ ## AI rule of thumb
86
+
87
+ A good fullstack contract update workflow is usually:
88
+
89
+ 1. change backend contract
90
+ 2. verify OpenAPI output
91
+ 3. detect edition and target flavor
92
+ 4. regenerate frontend contract artifacts
93
+ 5. inspect downstream breakage
94
+ 6. verify end to end
95
+
96
+ Not:
97
+
98
+ 1. change backend DTO
99
+ 2. hand-edit a few frontend request types
100
+ 3. leave the contract loop out of sync
@@ -0,0 +1,99 @@
1
+ # Playbook: Add a Frontend Page
2
+
3
+ This playbook turns the Zova frontend docs into a repeatable AI-friendly workflow.
4
+
5
+ ## When to use this playbook
6
+
7
+ Use this playbook when the goal is to add or extend a frontend page, especially when the work may involve:
8
+
9
+ - page creation
10
+ - route and params/query setup
11
+ - component integration
12
+ - model or API integration
13
+ - edition-sensitive UI assumptions
14
+
15
+ ## Step 1: Detect the edition first
16
+
17
+ Before generating or editing anything:
18
+
19
+ 1. check `__CABLOY_BASIC__` or `__CABLOY_START__`
20
+ 2. confirm the active frontend flavor assumptions
21
+ 3. inspect root `package.json` and `npm run zova`
22
+
23
+ This matters because frontend examples can differ between Basic and Start.
24
+
25
+ ## Step 2: Use the page generator first
26
+
27
+ Start from the Zova generator instead of creating the page structure manually.
28
+
29
+ Representative command:
30
+
31
+ ```bash
32
+ npm run zova :create:page ...
33
+ ```
34
+
35
+ ## Step 3: Add page capabilities with refactor commands
36
+
37
+ If the page needs additional framework features, prefer the dedicated refactor commands.
38
+
39
+ Representative examples:
40
+
41
+ ```bash
42
+ npm run zova :refactor:pageQuery ...
43
+ npm run zova :refactor:pageParams ...
44
+ ```
45
+
46
+ That is better than manually recreating the framework structure because the refactor commands preserve Zova conventions.
47
+
48
+ ## Step 4: Connect data and components the Zova way
49
+
50
+ Depending on the page, extend it through the right abstraction layer:
51
+
52
+ - API service
53
+ - model-managed remote state
54
+ - component wrappers
55
+ - SSR init data
56
+ - navigation guards or route metadata
57
+
58
+ Relevant docs:
59
+
60
+ - [Page Guide](/frontend/page-guide)
61
+ - [Page Query Guide](/frontend/page-query-guide)
62
+ - [Page Params Guide](/frontend/page-params-guide)
63
+ - [API Guide](/frontend/api-guide)
64
+ - [Model State Guide](/frontend/model-state-guide)
65
+ - [SSR Init Data](/frontend/ssr-init-data)
66
+
67
+ ## Step 5: Regenerate metadata when needed
68
+
69
+ If the page changes affect route structure or typed metadata, regenerate the relevant metadata through the Zova tool path.
70
+
71
+ Representative command family:
72
+
73
+ ```bash
74
+ npm run zova :tools:metadata ...
75
+ ```
76
+
77
+ ## Step 6: Verify the active edition workflow
78
+
79
+ Use the right verification path for the active repo and flavor.
80
+
81
+ Typical checks include:
82
+
83
+ ```bash
84
+ npm run tsc
85
+ npm run build:zova
86
+ ```
87
+
88
+ And if needed, the relevant `zova/` flavor-specific build or REST generation paths.
89
+
90
+ ## AI rule of thumb
91
+
92
+ A good AI frontend-page workflow in Cabloy is usually:
93
+
94
+ 1. detect edition
95
+ 2. choose generator or refactor command
96
+ 3. generate or transform
97
+ 4. connect API/model/SSR pieces
98
+ 5. regenerate metadata if needed
99
+ 6. verify
@@ -0,0 +1,67 @@
1
+ # Playbook: Metadata Refresh Workflow
2
+
3
+ This playbook documents when and how Cabloy contributors and AI systems should refresh generated metadata.
4
+
5
+ ## Why this workflow matters
6
+
7
+ In Cabloy, some framework behavior depends on generated metadata rather than only handwritten source files.
8
+
9
+ That means certain structural changes are incomplete until metadata is regenerated.
10
+
11
+ ## Common triggers
12
+
13
+ Typical triggers include:
14
+
15
+ - route changes
16
+ - page params/query structure changes
17
+ - component wrapper-related changes
18
+ - icon additions or module-level icon changes
19
+ - relation or type-surface changes that affect typed framework artifacts
20
+
21
+ ## Step 1: Recognize that the change is structural
22
+
23
+ Before editing more code, ask whether the change affects framework-generated structure rather than only business logic.
24
+
25
+ This is the key AI checkpoint.
26
+
27
+ ## Step 2: Choose the right metadata generation path
28
+
29
+ For frontend-side metadata work, the common path is the Zova tools family.
30
+
31
+ Representative command family:
32
+
33
+ ```bash
34
+ npm run zova :tools:metadata ...
35
+ ```
36
+
37
+ For icon changes or other generation-sensitive areas, the metadata refresh may be part of the same broader workflow.
38
+
39
+ ## Step 3: Detect edition before verifying downstream effects
40
+
41
+ If the generated metadata influences frontend build or runtime behavior, detect whether the active repo is Basic or Start before choosing verification examples.
42
+
43
+ ## Step 4: Re-run the dependent workflow
44
+
45
+ After metadata regeneration, re-run the relevant dependent flow, such as:
46
+
47
+ - typecheck
48
+ - page route verification
49
+ - component usage verification
50
+ - icon usage verification
51
+ - frontend build or REST generation
52
+
53
+ ## Step 5: Treat metadata generation as part of the change, not cleanup
54
+
55
+ Metadata regeneration should not be treated as an optional final polish step.
56
+
57
+ In Cabloy it is often part of the actual correctness path.
58
+
59
+ ## AI rule of thumb
60
+
61
+ If a change alters framework structure, ask immediately:
62
+
63
+ - does metadata need regeneration?
64
+ - which command family owns that regeneration?
65
+ - what downstream build or typecheck should confirm it worked?
66
+
67
+ That prevents a large class of false-positive “done” states.
@@ -0,0 +1,58 @@
1
+ # Repo Guidance for Agents
2
+
3
+ When an AI agent works in Cabloy, it should navigate the repo with deliberate layers of trust.
4
+
5
+ ## 1. Start from the root
6
+
7
+ Check the root repository signals first:
8
+
9
+ - `package.json`
10
+ - edition marker files such as `__CABLOY_BASIC__` or `__CABLOY_START__`
11
+ - `.docs-internal/README.md`
12
+ - root `.claude/` assets
13
+
14
+ These files tell the agent which repo it is in, which scripts are canonical, and where public versus internal documentation belongs.
15
+
16
+ ## 2. Prefer framework entrypoints over scattered examples
17
+
18
+ For backend workflows:
19
+
20
+ - start from `npm run vona`
21
+ - inspect Vona CLI command families
22
+
23
+ For frontend workflows:
24
+
25
+ - start from `npm run zova`
26
+ - inspect Zova CLI command families
27
+
28
+ This is more reliable than copying old file structures from examples without understanding the command surface that created them.
29
+
30
+ ## 3. Use docs and internal notes for different purposes
31
+
32
+ - use `cabloy-docs/` to explain how people and agents should work
33
+ - use `.docs-internal/` to explain why maintainers designed the repo a certain way
34
+
35
+ ## 4. Treat edition detection as mandatory for UI-sensitive work
36
+
37
+ Edition detection is especially important when the work touches:
38
+
39
+ - page creation
40
+ - component generation
41
+ - UI-layer usage
42
+ - frontend flavor scripts
43
+ - edition-specific suites, modules, SSR site baselines, or project assets
44
+
45
+ ## 5. Use the right lookup surface before searching broadly
46
+
47
+ For backend lookup work, choose the surface before choosing the files:
48
+
49
+ - if code references `this.bean.xxx`, `ctx.bean.xxx`, or `app.bean.xxx`, start from `IBeanRecordGlobal` and module `src/.metadata/index.ts`
50
+ - if code references a full bean name, inspect `IBeanRecordGeneral`
51
+ - if the target is a runtime-anchor or selector/class-token service, inspect `src/service` and service metadata
52
+ - if the target is only a helper or superclass chain, inspect `src/lib`
53
+
54
+ This reduces wasted search and keeps bean lookup aligned with class placement.
55
+
56
+ ## 6. Verify before claiming success
57
+
58
+ Whenever a workflow recommendation is made, verify it against current scripts or command definitions before presenting it as guidance.
@@ -0,0 +1,29 @@
1
+ # Rules and Config
2
+
3
+ Cabloy’s AI behavior should be organized into a few clear layers instead of one oversized instruction file.
4
+
5
+ ## Root `CLAUDE.md`
6
+
7
+ Use the root `CLAUDE.md` for concise, durable operational guidance such as:
8
+
9
+ - how the monorepo is organized
10
+ - where public docs live
11
+ - where internal docs live
12
+ - which command entrypoints are preferred
13
+ - why edition detection is mandatory before UI-sensitive guidance or project-creation assumptions
14
+
15
+ ## `.claude/commands/`
16
+
17
+ Use commands for reusable operator workflows that are naturally invoked as a named action, such as release or future docs migration helpers.
18
+
19
+ ## `.claude/skills/`
20
+
21
+ Use skills for workflows that need more procedural context, bundled references, or iterative selection logic.
22
+
23
+ ## `settings.json` and `settings.local.json`
24
+
25
+ Use Claude settings for permissions and execution environment, not as the primary place to explain framework concepts.
26
+
27
+ ## Documentation boundary
28
+
29
+ If a rule is important for people and agents to understand, it probably belongs in public docs too. If it explains internal rationale rather than user-facing workflow, it belongs in `.docs-internal/`.
@@ -0,0 +1,37 @@
1
+ # Skills
2
+
3
+ Skills are the procedural layer of Cabloy’s AI development model.
4
+
5
+ ## What a skill should do here
6
+
7
+ A Cabloy skill should reduce repeated reasoning cost by encoding workflows such as:
8
+
9
+ - choosing the correct backend or frontend entrypoint
10
+ - detecting the active edition
11
+ - selecting the right CLI command family
12
+ - deciding what to verify after generation or refactor work
13
+
14
+ ## What a skill should not do by default
15
+
16
+ A skill should not re-implement framework scaffolding manually when the Vona or Zova CLI already provides that behavior.
17
+
18
+ If a generator or refactor command exists, the skill should orchestrate it instead of replacing it.
19
+
20
+ ## Skill placement
21
+
22
+ - Use root `.claude/skills/` for cross-stack, monorepo-wide workflows.
23
+ - Use subtree-local `.claude/skills/` only when a workflow is truly specific to one framework area.
24
+
25
+ ## Skill structure recommendation
26
+
27
+ A strong Cabloy skill usually includes:
28
+
29
+ 1. repo and edition detection
30
+ 2. CLI-first workflow selection
31
+ 3. minimal manual fallback guidance
32
+ 4. verification guidance
33
+ 5. references to durable source-of-truth files
34
+
35
+ When a skill needs to apply an architectural rule such as backend class placement, prefer a branching decision tree that points back to durable docs instead of embedding the full architecture rationale inside the skill itself.
36
+
37
+ For edition-aware skills, use [Edition Detection for AI Workflows](/ai/edition-detection) and [Edition Consistency Checklist](/ai/edition-consistency-checklist) as the durable review surfaces before expanding edition-specific branches.
@@ -0,0 +1,31 @@
1
+ # Verification
2
+
3
+ AI-assisted work should finish with checks that match the scope of the change.
4
+
5
+ ## Documentation verification
6
+
7
+ For public docs changes, verify at minimum:
8
+
9
+ - VitePress dev/build commands work
10
+ - navigation links resolve
11
+ - examples match current scripts and command names
12
+ - edition labels and notes are consistent
13
+
14
+ ## Skill and rule verification
15
+
16
+ For skills and repo guidance:
17
+
18
+ - confirm the workflow still points to real command entrypoints
19
+ - confirm edition branches match the active repo markers and scripts
20
+ - confirm public docs, skills, and root `CLAUDE.md` tell the same story
21
+ - review edition-aware changes against [Edition Consistency Checklist](/ai/edition-consistency-checklist)
22
+
23
+ ## Code-generation verification
24
+
25
+ When a skill triggers code generation or refactor behavior:
26
+
27
+ - inspect generated output
28
+ - run targeted typecheck, tests, or build commands
29
+ - prefer existing root scripts when a full verification pass is needed
30
+
31
+ Verification is part of the workflow, not an optional afterthought.
@@ -0,0 +1,206 @@
1
+ # Virtual Decorator Guidance
2
+
3
+ Use this page when deciding whether a backend class should use `@Virtual()`, or when AI needs to understand what `@Virtual()` changes in Vona bean behavior.
4
+
5
+ The goal is to preserve real runtime semantics, keep class placement intentional, and prevent `@Virtual()` from being reused as a shorthand or registration filter.
6
+
7
+ ## Short definition
8
+
9
+ `@Virtual()` marks a container-managed class as a virtual inherited runtime node.
10
+
11
+ Its core effect is to make bean registration inherit `moduleBelong` from the parent bean chain instead of treating the current class as a new independent runtime ownership center.
12
+
13
+ ## What `@Virtual()` does not mean
14
+
15
+ `@Virtual()` does **not** mean any of the following:
16
+
17
+ - suppress bean registration
18
+ - remove a bean-scene class from `IBeanRecordGlobal`
19
+ - act as a shorthand-registration filter
20
+ - compensate for incorrect class placement
21
+ - mean only that a class is abstract or internal
22
+
23
+ If a class should not appear on the global shorthand surface, fix placement instead.
24
+
25
+ For related guidance, also read:
26
+
27
+ - [Class Placement Rule](/ai/class-placement-rule)
28
+ - [Global Bean Lookup](/ai/global-bean-lookup)
29
+
30
+ ## Runtime effect
31
+
32
+ `@Virtual()` matters at registration time and then keeps affecting runtime scope resolution.
33
+
34
+ ### 1. Decorator stage
35
+
36
+ The decorator writes virtual metadata on the class.
37
+
38
+ Conceptually:
39
+
40
+ ```text
41
+ @Virtual()
42
+ -> metadata(SymbolDecoratorVirtual = true)
43
+ ```
44
+
45
+ ### 2. Registration stage
46
+
47
+ When the bean is registered, Vona reads that metadata and computes `moduleBelong`.
48
+
49
+ - non-virtual bean -> `moduleBelong` stays equal to the current module
50
+ - virtual bean -> `moduleBelong` is inherited from the nearest parent bean that already has one
51
+
52
+ Conceptually:
53
+
54
+ ```text
55
+ @Virtual()
56
+ -> addBean()
57
+ -> _parseModuleBelong()
58
+ -> inherited moduleBelong
59
+ ```
60
+
61
+ ### 3. Runtime stage
62
+
63
+ Bean instances then resolve runtime scope resources from that inherited `moduleBelong`.
64
+
65
+ This directly affects access to:
66
+
67
+ - `this.scope`
68
+ - `this.module`
69
+ - `this.config`
70
+ - `this.constant`
71
+ - `this.error`
72
+ - `this.locale`
73
+ - `this.util`
74
+ - `this.model`
75
+ - `this.entity`
76
+ - module meta and scene resources
77
+
78
+ Short version:
79
+
80
+ > `@Virtual()` changes runtime ownership resolution, not registration existence.
81
+
82
+ ## Relationship to `@Bean()` and `@Service()`
83
+
84
+ These decorators solve different problems.
85
+
86
+ - `@Bean()` / `@Service()` / `@Controller()` decide which scene the class registers into
87
+ - `@Virtual()` decides how runtime ownership is resolved
88
+
89
+ They are orthogonal.
90
+
91
+ Examples:
92
+
93
+ - `@Service() + @Virtual()`
94
+ - service-scene bean
95
+ - runtime ownership follows the parent bean chain
96
+ - `@Bean() + @Virtual()`
97
+ - bean-scene bean
98
+ - still a virtual bridge node rather than a new independent ownership center
99
+
100
+ ## When to use `@Virtual()`
101
+
102
+ Use `@Virtual()` when a class is still container-managed, but is not intended to become a new independent runtime ownership center.
103
+
104
+ Typical cases:
105
+
106
+ ### 1. Runtime-anchor bases
107
+
108
+ These classes still need bean lifecycle, class-token lookup, selector-aware behavior, or framework-managed context.
109
+
110
+ Representative examples:
111
+
112
+ - `vona/src/suite-vendor/a-vona/modules/a-orm/src/service/databaseDialectBase_.ts`
113
+ - `vona/src/suite-vendor/a-vona/modules/a-cache/src/service/cacheMemBase_.ts`
114
+ - `vona/src/suite-vendor/a-vona/modules/a-cache/src/service/cacheRedisBase_.ts`
115
+ - `vona/src/suite-vendor/a-vona/modules/a-summer/src/service/summerCacheBase_.ts`
116
+
117
+ ### 2. Bean facade or bridge nodes
118
+
119
+ These classes remain intentionally visible on the bean-scene shorthand surface, but still behave as inherited bridge nodes rather than independent runtime ownership centers.
120
+
121
+ Representative example:
122
+
123
+ - `vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.model.ts`
124
+
125
+ ### 3. Compatibility or variant nodes
126
+
127
+ These classes extend an existing bean hierarchy and should keep runtime ownership aligned with the parent chain.
128
+
129
+ Representative example:
130
+
131
+ - `vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.mysql3.ts`
132
+
133
+ ## When not to use `@Virtual()`
134
+
135
+ Do **not** use `@Virtual()` for these cases.
136
+
137
+ ### 1. Independent business services
138
+
139
+ If a class is the real business owner of its own runtime boundary, it should usually keep its own `moduleBelong` and should not be virtual.
140
+
141
+ ### 2. Misplaced bean-scene classes
142
+
143
+ Do not keep a class in `src/bean` and try to hide it with `@Virtual()`.
144
+
145
+ If it should not be a global shorthand bean, move it instead:
146
+
147
+ - pure helper or subclass-only base -> `src/lib`
148
+ - runtime-anchor base -> `src/service`, often `src/service/*_.ts`
149
+
150
+ ### 3. Pure helpers or superclass convenience classes
151
+
152
+ If a class does not need container-managed behavior, it usually belongs in `src/lib` and should not use `@Virtual()`.
153
+
154
+ ## Decision table
155
+
156
+ | Scenario | Use `@Virtual()` | Recommended placement | Reason |
157
+ | --- | --- | --- | --- |
158
+ | independent business service | No | `src/service` | it should own its own runtime resource boundary |
159
+ | runtime-anchor base with container behavior | Yes | `src/service` or `src/service/*_.ts` | it is container-managed but belongs logically to the parent bean system |
160
+ | bean-scene facade that intentionally stays on shorthand surface | Yes, if it is a bridge node | `src/bean` | it participates in shorthand lookup but is not a new ownership center |
161
+ | compatibility / dialect / variant node built on a parent bean | Yes | same scene as the concrete variant type | runtime ownership should inherit from the parent chain |
162
+ | pure helper or superclass convenience class | No | `src/lib` | no bean ownership semantics are needed |
163
+ | class kept in `src/bean` only to expose shortcut lookup | Usually no | re-evaluate placement | `@Virtual()` is not a shorthand filter |
164
+ | misplaced bean-scene class that should not be globally visible | No | move to `src/lib` or `src/service` | fix placement, not metadata |
165
+
166
+ ## Worked examples
167
+
168
+ ### Example: runtime-anchor dialect base
169
+
170
+ `databaseDialectBase_.ts` is virtual because it remains container-managed and is used as the runtime base for dialect resolution, but it is not meant to become a separate public shorthand ownership center.
171
+
172
+ ### Example: bean-scene bridge node
173
+
174
+ `bean.model.ts` is still in bean-scene because it intentionally participates in the global shorthand surface, but `@Virtual()` preserves its bridge-node semantics.
175
+
176
+ ### Example: derived dialect variant
177
+
178
+ `databaseDialect.mysql3.ts` combines `$Class.extend(...)` and `@Virtual()` because those two features solve different problems:
179
+
180
+ - `$Class.extend(...)` expresses a framework-managed derived-class relationship
181
+ - `@Virtual()` preserves inherited runtime ownership semantics
182
+
183
+ ## Quick checklist
184
+
185
+ Ask these questions in order:
186
+
187
+ 1. Does the class still need container-managed behavior?
188
+ - if no, do not use `@Virtual()`
189
+ 2. Is it a runtime extension of a parent bean system rather than a new business ownership center?
190
+ - if yes, `@Virtual()` may be appropriate
191
+ 3. Are you using `@Virtual()` only to hide the class from shorthand or metadata surfaces?
192
+ - if yes, do not use it; fix placement instead
193
+ 4. Will inherited `moduleBelong` produce the correct `scope` / `config` / `model` / `entity` behavior at runtime?
194
+ - if no, do not use `@Virtual()`
195
+
196
+ ## Related guidance
197
+
198
+ Read these pages together:
199
+
200
+ - [Class Placement Rule](/ai/class-placement-rule)
201
+ - [Global Bean Lookup](/ai/global-bean-lookup)
202
+ - [Docs, Skills, Rules, and CLI Mapping](/ai/docs-skills-rules-mapping)
203
+
204
+ For maintainer-level rationale, also read:
205
+
206
+ - `.docs-internal/architecture/virtual-decorator-runtime-semantics.md`