cabloy 5.1.60 → 5.1.62

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 (232) hide show
  1. package/.claude/hooks/contract-loop-gate.ts +296 -0
  2. package/.claude/settings.json +16 -0
  3. package/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
  4. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
  5. package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
  6. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
  7. package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
  8. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
  9. package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
  10. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +13 -0
  11. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
  12. package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
  13. package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
  14. package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
  15. package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
  16. package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
  17. package/CHANGELOG.md +64 -0
  18. package/CLAUDE.md +11 -0
  19. package/cabloy-docs/.vitepress/config.mjs +197 -5
  20. package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
  21. package/cabloy-docs/ai/docs-skills-rules-mapping.md +22 -0
  22. package/cabloy-docs/ai/future-skill-roadmap.md +12 -7
  23. package/cabloy-docs/ai/introduction.md +1 -0
  24. package/cabloy-docs/ai/playbook-backend-module.md +6 -0
  25. package/cabloy-docs/ai/playbook-module-removal.md +164 -0
  26. package/cabloy-docs/ai/skills.md +12 -0
  27. package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
  28. package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
  29. package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
  30. package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
  31. package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
  32. package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
  33. package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
  34. package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
  35. package/cabloy-docs/backend/broadcast-guide.md +3 -3
  36. package/cabloy-docs/backend/cli.md +20 -11
  37. package/cabloy-docs/backend/config-guide.md +4 -4
  38. package/cabloy-docs/backend/controller-aop-guide.md +10 -10
  39. package/cabloy-docs/backend/controller-guide.md +12 -2
  40. package/cabloy-docs/backend/crud-workflow.md +7 -3
  41. package/cabloy-docs/backend/dto-guide.md +18 -2
  42. package/cabloy-docs/backend/dto-infer-generation.md +201 -25
  43. package/cabloy-docs/backend/election-guide.md +2 -2
  44. package/cabloy-docs/backend/entity-guide.md +30 -3
  45. package/cabloy-docs/backend/error-guide.md +3 -3
  46. package/cabloy-docs/backend/event-guide.md +4 -4
  47. package/cabloy-docs/backend/external-aop-guide.md +2 -2
  48. package/cabloy-docs/backend/field-indexes.md +9 -3
  49. package/cabloy-docs/backend/foundation.md +8 -8
  50. package/cabloy-docs/backend/i18n-guide.md +6 -6
  51. package/cabloy-docs/backend/internal-aop-guide.md +2 -2
  52. package/cabloy-docs/backend/introduction.md +15 -0
  53. package/cabloy-docs/backend/migration-and-changes.md +3 -3
  54. package/cabloy-docs/backend/model-guide.md +16 -6
  55. package/cabloy-docs/backend/openapi-guide.md +3 -0
  56. package/cabloy-docs/backend/queue-guide.md +3 -3
  57. package/cabloy-docs/backend/redlock-guide.md +2 -2
  58. package/cabloy-docs/backend/schedule-guide.md +2 -2
  59. package/cabloy-docs/backend/scripts.md +8 -0
  60. package/cabloy-docs/backend/serialization-guide.md +12 -2
  61. package/cabloy-docs/backend/service-guide.md +18 -9
  62. package/cabloy-docs/backend/startup-guide.md +5 -5
  63. package/cabloy-docs/backend/status-guide.md +271 -0
  64. package/cabloy-docs/backend/unit-testing.md +3 -3
  65. package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
  66. package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
  67. package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
  68. package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
  69. package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
  70. package/cabloy-docs/frontend/a-router-guide.md +307 -0
  71. package/cabloy-docs/frontend/api-guide.md +6 -4
  72. package/cabloy-docs/frontend/api-schema-guide.md +1 -0
  73. package/cabloy-docs/frontend/app-startup-guide.md +7 -4
  74. package/cabloy-docs/frontend/bean-scene-authoring.md +3 -1
  75. package/cabloy-docs/frontend/behavior-guide.md +16 -16
  76. package/cabloy-docs/frontend/cli.md +14 -2
  77. package/cabloy-docs/frontend/command-scene-authoring.md +504 -0
  78. package/cabloy-docs/frontend/component-guide.md +5 -5
  79. package/cabloy-docs/frontend/component-props-guide.md +1 -1
  80. package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
  81. package/cabloy-docs/frontend/design-principles.md +6 -0
  82. package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
  83. package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
  84. package/cabloy-docs/frontend/form-guide.md +786 -0
  85. package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
  86. package/cabloy-docs/frontend/foundation.md +33 -0
  87. package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
  88. package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
  89. package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
  90. package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
  91. package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
  92. package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
  93. package/cabloy-docs/frontend/generic-component-guide.md +1 -1
  94. package/cabloy-docs/frontend/introduction.md +38 -5
  95. package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
  96. package/cabloy-docs/frontend/mock-guide.md +1 -0
  97. package/cabloy-docs/frontend/model-architecture.md +288 -39
  98. package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
  99. package/cabloy-docs/frontend/model-resource-cookbook.md +508 -0
  100. package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
  101. package/cabloy-docs/frontend/model-resource-owner-pattern.md +402 -0
  102. package/cabloy-docs/frontend/model-resource-usage-guide.md +334 -0
  103. package/cabloy-docs/frontend/model-state-guide.md +371 -15
  104. package/cabloy-docs/frontend/module-scope.md +8 -8
  105. package/cabloy-docs/frontend/modules-and-suites.md +2 -1
  106. package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
  107. package/cabloy-docs/frontend/openapi-sdk-guide.md +17 -6
  108. package/cabloy-docs/frontend/page-guide.md +15 -9
  109. package/cabloy-docs/frontend/page-meta-guide.md +466 -0
  110. package/cabloy-docs/frontend/page-params-guide.md +3 -3
  111. package/cabloy-docs/frontend/page-query-guide.md +2 -2
  112. package/cabloy-docs/frontend/page-route-guide.md +6 -0
  113. package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
  114. package/cabloy-docs/frontend/quickstart.md +18 -2
  115. package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
  116. package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
  117. package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
  118. package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
  119. package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
  120. package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
  121. package/cabloy-docs/frontend/route-alias-guide.md +6 -0
  122. package/cabloy-docs/frontend/router-stack-guide.md +229 -0
  123. package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
  124. package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
  125. package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
  126. package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
  127. package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
  128. package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
  129. package/cabloy-docs/frontend/server-data.md +4 -1
  130. package/cabloy-docs/frontend/system-startup-guide.md +2 -2
  131. package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
  132. package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
  133. package/cabloy-docs/frontend/table-guide.md +373 -0
  134. package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
  135. package/cabloy-docs/frontend/zova-app-guide.md +251 -0
  136. package/cabloy-docs/frontend/zova-form-source-reading-map.md +293 -0
  137. package/cabloy-docs/frontend/zova-form-under-the-hood.md +561 -0
  138. package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
  139. package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
  140. package/cabloy-docs/frontend/zova-source-reading-map.md +421 -0
  141. package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
  142. package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
  143. package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
  144. package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
  145. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
  146. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
  147. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
  148. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
  149. package/cabloy-docs/fullstack/contract-loop-playbook.md +356 -0
  150. package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
  151. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +199 -23
  152. package/cabloy-docs/fullstack/introduction.md +15 -1
  153. package/cabloy-docs/fullstack/openapi-to-sdk.md +135 -11
  154. package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
  155. package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
  156. package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
  157. package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +6 -2
  158. package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +60 -23
  159. package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +14 -7
  160. package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +6 -0
  161. package/cabloy-docs/fullstack/tutorials-overview.md +17 -4
  162. package/cabloy-docs/reference/bean-scene-boilerplates.md +15 -13
  163. package/cabloy-docs/reference/package-map.md +4 -3
  164. package/package.json +2 -1
  165. package/scripts/init.ts +2 -18
  166. package/scripts/initTestData.ts +25 -0
  167. package/scripts/upgrade.ts +17 -2
  168. package/vona/pnpm-lock.yaml +48 -194
  169. package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
  170. package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
  171. package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
  172. package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  173. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
  174. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
  175. package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
  176. package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
  177. package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
  178. package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
  179. package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
  180. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
  181. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
  182. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
  183. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
  184. package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
  185. package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
  186. package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
  187. package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  188. package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
  189. package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
  190. package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
  191. package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
  192. package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
  193. package/vona/src/suite/a-training/package.json +12 -0
  194. package/vona/src/suite/a-training/tsconfig.base.json +4 -0
  195. package/vona/src/suite/a-training/tsconfig.json +10 -0
  196. package/zova/packages-cli/cli/package.json +2 -2
  197. package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
  198. package/zova/packages-cli/cli-set-front/package.json +1 -1
  199. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
  200. package/zova/packages-zova/zova/package.json +2 -2
  201. package/zova/pnpm-lock.yaml +416 -690
  202. package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
  203. package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
  204. package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
  205. package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
  206. package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
  207. package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  208. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
  209. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
  210. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
  211. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
  212. package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
  213. package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
  214. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
  215. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
  216. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
  217. package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
  218. package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
  219. package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
  220. package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  221. package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
  222. package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
  223. package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
  224. package/zova/src/suite/a-training/package.json +12 -0
  225. package/zova/src/suite/a-training/tsconfig.base.json +4 -0
  226. package/zova/src/suite/a-training/tsconfig.json +4 -0
  227. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
  228. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
  229. package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
  230. package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
  231. package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
  232. package/zova/src/suite-vendor/a-zova/package.json +2 -2
