openyida 2026.9.22-beta.1 → 2026.9.22

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 (338) hide show
  1. package/README.md +22 -14
  2. package/bin/yida.js +17 -6
  3. package/lib/app/app-entry.js +118 -0
  4. package/lib/app/app-list.js +8 -3
  5. package/lib/app/application-entry-urls.js +31 -0
  6. package/lib/app/application-style.js +69 -0
  7. package/lib/app/canvas-compile.js +22 -12
  8. package/lib/app/canvas-icon-exports.json +6160 -0
  9. package/lib/app/canvas-icon-guard.js +87 -0
  10. package/lib/app/canvas-navigation-guard.js +84 -0
  11. package/lib/app/canvas-path-guard.js +78 -0
  12. package/lib/app/canvas-theme-guard.js +254 -0
  13. package/lib/app/check-prd-completeness.js +7 -0
  14. package/lib/app/create-app.js +4 -1
  15. package/lib/app/create-form/args.js +37 -12
  16. package/lib/app/create-form/batch.js +86 -11
  17. package/lib/app/create-form.js +193 -86
  18. package/lib/app/create-page.js +84 -17
  19. package/lib/app/custom-theme.js +11 -0
  20. package/lib/app/fix-theme.js +82 -0
  21. package/lib/app/form-data-response-guard.js +57 -0
  22. package/lib/app/form-field-validator.js +26 -41
  23. package/lib/app/form-open-guard.js +97 -10
  24. package/lib/app/get-form-config.js +1 -0
  25. package/lib/app/inline-css-guard.js +1 -31
  26. package/lib/app/publish.js +67 -3
  27. package/lib/app/services/form-compiler.js +2 -4
  28. package/lib/app/theme-from-design.js +144 -41
  29. package/lib/app/theme-presets.js +1 -1
  30. package/lib/app/update-app.js +63 -13
  31. package/lib/asset/ai-image.js +59 -9
  32. package/lib/asset/asset-cmd.js +18 -7
  33. package/lib/asset/asset-execution.js +79 -0
  34. package/lib/asset/asset-plan.js +102 -9
  35. package/lib/asset/asset-resolve.js +55 -10
  36. package/lib/asset/asset-status.js +5 -4
  37. package/lib/asset/host-capabilities.js +11 -2
  38. package/lib/asset/url-verify.js +19 -4
  39. package/lib/auth/token-auth.js +9 -73
  40. package/lib/auth/token-store.js +0 -50
  41. package/lib/connector/connector-test.js +19 -5
  42. package/lib/connector/contract.js +3 -1
  43. package/lib/core/agent-capabilities.js +19 -16
  44. package/lib/core/command-manifest.js +339 -40
  45. package/lib/core/css-structure.js +37 -0
  46. package/lib/core/locales/en.js +90 -17
  47. package/lib/core/locales/zh.js +89 -16
  48. package/lib/core/redact.js +15 -10
  49. package/lib/core/sample.js +72 -30
  50. package/lib/core/utils.js +0 -4
  51. package/lib/design/check-design.js +51 -0
  52. package/lib/design/document.js +458 -0
  53. package/lib/design/icon-contrast.js +85 -0
  54. package/lib/design/page-content.js +11 -0
  55. package/lib/design-plan/artifact-updates.js +117 -0
  56. package/lib/design-plan/confirmation.js +13 -0
  57. package/lib/design-plan/design-plan.js +51 -4
  58. package/lib/design-plan/entry-navigation.js +97 -0
  59. package/lib/design-plan/init.js +121 -26
  60. package/lib/design-plan/materialize.js +449 -356
  61. package/lib/design-plan/navigation-policy.js +38 -0
  62. package/lib/design-plan/normalize.js +74 -29
  63. package/lib/design-plan/parallel.js +71 -16
  64. package/lib/design-plan/patch.js +63 -16
  65. package/lib/design-plan/preview.js +10 -9
  66. package/lib/design-plan/rebase.js +69 -0
  67. package/lib/design-plan/themes.js +101 -0
  68. package/lib/design-plan/validate.js +72 -12
  69. package/lib/design-plan/visual-policy.js +42 -0
  70. package/lib/process/create-process.js +84 -50
  71. package/lib/samples/openyida-scaffold/canvas-admin-entry.jsx +62 -0
  72. package/lib/samples/openyida-scaffold/canvas-form-drawer.canvas.jsx +20 -90
  73. package/lib/samples/openyida-scaffold/canvas-nav/content.jsx +93 -13
  74. package/lib/samples/openyida-scaffold/canvas-nav/data.jsx +100 -18
  75. package/lib/samples/openyida-scaffold/canvas-nav/mixed.jsx +6 -4
  76. package/lib/samples/openyida-scaffold/canvas-nav/shared.jsx +5 -5
  77. package/lib/samples/openyida-scaffold/canvas-nav/side.jsx +1 -2
  78. package/lib/samples/openyida-scaffold/canvas-nav/sidebar.jsx +1 -1
  79. package/lib/samples/openyida-scaffold/canvas-nav/top.jsx +15 -9
  80. package/lib/samples/openyida-scaffold/canvas-navigation.jsx +56 -0
  81. package/lib/samples/openyida-scaffold/canvas-view-state.jsx +74 -0
  82. package/lib/samples/yida-canvas-table-form/table-form-batch-submit.canvas.jsx +9 -83
  83. package/lib/samples/yida-rechart/trend-combo.canvas.jsx +14 -87
  84. package/package.json +3 -1
  85. package/scripts/postinstall.js +3 -3
  86. package/yida-skills/SKILL.md +19 -16
  87. package/yida-skills/references/official-example-schema-patterns.md +1 -1
  88. package/yida-skills/references/yida-api.md +4 -0
  89. package/yida-skills/skills/yida-app/SKILL.md +46 -23
  90. package/yida-skills/skills/yida-app/references/entry-navigation.md +193 -0
  91. package/yida-skills/skills/yida-app/workflow/parallel-work.md +15 -6
  92. package/yida-skills/skills/yida-app/workflow/plan/step-1-understand.md +1 -1
  93. package/yida-skills/skills/yida-app/workflow/plan/step-2-confirm.md +1 -1
  94. package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +29 -15
  95. package/yida-skills/skills/yida-app/workflow/plan/workflow.md +29 -11
  96. package/yida-skills/skills/yida-app/workflow/step-1-resource-context.md +4 -2
  97. package/yida-skills/skills/yida-app/workflow/step-2-design.md +23 -9
  98. package/yida-skills/skills/yida-app/workflow/step-3-create-or-reuse-app.md +6 -4
  99. package/yida-skills/skills/yida-app/workflow/step-4-forms-processes.md +15 -4
  100. package/yida-skills/skills/yida-app/workflow/step-6-main-page.md +6 -4
  101. package/yida-skills/skills/yida-app/workflow/step-7-page-code.md +15 -9
  102. package/yida-skills/skills/yida-app/workflow/step-8-publish-navigation.md +25 -11
  103. package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +88 -28
  104. package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +43 -43
  105. package/yida-skills/skills/yida-canvas-custom-page/references/canvas-style-implementation-guide.md +60 -44
  106. package/yida-skills/skills/yida-canvas-custom-page/references/canvas-theme-provider.md +72 -50
  107. package/yida-skills/skills/yida-canvas-custom-page/references/component-library-guide.md +13 -1
  108. package/yida-skills/skills/yida-canvas-custom-page/references/data-bridge-guide.md +140 -1
  109. package/yida-skills/skills/yida-canvas-custom-page/references/navigation-and-entry-guide.md +101 -72
  110. package/yida-skills/skills/yida-canvas-custom-page/references/page-generation-guide.md +35 -32
  111. package/yida-skills/skills/yida-canvas-custom-page/references/view-state-recovery.md +52 -0
  112. package/yida-skills/skills/yida-canvas-custom-page/references/waf-safe-authoring.md +45 -0
  113. package/yida-skills/skills/yida-canvas-custom-page/scripts/build-canvas-theme.js +29 -3
  114. package/yida-skills/skills/yida-canvas-custom-page/scripts/canvas-theme-provider.template.jsx +69 -6
  115. package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +26 -0
  116. package/yida-skills/skills/yida-canvas-data-binding/references/business-action-permissions.md +31 -0
  117. package/yida-skills/skills/yida-create-app/SKILL.md +2 -0
  118. package/yida-skills/skills/yida-create-form-page/SKILL.md +72 -58
  119. package/yida-skills/skills/yida-create-form-page/references/advanced-form-modes.md +5 -5
  120. package/yida-skills/skills/yida-create-form-page/references/association-form-field.md +4 -4
  121. package/yida-skills/skills/yida-create-form-page/references/batch-forms.md +6 -5
  122. package/yida-skills/skills/yida-create-form-page/references/field-definition-guide.md +7 -19
  123. package/yida-skills/skills/yida-create-form-page/references/form-field-properties.md +62 -44
  124. package/yida-skills/skills/yida-create-page/SKILL.md +14 -6
  125. package/yida-skills/skills/yida-create-process/SKILL.md +13 -2
  126. package/yida-skills/skills/yida-custom-page/SKILL.md +2 -0
  127. package/yida-skills/skills/yida-custom-page/references/design-system.md +1 -1
  128. package/yida-skills/skills/yida-dashboard/SKILL.md +5 -4
  129. package/yida-skills/skills/yida-data-management/SKILL.md +4 -2
  130. package/yida-skills/skills/yida-data-management/references/data-format-guide.md +4 -4
  131. package/yida-skills/skills/yida-design/SKILL.md +29 -14
  132. package/yida-skills/skills/yida-design/references/application-style-library.md +93 -0
  133. package/yida-skills/skills/yida-design/references/application-theme-consistency.md +150 -0
  134. package/yida-skills/skills/yida-design/references/ask-human-interaction-contract.md +67 -42
  135. package/yida-skills/skills/yida-design/references/asset-workflow.md +6 -2
  136. package/yida-skills/skills/yida-design/references/design-mode.md +4 -4
  137. package/yida-skills/skills/yida-design/references/native-form-styles.md +208 -0
  138. package/yida-skills/skills/yida-design/references/navigation-decision.md +53 -0
  139. package/yida-skills/skills/yida-design/references/page-continuity.md +42 -0
  140. package/yida-skills/skills/yida-design/references/page-quality-gates.md +26 -38
  141. package/yida-skills/skills/yida-design/references/theme/app-custom-theme-template.css +350 -432
  142. package/yida-skills/skills/yida-design/references/theme/application-style-recipes.css +58 -0
  143. package/yida-skills/skills/yida-design/references/theme-selection.md +67 -0
  144. package/yida-skills/skills/yida-design/references/visual-decision-engine.md +19 -143
  145. package/yida-skills/skills/yida-design/references/visual-scaffold-recipes.md +15 -27
  146. package/yida-skills/skills/yida-design/scripts/validate_design_themes.py +302 -0
  147. package/yida-skills/skills/yida-design/sub_skill/page-design/SKILL.md +4 -0
  148. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/SKILL.md +22 -8
  149. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/README.md +14 -10
  150. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/build-plan-template.html +9 -4
  151. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-compact-schema.md +49 -27
  152. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-schema.md +33 -154
  153. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-design.md +48 -127
  154. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-theme-selection.md +37 -51
  155. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/render_build_plan.py +43 -48
  156. package/yida-skills/skills/yida-design/templates/application-styles.json +398 -0
  157. package/yida-skills/skills/yida-design/templates/design-themes/README.md +73 -0
  158. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/app_theme.css +748 -0
  159. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/design.md +274 -0
  160. package/yida-skills/skills/yida-design/templates/design-themes/app-amber/form-layout.json +15 -0
  161. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/app_theme.css +748 -0
  162. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/design.md +274 -0
  163. package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/form-layout.json +14 -0
  164. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/app_theme.css +748 -0
  165. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/design.md +274 -0
  166. package/yida-skills/skills/yida-design/templates/design-themes/app-executive/form-layout.json +13 -0
  167. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/app_theme.css +748 -0
  168. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/design.md +274 -0
  169. package/yida-skills/skills/yida-design/templates/design-themes/app-finance/form-layout.json +14 -0
  170. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/app_theme.css +748 -0
  171. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/design.md +274 -0
  172. package/yida-skills/skills/yida-design/templates/design-themes/app-glass/form-layout.json +14 -0
  173. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/app_theme.css +748 -0
  174. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/design.md +274 -0
  175. package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/form-layout.json +14 -0
  176. package/yida-skills/skills/yida-design/templates/design-themes/app-line/app_theme.css +748 -0
  177. package/yida-skills/skills/yida-design/templates/design-themes/app-line/design.md +274 -0
  178. package/yida-skills/skills/yida-design/templates/design-themes/app-line/form-layout.json +13 -0
  179. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/app_theme.css +748 -0
  180. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/design.md +274 -0
  181. package/yida-skills/skills/yida-design/templates/design-themes/app-neon/form-layout.json +14 -0
  182. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/app_theme.css +754 -0
  183. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/design.md +279 -0
  184. package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/form-layout.json +13 -0
  185. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/app_theme.css +748 -0
  186. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/design.md +274 -0
  187. package/yida-skills/skills/yida-design/templates/design-themes/app-paper/form-layout.json +13 -0
  188. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/app_theme.css +748 -0
  189. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/design.md +274 -0
  190. package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/form-layout.json +14 -0
  191. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/app_theme.css +748 -0
  192. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/design.md +274 -0
  193. package/yida-skills/skills/yida-design/templates/design-themes/app-plum/form-layout.json +14 -0
  194. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/app_theme.css +758 -0
  195. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/design.md +281 -0
  196. package/yida-skills/skills/yida-design/templates/design-themes/app-pop/form-layout.json +14 -0
  197. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/app_theme.css +748 -0
  198. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/design.md +274 -0
  199. package/yida-skills/skills/yida-design/templates/design-themes/app-sage/form-layout.json +14 -0
  200. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/app_theme.css +748 -0
  201. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/design.md +274 -0
  202. package/yida-skills/skills/yida-design/templates/design-themes/app-teal/form-layout.json +14 -0
  203. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/app_theme.css +754 -0
  204. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/design.md +279 -0
  205. package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/form-layout.json +14 -0
  206. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/app_theme.css +752 -0
  207. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/design.md +278 -0
  208. package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/form-layout.json +13 -0
  209. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/app_theme.css +748 -0
  210. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/design.md +274 -0
  211. package/yida-skills/skills/yida-design/templates/design-themes/app-wire/form-layout.json +14 -0
  212. package/yida-skills/skills/yida-design/templates/design-themes/basic-tokens.json +118 -0
  213. package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/app_theme.css +690 -0
  214. package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/design.md +382 -0
  215. package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline/form-layout.json +13 -0
  216. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/app_theme.css +691 -0
  217. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/design.md +380 -0
  218. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines/form-layout.json +13 -0
  219. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/app_theme.css +696 -0
  220. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/design.md +378 -0
  221. package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels/form-layout.json +13 -0
  222. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/app_theme.css +689 -0
  223. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/design.md +238 -0
  224. package/yida-skills/skills/yida-design/templates/design-themes/free-creative/form-layout.json +13 -0
  225. package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/app_theme.css +692 -0
  226. package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/design.md +375 -0
  227. package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid/form-layout.json +13 -0
  228. package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/app_theme.css +691 -0
  229. package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/design.md +362 -0
  230. package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands/form-layout.json +13 -0
  231. package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/app_theme.css +691 -0
  232. package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/design.md +409 -0
  233. package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks/form-layout.json +13 -0
  234. package/yida-skills/skills/yida-design/templates/design-themes/index.json +464 -0
  235. package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/app_theme.css +701 -0
  236. package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/design.md +379 -0
  237. package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels/form-layout.json +13 -0
  238. package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/app_theme.css +691 -0
  239. package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/design.md +404 -0
  240. package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm/form-layout.json +13 -0
  241. package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/app_theme.css +698 -0
  242. package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/design.md +389 -0
  243. package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone/form-layout.json +13 -0
  244. package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/app_theme.css +691 -0
  245. package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/design.md +372 -0
  246. package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces/form-layout.json +13 -0
  247. package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/app_theme.css +690 -0
  248. package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/design.md +455 -0
  249. package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm/form-layout.json +13 -0
  250. package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/app_theme.css +698 -0
  251. package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/design.md +394 -0
  252. package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band/form-layout.json +13 -0
  253. package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/app_theme.css +692 -0
  254. package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/design.md +391 -0
  255. package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels/form-layout.json +13 -0
  256. package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/app_theme.css +711 -0
  257. package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/design.md +408 -0
  258. package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels/form-layout.json +13 -0
  259. package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/app_theme.css +692 -0
  260. package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/design.md +383 -0
  261. package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels/form-layout.json +13 -0
  262. package/yida-skills/skills/yida-design/templates/navigation-styles.json +769 -0
  263. package/yida-skills/skills/yida-design/workflow/output-design.md +117 -375
  264. package/yida-skills/skills/yida-design/workflow/step-1-read-brief.md +1 -1
  265. package/yida-skills/skills/yida-design/workflow/step-2-theme-system.md +33 -29
  266. package/yida-skills/skills/yida-design/workflow/step-4-wireframe-interaction.md +3 -1
  267. package/yida-skills/skills/yida-design/workflow/step-5-visual-states.md +22 -106
  268. package/yida-skills/skills/yida-design/workflow/step-6-handoff.md +15 -22
  269. package/yida-skills/skills/yida-form-permission/SKILL.md +6 -0
  270. package/yida-skills/skills/yida-image-assets/SKILL.md +73 -50
  271. package/yida-skills/skills/yida-image-assets/references/manifest-contract.md +82 -52
  272. package/yida-skills/skills/yida-image-assets/references/source-policy.md +14 -15
  273. package/yida-skills/skills/yida-integration/SKILL.md +1 -0
  274. package/yida-skills/skills/yida-login/SKILL.md +2 -0
  275. package/yida-skills/skills/yida-nav-group/SKILL.md +4 -2
  276. package/yida-skills/skills/yida-nav-shell/SKILL.md +36 -12
  277. package/yida-skills/skills/yida-nav-shell/references/nav-shell-patterns.md +79 -136
  278. package/yida-skills/skills/yida-page-config/SKILL.md +13 -4
  279. package/yida-skills/skills/yida-prd/SKILL.md +5 -3
  280. package/yida-skills/skills/yida-prd/references/app/blueprint.md +4 -4
  281. package/yida-skills/skills/yida-prd/references/app/navigation-patterns.md +6 -3
  282. package/yida-skills/skills/yida-prd/references/app/role-journey.md +5 -3
  283. package/yida-skills/skills/yida-prd/references/plan-content.md +4 -0
  284. package/yida-skills/skills/yida-prd/workflow/output-prd.md +18 -11
  285. package/yida-skills/skills/yida-prd/workflow/plan-business.md +4 -4
  286. package/yida-skills/skills/yida-prd/workflow/step-2-information-architecture.md +11 -8
  287. package/yida-skills/skills/yida-publish-page/SKILL.md +10 -1
  288. package/yida-skills/skills/yida-requirement-analysis/SKILL.md +10 -39
  289. package/yida-skills/skills/yida-requirement-analysis/references/experience-groups.md +79 -0
  290. package/yida-skills/skills/yida-requirement-analysis/references/handoff.md +68 -0
  291. package/yida-skills/skills/yida-requirement-analysis/workflow/prepare-brief.md +40 -71
  292. package/yida-skills/skills-index.json +36 -16
  293. package/lib/auth/dws-sync.js +0 -145
  294. package/yida-skills/skills/yida-design/references/app/blueprint.md +0 -70
  295. package/yida-skills/skills/yida-design/references/app/navigation-patterns.md +0 -43
  296. package/yida-skills/skills/yida-design/references/app/role-journey.md +0 -30
  297. package/yida-skills/skills/yida-design/references/style-design-selection.md +0 -137
  298. package/yida-skills/skills/yida-design/references/style-designs/_design-md-template.md +0 -185
  299. package/yida-skills/skills/yida-design/references/style-designs/aqua-service-progress-dashboard.md +0 -242
  300. package/yida-skills/skills/yida-design/references/style-designs/blue-insight-operations-dashboard.md +0 -243
  301. package/yida-skills/skills/yida-design/references/style-designs/blue-productivity-insight-workbench.md +0 -242
  302. package/yida-skills/skills/yida-design/references/style-designs/command-filter-card-console.md +0 -304
  303. package/yida-skills/skills/yida-design/references/style-designs/contrast-command-analytics-workbench.md +0 -261
  304. package/yida-skills/skills/yida-design/references/style-designs/dark-stage-analytic-dashboard.md +0 -369
  305. package/yida-skills/skills/yida-design/references/style-designs/filterable-card-catalog.md +0 -354
  306. package/yida-skills/skills/yida-design/references/style-designs/green-timeline-progress-workbench.md +0 -250
  307. package/yida-skills/skills/yida-design/references/style-designs/registry.md +0 -117
  308. package/yida-skills/skills/yida-design/references/style-designs/soft-analytic-workbench.md +0 -348
  309. package/yida-skills/skills/yida-design/references/style-designs/soft-blue-grid-analytic-dashboard.md +0 -658
  310. package/yida-skills/skills/yida-design/references/style-designs/soft-bordered-analytic-workbench.md +0 -385
  311. package/yida-skills/skills/yida-design/references/style-designs/soft-curated-filter-gallery.md +0 -300
  312. package/yida-skills/skills/yida-design/references/style-designs/soft-modular-analytic-workbench.md +0 -404
  313. package/yida-skills/skills/yida-design/references/style-designs/soft-progress-analytics-workbench.md +0 -382
  314. package/yida-skills/skills/yida-design/references/style-designs/soft-timeline-analytics-workbench.md +0 -367
  315. package/yida-skills/skills/yida-design/references/style-designs/teal-rail-analytics-workbench.md +0 -341
  316. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/validate_design_themes.py +0 -190
  317. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/README.md +0 -98
  318. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-media-grid.md +0 -339
  319. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-modular-clarity.md +0 -348
  320. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-structured-clarity.md +0 -344
  321. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ambient-halo-layered.md +0 -345
  322. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-focus-layered.md +0 -355
  323. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-luminous-modular.md +0 -377
  324. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/deep-stage-duotone.md +0 -352
  325. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/hairline-runway-clarity.md +0 -389
  326. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/high-contrast-modular.md +0 -364
  327. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/index.json +0 -329
  328. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/interlocked-vivid-modules.md +0 -348
  329. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/matrix-grid-focus.md +0 -345
  330. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/media-rail-inspector.md +0 -379
  331. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mist-layered-signal.md +0 -347
  332. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/modular-rail-signal.md +0 -352
  333. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mono-grid-signal.md +0 -386
  334. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ribbon-ledger-lift.md +0 -384
  335. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/segmented-meter-clarity.md +0 -388
  336. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/split-rail-precision.md +0 -341
  337. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/status-framed-media-grid.md +0 -361
  338. package/yida-skills/skills/yida-design/workflow/output-prd.md +0 -185
package/README.md CHANGED
@@ -183,7 +183,7 @@ openyida get-schema APP_XXX FORM_XXX --compact --resolve-fields "Customer Name,S
183
183
  openyida get-schema APP_XXX --all --output-dir .cache/schemas
184
184
  ```
185
185
 
186
- Form definitions support 19 business field types plus verified presentation/layout components. Prefer `Divider` for section titles and `ColumnContainer` (mapped to `ColumnsLayout` + `Column`) for multi-column layout; use `GroupContainer` / `PageSection` only when an actual grouping container is needed.
186
+ Native forms use a component tree: business fields capture data, tabs switch content, action groups trigger business actions, images establish visual focus, status areas provide feedback, and `Divider` plus `ColumnContainer` organize hierarchy and columns. `create-form` field definitions create 19 business field types plus `Divider` and `ColumnContainer` (mapped to `ColumnsLayout` + `Column`), while updates retain other existing components.
187
187
 
188
188
  ### Custom Page Development
189
189
 
@@ -385,7 +385,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
385
385
  |---------|-------------|
386
386
  | `openyida login [target-url] [--env <name>\|--intl\|--overseas\|--global\|--yidaapps\|--alibaba] [--client-id <clientId>] [--endpoint <url>] [--no-browser]` | Login with OAuth token mode |
387
387
  | `openyida logout` | Logout / unbind current project auth |
388
- | `openyida auth <status\|login\|sync-dws\|refresh\|logout\|profiles\|profile switch>` | Token login state and profile management |
388
+ | `openyida auth <status\|login\|refresh\|logout\|profiles\|profile switch>` | Token login state and profile management |
389
389
  | `openyida org <list\|switch> [--json] [--corp-id <corpId>]` | Organization management (list / switch existing profiles first) |
390
390
  | `openyida env [--json\|setup\|list\|show\|switch\|add\|remove] [options]` | Detect AI tool environment & token login state |
391
391
 
@@ -393,14 +393,17 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
393
393
 
394
394
  | Command | Description |
395
395
  |---------|-------------|
396
+ | `openyida app-entry get <appType> [--json]` | Read frontend and management runtime entries |
397
+ | `openyida app-entry set <appType> [--frontend <url>] [--management <url>] [--clear-frontend] [--clear-management] [--json]` | Register application entries with partial update and readback |
396
398
  | `openyida app-list [--type managed\|created] [--page N] [--size N]` | Page through apps I manage or created |
397
399
  | `openyida corp-efficiency [overview\|details\|detail\|groups\|notify] [options] [--open\|--no-open]` | Query enterprise efficiency overview and detail reports |
398
400
  | `openyida create-app "<name>"\|--name <name> [options] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a Yida app |