@@ -25,7 +25,7 @@ The public decorator is:
25
25
  At the source level, the decorator is implemented as:
26
26
 
27
27
  ```typescript
28
- createBeanDecorator('behavior', 'new', true, options)
28
+ createBeanDecorator('behavior', 'new', true, options);
29
29
  ```
30
30
 
31
31
  That matters because Behavior is authored as a **fresh-instance bean scene** with decorator options, while the runtime may reuse existing behavior instances across reloads when appropriate.
@@ -41,6 +41,9 @@ Typical use cases include:
41
41
  - prop transformation before the final render
42
42
  - UI wrappers that should stay composable instead of being copied into many components
43
43
  - module-level behavior selection through provider config
44
+ - app-wide wrappers that should participate around the routed tree through the root app host
45
+
46
+ For the root hosting point used by app-wide behavior composition, see [Zova App Guide](/frontend/zova-app-guide). For the end-to-end app-scope composition path around the routed tree, continue with [Root Behaviors Guide](/frontend/root-behaviors-guide).
44
47
 
45
48
  Do **not** reach for Behavior first when a plain helper or a normal component is enough.
46
49
 
@@ -54,11 +57,11 @@ A practical rule is:
54
57
 
55
58
  Use these three tools for different kinds of reuse.
56
59
 