401
+ | `openyida design-plan catalog [--json]` | List available planning themes and page patterns |
399
402
  | `openyida design-plan init <requirement-brief.json> [--theme-id <id>] [--output-dir <dir>] [--json]` | Initialize a plan draft from confirmed requirements |
400
403
  | `openyida design-plan preview <build-plan.json> --part-file <module.json> [--json]` | Update plan drafts by module |
401
- | `openyida design-plan materialize <build-plan.json> [--from-preview \| --business-file <json> --visual-file <json>] [--output-dir <dir>] [--check] [--json]` | Generate and validate design-plan artifacts from build-plan.json |
402
- | `openyida design-plan patch <build-plan.json> --set <path=value> [--set <path=value> ...] [--materialize] [--output-dir <dir>] [--json]` | Patch a design plan by field path and invalidate prior confirmation |
403
- | `openyida update-app <appType> [--name "..."] [--theme-file <css>] [--nav-theme light\|dark\|white\|gray] [--logo-source appIcon\|customImage] [--layout side\|top\|l_shape] [--hide-app-nav\|--show-app-nav]` | Update app info |
404
+ | `openyida design-plan materialize <build-plan.json> [--from-preview \| --business-file <json> --visual-file <json>] [--output-dir <dir>] [--rebase-parts] [--check] [--json]` | Generate or update plan documents and theme with consistency checks |
405
+ | `openyida design-plan patch <build-plan.json> --set <path=value> [--set <path=value> ...] [--materialize] [--output-dir <dir>] [--json]` | Patch plan fields and optionally sync documents and theme |
406
+ | `openyida update-app <appType> [--name "..."] [--desc "..."] [--icon <name>] [--icon-color <color>] [--colour <key>] [--theme-color <color>] [--theme-file <css>] [--nav-theme light\|dark\|white\|gray] [--logo-source appIcon\|customImage] [--layout side\|top\|l_shape] [--hide-app-nav\|--show-app-nav]` | Update app info |
404
407
  | `openyida app-online <appType> [--to-ding-app-center] [--show-app-center]` | Enable a Yida app |
405
408
  | `openyida app-offline <appType> [--to-ding-app-center] [--show-app-center]` | Disable a Yida app |
406
409
  | `openyida nav-group <list\|create\|rename\|delete\|move\|order\|auto-order\|hide\|show> <appType> ...` | Manage app sidebar navigation groups |
@@ -414,7 +417,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
414
417
  | Command | Description |
415
418
  |---------|-------------|
416
419
  | `openyida create-form batch <appType> <plan.json> [--concurrency 1..4] [--check] [--json]` | Create forms concurrently by dependency |
417
- | `openyida create-form create <appType> "<formTitle>" <fieldsJsonFile> [--icon auto\|<iconName>] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a form page |
420
+ | `openyida create-form create <appType> "<formTitle>" <fieldsJsonFile> [--layout single\|double\|card\|section] [--theme default\|compact\|comfortable] [--label-align top\|left\|right] [--icon auto\|<iconName>] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a form page |
418
421
  | `openyida create-form icons [--json]` | List available form navigation icons |
419
422
  | `openyida create-form validate-fields <fieldsJsonOrFile> [--json]` | Validate form field JSON locally |
420
423
  | `openyida create-form update <appType> <formUuid> (<changesJsonOrFile> \| --data-file <changesJsonOrFile>) [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Update a form page |
@@ -429,12 +432,13 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
429
432
  | `openyida aggregate-table <list\|create-empty\|inspect\|preview\|save\|publish\|status> <appType> ...` | Manage aggregate tables (virtualView) |
430
433
  | `openyida get-schema <appType> <formUuid\|--all> [--summary-json\|--field-map-json\|--analysis-json]` | Get one form Schema or all form Schemas |
431
434
  | `openyida check-prd-completeness <prd.md> --app-type <appType> [--build-manifest <file>] [--json]` | Check PRD page/resource count risk |
435
+ | `openyida check-design <design.md> [--prd <prd.md>] [--base-dir <dir>] [--json]` | Validate design documents, theme tokens and PRD handoff |
432
436
  | `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