57
- | Tool | Best fit | Typical responsibility |
58
- | --- | --- | --- |
59
- | Behavior | render-time interception or wrapping | adjust props, intercept refs, wrap a vnode, compose multiple render concerns |
60
- | Component | standalone UI unit | own a reusable UI contract and render structure directly |
61
- | Helper | framework-neutral utility | transform data, normalize values, or share logic that does not need bean lifecycle or render composition |
60
+ | Tool | Best fit | Typical responsibility |
61
+ | --------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------- |
62
+ | Behavior | render-time interception or wrapping | adjust props, intercept refs, wrap a vnode, compose multiple render concerns |
63
+ | Component | standalone UI unit | own a reusable UI contract and render structure directly |
64
+ | Helper | framework-neutral utility | transform data, normalize values, or share logic that does not need bean lifecycle or render composition |
62
65
 
63
66
  A practical decision map is:
64
67
 
@@ -115,12 +118,12 @@ Use `@Behavior()` to declare a behavior bean.
115
118
  Representative shape:
116
119
 
117
120
  ```typescript
118
- import { BeanBehaviorBase, Behavior } from 'zova-module-a-behavior'
121
+ import { BeanBehaviorBase, Behavior } from 'zova-module-a-behavior';
119
122
 
120
123
  @Behavior()
121
124
  export class BehaviorFocus extends BeanBehaviorBase {
122
125
  protected render(props, next) {
123
- return next(props)
126
+ return next(props);
124
127
  }
125
128
  }
126
129
  ```
@@ -152,7 +155,7 @@ This is one of the main reasons Behavior fits naturally into the Zova bean archi
152
155
  Representative shape:
153
156
 
154
157
  ```typescript
155
- $UseBehavior('a-behaviors:focus', { always: true })
158
+ $UseBehavior('a-behaviors:focus', { always: true });
156
159
  ```
157
160
 
158
161
  The helper returns one behavior declaration item in object form. Broader normalization into onion items happens later in the runtime composer path.
@@ -164,7 +167,7 @@ The helper returns one behavior declaration item in object form. Broader normali
164
167
  Representative shape:
165
168
 
166
169
  ```typescript
167
- $UseBehaviorTag('input')
170
+ $UseBehaviorTag('input');
168
171
  ```
169
172
 
170
173
  ### `ZBehavior`
@@ -194,7 +197,7 @@ At the type level, `IBehaviors` accepts these shapes:
194
197
  Representative forms:
195
198
 
196
199
  ```typescript
197
- 'a-behaviors:focus'
200
+ 'a-behaviors:focus';
198
201
  ```
199
202
 
200
203
  ```typescript
@@ -202,10 +205,7 @@ Representative forms:
202
205
  ```
203
206
 
204
207
  ```typescript
205
- [
206
- 'a-behaviors:focus',
207
- { 'home-login:formFieldLayoutLogin': {} },
208
- ]
208
+ ['a-behaviors:focus', { 'home-login:formFieldLayoutLogin': {} }];
209
209
  ```
210
210
 
211
211
  At runtime, the composer normalizes these forms into onion items before the render chain is built.
@@ -370,7 +370,7 @@ Behavior metadata generation also exposes shorthand HTML/JSX attributes.
370
370
  For example, a behavior such as `a-behaviors:focus` generates an attribute like:
371
371
 
372
372
  ```tsx
373
- bs-behaviors-focus
373
+ bs - behaviors - focus;
374
374
  ```
375
375
 
376
376
  The generation rule is defined by the behavior metadata generator and is based on the module name and bean name.
@@ -10,10 +10,10 @@ For AI-assisted development, the CLI should be the default starting point whenev
10
10
 
11
11
  ## Example
12
12
 
13
- Create a `component` named `test` in module `demo-student`:
13
+ Create a `component` named `test` in module `training-student`:
14
14
 
15
15
  ```bash
16
- npm run zova :create:component test -- --module=demo-student
16
+ npm run zova :create:component test -- --module=training-student
17
17
  ```
18
18
 
19
19
  ## Command discovery pattern
@@ -81,6 +81,18 @@ A practical rule is:
81
81
  - a named variant such as `--boilerplate=commandRow` maps to a metadata key such as `boilerplateCommandRow`
82
82
  - supported variants are scene-defined, so do not assume every scene exposes them
83
83
 
84
+ The built-in `command` scene is the clearest current example:
85
+
86
+ ```bash
87
+ npm run zova :create:bean command test -- --module=training-student
88
+ npm run zova :create:bean command test -- --module=training-student --boilerplate=commandBulk
89
+ npm run zova :create:bean command test -- --module=training-student --boilerplate=commandRow
90
+ ```
91
+
92
+ Use the default template for the command shape without the bulk/row helper bases, `commandBulk` for resource-oriented bulk commands, and `commandRow` for row-oriented commands that need both `resource` and `id`.
93
+
94
+ For the command-scene runtime model and source-reading path, see [Command Scene Authoring](/frontend/command-scene-authoring).
95
+
84
96
  For the current cross-stack lookup table, see [Bean Scene Boilerplate Variants](/reference/bean-scene-boilerplates).
85
97
 
86
98
  ## Practical workflow rule