433
437
  | `openyida create-page <appType> "<name>" [--mode dashboard] [--hide-nav] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom display page |
434
438
  | `openyida build-page <sourceFile> [--output file\|--write]` | Build Yida-compatible page source |
435
- | `openyida check-page <src> [--compat]` | Check custom page standards |
436
- | `openyida compile <src> [--canvas] [--json]` | Compile custom page locally |
437
- | `openyida publish <src> <appType> <formUuid> [--health-check] [--force] [--canvas] [--auto-nav-order] [--open\|--no-open]` | Compile and publish custom page |
439
+ | `openyida check-page <src> [--compat] [--json]` | Check custom page standards |
440
+ | `openyida compile <src> [--canvas] [--compat] [--skip-lint] [--json]` | Compile custom page locally |
441
+ | `openyida publish <src> <appType> <formUuid> [--health-check] [--force] [--canvas] [--compat] [--skip-lint] [--auto-nav-order] [--open\|--no-open] [--json]` | Compile and publish custom page |
438
442
  | `openyida update-form-config <appType> <formUuid> <true\|false\|keep> "<title>" [--locale zh_CN\|en_US\|ja_JP]` | Update form configuration |
439
443
  | `openyida get-form-config <appType> <formUuid> [--json]` | Query form configuration |
440
444
 
@@ -457,7 +461,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
457
461
  | Command | Description |
458
462
  |---------|-------------|
459
463
  | `openyida configure-process <appType> <formUuid> <definition> [processCode] [--replace]` | Configure and publish process rules; Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
460
- | `openyida create-process <appType> ... [--replace]` | Create process form (all-in-one); Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
464
+ | `openyida create-process <appType> <formTitle> <fieldsJsonFile> <processDefinitionFile> [--replace] \| create-process <appType> --formUuid <formUuid> <processDefinitionFile> [--replace]` | Create process form (all-in-one); Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
461
465
  | `openyida ai-form-setting <get\|fields\|models\|enable\|disable\|save> <appType> ...` | Manage process form AI approval prompts |
462
466
  | `openyida process preview <appType> ...` | Preview process instance (visual flowchart) |
463
467
 
@@ -490,7 +494,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
490
494
  | `openyida connector update-action --connector-id <id> --action <operationId> --query-json JSON --confirm` | Safely update action query defaults |
491
495
  | `openyida connector list-actions <id>` | List actions |
492
496
  | `openyida connector delete-action <id> <operation-id>` | Delete an action |
493
- | `openyida connector test --connector-id <id> --action <actionId> [--path-json JSON] [--query-json JSON] [--header-json JSON] [--body-json JSON] [--account-id <id>] [--system-token-app <appType>]` | Test an action |
497
+ | `openyida connector test --connector-id <id> --action <actionId> [--path-json JSON] [--query-json JSON] [--header-json JSON] [--body-json JSON] [--account-id <id>] [--system-token-app <appType>] [--ignore-defaults]` | Test an action |
494
498
  | `openyida connector list-connections <id>` | List auth connections |
495
499
  | `openyida connector create-connection <id> <name> [--interactive]` | Create an auth connection |
496
500
  | `openyida connector smart-create --curl "..."` | Generate a redacted action draft from cURL (no remote create) |
@@ -521,7 +525,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
521
525
  | `openyida a2a <serve\|agent-card> [options]` | Start local read-only A2A adapter or print Agent Card |
522
526
  | `openyida bridge start [--token <pair-token>] [--port 6736] [--origin https://demo.aliwork.com] [--open\|--no-open]` | Start OpenYida local web bridge service |
523
527
  | `openyida copy [--force]` | Copy project working directory |
524
- | `openyida sample [--list] [<skill> <name>] [--output <file>] [--var KEY=VALUE ...] [--design-file <design.md>]` | Output code samples/templates |
528
+ | `openyida sample [--list] [<skill> <name>] [--output <file-or-directory>] [--var KEY=VALUE ...] [--design-file <design.md>] [--style-id <themeId\|free-creative>]` | Output code samples/templates |
525
529
  | `openyida doctor [--fix]` | Environment diagnostics & auto-fix |
526
530
  | `openyida db-seq-fix [--fix]` | Detect and repair PostgreSQL sequence drift |
527
531
  | `openyida formula evaluate <formula\|file> [--schema file]` | Static-check Yida formula syntax and field refs |
@@ -542,7 +546,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
542
546
 
543
547
  #### Connector Safety and Real E2E
544
548
 
545
- `connector test` keeps the legacy flat `--params` option, but dispatches each key only to the location proven by the action schema. Unknown or ambiguous keys fail closed. Authenticated connectors require `--account-id`, and that account must belong to the selected connector. The test response follows the frontend canonical contract `{statusLine,responseHeaders,content}`; unknown envelopes and non-2xx status lines are failures.
549
+ `connector test` keeps the legacy flat `--params` option, but dispatches each key only to the location proven by the action schema. Unknown or ambiguous keys fail closed. Authenticated connectors require `--account-id`, and that account must belong to the selected connector. The test response follows the frontend canonical contract `{statusLine,responseHeaders,content}`; unknown envelopes and non-2xx status lines are failures. With `--ignore-defaults`, the test starts from empty parameter sets: saved default values from the action definition (including sensitive placeholder values such as documented `***` samples) are ignored for the run, and a warning is printed when a non-empty systemToken default exists. Declared systemToken actions still require `--system-token-app`, target-trust checks still apply, and explicitly provided systemToken values are still rejected.
546
550
 
547
551
  `connector update-action --connector-id <id> --action <operationId> --query-json '{"currentPage":"1"}' --confirm` is the narrow safe path for editing existing query defaults. It requires a complete connector/action preflight, changes only declared query defaults mirrored in `inputs` and `parameters`, submits the complete action collection once, and verifies an unchanged connector fingerprint, action count, non-target actions, and stable IDs. Missing/empty/unknown parameters, duplicate IDs, incomplete readback, and unknown write outcomes fail closed without automatic retry. `add-action` no longer overwrites an existing action ID; use `update-action` for query-only edits.
548
552
 
@@ -649,10 +653,14 @@ npx clawhub@latest install nicky1108/yida-app
649
653
  ```bash
650
654
  git clone https://github.com/openyida/openyida.git
651
655
  cd openyida
652
- npm install
656
+ nvm install
657
+ nvm use
658
+ npm ci --ignore-scripts
653
659
  npm run check:ci
654
660
  ```
655
661
 
662
+ Use the Node.js version in `.nvmrc` to match CI validation. If you do not use nvm, install that version directly.
663
+
656
664
  Useful checks:
657
665
 
658
666
  | Command | Purpose |
package/bin/yida.js CHANGED
@@ -526,6 +526,7 @@ function printManifestCommandHelp(commandName) {
526
526
  printCommandUsage(...entries.flatMap((entry) => [
527
527
  entry.usage,
528
528
  entry.description,
529
+ ...(entry.notes || []),
529
530
  ...(entry.examples || []),
530
531
  ]));
531
532
  return true;
@@ -690,8 +691,6 @@ async function main() {
690
691
  const { tokenLogin, tokenLogout, tokenRefresh } = require('../lib/auth/token-auth');
691
692
  if (!subCommand || subCommand === '--help' || subCommand === '-h') {
692
693
  printAuthHelp();
693
- } else if (subCommand === 'sync-dws') {
694
- await require('../lib/auth/dws-sync').run(authArgs, buildTokenLoginOptions(authArgs));
695
694
  } else if (subCommand === 'status') {
696
695
  console.log(JSON.stringify(getAuthStatus(buildTokenLoginOptions(authArgs)), null, 2));
697
696
  } else if (subCommand === 'profiles') {
@@ -699,7 +698,10 @@ async function main() {
699
698
  console.log(JSON.stringify(listAuthProfiles(buildTokenLoginOptions(authArgs)), null, 2));
700
699
  } else if (subCommand === 'profile') {
701
700
  const profileSubCommand = authArgs[0];
702
- if (profileSubCommand === 'switch') {
701
+ if (profileSubCommand === 'list') {
702
+ const { listAuthProfiles } = require('../lib/auth/profile');
703
+ console.log(JSON.stringify(listAuthProfiles(buildTokenLoginOptions(authArgs.slice(1))), null, 2));
704
+ } else if (profileSubCommand === 'switch') {
703
705
  const target = getFirstPositionalArg(authArgs, 1);
704
706
  const { switchAuthProfile } = require('../lib/auth/profile');
705
707
  console.log(JSON.stringify(switchAuthProfile(target, buildTokenLoginOptions(authArgs)), null, 2));
@@ -731,6 +733,12 @@ async function main() {
731
733
  break;
732
734
  }
733
735
 
736
+ case 'app-entry': {
737
+ const { run } = require('../lib/app/app-entry');
738
+ await run(args);
739
+ break;
740
+ }
741
+
734
742
  case 'app-list': {
735
743
  const { run } = require('../lib/app/app-list');
736
744
  await run(args);
@@ -797,6 +805,12 @@ async function main() {
797
805
  break;
798
806
  }
799
807
 
808
+ case 'check-design': {
809
+ const { run } = require('../lib/design/check-design');
810
+ await run(args);
811
+ break;
812
+ }
813
+
800
814
  case 'er': {
801
815
  const { run } = require('../lib/app/er');
802
816
  await run(args);
@@ -1008,9 +1022,6 @@ async function main() {
1008
1022
  }
1009
1023
 
1010
1024
  case 'create-process': {
1011
- if (args.length < 2) {
1012
- throwCliUsage(t('cli.create_process_usage'), t('cli.create_process_example'));
1013
- }
1014
1025
  const { run: runCreateProcess } = require('../lib/process/create-process');
1015
1026
  await runCreateProcess(args);
1016
1027
  break;
@@ -0,0 +1,118 @@
1
+ 'use strict';
2
+
3
+ const { createAuthRef, createYidaClient, unwrapYidaResponse } = require('../core/yida-client');
4
+ const { t } = require('../core/i18n');
5
+ const { throwUsage } = require('../core/command-errors');
6
+
7
+ /** Keep complete runtime URLs; the server verifies tenant and resource ownership. */
8
+ function normalizeUrl(value, appType) {
9
+ const input = String(value || '').trim();
10
+ if (!input) { throw new Error(t('app_entry.invalid_url')); }
11
+ // eslint-disable-next-line no-control-regex -- reject control characters in persisted URLs
12
+ if (input.length > 2048 || /[\\\s\x00-\x1f\x7f]/.test(input)) {
13
+ throw new Error(t('app_entry.invalid_url'));
14
+ }
15
+ const match = /^https?:\/\/[^/?#]+(\/[^?#]*)(?:\?([^#]*))?(?:#(.*))?$/i.exec(input);
16
+ if (!match) { throw new Error(t('app_entry.invalid_url')); }
17
+ const url = new URL(input);
18
+ const route = match[1];
19
+ const prefix = `/${appType}/`;
20
+ const parts = route.startsWith(prefix) ? route.slice(prefix.length).split('/') : [];
21
+ const short = /^\/(?:s\/[A-Za-z0-9_-]+|o\/[A-Za-z0-9_-]+(?:\/FORM-[A-Za-z0-9_-]+)?)$/.test(route);
22
+ const runtime = ['custom', 'workbench', 'submission', 'manage'].includes(parts[0]) &&
23
+ ((parts.length === 1 && parts[0] === 'workbench') ||
24
+ (parts.length === 2 && /^[A-Za-z0-9_-]+$/.test(parts[1])));
25
+ if (url.username || url.password || url.pathname !== route || (!short && !runtime)) {
26
+ throw new Error(t('app_entry.invalid_url'));
27
+ }
28
+ if (match[2] !== undefined) {
29
+ const seen = new Set();
30
+ for (const parameter of match[2].split('&')) {
31
+ const pair = /^(corpid|locale|viewUuid|processCode|hideLeftNav|noShowTopBottom)=([A-Za-z0-9_-]+)$/.exec(parameter);
32
+ if (!pair || seen.has(pair[1]) ||
33
+ (['hideLeftNav', 'noShowTopBottom'].includes(pair[1]) && !/^(true|false|y|n|0|1)$/.test(pair[2]))) {
34
+ throw new Error(t('app_entry.invalid_url'));
35
+ }
36
+ seen.add(pair[1]);
37
+ }
38
+ }
39
+ if (match[3] !== undefined && !/^[A-Za-z0-9_/-]+$/.test(match[3])) {
40
+ throw new Error(t('app_entry.invalid_url'));
41
+ }
42
+ return input;
43
+ }
44
+
45
+ /** Reject duplicate or ambiguous flags; omissions never clear stored entries. */
46
+ function parseArgs(args) {
47
+ const [action, appType, ...flags] = args;
48
+ if (!['get', 'set'].includes(action) || !/^[A-Za-z0-9_-]+$/.test(appType || '')) {
49
+ throwUsage(t('app_entry.usage'));
50
+ }
51
+ const values = {};
52
+ for (let index = 0; index < flags.length; index++) {
53
+ const flag = flags[index];
54
+ if (flag === '--json') {
55
+ continue;
56
+ }
57
+ const match = /^--(clear-)?(frontend|management)$/.exec(flag);
58
+ if (action !== 'set' || !match || Object.prototype.hasOwnProperty.call(values, match[2])) {
59
+ throwUsage(t('app_entry.usage'));
60
+ }
61
+ const value = match[1] ? null : flags[++index];
62
+ if (value !== null && (!value || value.startsWith('--'))) {
63
+ throwUsage(t('app_entry.usage'));
64
+ }
65
+ values[match[2]] = value;
66
+ }
67
+ if (action === 'set' && !Object.keys(values).length) {
68
+ throwUsage(t('app_entry.usage'));
69
+ }
70
+ return { action, appType, values };
71
+ }
72
+
73
+ /** Read the revision used for a conditional partial write. */
74
+ async function readEntries(client, appType) {
75
+ const result = unwrapYidaResponse(await client.get(`/${appType}/query/app/getAccessEntries.json`));
76
+ if (!result || typeof result.revision !== 'string' || !result.revision ||
77
+ !result.accessEntries || typeof result.accessEntries !== 'object' || Array.isArray(result.accessEntries)) {
78
+ throw new Error(t('app_entry.invalid_response'));
79
+ }
80
+ return result;
81
+ }
82
+
83
+ /** Persist only supplied entries and verify them through a separate read. */
84
+ async function run(args = []) {
85
+ if (args.includes('--help') || args.includes('-h')) {
86
+ console.log(t('app_entry.usage'));
87
+ return;
88
+ }
89
+ const { action, appType, values } = parseArgs(args);
90
+ const authRef = createAuthRef();
91
+ const client = createYidaClient({ authRef });
92
+ const patch = {};
93
+ for (const [key, value] of Object.entries(values)) {
94
+ patch[key] = value === null ? null : { url: normalizeUrl(value, appType) };
95
+ }
96
+ let result = await readEntries(client, appType);
97
+ if (action === 'set') {
98
+ unwrapYidaResponse(await client.postForm(`/${appType}/query/app/saveAccessEntries.json`, {
99
+ accessEntries: JSON.stringify(patch), revision: result.revision,
100
+ }));
101
+ result = await readEntries(client, appType);
102
+ for (const [key, entry] of Object.entries(patch)) {
103
+ if ((result.accessEntries[key]?.url || '') !== (entry?.url || '')) {
104
+ throw new Error(t('app_entry.readback_failed'));
105
+ }
106
+ }
107
+ }
108
+ const urls = {};
109
+ for (const key of ['frontend', 'management']) {
110
+ if (result.accessEntries[key]?.url) {
111
+ urls[key] = normalizeUrl(result.accessEntries[key].url, appType);
112
+ }
113
+ }
114
+ console.log(JSON.stringify({ appType, ...result, urls }, null, 2));
115
+ return result;
116
+ }
117
+
118
+ module.exports = { run, parseArgs, normalizeUrl };
@@ -6,13 +6,16 @@
6
6
  * 输出字段:
7
7
  * appName - 应用名称(zh_CN)
8
8
  * appType - 应用唯一标识
9
- * systemLink - 应用访问地址
9
+ * systemLink - 平台返回的应用访问地址
10
+ * appUrl / workbenchUrl - 应用工作台地址
11
+ * adminUrl - 开发者管理后台地址(不表示已验证访问权限)
10
12
  */
11
13
 
12
14
  'use strict';
13
15
 
14
16
  const { createAuthRef, createYidaClient } = require('../core/yida-client');
15
17
  const { t } = require('../core/i18n');
18
+ const { buildApplicationEntryUrls } = require('./application-entry-urls');
16
19
  const { throwCommandError, throwUsage } = require('../core/command-errors');
17
20
 
18
21
  const API_PATH = '/query/app/getAppList.json';
@@ -76,11 +79,13 @@ function parseArgs(args = []) {
76
79
  /**
77
80
  * 将应用原始数据提取为输出字段
78
81
  */
79
- function formatApp(app) {
82
+ function formatApp(app, baseUrl) {
80
83
  return {
81
84
  appName: (app.appName && app.appName.zh_CN) || '',
82
85
  appType: app.appType || '',
83
86
  systemLink: app.systemLink || '',
87
+ ...(app.accessEntries ? { accessEntries: app.accessEntries } : {}),
88
+ ...buildApplicationEntryUrls({ appType: app.appType, systemLink: app.systemLink, baseUrl }),
84
89
  };
85
90
  }
86
91
 
@@ -141,7 +146,7 @@ async function run(args) {
141
146
  const totalCount = Number.isFinite(Number(content.totalCount)) ? Number(content.totalCount) : apps.length;
142
147
  const totalPages = Math.max(1, Math.ceil(totalCount / options.pageSize));
143
148
  const scopeLabel = t(`app_list.scope_${options.type}`);
144
- const formattedApps = apps.map(formatApp);
149
+ const formattedApps = apps.map(app => formatApp(app, authRef.baseUrl));
145
150
 
146
151
  // stdout 输出 JSON,方便 AI 工具解析
147
152
  console.log(JSON.stringify(formattedApps, null, 2));
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ // URLs derived by the CLI from a successful app result and its authenticated
4
+ // base URL. Constructing a route does not verify the recipient's access rights.
5
+ function buildApplicationEntryUrls({ appType, baseUrl, systemLink }) {
6
+ if (typeof appType !== 'string' || !/^APP_[A-Za-z0-9_-]+$/.test(appType)) { return {}; }
7
+ let origin;
8
+ const params = new URLSearchParams();
9
+ try {
10
+ const base = new URL(baseUrl);
11
+ if (!['https:', 'http:'].includes(base.protocol) || base.username || base.password) { return {}; }
12
+ origin = base.origin;
13
+ } catch { return {}; }
14
+ try {
15
+ if (systemLink) {
16
+ const app = new URL(systemLink, origin);
17
+ if (['https:', 'http:'].includes(app.protocol) && !app.username && !app.password && (app.pathname === `/${appType}` || app.pathname.startsWith(`/${appType}/`))) {
18
+ origin = app.origin;
19
+ for (const key of ['corpid', 'locale']) {
20
+ if (app.searchParams.has(key)) { params.set(key, app.searchParams.get(key)); }
21
+ }
22
+ }
23
+ }
24
+ } catch { /* Ignore malformed optional links; retain the authenticated base. */ }
25
+ const query = params.toString();
26
+ const suffix = query ? `?${query}` : '';
27
+ const workbenchUrl = `${origin}/${appType}/workbench${suffix}`;
28
+ return { appUrl: workbenchUrl, workbenchUrl, adminUrl: `${origin}/${appType}/admin${suffix}` };
29
+ }
30
+
31
+ module.exports = { buildApplicationEntryUrls };
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const { CliError } = require('../core/cli-error');
6
+ const { t } = require('../core/i18n');
7
+ const { DESIGN_SKILL_ROOT, loadThemeIndex } = require('../design-plan/themes');
8
+ const START = '/* OPENYIDA APPLICATION STYLE RECIPES START';
9
+ const END = '/* OPENYIDA APPLICATION STYLE RECIPES END */';
10
+ const CREATIVE_TOKENS = [
11
+ '--pod-page-bg-color', '--pod-card-bg-color', '--color-text1-4',
12
+ '--form-element-medium-corner', '--form-element-medium-height',
13
+ '--pod-page-footer-bg-color', '--pod-sticky-footer-box-shadow',
14
+ '--oyd-content-width', '--oyd-content-padding', '--oyd-field-gap',
15
+ '--oyd-heading-font', '--oyd-heading-size', '--oyd-rule-style',
16
+ '--pod-shell-theme-bg-color', '--pod-nav-item-text-color', '--pod-nav-item-text-hover-color',
17
+ '--pod-nav-item-text-selected-color', '--pod-nav-menu-bg-hover-color', '--pod-nav-menu-bg-selected-color',
18
+ ];
19
+
20
+ function validateCreativeDirection(direction, tokens) {
21
+ const missing = ['businessRationale', 'composition', 'typography', 'material', 'formLayout']
22
+ .filter(key => typeof direction?.[key] !== 'string' || !direction[key].trim());
23
+ missing.push(...CREATIVE_TOKENS.filter(key => typeof tokens?.[key] !== 'string' || !tokens[key].trim()));
24
+ if (missing.length) {
25
+ throw new CliError(t('design_document.invalid', 'creativeDirection', missing.join(', ')), {
26
+ code: 'APPLICATION_STYLE_CREATIVE_INCOMPLETE', details: { missing },
27
+ });
28
+ }
29
+ }
30
+
31
+ function applyApplicationStyle(css, metadata, tokens) {
32
+ const style = metadata.applicationStyle;
33
+ if (style && (style.recipe !== 'application-style-v1' || !['template', 'creative'].includes(style.mode))) {
34
+ throw new CliError(t('design_document.invalid', 'applicationStyle', 'APPLICATION_STYLE_INVALID'), { code: 'APPLICATION_STYLE_INVALID' });
35
+ }
36
+ if (style?.mode === 'creative') {validateCreativeDirection(metadata.creativeDirection, tokens);}
37
+ const first = css.indexOf(START);
38
+ const last = css.indexOf(END);
39
+ if (first >= 0 && last < first) {
40
+ throw new CliError(t('design_document.invalid', 'app_theme.css', 'APPLICATION_STYLE_CSS_INVALID'), { code: 'APPLICATION_STYLE_CSS_INVALID' });
41
+ }
42
+ const recipe = style
43
+ ? fs.readFileSync(path.join(DESIGN_SKILL_ROOT, 'references/theme/application-style-recipes.css'), 'utf8').trim()
44
+ : '';
45
+ // Only the managed recipe block is replaced. User-authored rules stay intact.
46
+ if (first >= 0) {return css.slice(0, first) + recipe + css.slice(last + END.length);}
47
+ return recipe ? `${css.trimEnd()}\n\n${recipe}\n` : css;
48
+ }
49
+
50
+ function exportApplicationStyle(id, outputDirectory) {
51
+ const theme = loadThemeIndex().themes.find(item => item.themeId === id);
52
+ if (!theme) {throw new CliError(t('design_document.invalid', id || '--style-id', 'APPLICATION_STYLE_UNKNOWN'), { code: 'APPLICATION_STYLE_UNKNOWN' });}
53
+ const directory = path.resolve(outputDirectory);
54
+ const assets = [['design.md', theme.templatePath], ['app_theme.css', theme.cssTemplatePath], ['form-layout.json', theme.formLayoutPath]];
55
+ const outputs = assets.map(([name, relative]) => {
56
+ const source = path.resolve(DESIGN_SKILL_ROOT, relative);
57
+ const target = path.join(directory, name);
58
+ const root = path.resolve(DESIGN_SKILL_ROOT, 'templates/design-themes') + path.sep;
59
+ if (!source.startsWith(root) || fs.existsSync(target)) {
60
+ throw new CliError(t('design_document.invalid', target, 'APPLICATION_STYLE_OUTPUT_CONFLICT'), { code: 'APPLICATION_STYLE_OUTPUT_CONFLICT' });
61
+ }
62
+ return { source, target, content: fs.readFileSync(source, 'utf8') };
63
+ });
64
+ fs.mkdirSync(directory, { recursive: true });
65
+ for (const item of outputs) {fs.writeFileSync(item.target, item.content, { flag: 'wx' });}
66
+ return { success: true, mode: theme.mode, themeId: id, authoringRequired: true, outputs: outputs.map(item => item.target) };
67
+ }
68
+
69
+ module.exports = { applyApplicationStyle, validateCreativeDirection, CREATIVE_TOKENS, exportApplicationStyle };
@@ -49,7 +49,12 @@ const {
49
49
  formatFormDetailLinkMessage,
50
50
  } = require('./form-detail-link-guard');
51
51
  const { t } = require('../core/i18n');
52
+ const { assertFormDataResponse } = require('./form-data-response-guard');
52
53
  const { assertInlineCssStructure } = require('./inline-css-guard');
54
+ const { assertCanvasThemeStructure } = require('./canvas-theme-guard');
55
+ const { assertCanvasIconExports } = require('./canvas-icon-guard');
56
+ const { assertCanvasNavigationStructure } = require('./canvas-navigation-guard');
57
+ const { assertCanvasNavigationPaths } = require('./canvas-path-guard');
53
58
 
54
59
  /**
55
60
  * 依赖 → window 别名白名单,用于把 import 改写到运行时全局对象。
@@ -936,37 +941,42 @@ function compileCanvasLocal(source, options = {}) {
936
941
  },
937
942
  });
938
943
  }
939
- const directFormOpenIssues = findDirectFormOpenIssues(source);
940
- if (directFormOpenIssues.length > 0) {
941
- const firstIssue = directFormOpenIssues[0];
942
- throw new CliError(formatDirectFormOpenMessage(), {
943
- code: 'OPENYIDA_CANVAS_FORM_OPEN_CONTAINER_REQUIRED',
944
+ const formDetailLinkIssues = findFormDetailLinkIssues(source);
945
+ if (formDetailLinkIssues.length > 0) {
946
+ const firstIssue = formDetailLinkIssues[0];
947
+ throw new CliError(formatFormDetailLinkMessage(firstIssue), {
948
+ code: 'OPENYIDA_CANVAS_FORM_DETAIL_LINK_INVALID',
944
949
  details: {
945
950
  stage: 'canvas_compile',
946
951
  sourcePath: options.sourcePath || '',
947
952
  line: firstIssue.line,
948
- callee: firstIssue.callee,
953
+ issueType: firstIssue.type,
949
954
  },
950
955
  });
951
956
  }
952
- const formDetailLinkIssues = findFormDetailLinkIssues(source);
953
- if (formDetailLinkIssues.length > 0) {
954
- const firstIssue = formDetailLinkIssues[0];
955
- throw new CliError(formatFormDetailLinkMessage(firstIssue), {
956
- code: 'OPENYIDA_CANVAS_FORM_DETAIL_LINK_INVALID',
957
+ const directFormOpenIssues = findDirectFormOpenIssues(source);
958
+ if (directFormOpenIssues.length > 0) {
959
+ const firstIssue = directFormOpenIssues[0];
960
+ throw new CliError(formatDirectFormOpenMessage(), {
961
+ code: 'OPENYIDA_CANVAS_FORM_OPEN_CONTAINER_REQUIRED',
957
962
  details: {
958
963
  stage: 'canvas_compile',
959
964
  sourcePath: options.sourcePath || '',
960
965
  line: firstIssue.line,
961
- issueType: firstIssue.type,
966
+ callee: firstIssue.callee,
962
967
  },
963
968
  });
964
969
  }
970
+ assertFormDataResponse(source, options);
965
971
  assertNoUnavailableCanvasInstanceApis(source, options);
966
972
  assertNoSelfReferentialDependencyBindings(source, options);
967
973
  assertNoBareDependencyGlobals(source, options);
968
974
  assertNoManualDependencyGlobals(source, options);
975
+ assertCanvasIconExports(source, options);
976
+ assertCanvasNavigationStructure(source, options);
977
+ assertCanvasNavigationPaths(source, options);
969
978
  assertInlineCssStructure(source, options);
979
+ assertCanvasThemeStructure(source, options);
970
980
 
971
981
  const importedModules = extractImportedModules(source);
972
982