@@ -0,0 +1,504 @@
1
+ # Command Scene Authoring
2
+
3
+ This guide explains how the built-in Zova `command` scene works and how to read or author command beans accurately.
4
+
5
+ Use this page when you need to answer questions such as:
6
+
7
+ - what is a Zova command bean
8
+ - when should logic live in a command bean
9
+ - how does `$performCommand(...)` resolve and execute a command
10
+ - which built-in command boilerplates already exist
11
+ - which source files should I read first to understand command behavior
12
+
13
+ This page is about the **existing** `command` scene. If you need to create a brand-new frontend bean scene instead, use [Frontend Bean Scene Authoring](/frontend/bean-scene-authoring).
14
+
15
+ ## What the command scene is
16
+
17
+ In Zova, `command` is a frontend bean scene for **named command beans** that can be invoked through an onion name.
18
+
19
+ A command bean is useful when you want:
20
+
21
+ - a reusable action with a stable command name
22
+ - scene-aware logic that depends on `renderContext`
23
+ - behavior that can be triggered indirectly rather than by calling one concrete class directly
24
+ - a typed command contract that can be extended through generated metadata
25
+
26
+ A good mental model is:
27
+
28
+ - the **command scene** defines the runtime contract
29
+ - each **command bean** implements one named action
30
+ - the framework resolves the command bean from the onion name and then calls its `execute(...)` method
31
+
32
+ This is a Zova bean-scene-based action mechanism, not a generic Vue helper pattern.
33
+
34
+ ## When a command bean fits well
35
+
36
+ A command bean is a good fit when the action needs one or more of these properties:
37
+
38
+ - a stable command identity such as `basic-commands:create`
39
+ - access to host-driven context such as `app`, `ctx`, `$host`, or scene-specific render information
40
+ - a reusable action surface shared across modules or UI authoring paths
41
+ - an action that should stay thin and composable instead of being buried directly inside one page or component controller
42
+
43
+ Typical examples from the current source tree include:
44
+
45
+ - page-level resource creation commands
46
+ - table-row commands that need `resource` and `id`
47
+ - form-field commands that update field state from an event
48
+ - small sync commands such as debug or logging helpers
49
+
50
+ If the behavior is only private page logic with no command identity and no reuse pressure, it may belong in the page or component controller instead.
51
+
52
+ ## Public authoring surface
53
+
54
+ The public authoring surface is intentionally small.
55
+
56
+ ### `@Command()`
57
+
58
+ The scene decorator is defined in:
59
+
60
+ ```text
61
+ zova/src/suite-vendor/a-zova/modules/a-command/src/lib/command.ts
62
+ ```
63
+
64
+ Representative source:
65
+
66
+ ```typescript
67
+ export function Command<T extends IDecoratorCommandOptions>(
68
+ options?: PowerPartial<T>,
69
+ ): ClassDecorator {
70
+ return createBeanDecorator('command', 'sys', true, options);
71
+ }
72
+ ```
73
+
74
+ That confirms three important facts:
75
+
76
+ - the scene name is `command`
77
+ - command beans use the `sys` container scope
78
+ - the decorator supports options
79
+
80
+ So a command bean is a Zova system-scoped bean scene with onion options, not a one-off helper class.
81
+
82
+ ### `ICommandExecute`
83
+
84
+ The main runtime contract is defined in:
85
+
86
+ ```text
87
+ zova/src/suite-vendor/a-zova/modules/a-command/src/types/command.ts
88
+ ```
89
+
90
+ Representative shape:
91
+
92
+ ```typescript
93
+ export interface ICommandExecute {
94
+ execute(
95
+ options: IDecoratorCommandOptions,
96
+ renderContext: IJsxRenderContextBase,
97
+ next: NextCommandExecute,
98
+ ): any | Promise<any>;
99
+ }
100
+ ```
101
+
102
+ In practice, a command bean usually:
103
+
104
+ 1. receives typed options
105
+ 2. reads `renderContext` when scene-specific behavior matters
106
+ 3. performs the action
107
+ 4. returns `next(...)` to continue the command pipeline or pass the result forward
108
+
109
+ ### Minimal command bean pattern
110
+
111
+ The default command boilerplate currently generates this shape:
112
+
113
+ ```typescript
114
+ import type { IJsxRenderContextBase } from 'zova-module-a-openapi';
115
+
116
+ import { BeanBase } from 'zova';
117
+ import {
118
+ Command,
119
+ type ICommandExecute,
120
+ type ICommandOptionsBase,
121
+ type NextCommandExecute,
122
+ } from 'zova-module-a-command';
123
+
124
+ export type TypeCommandExampleResult = unknown;
125
+
126
+ export interface ICommandOptionsExample extends ICommandOptionsBase<TypeCommandExampleResult> {}
127
+
128
+ @Command<ICommandOptionsExample>()
129
+ export class CommandExample extends BeanBase implements ICommandExecute {
130
+ execute(
131
+ _options: ICommandOptionsExample,
132
+ _renderContext: IJsxRenderContextBase,
133
+ next: NextCommandExecute,
134
+ ) {
135
+ return next();
136
+ }
137
+ }
138
+ ```
139
+
140
+ That is the thinnest useful command-bean shape.
141
+
142
+ ## Runtime invocation path
143
+
144
+ The runtime path is easiest to understand in this order:
145
+
146
+ 1. `command.ts`
147
+ 2. `monkey.ts`
148
+ 3. `performCommand.ts`
149
+ 4. downstream command beans and generated metadata
150
+
151
+ ### `$performCommand(...)` is injected by monkey wiring
152
+
153
+ Read:
154
+
155
+ ```text
156
+ zova/src/suite-vendor/a-zova/modules/a-command/src/monkey.ts
157
+ ```
158
+
159
+ `Monkey` injects `$performCommand(...)` onto bean instances during `beanInit(...)`.
160
+
161
+ A key source-confirmed detail is that the injected method synthesizes a default render context from the host bean:
162
+
163
+ - `app`
164
+ - `ctx`
165
+ - `$host`
166
+
167
+ That means command execution naturally carries the invoking bean context even when the caller only passes partial render information.
168
+
169
+ ### A practical `$performCommand(...)` call shape
170
+
171
+ Because `$performCommand(...)` is injected onto bean instances, the most natural calling style is from another bean such as a page or component controller.
172
+
173
+ A representative call shape looks like this:
174
+
175
+ ```typescript
176
+ await this.$performCommand('basic-commands:create', {
177
+ resource: 'training-student:student',
178
+ replace: false,
179
+ });
180
+ ```
181
+
182
+ A row-oriented example looks like this:
183
+
184
+ ```typescript
185
+ await this.$performCommand('basic-commands:delete', {
186
+ resource: 'training-student:student',
187
+ id: row.id,
188
+ });
189
+ ```
190
+
191
+ The important point is not the exact calling location. The important point is that the caller invokes a **command onion name**, passes typed options, and lets the command scene resolve the real bean instance and execution path.
192
+
193
+ When scene-sensitive behavior matters, the caller can also pass explicit `renderContext` or a custom `next(...)` handler. If not, the injected helper already supplies the host-driven defaults.
194
+
195
+ ### Onion name resolves to the command bean
196
+
197
+ Read:
198
+
199
+ ```text
200
+ zova/src/suite-vendor/a-zova/modules/a-command/src/lib/performCommand.ts
201
+ ```
202
+
203
+ The core dispatch path is:
204
+
205
+ 1. resolve `beanFullName` from `commandName` with `beanFullNameFromOnionName(commandName, 'command')`
206
+ 2. try synchronous lookup first with `sys.bean._getBeanSyncOnly(...)`
207
+ 3. if not available, fall back to async lookup with `sys.bean._getBean(...)`
208
+ 4. merge decorator/onion options and call-time options through `deepExtend(...)`
209
+ 5. execute the command bean through `beanInstance.execute(props, renderContext, next)`
210
+
211
+ This shows that command invocation is not a string-to-function shortcut. It is a bean-container resolution flow with command-specific typing and option merging.
212
+
213
+ ### Why `next(...)` matters
214
+
215
+ `performCommand.ts` also shows that a missing `next` gets a default identity-style function.
216
+
217
+ So `next(...)` is part of the stable command contract even for simple commands:
218
+
219
+ - simple commands can just call `next()`
220
+ - commands that produce a value can pass that value to `next(res)`
221
+ - callers can supply a custom `next` to wrap or transform the result
222
+
223
+ ## Built-in helper base classes
224
+
225
+ The command scene includes two helper bases for common render-context patterns.
226
+
227
+ ### `BeanCommandBulkBase`
228
+
229
+ Read:
230
+
231
+ ```text
232
+ zova/src/suite-vendor/a-zova/modules/a-command/src/lib/beanCommandBulkBase.ts
233
+ ```
234
+
235
+ This base resolves `resource` from:
236
+
237
+ - explicit `options.resource`
238
+ - or page-scene `$celScope.resource`
239
+
240
+ If neither exists, it throws.
241
+
242
+ This makes it the right base when the command is bulk-like or page-resource-oriented and only needs a resource identity.
243
+
244
+ The `commandBulk` boilerplate reflects this shape.
245
+
246
+ ### `BeanCommandRowBase`
247
+
248
+ Read:
249
+
250
+ ```text
251
+ zova/src/suite-vendor/a-zova/modules/a-command/src/lib/beanCommandRowBase.ts
252
+ ```
253
+
254
+ This base resolves:
255
+
256
+ - `resource`
257
+ - `id`
258
+
259
+ from either explicit options or `tableCell` render context.
260
+
261
+ If either value is missing, it throws.
262
+
263
+ This makes it the right base when the command is row-oriented and needs the current table row identity.
264
+
265
+ The `commandRow` boilerplate reflects this shape.
266
+
267
+ ## Typing and metadata registration
268
+
269
+ The command scene becomes truly useful because the typing surface and generated metadata cooperate.
270
+
271
+ ### Core typing surface
272
+
273
+ Read:
274
+
275
+ ```text
276
+ zova/src/suite-vendor/a-zova/modules/a-command/src/types/command.ts
277
+ ```
278
+
279
+ Important pieces:
280
+
281
+ - `ICommandRecord`
282
+ - the extensible registry of command names to command option types
283
+ - `SymbolCommandResult`
284
+ - the result-type carrier used in the command option contract
285
+ - `IDecoratorCommandOptions`
286
+ - the base decorator options shape
287
+ - `ICommandOptionsBase`, `ICommandBulkOptionsBase`, `ICommandRowOptionsBase`
288
+ - shared option contracts for common command patterns
289
+ - `TypeCommandOptions<K>`
290
+ - typed command reference shape
291
+ - `ICommandExecute`
292
+ - runtime execution contract
293
+
294
+ The same file also declaration-merges the command scene into Zova surfaces such as:
295
+
296
+ - `SysOnion`
297
+ - `ConfigOnions`
298
+ - `IBeanSceneRecord`
299
+
300
+ That confirms `command` is a first-class Zova bean scene.
301
+
302
+ ### Generated metadata proves the real command names
303
+
304
+ A representative generated metadata file is:
305
+
306
+ ```text
307
+ zova/src/suite/cabloy-basic/modules/basic-commands/src/.metadata/index.ts
308
+ ```
309
+
310
+ From current source, this file augments `zova-module-a-command` by extending `ICommandRecord` with names such as:
311
+
312
+ - `basic-commands:create`
313
+ - `basic-commands:delete`
314
+ - `basic-commands:setValue`
315
+
316
+ It also records the related bean full names such as:
317
+
318
+ - `basic-commands.command.create`
319
+ - `basic-commands.command.delete`
320
+ - `basic-commands.command.setValue`
321
+
322
+ This is why the command scene should be read through both the source bean and the generated metadata surface.
323
+
324
+ ## CLI scaffolding and boilerplate variants
325
+
326
+ The command scene is also defined by module metadata in:
327
+
328
+ ```text
329
+ zova/src/suite-vendor/a-zova/modules/a-command/package.json
330
+ ```
331
+
332
+ The `zovaModule.onions.command` metadata confirms:
333
+
334
+ - `beanGeneral: true`
335
+ - `optionsGlobalInterfaceName: IDecoratorCommandOptions`
336
+ - default `boilerplate`
337
+ - `boilerplateCommandBulk`
338
+ - `boilerplateCommandRow`
339
+
340
+ The CLI command shape is currently exposed by:
341
+
342
+ ```text
343
+ zova/packages-cli/cli-set-front/src/lib/command/create.bean.ts
344
+ ```
345
+
346
+ CLI help usage:
347
+
348
+ ```bash
349
+ npm run zova :create:bean sceneName beanName -- [--module=] [--boilerplate=]
350
+ ```
351
+
352
+ ### Default command boilerplate
353
+
354
+ Use the default template when the command bean does not need `BeanCommandBulkBase` or `BeanCommandRowBase`:
355
+
356
+ ```bash
357
+ npm run zova :create:bean command test -- --module=training-student
358
+ ```
359
+
360
+ ### `commandBulk` boilerplate
361
+
362
+ Use the bulk variant when the command should resolve `resource` through `BeanCommandBulkBase`:
363
+
364
+ ```bash
365
+ npm run zova :create:bean command test -- --module=training-student --boilerplate=commandBulk
366
+ ```
367
+
368
+ ### `commandRow` boilerplate
369
+
370
+ Use the row variant when the command should resolve `resource` and `id` through `BeanCommandRowBase`:
371
+
372
+ ```bash
373
+ npm run zova :create:bean command test -- --module=training-student --boilerplate=commandRow
374
+ ```
375
+
376
+ For the cross-scene lookup table, also see [Bean Scene Boilerplate Variants](/reference/bean-scene-boilerplates).
377
+
378
+ ## Representative built-in examples
379
+
380
+ Use the following examples when you need to understand how the command scene is used in real modules.
381
+
382
+ ### `basic-commands:create`
383
+
384
+ Read:
385
+
386
+ ```text
387
+ zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.create.tsx
388
+ ```
389
+
390
+ Why it matters:
391
+
392
+ - extends `BeanCommandBulkBase`
393
+ - derives `resource` from options or page context
394
+ - routes through the host router to the resource-create page
395
+
396
+ This is the clearest bulk-command specimen.
397
+
398
+ ### `basic-commands:delete`
399
+
400
+ Read:
401
+
402
+ ```text
403
+ zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.delete.tsx
404
+ ```
405
+
406
+ Why it matters:
407
+
408
+ - extends `BeanCommandRowBase`
409
+ - derives `resource` and `id`
410
+ - resolves a resource model bean and performs a mutation
411
+
412
+ This is the clearest row-command specimen.
413
+
414
+ ### `basic-commands:setValue`
415
+
416
+ Read:
417
+
418
+ ```text
419
+ zova/src/suite/cabloy-basic/modules/basic-commands/src/bean/command.setValue.tsx
420
+ ```
421
+
422
+ Why it matters:
423
+
424
+ - extends plain `BeanBase`, not a bulk/row helper base
425
+ - checks `renderContext.$scene === 'formField'`
426
+ - uses field-scene data and event data to update form state
427
+
428
+ This is the clearest example that command beans can be scene-sensitive without fitting the resource-row patterns.
429
+
430
+ ### `basic-commandssync:log`
431
+
432
+ Read:
433
+
434
+ ```text
435
+ zova/src/suite/cabloy-basic/modules/basic-commandssync/src/bean/command.log.tsx
436
+ ```
437
+
438
+ Why it matters:
439
+
440
+ - small synchronous command
441
+ - also uses `@Preload()`
442
+ - demonstrates that command beans can stay very small when the command contract is the important part
443
+
444
+ ## A practical source-reading order
445
+
446
+ When you need to understand Zova Command quickly, use this order:
447
+
448
+ 1. this guide
449
+ 2. `zova/src/suite-vendor/a-zova/modules/a-command/src/lib/command.ts`
450
+ 3. `zova/src/suite-vendor/a-zova/modules/a-command/src/monkey.ts`
451
+ 4. `zova/src/suite-vendor/a-zova/modules/a-command/src/lib/performCommand.ts`
452
+ 5. `zova/src/suite-vendor/a-zova/modules/a-command/src/types/command.ts`
453
+ 6. one representative downstream metadata file such as `basic-commands/src/.metadata/index.ts`
454
+ 7. one or more concrete command beans such as `command.create.tsx`, `command.delete.tsx`, `command.setValue.tsx`, or `command.log.tsx`
455
+
456
+ That path moves from public scene surface to runtime wiring to real consumer code without flattening the architecture into generic Vue terminology too early.
457
+
458
+ ## Design guidance
459
+
460
+ When authoring command beans, prefer these rules:
461
+
462
+ - keep the command bean focused on one named action
463
+ - use `BeanCommandBulkBase` or `BeanCommandRowBase` only when the render-context pattern matches
464
+ - prefer explicit command identity over hidden page-local behavior when the action is meant to be reused
465
+ - keep business logic thin when it naturally belongs in a model, service, or other bean
466
+ - treat `renderContext` as part of the command contract, not as an afterthought
467
+
468
+ A command bean should usually coordinate an action cleanly, not become a dumping ground for unrelated page behavior.
469
+
470
+ ## Relationship to other guides
471
+
472
+ Read this together with:
473
+
474
+ - [Frontend CLI](/frontend/cli)
475
+ - [IoC and Beans](/frontend/ioc-and-beans)
476
+ - [Frontend Bean Scene Authoring](/frontend/bean-scene-authoring)
477
+ - [Zova Source Reading Map](/frontend/zova-source-reading-map)
478
+
479
+ Use this page to understand the built-in command scene itself. Use the bean-scene authoring page when you need to design a new scene contract, not when you only need to author command beans inside the existing `command` scene.
480
+
481
+ ## Verification checklist
482
+
483
+ When documenting or reviewing command-scene behavior, verify in this order:
484
+
485
+ 1. confirm the CLI help still matches the documented command shape:
486
+
487
+ ```bash
488
+ npm run zova :create:bean --help
489
+ ```
490
+
491
+ 2. confirm these source files still match the explanation:
492
+ - `a-command/src/lib/command.ts`
493
+ - `a-command/src/monkey.ts`
494
+ - `a-command/src/lib/performCommand.ts`
495
+ - `a-command/src/lib/beanCommandBulkBase.ts`
496
+ - `a-command/src/lib/beanCommandRowBase.ts`
497
+ - `a-command/src/types/command.ts`
498
+ 3. inspect a generated downstream `.metadata/index.ts` file to confirm current command names and bean full names
499
+ 4. confirm the example command beans still demonstrate the described scene patterns
500
+ 5. run the docs build for repo-level docs verification:
501
+
502
+ ```bash
503
+ npm run docs:build
504
+ ```
@@ -18,10 +18,10 @@ For the practical styling decision map around local `$style`, dedicated style be
18
18
 
19
19
  ## Create a component
20
20
 
21
- Example: create a component named `card` in module `demo-student`.
21
+ Example: create a component named `card` in module `training-student`.
22
22
 
23
23
  ```bash
24
- npm run zova :create:component card -- --module=demo-student
24
+ npm run zova :create:component card -- --module=training-student
25
25
  ```
26
26
 
27
27
  ## Controller definition
@@ -53,7 +53,7 @@ The `Z` prefix is useful because it makes framework components easy to identify
53
53
  Representative usage pattern:
54
54
 
55
55
  ```typescript
56
- import { ZCard } from 'zova-module-demo-student';
56
+ import { ZCard } from 'zova-module-training-student';
57
57
 
58
58
  class RenderPageCounter {
59
59
  render() {
@@ -75,8 +75,8 @@ Instead of relying on template refs in the usual Vue style, Zova prefers direct
75
75
  Representative pattern:
76
76
 
77
77
  ```typescript
78
- import type { ControllerCard } from 'zova-module-demo-student';
79
- import { ZCard } from 'zova-module-demo-student';
78
+ import type { ControllerCard } from 'zova-module-training-student';
79
+ import { ZCard } from 'zova-module-training-student';
80
80
 
81
81
  class RenderPageCounter {
82
82
  cardRef: ControllerCard;
@@ -13,7 +13,7 @@ Zova uses a more unified approach centered on component props, which makes the p
13
13
  Example: add props support to component `card`.
14
14
 
15
15
  ```bash
16
- npm run zova :refactor:componentProps card -- --module=demo-student
16
+ npm run zova :refactor:componentProps card -- --module=training-student
17
17
  ```
18
18
 
19
19
  ## Define props
@@ -13,7 +13,7 @@ That is important because the framework treats model binding as part of the cont
13
13
  Example: add `modelValue` to component `card`.
14
14
 
15
15
  ```bash
16
- npm run zova :refactor:componentModel card modelValue -- --module=demo-student
16
+ npm run zova :refactor:componentModel card modelValue -- --module=training-student
17
17
  ```
18
18
 
19
19
  ## Representative generated shape
@@ -83,7 +83,7 @@ class ControllerOther {
83
83
  Representative generation command:
84
84
 
85
85
  ```bash
86
- npm run zova :refactor:componentModel card title -- --module=demo-student
86
+ npm run zova :refactor:componentModel card title -- --module=training-student
87
87
  ```
88
88
 
89
89
  Representative usage pattern: