openyida 2026.9.20 → 2026.9.22-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -20
- package/bin/yida.js +6 -11
- package/lib/app/app-list.js +3 -7
- package/lib/app/canvas-compile.js +12 -22
- package/lib/app/check-prd-completeness.js +0 -7
- package/lib/app/create-app.js +1 -4
- package/lib/app/create-form/args.js +12 -37
- package/lib/app/create-form/batch.js +11 -86
- package/lib/app/create-form.js +86 -193
- package/lib/app/create-page.js +17 -84
- package/lib/app/custom-theme.js +0 -11
- package/lib/app/form-field-validator.js +41 -26
- package/lib/app/form-open-guard.js +10 -97
- package/lib/app/get-form-config.js +0 -1
- package/lib/app/inline-css-guard.js +31 -1
- package/lib/app/services/form-compiler.js +4 -2
- package/lib/app/theme-from-design.js +41 -119
- package/lib/app/theme-presets.js +1 -1
- package/lib/asset/ai-image.js +9 -59
- package/lib/asset/asset-cmd.js +7 -18
- package/lib/asset/asset-plan.js +9 -102
- package/lib/asset/asset-resolve.js +10 -55
- package/lib/asset/asset-status.js +4 -5
- package/lib/asset/host-capabilities.js +2 -11
- package/lib/asset/url-verify.js +4 -19
- package/lib/auth/dws-sync.js +145 -0
- package/lib/auth/token-auth.js +73 -9
- package/lib/auth/token-store.js +50 -0
- package/lib/connector/connector-test.js +5 -19
- package/lib/connector/contract.js +1 -3
- package/lib/core/agent-capabilities.js +16 -19
- package/lib/core/command-manifest.js +35 -312
- package/lib/core/locales/en.js +17 -57
- package/lib/core/locales/zh.js +16 -56
- package/lib/core/redact.js +10 -15
- package/lib/core/sample.js +18 -57
- package/lib/core/utils.js +4 -0
- package/lib/design-plan/design-plan.js +2 -7
- package/lib/design-plan/init.js +24 -115
- package/lib/design-plan/materialize.js +331 -415
- package/lib/design-plan/normalize.js +17 -63
- package/lib/design-plan/parallel.js +3 -9
- package/lib/design-plan/patch.js +9 -42
- package/lib/design-plan/preview.js +8 -6
- package/lib/design-plan/validate.js +11 -66
- package/lib/process/create-process.js +50 -84
- package/lib/samples/openyida-scaffold/canvas-form-drawer.canvas.jsx +87 -17
- package/lib/samples/openyida-scaffold/canvas-nav/content.jsx +13 -93
- package/lib/samples/openyida-scaffold/canvas-nav/data.jsx +18 -100
- package/lib/samples/openyida-scaffold/canvas-nav/top.jsx +5 -10
- package/lib/samples/yida-canvas-table-form/table-form-batch-submit.canvas.jsx +83 -9
- package/lib/samples/yida-rechart/trend-combo.canvas.jsx +87 -14
- package/package.json +1 -3
- package/scripts/postinstall.js +3 -3
- package/yida-skills/SKILL.md +15 -18
- package/yida-skills/references/official-example-schema-patterns.md +1 -1
- package/yida-skills/skills/yida-app/SKILL.md +21 -36
- package/yida-skills/skills/yida-app/workflow/parallel-work.md +6 -15
- package/yida-skills/skills/yida-app/workflow/plan/step-1-understand.md +1 -1
- package/yida-skills/skills/yida-app/workflow/plan/step-2-confirm.md +1 -1
- package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +15 -29
- package/yida-skills/skills/yida-app/workflow/plan/workflow.md +10 -21
- package/yida-skills/skills/yida-app/workflow/step-1-resource-context.md +2 -4
- package/yida-skills/skills/yida-app/workflow/step-2-design.md +8 -22
- package/yida-skills/skills/yida-app/workflow/step-3-create-or-reuse-app.md +2 -4
- package/yida-skills/skills/yida-app/workflow/step-4-forms-processes.md +4 -15
- package/yida-skills/skills/yida-app/workflow/step-6-main-page.md +4 -6
- package/yida-skills/skills/yida-app/workflow/step-7-page-code.md +9 -15
- package/yida-skills/skills/yida-app/workflow/step-8-publish-navigation.md +11 -25
- package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +28 -67
- package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +43 -42
- package/yida-skills/skills/yida-canvas-custom-page/references/canvas-style-implementation-guide.md +44 -60
- package/yida-skills/skills/yida-canvas-custom-page/references/canvas-theme-provider.md +50 -72
- package/yida-skills/skills/yida-canvas-custom-page/references/component-library-guide.md +1 -13
- package/yida-skills/skills/yida-canvas-custom-page/references/navigation-and-entry-guide.md +72 -101
- package/yida-skills/skills/yida-canvas-custom-page/references/page-generation-guide.md +32 -35
- package/yida-skills/skills/yida-canvas-custom-page/scripts/build-canvas-theme.js +3 -29
- package/yida-skills/skills/yida-canvas-custom-page/scripts/canvas-theme-provider.template.jsx +6 -69
- package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +0 -19
- package/yida-skills/skills/yida-create-app/SKILL.md +0 -2
- package/yida-skills/skills/yida-create-form-page/SKILL.md +58 -72
- package/yida-skills/skills/yida-create-form-page/references/advanced-form-modes.md +5 -5
- package/yida-skills/skills/yida-create-form-page/references/association-form-field.md +4 -4
- package/yida-skills/skills/yida-create-form-page/references/batch-forms.md +5 -6
- package/yida-skills/skills/yida-create-form-page/references/field-definition-guide.md +19 -7
- package/yida-skills/skills/yida-create-form-page/references/form-field-properties.md +44 -62
- package/yida-skills/skills/yida-create-page/SKILL.md +6 -14
- package/yida-skills/skills/yida-create-process/SKILL.md +2 -13
- package/yida-skills/skills/yida-custom-page/SKILL.md +0 -2
- package/yida-skills/skills/yida-custom-page/references/design-system.md +1 -1
- package/yida-skills/skills/yida-dashboard/SKILL.md +4 -5
- package/yida-skills/skills/yida-data-management/SKILL.md +2 -4
- package/yida-skills/skills/yida-data-management/references/data-format-guide.md +4 -4
- package/yida-skills/skills/yida-design/SKILL.md +13 -26
- package/yida-skills/skills/yida-design/references/app/blueprint.md +70 -0
- package/yida-skills/skills/yida-design/references/app/navigation-patterns.md +43 -0
- package/yida-skills/skills/yida-design/references/app/role-journey.md +30 -0
- package/yida-skills/skills/yida-design/references/ask-human-interaction-contract.md +42 -67
- package/yida-skills/skills/yida-design/references/asset-workflow.md +2 -6
- package/yida-skills/skills/yida-design/references/design-mode.md +4 -4
- package/yida-skills/skills/yida-design/references/page-quality-gates.md +38 -26
- package/yida-skills/skills/yida-design/references/style-design-selection.md +137 -0
- package/yida-skills/skills/yida-design/references/style-designs/_design-md-template.md +185 -0
- package/yida-skills/skills/yida-design/references/style-designs/aqua-service-progress-dashboard.md +242 -0
- package/yida-skills/skills/yida-design/references/style-designs/blue-insight-operations-dashboard.md +243 -0
- package/yida-skills/skills/yida-design/references/style-designs/blue-productivity-insight-workbench.md +242 -0
- package/yida-skills/skills/yida-design/references/style-designs/command-filter-card-console.md +304 -0
- package/yida-skills/skills/yida-design/references/style-designs/contrast-command-analytics-workbench.md +261 -0
- package/yida-skills/skills/yida-design/references/style-designs/dark-stage-analytic-dashboard.md +369 -0
- package/yida-skills/skills/yida-design/references/style-designs/filterable-card-catalog.md +354 -0
- package/yida-skills/skills/yida-design/references/style-designs/green-timeline-progress-workbench.md +250 -0
- package/yida-skills/skills/yida-design/references/style-designs/registry.md +117 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-analytic-workbench.md +348 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-blue-grid-analytic-dashboard.md +658 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-bordered-analytic-workbench.md +385 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-curated-filter-gallery.md +300 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-modular-analytic-workbench.md +404 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-progress-analytics-workbench.md +382 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-timeline-analytics-workbench.md +367 -0
- package/yida-skills/skills/yida-design/references/style-designs/teal-rail-analytics-workbench.md +341 -0
- package/yida-skills/skills/yida-design/references/theme/app-custom-theme-template.css +432 -288
- package/yida-skills/skills/yida-design/references/visual-decision-engine.md +143 -19
- package/yida-skills/skills/yida-design/references/visual-scaffold-recipes.md +27 -15
- package/yida-skills/skills/yida-design/sub_skill/page-design/SKILL.md +0 -4
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/SKILL.md +7 -11
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/README.md +10 -14
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/assets/build-plan-template.html +4 -9
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-compact-schema.md +25 -45
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-schema.md +154 -31
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-design.md +127 -46
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/visual-theme-selection.md +44 -32
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/render_build_plan.py +48 -41
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/scripts/validate_design_themes.py +190 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/README.md +98 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-media-grid.md +339 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-modular-clarity.md +348 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/airy-structured-clarity.md +344 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ambient-halo-layered.md +345 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-focus-layered.md +355 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/dark-luminous-modular.md +377 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/deep-stage-duotone.md +352 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/hairline-runway-clarity.md +389 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/high-contrast-modular.md +364 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/index.json +329 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/interlocked-vivid-modules.md +348 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/matrix-grid-focus.md +345 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/media-rail-inspector.md +379 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mist-layered-signal.md +347 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/modular-rail-signal.md +352 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/mono-grid-signal.md +386 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/ribbon-ledger-lift.md +384 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/segmented-meter-clarity.md +388 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/split-rail-precision.md +341 -0
- package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/templates/design-themes/status-framed-media-grid.md +361 -0
- package/yida-skills/skills/yida-design/workflow/output-design.md +375 -117
- package/yida-skills/skills/yida-design/workflow/output-prd.md +185 -0
- package/yida-skills/skills/yida-design/workflow/step-1-read-brief.md +1 -1
- package/yida-skills/skills/yida-design/workflow/step-2-theme-system.md +28 -30
- package/yida-skills/skills/yida-design/workflow/step-4-wireframe-interaction.md +1 -3
- package/yida-skills/skills/yida-design/workflow/step-5-visual-states.md +106 -22
- package/yida-skills/skills/yida-design/workflow/step-6-handoff.md +22 -15
- package/yida-skills/skills/yida-image-assets/SKILL.md +50 -73
- package/yida-skills/skills/yida-image-assets/references/manifest-contract.md +52 -82
- package/yida-skills/skills/yida-image-assets/references/source-policy.md +15 -14
- package/yida-skills/skills/yida-integration/SKILL.md +0 -1
- package/yida-skills/skills/yida-login/SKILL.md +0 -2
- package/yida-skills/skills/yida-nav-group/SKILL.md +2 -4
- package/yida-skills/skills/yida-nav-shell/SKILL.md +12 -36
- package/yida-skills/skills/yida-nav-shell/references/nav-shell-patterns.md +136 -73
- package/yida-skills/skills/yida-page-config/SKILL.md +4 -4
- package/yida-skills/skills/yida-prd/SKILL.md +3 -4
- package/yida-skills/skills/yida-prd/references/app/blueprint.md +4 -4
- package/yida-skills/skills/yida-prd/references/app/navigation-patterns.md +3 -6
- package/yida-skills/skills/yida-prd/references/app/role-journey.md +3 -5
- package/yida-skills/skills/yida-prd/references/plan-content.md +0 -4
- package/yida-skills/skills/yida-prd/workflow/output-prd.md +9 -16
- package/yida-skills/skills/yida-prd/workflow/plan-business.md +4 -4
- package/yida-skills/skills/yida-prd/workflow/step-2-information-architecture.md +8 -11
- package/yida-skills/skills/yida-publish-page/SKILL.md +1 -9
- package/yida-skills/skills/yida-requirement-analysis/SKILL.md +39 -10
- package/yida-skills/skills/yida-requirement-analysis/workflow/prepare-brief.md +76 -32
- package/yida-skills/skills-index.json +16 -36
- package/lib/app/application-entry-urls.js +0 -31
- package/lib/app/application-style.js +0 -67
- package/lib/app/canvas-icon-exports.json +0 -6160
- package/lib/app/canvas-icon-guard.js +0 -87
- package/lib/app/canvas-navigation-guard.js +0 -84
- package/lib/app/canvas-path-guard.js +0 -78
- package/lib/app/canvas-theme-guard.js +0 -184
- package/lib/app/form-data-response-guard.js +0 -57
- package/lib/asset/asset-execution.js +0 -79
- package/lib/core/css-structure.js +0 -37
- package/lib/design/check-design.js +0 -51
- package/lib/design/document.js +0 -458
- package/lib/design/icon-contrast.js +0 -85
- package/lib/design/page-content.js +0 -11
- package/lib/design-plan/artifact-updates.js +0 -117
- package/lib/design-plan/entry-navigation.js +0 -89
- package/lib/design-plan/navigation-policy.js +0 -38
- package/lib/design-plan/themes.js +0 -86
- package/lib/design-plan/visual-policy.js +0 -28
- package/lib/samples/openyida-scaffold/canvas-admin-entry.jsx +0 -62
- package/lib/samples/openyida-scaffold/canvas-navigation.jsx +0 -56
- package/lib/samples/openyida-scaffold/canvas-view-state.jsx +0 -74
- package/yida-skills/skills/yida-app/references/entry-navigation.md +0 -191
- package/yida-skills/skills/yida-canvas-custom-page/references/view-state-recovery.md +0 -52
- package/yida-skills/skills/yida-canvas-data-binding/references/business-action-permissions.md +0 -31
- package/yida-skills/skills/yida-design/references/application-style-library.md +0 -78
- package/yida-skills/skills/yida-design/references/application-theme-consistency.md +0 -110
- package/yida-skills/skills/yida-design/references/native-form-styles.md +0 -208
- package/yida-skills/skills/yida-design/references/navigation-decision.md +0 -51
- package/yida-skills/skills/yida-design/references/page-continuity.md +0 -42
- package/yida-skills/skills/yida-design/references/theme/application-style-recipes.css +0 -58
- package/yida-skills/skills/yida-design/references/theme-selection.md +0 -66
- package/yida-skills/skills/yida-design/scripts/validate_design_themes.py +0 -276
- package/yida-skills/skills/yida-design/templates/application-styles.json +0 -398
- package/yida-skills/skills/yida-design/templates/design-themes/README.md +0 -68
- package/yida-skills/skills/yida-design/templates/design-themes/app-amber/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-amber/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-amber/form-layout.json +0 -15
- package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-editorial/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-executive/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-executive/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-executive/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-finance/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-finance/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-finance/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-glass/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-glass/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-glass/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-graphite/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-line/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-line/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-line/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-neon/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-neon/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-neon/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-nordic/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-paper/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-paper/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-paper/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-platinum/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-plum/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-plum/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-plum/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-pop/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-pop/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-pop/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-sage/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-sage/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-sage/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-teal/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-teal/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-teal/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-terminal/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-ticket/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/app-wire/app_theme.css +0 -607
- package/yida-skills/skills/yida-design/templates/design-themes/app-wire/design.md +0 -219
- package/yida-skills/skills/yida-design/templates/design-themes/app-wire/form-layout.json +0 -14
- package/yida-skills/skills/yida-design/templates/design-themes/basic-tokens.json +0 -117
- package/yida-skills/skills/yida-design/templates/design-themes/dark-inset-hairline.md +0 -337
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-fine-lines.md +0 -328
- package/yida-skills/skills/yida-design/templates/design-themes/dark-rail-signal-panels.md +0 -328
- package/yida-skills/skills/yida-design/templates/design-themes/free-creative/app_theme.css +0 -526
- package/yida-skills/skills/yida-design/templates/design-themes/free-creative/design.md +0 -191
- package/yida-skills/skills/yida-design/templates/design-themes/free-creative/form-layout.json +0 -13
- package/yida-skills/skills/yida-design/templates/design-themes/graphite-bevel-grid.md +0 -325
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-shared-bands.md +0 -312
- package/yida-skills/skills/yida-design/templates/design-themes/hairline-soft-blocks.md +0 -361
- package/yida-skills/skills/yida-design/templates/design-themes/index.json +0 -371
- package/yida-skills/skills/yida-design/templates/design-themes/ink-glow-soft-panels.md +0 -329
- package/yida-skills/skills/yida-design/templates/design-themes/inset-frame-pixel-rhythm.md +0 -354
- package/yida-skills/skills/yida-design/templates/design-themes/outlined-texture-duotone.md +0 -339
- package/yida-skills/skills/yida-design/templates/design-themes/soft-inset-surfaces.md +0 -324
- package/yida-skills/skills/yida-design/templates/design-themes/soft-outline-rhythm.md +0 -421
- package/yida-skills/skills/yida-design/templates/design-themes/soft-rail-bold-band.md +0 -344
- package/yida-skills/skills/yida-design/templates/design-themes/soft-spectral-panels.md +0 -341
- package/yida-skills/skills/yida-design/templates/design-themes/warm-canvas-contrast-panels.md +0 -358
- package/yida-skills/skills/yida-design/templates/design-themes/warm-rail-muted-panels.md +0 -335
- package/yida-skills/skills/yida-requirement-analysis/references/experience-groups.md +0 -43
- package/yida-skills/skills/yida-requirement-analysis/references/handoff.md +0 -68
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
|
-
|
|
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.
|
|
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\|refresh\|logout\|profiles\|profile switch>` | Token login state and profile management |
|
|
388
|
+
| `openyida auth <status\|login\|sync-dws\|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
|
|
|
@@ -396,12 +396,11 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
396
396
|
| `openyida app-list [--type managed\|created] [--page N] [--size N]` | Page through apps I manage or created |
|
|
397
397
|
| `openyida corp-efficiency [overview\|details\|detail\|groups\|notify] [options] [--open\|--no-open]` | Query enterprise efficiency overview and detail reports |
|
|
398
398
|
| `openyida create-app "<name>"\|--name <name> [options] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a Yida app |
|
|
399
|
-
| `openyida design-plan catalog [--json]` | List available planning themes and page patterns |
|
|
400
399
|
| `openyida design-plan init <requirement-brief.json> [--theme-id <id>] [--output-dir <dir>] [--json]` | Initialize a plan draft from confirmed requirements |
|
|
401
400
|
| `openyida design-plan preview <build-plan.json> --part-file <module.json> [--json]` | Update plan drafts by module |
|
|
402
|
-
| `openyida design-plan materialize <build-plan.json> [--from-preview \| --business-file <json> --visual-file <json>] [--output-dir <dir>] [--check] [--json]` | Generate
|
|
403
|
-
| `openyida design-plan patch <build-plan.json> --set <path=value> [--set <path=value> ...] [--materialize] [--output-dir <dir>] [--json]` | Patch
|
|
404
|
-
| `openyida update-app <appType> [--name "..."] [--
|
|
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 |
|
|
405
404
|
| `openyida app-online <appType> [--to-ding-app-center] [--show-app-center]` | Enable a Yida app |
|
|
406
405
|
| `openyida app-offline <appType> [--to-ding-app-center] [--show-app-center]` | Disable a Yida app |
|
|
407
406
|
| `openyida nav-group <list\|create\|rename\|delete\|move\|order\|auto-order\|hide\|show> <appType> ...` | Manage app sidebar navigation groups |
|
|
@@ -415,7 +414,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
415
414
|
| Command | Description |
|
|
416
415
|
|---------|-------------|
|
|
417
416
|
| `openyida create-form batch <appType> <plan.json> [--concurrency 1..4] [--check] [--json]` | Create forms concurrently by dependency |
|
|
418
|
-
| `openyida create-form create <appType> "<formTitle>" <fieldsJsonFile> [--
|
|
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 |
|
|
419
418
|
| `openyida create-form icons [--json]` | List available form navigation icons |
|
|
420
419
|
| `openyida create-form validate-fields <fieldsJsonOrFile> [--json]` | Validate form field JSON locally |
|
|
421
420
|
| `openyida create-form update <appType> <formUuid> (<changesJsonOrFile> \| --data-file <changesJsonOrFile>) [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Update a form page |
|
|
@@ -430,13 +429,12 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
430
429
|
| `openyida aggregate-table <list\|create-empty\|inspect\|preview\|save\|publish\|status> <appType> ...` | Manage aggregate tables (virtualView) |
|
|
431
430
|
| `openyida get-schema <appType> <formUuid\|--all> [--summary-json\|--field-map-json\|--analysis-json]` | Get one form Schema or all form Schemas |
|
|
432
431
|
| `openyida check-prd-completeness <prd.md> --app-type <appType> [--build-manifest <file>] [--json]` | Check PRD page/resource count risk |
|
|
433
|
-
| `openyida check-design <design.md> [--prd <prd.md>] [--base-dir <dir>] [--json]` | Validate design documents, theme tokens and PRD handoff |
|
|
434
432
|
| `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
|
|
435
433
|
| `openyida create-page <appType> "<name>" [--mode dashboard] [--hide-nav] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom display page |
|
|
436
434
|
| `openyida build-page <sourceFile> [--output file\|--write]` | Build Yida-compatible page source |
|
|
437
|
-
| `openyida check-page <src> [--compat]
|
|
438
|
-
| `openyida compile <src> [--canvas] [--
|
|
439
|
-
| `openyida publish <src> <appType> <formUuid> [--health-check] [--force] [--canvas] [--
|
|
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 |
|
|
440
438
|
| `openyida update-form-config <appType> <formUuid> <true\|false\|keep> "<title>" [--locale zh_CN\|en_US\|ja_JP]` | Update form configuration |
|
|
441
439
|
| `openyida get-form-config <appType> <formUuid> [--json]` | Query form configuration |
|
|
442
440
|
|
|
@@ -459,7 +457,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
459
457
|
| Command | Description |
|
|
460
458
|
|---------|-------------|
|
|
461
459
|
| `openyida configure-process <appType> <formUuid> <definition> [processCode] [--replace]` | Configure and publish process rules; Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
|
|
462
|
-
| `openyida create-process <appType>
|
|
460
|
+
| `openyida create-process <appType> ... [--replace]` | Create process form (all-in-one); Supports append/forward via JSON nodes[].actions.normalActions/appendActions |
|
|
463
461
|
| `openyida ai-form-setting <get\|fields\|models\|enable\|disable\|save> <appType> ...` | Manage process form AI approval prompts |
|
|
464
462
|
| `openyida process preview <appType> ...` | Preview process instance (visual flowchart) |
|
|
465
463
|
|
|
@@ -492,7 +490,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
492
490
|
| `openyida connector update-action --connector-id <id> --action <operationId> --query-json JSON --confirm` | Safely update action query defaults |
|
|
493
491
|
| `openyida connector list-actions <id>` | List actions |
|
|
494
492
|
| `openyida connector delete-action <id> <operation-id>` | Delete an action |
|
|
495
|
-
| `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>]
|
|
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 |
|
|
496
494
|
| `openyida connector list-connections <id>` | List auth connections |
|
|
497
495
|
| `openyida connector create-connection <id> <name> [--interactive]` | Create an auth connection |
|
|
498
496
|
| `openyida connector smart-create --curl "..."` | Generate a redacted action draft from cURL (no remote create) |
|
|
@@ -523,7 +521,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
523
521
|
| `openyida a2a <serve\|agent-card> [options]` | Start local read-only A2A adapter or print Agent Card |
|
|
524
522
|
| `openyida bridge start [--token <pair-token>] [--port 6736] [--origin https://demo.aliwork.com] [--open\|--no-open]` | Start OpenYida local web bridge service |
|
|
525
523
|
| `openyida copy [--force]` | Copy project working directory |
|
|
526
|
-
| `openyida sample [--list] [<skill> <name>] [--output <file
|
|
524
|
+
| `openyida sample [--list] [<skill> <name>] [--output <file>] [--var KEY=VALUE ...] [--design-file <design.md>]` | Output code samples/templates |
|
|
527
525
|
| `openyida doctor [--fix]` | Environment diagnostics & auto-fix |
|
|
528
526
|
| `openyida db-seq-fix [--fix]` | Detect and repair PostgreSQL sequence drift |
|
|
529
527
|
| `openyida formula evaluate <formula\|file> [--schema file]` | Static-check Yida formula syntax and field refs |
|
|
@@ -544,7 +542,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
544
542
|
|
|
545
543
|
#### Connector Safety and Real E2E
|
|
546
544
|
|
|
547
|
-
`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.
|
|
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.
|
|
548
546
|
|
|
549
547
|
`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.
|
|
550
548
|
|
|
@@ -651,14 +649,10 @@ npx clawhub@latest install nicky1108/yida-app
|
|
|
651
649
|
```bash
|
|
652
650
|
git clone https://github.com/openyida/openyida.git
|
|
653
651
|
cd openyida
|
|
654
|
-
|
|
655
|
-
nvm use
|
|
656
|
-
npm ci --ignore-scripts
|
|
652
|
+
npm install
|
|
657
653
|
npm run check:ci
|
|
658
654
|
```
|
|
659
655
|
|
|
660
|
-
Use the Node.js version in `.nvmrc` to match CI validation. If you do not use nvm, install that version directly.
|
|
661
|
-
|
|
662
656
|
Useful checks:
|
|
663
657
|
|
|
664
658
|
| Command | Purpose |
|
package/bin/yida.js
CHANGED
|
@@ -526,7 +526,6 @@ function printManifestCommandHelp(commandName) {
|
|
|
526
526
|
printCommandUsage(...entries.flatMap((entry) => [
|
|
527
527
|
entry.usage,
|
|
528
528
|
entry.description,
|
|
529
|
-
...(entry.notes || []),
|
|
530
529
|
...(entry.examples || []),
|
|
531
530
|
]));
|
|
532
531
|
return true;
|
|
@@ -691,6 +690,8 @@ async function main() {
|
|
|
691
690
|
const { tokenLogin, tokenLogout, tokenRefresh } = require('../lib/auth/token-auth');
|
|
692
691
|
if (!subCommand || subCommand === '--help' || subCommand === '-h') {
|
|
693
692
|
printAuthHelp();
|
|
693
|
+
} else if (subCommand === 'sync-dws') {
|
|
694
|
+
await require('../lib/auth/dws-sync').run(authArgs, buildTokenLoginOptions(authArgs));
|
|
694
695
|
} else if (subCommand === 'status') {
|
|
695
696
|
console.log(JSON.stringify(getAuthStatus(buildTokenLoginOptions(authArgs)), null, 2));
|
|
696
697
|
} else if (subCommand === 'profiles') {
|
|
@@ -698,10 +699,7 @@ async function main() {
|
|
|
698
699
|
console.log(JSON.stringify(listAuthProfiles(buildTokenLoginOptions(authArgs)), null, 2));
|
|
699
700
|
} else if (subCommand === 'profile') {
|
|
700
701
|
const profileSubCommand = authArgs[0];
|
|
701
|
-
if (profileSubCommand === '
|
|
702
|
-
const { listAuthProfiles } = require('../lib/auth/profile');
|
|
703
|
-
console.log(JSON.stringify(listAuthProfiles(buildTokenLoginOptions(authArgs.slice(1))), null, 2));
|
|
704
|
-
} else if (profileSubCommand === 'switch') {
|
|
702
|
+
if (profileSubCommand === 'switch') {
|
|
705
703
|
const target = getFirstPositionalArg(authArgs, 1);
|
|
706
704
|
const { switchAuthProfile } = require('../lib/auth/profile');
|
|
707
705
|
console.log(JSON.stringify(switchAuthProfile(target, buildTokenLoginOptions(authArgs)), null, 2));
|
|
@@ -799,12 +797,6 @@ async function main() {
|
|
|
799
797
|
break;
|
|
800
798
|
}
|
|
801
799
|
|
|
802
|
-
case 'check-design': {
|
|
803
|
-
const { run } = require('../lib/design/check-design');
|
|
804
|
-
await run(args);
|
|
805
|
-
break;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
800
|
case 'er': {
|
|
809
801
|
const { run } = require('../lib/app/er');
|
|
810
802
|
await run(args);
|
|
@@ -1016,6 +1008,9 @@ async function main() {
|
|
|
1016
1008
|
}
|
|
1017
1009
|
|
|
1018
1010
|
case 'create-process': {
|
|
1011
|
+
if (args.length < 2) {
|
|
1012
|
+
throwCliUsage(t('cli.create_process_usage'), t('cli.create_process_example'));
|
|
1013
|
+
}
|
|
1019
1014
|
const { run: runCreateProcess } = require('../lib/process/create-process');
|
|
1020
1015
|
await runCreateProcess(args);
|
|
1021
1016
|
break;
|
package/lib/app/app-list.js
CHANGED
|
@@ -6,16 +6,13 @@
|
|
|
6
6
|
* 输出字段:
|
|
7
7
|
* appName - 应用名称(zh_CN)
|
|
8
8
|
* appType - 应用唯一标识
|
|
9
|
-
* systemLink -
|
|
10
|
-
* appUrl / workbenchUrl - 应用工作台地址
|
|
11
|
-
* adminUrl - 开发者管理后台地址(不表示已验证访问权限)
|
|
9
|
+
* systemLink - 应用访问地址
|
|
12
10
|
*/
|
|
13
11
|
|
|
14
12
|
'use strict';
|
|
15
13
|
|
|
16
14
|
const { createAuthRef, createYidaClient } = require('../core/yida-client');
|
|
17
15
|
const { t } = require('../core/i18n');
|
|
18
|
-
const { buildApplicationEntryUrls } = require('./application-entry-urls');
|
|
19
16
|
const { throwCommandError, throwUsage } = require('../core/command-errors');
|
|
20
17
|
|
|
21
18
|
const API_PATH = '/query/app/getAppList.json';
|
|
@@ -79,12 +76,11 @@ function parseArgs(args = []) {
|
|
|
79
76
|
/**
|
|
80
77
|
* 将应用原始数据提取为输出字段
|
|
81
78
|
*/
|
|
82
|
-
function formatApp(app
|
|
79
|
+
function formatApp(app) {
|
|
83
80
|
return {
|
|
84
81
|
appName: (app.appName && app.appName.zh_CN) || '',
|
|
85
82
|
appType: app.appType || '',
|
|
86
83
|
systemLink: app.systemLink || '',
|
|
87
|
-
...buildApplicationEntryUrls({ appType: app.appType, systemLink: app.systemLink, baseUrl }),
|
|
88
84
|
};
|
|
89
85
|
}
|
|
90
86
|
|
|
@@ -145,7 +141,7 @@ async function run(args) {
|
|
|
145
141
|
const totalCount = Number.isFinite(Number(content.totalCount)) ? Number(content.totalCount) : apps.length;
|
|
146
142
|
const totalPages = Math.max(1, Math.ceil(totalCount / options.pageSize));
|
|
147
143
|
const scopeLabel = t(`app_list.scope_${options.type}`);
|
|
148
|
-
const formattedApps = apps.map(
|
|
144
|
+
const formattedApps = apps.map(formatApp);
|
|
149
145
|
|
|
150
146
|
// stdout 输出 JSON,方便 AI 工具解析
|
|
151
147
|
console.log(JSON.stringify(formattedApps, null, 2));
|
|
@@ -49,12 +49,7 @@ 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');
|
|
53
52
|
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');
|
|
58
53
|
|
|
59
54
|
/**
|
|
60
55
|
* 依赖 → window 别名白名单,用于把 import 改写到运行时全局对象。
|
|
@@ -941,42 +936,37 @@ function compileCanvasLocal(source, options = {}) {
|
|
|
941
936
|
},
|
|
942
937
|
});
|
|
943
938
|
}
|
|
944
|
-
const
|
|
945
|
-
if (
|
|
946
|
-
const firstIssue =
|
|
947
|
-
throw new CliError(
|
|
948
|
-
code: '
|
|
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',
|
|
949
944
|
details: {
|
|
950
945
|
stage: 'canvas_compile',
|
|
951
946
|
sourcePath: options.sourcePath || '',
|
|
952
947
|
line: firstIssue.line,
|
|
953
|
-
|
|
948
|
+
callee: firstIssue.callee,
|
|
954
949
|
},
|
|
955
950
|
});
|
|
956
951
|
}
|
|
957
|
-
const
|
|
958
|
-
if (
|
|
959
|
-
const firstIssue =
|
|
960
|
-
throw new CliError(
|
|
961
|
-
code: '
|
|
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',
|
|
962
957
|
details: {
|
|
963
958
|
stage: 'canvas_compile',
|
|
964
959
|
sourcePath: options.sourcePath || '',
|
|
965
960
|
line: firstIssue.line,
|
|
966
|
-
|
|
961
|
+
issueType: firstIssue.type,
|
|
967
962
|
},
|
|
968
963
|
});
|
|
969
964
|
}
|
|
970
|
-
assertFormDataResponse(source, options);
|
|
971
965
|
assertNoUnavailableCanvasInstanceApis(source, options);
|
|
972
966
|
assertNoSelfReferentialDependencyBindings(source, options);
|
|
973
967
|
assertNoBareDependencyGlobals(source, options);
|
|
974
968
|
assertNoManualDependencyGlobals(source, options);
|
|
975
|
-
assertCanvasIconExports(source, options);
|
|
976
|
-
assertCanvasNavigationStructure(source, options);
|
|
977
|
-
assertCanvasNavigationPaths(source, options);
|
|
978
969
|
assertInlineCssStructure(source, options);
|
|
979
|
-
assertCanvasThemeStructure(source, options);
|
|
980
970
|
|
|
981
971
|
const importedModules = extractImportedModules(source);
|
|
982
972
|
|
|
@@ -5,7 +5,6 @@ const path = require('path');
|
|
|
5
5
|
const { createAuthRef, isAuthRefReady } = require('../core/yida-client');
|
|
6
6
|
const { t } = require('../core/i18n');
|
|
7
7
|
const { throwCommandError, throwUsage } = require('../core/command-errors');
|
|
8
|
-
const { auditAssetExecution } = require('../asset/asset-execution');
|
|
9
8
|
const { fetchFormPageList } = require('./form-navigation');
|
|
10
9
|
|
|
11
10
|
const CHECKABLE_RESOURCE_KINDS = new Set(['display-page', 'normal-form', 'process-form']);
|
|
@@ -440,7 +439,6 @@ async function evaluatePrdCompleteness(markdown, options = {}, deps = {}) {
|
|
|
440
439
|
const parsedPrd = parsePrdMarkdown(markdown);
|
|
441
440
|
const parsedManifest = parseBuildManifest(options.buildManifest);
|
|
442
441
|
const items = [];
|
|
443
|
-
const assetExecution = auditAssetExecution(options.buildManifest?.assetExecution, options.buildManifest?.assetTasks);
|
|
444
442
|
|
|
445
443
|
function addItem(id, source, status, severity, message, details = {}) {
|
|
446
444
|
items.push(makeRiskItem(id, source, status, severity, message, details));
|
|
@@ -454,7 +452,6 @@ async function evaluatePrdCompleteness(markdown, options = {}, deps = {}) {
|
|
|
454
452
|
success: true,
|
|
455
453
|
verdict,
|
|
456
454
|
mode: 'delivery_risk_radar',
|
|
457
|
-
assetExecution,
|
|
458
455
|
appType,
|
|
459
456
|
prdPath: options.prdPath || '',
|
|
460
457
|
buildManifestPath: options.buildManifestPath || '',
|
|
@@ -493,10 +490,6 @@ async function evaluatePrdCompleteness(markdown, options = {}, deps = {}) {
|
|
|
493
490
|
};
|
|
494
491
|
}
|
|
495
492
|
|
|
496
|
-
for (const issue of assetExecution.issues) {
|
|
497
|
-
addItem('asset_execution_' + issue.code, 'build_manifest.assetExecution', 'needs_review', 'warning',
|
|
498
|
-
t('asset.executionReview', issue.code), { actual: issue });
|
|
499
|
-
}
|
|
500
493
|
const fetchForms = deps.fetchForms || fetchFormPageList;
|
|
501
494
|
let forms = [];
|
|
502
495
|
try {
|
package/lib/app/create-app.js
CHANGED
|
@@ -16,7 +16,6 @@ const {
|
|
|
16
16
|
} = require('../core/utils');
|
|
17
17
|
const { createAuthRef } = require('../core/yida-client');
|
|
18
18
|
const { t } = require('../core/i18n');
|
|
19
|
-
const { buildApplicationEntryUrls } = require('./application-entry-urls');
|
|
20
19
|
const { buildYidaI18n, normalizeYidaLocale, resolveContentLocale } = require('../core/yida-i18n');
|
|
21
20
|
const { parseOpenOption, withBrowserHandoff } = require('../core/browser-handoff');
|
|
22
21
|
const { throwCommandError } = require('../core/command-errors');
|
|
@@ -370,8 +369,7 @@ async function run(args) {
|
|
|
370
369
|
// 输出结果
|
|
371
370
|
if (response && response.success && response.content) {
|
|
372
371
|
const appType = response.content;
|
|
373
|
-
const
|
|
374
|
-
const appUrl = entryUrls.appUrl;
|
|
372
|
+
const appUrl = `${authRef.baseUrl}/${appType}/workbench`;
|
|
375
373
|
const corpId = authRef.corpId || (authRef.authData && authRef.authData.corp_id) || '';
|
|
376
374
|
|
|
377
375
|
chalkResult(true, t('create_app.success'), [
|
|
@@ -390,7 +388,6 @@ async function run(args) {
|
|
|
390
388
|
appName,
|
|
391
389
|
corpId,
|
|
392
390
|
url: appUrl,
|
|
393
|
-
...entryUrls,
|
|
394
391
|
},
|
|
395
392
|
appUrl,
|
|
396
393
|
{ stage: 'create_app_success', title: appName },
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const { detectDeprecatedCreateFormInvocation } = require('../../core/command-contract');
|
|
4
4
|
|
|
5
|
-
const CREATE_FORM_LAYOUTS = new Set(['single', '1', 'double', '2', 'card', 'section']);
|
|
6
|
-
const CREATE_FORM_THEMES = new Set(['default', 'compact', 'comfortable']);
|
|
7
|
-
const CREATE_FORM_LABEL_ALIGNS = new Set(['top', 'left', 'right']);
|
|
8
|
-
|
|
9
5
|
function parseMaybeJsonValue(value) {
|
|
10
6
|
if (typeof value !== 'string') {
|
|
11
7
|
return value;
|
|
@@ -98,38 +94,24 @@ function createParseArgs(dependencies) {
|
|
|
98
94
|
const args = [...rawArgs];
|
|
99
95
|
|
|
100
96
|
for (let i = 0; i < args.length; i++) {
|
|
101
|
-
if (args[i] === '--layout') {
|
|
102
|
-
|
|
103
|
-
if (!value || value.startsWith('--') || !CREATE_FORM_LAYOUTS.has(value)) {
|
|
104
|
-
throwCreateFormError('--layout must be one of: single, double, card, section', 'CREATE_FORM_INVALID_ARGUMENTS');
|
|
105
|
-
}
|
|
106
|
-
options.layout = value;
|
|
97
|
+
if (args[i] === '--layout' && i + 1 < args.length) {
|
|
98
|
+
options.layout = args[i + 1];
|
|
107
99
|
args.splice(i, 2);
|
|
108
100
|
i--;
|
|
109
|
-
} else if (args[i] === '--theme') {
|
|
110
|
-
|
|
111
|
-
if (!value || value.startsWith('--') || !CREATE_FORM_THEMES.has(value)) {
|
|
112
|
-
throwCreateFormError('--theme must be one of: default, compact, comfortable', 'CREATE_FORM_INVALID_ARGUMENTS');
|
|
113
|
-
}
|
|
114
|
-
options.theme = value;
|
|
101
|
+
} else if (args[i] === '--theme' && i + 1 < args.length) {
|
|
102
|
+
options.theme = args[i + 1];
|
|
115
103
|
args.splice(i, 2);
|
|
116
104
|
i--;
|
|
117
|
-
} else if (args[i] === '--label-align') {
|
|
118
|
-
|
|
119
|
-
if (!value || value.startsWith('--') || !CREATE_FORM_LABEL_ALIGNS.has(value)) {
|
|
120
|
-
throwCreateFormError('--label-align must be one of: top, left, right', 'CREATE_FORM_INVALID_ARGUMENTS');
|
|
121
|
-
}
|
|
122
|
-
options.labelAlign = value;
|
|
105
|
+
} else if (args[i] === '--label-align' && i + 1 < args.length) {
|
|
106
|
+
options.labelAlign = args[i + 1];
|
|
123
107
|
args.splice(i, 2);
|
|
124
108
|
i--;
|
|
125
|
-
} else if (args[i] === '--icon') {
|
|
126
|
-
|
|
127
|
-
if (!value || value.startsWith('--')) {
|
|
128
|
-
throwCreateFormError('--icon requires a value', 'CREATE_FORM_INVALID_ARGUMENTS');
|
|
129
|
-
}
|
|
130
|
-
options.icon = value;
|
|
109
|
+
} else if (args[i] === '--icon' && i + 1 < args.length) {
|
|
110
|
+
options.icon = args[i + 1];
|
|
131
111
|
args.splice(i, 2);
|
|
132
112
|
i--;
|
|
113
|
+
} else if (args[i] === '--icon') {
|
|
114
|
+
throwCreateFormError('--icon requires a value', 'CREATE_FORM_INVALID_ARGUMENTS');
|
|
133
115
|
} else if (args[i] === '--data-file') {
|
|
134
116
|
const next = args[i + 1];
|
|
135
117
|
if (dataFileInput !== undefined || !next || next.startsWith('--')) {
|
|
@@ -138,12 +120,8 @@ function createParseArgs(dependencies) {
|
|
|
138
120
|
dataFileInput = next;
|
|
139
121
|
args.splice(i, 2);
|
|
140
122
|
i--;
|
|
141
|
-
} else if (args[i] === '--locale' || args[i] === '--content-locale' || args[i] === '--lang') {
|
|
142
|
-
|
|
143
|
-
if (!value || value.startsWith('--')) {
|
|
144
|
-
throwCreateFormError(`${args[i]} requires a value`, 'CREATE_FORM_INVALID_ARGUMENTS');
|
|
145
|
-
}
|
|
146
|
-
options.contentLocale = value;
|
|
123
|
+
} else if ((args[i] === '--locale' || args[i] === '--content-locale' || args[i] === '--lang') && i + 1 < args.length) {
|
|
124
|
+
options.contentLocale = args[i + 1];
|
|
147
125
|
if (!normalizeYidaLocale(options.contentLocale)) {
|
|
148
126
|
error(`Unsupported locale: ${options.contentLocale}`);
|
|
149
127
|
throwCreateFormError(`Unsupported locale: ${options.contentLocale}`, 'CREATE_FORM_INVALID_ARGUMENTS');
|
|
@@ -383,7 +361,4 @@ module.exports = {
|
|
|
383
361
|
createParseArgs,
|
|
384
362
|
parseInlineValidationOptions,
|
|
385
363
|
parseMaybeJsonValue,
|
|
386
|
-
CREATE_FORM_LAYOUTS,
|
|
387
|
-
CREATE_FORM_THEMES,
|
|
388
|
-
CREATE_FORM_LABEL_ALIGNS,
|
|
389
364
|
};
|
|
@@ -9,15 +9,10 @@ const { t } = require('../../core/i18n');
|
|
|
9
9
|
const { usage, hint } = require('../../core/chalk');
|
|
10
10
|
const { assertNoEmojiInText, assertNoEmojiInValue } = require('../../core/no-emoji-guard');
|
|
11
11
|
const { normalizeYidaLocale } = require('../../core/yida-i18n');
|
|
12
|
-
const {
|
|
13
|
-
CREATE_FORM_LAYOUTS,
|
|
14
|
-
CREATE_FORM_THEMES,
|
|
15
|
-
CREATE_FORM_LABEL_ALIGNS,
|
|
16
|
-
} = require('./args');
|
|
17
12
|
const { FORM_NAV_ICONS, resolveFormNavIcon } = require('./nav-icon');
|
|
18
13
|
|
|
19
14
|
const BATCH_USAGE = 'openyida create-form batch <appType> <plan.json> [--concurrency 1..4] [--check] [--json]';
|
|
20
|
-
const BATCH_PLAN_EXAMPLE = '{"forms":[{"key":"customer","title":"客户","fieldsFile":"customer-fields.json"
|
|
15
|
+
const BATCH_PLAN_EXAMPLE = '{"forms":[{"key":"customer","title":"客户","fieldsFile":"customer-fields.json"},{"key":"order","title":"订单","fieldsFile":"order-fields.json","dependsOn":["customer"]}]}';
|
|
21
16
|
|
|
22
17
|
function invalid(reason) {
|
|
23
18
|
throw new CliError(t('create_form.batch_invalid'), { code: 'FORM_BATCH_INVALID', details: { reason } });
|
|
@@ -51,20 +46,6 @@ function validateStaticDefinition(form, fields) {
|
|
|
51
46
|
locale: form.locale,
|
|
52
47
|
});
|
|
53
48
|
}
|
|
54
|
-
for (const [key, values] of [
|
|
55
|
-
['layout', CREATE_FORM_LAYOUTS],
|
|
56
|
-
['theme', CREATE_FORM_THEMES],
|
|
57
|
-
['labelAlign', CREATE_FORM_LABEL_ALIGNS],
|
|
58
|
-
]) {
|
|
59
|
-
if (form[key] !== undefined && !values.has(form[key])) {
|
|
60
|
-
invalid({
|
|
61
|
-
formKey: form.key,
|
|
62
|
-
errorCode: 'CREATE_FORM_INVALID_ARGUMENTS',
|
|
63
|
-
errorMsg: `Unsupported ${key}: ${form[key]}`,
|
|
64
|
-
[key]: form[key],
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
49
|
}
|
|
69
50
|
|
|
70
51
|
function parseArgs(args) {
|
|
@@ -145,9 +126,9 @@ function loadPlan(file, options = {}) {
|
|
|
145
126
|
if (!form || !/^[a-zA-Z][\w-]*$/.test(form.key || '') || typeof form.title !== 'string' || !form.title.trim() ||
|
|
146
127
|
(form.fields === undefined) === (form.fieldsFile === undefined) ||
|
|
147
128
|
(form.dependsOn !== undefined && (!Array.isArray(form.dependsOn) || form.dependsOn.some(key => typeof key !== 'string')))) { invalid('form'); }
|
|
148
|
-
if (Object.keys(form).some(key => !['key', 'title', 'fields', 'fieldsFile', 'dependsOn', 'formUuid', '
|
|
129
|
+
if (Object.keys(form).some(key => !['key', 'title', 'fields', 'fieldsFile', 'dependsOn', 'formUuid', 'icon', 'locale'].includes(key))) { invalid(form.key); }
|
|
149
130
|
if (form.formUuid !== undefined && (typeof form.formUuid !== 'string' || !form.formUuid.startsWith('FORM'))) { invalid(form.key); }
|
|
150
|
-
for (const key of ['
|
|
131
|
+
for (const key of ['icon', 'locale']) { if (form[key] !== undefined && typeof form[key] !== 'string') { invalid(key); } }
|
|
151
132
|
const rawFields = form.fieldsFile === undefined ? form.fields : JSON.parse(fs.readFileSync(path.resolve(path.dirname(file), form.fieldsFile), 'utf8'));
|
|
152
133
|
const fields = normalizeAssociationReferences(rawFields, options.appType);
|
|
153
134
|
validateStaticDefinition(form, fields);
|
|
@@ -211,7 +192,7 @@ function expectedReadbackFields(fields) {
|
|
|
211
192
|
expected.push(...expectedReadbackFields(field.children));
|
|
212
193
|
continue;
|
|
213
194
|
}
|
|
214
|
-
if (['Divider', 'RichText'].includes(field.type)) { continue; }
|
|
195
|
+
if (['Divider', 'RichText', 'PageSection', 'GroupContainer'].includes(field.type)) { continue; }
|
|
215
196
|
if (typeof field.label === 'string' && field.label.trim()) {
|
|
216
197
|
expected.push({ label: field.label.trim(), componentName: field.type });
|
|
217
198
|
}
|
|
@@ -244,25 +225,6 @@ function readbackMismatch(formUuid, form, schema) {
|
|
|
244
225
|
});
|
|
245
226
|
}
|
|
246
227
|
|
|
247
|
-
function buildPartialFailureRecovery(results) {
|
|
248
|
-
const items = Object.values(results || {});
|
|
249
|
-
const hasUnknownWrite = items.some(item =>
|
|
250
|
-
item && (item.status === 'running' || (item.status === 'failed' && !item.formUuid))
|
|
251
|
-
);
|
|
252
|
-
const recoveryAction = hasUnknownWrite
|
|
253
|
-
? 'inspect_unknown_write_then_reconcile'
|
|
254
|
-
: 'rerun_unchanged_plan';
|
|
255
|
-
return { recoveryAction, nextAction: recoveryAction };
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
function buildDeliveryUrls(baseUrl, appType, formUuid) {
|
|
259
|
-
const normalizedBaseUrl = String(baseUrl || '').replace(/\/+$/, '');
|
|
260
|
-
if (!normalizedBaseUrl || !appType || !formUuid) { return {}; }
|
|
261
|
-
const appUrl = `${normalizedBaseUrl}/${appType}/workbench`;
|
|
262
|
-
const formUrl = `${appUrl}/${formUuid}`;
|
|
263
|
-
return { url: formUrl, formUrl, appUrl };
|
|
264
|
-
}
|
|
265
|
-
|
|
266
228
|
function execute(args, { execFile: execFileImpl = execFile } = {}) {
|
|
267
229
|
return new Promise((resolve, reject) => {
|
|
268
230
|
execFileImpl(process.execPath, [path.resolve(__dirname, '../../../bin/yida.js'), ...args, '--quiet'], {
|
|
@@ -355,15 +317,13 @@ async function run(args, dependencies = {}) {
|
|
|
355
317
|
try {
|
|
356
318
|
const state = fs.existsSync(stateFile) ? JSON.parse(fs.readFileSync(stateFile, 'utf8')) : { fingerprint, appType: options.appType, results: {} };
|
|
357
319
|
if (state.fingerprint !== fingerprint) { invalid('state belongs to a different plan; reconcile existing resources before preparing a new batch'); }
|
|
358
|
-
|
|
359
|
-
const baseUrl = loginStatus?.base_url || loginStatus?.baseUrl || '';
|
|
320
|
+
await call(['login', '--check-only', '--json']);
|
|
360
321
|
// Read back completed resources before their IDs can be used by dependent forms.
|
|
361
322
|
for (const form of forms.filter(item => state.results[item.key]?.status === 'success')) {
|
|
362
323
|
const item = state.results[form.key];
|
|
363
324
|
const schema = await call(['get-schema', options.appType, item.formUuid, '--field-map-json']);
|
|
364
325
|
if (schema.formUuid !== item.formUuid || !Array.isArray(schema.fields)) { invalid(`schema: ${form.key}`); }
|
|
365
326
|
item.fields = schema.fields;
|
|
366
|
-
Object.assign(item, buildDeliveryUrls(baseUrl, options.appType, item.formUuid));
|
|
367
327
|
}
|
|
368
328
|
const resolve = (key, field) => {
|
|
369
329
|
const item = state.results[key];
|
|
@@ -376,29 +336,14 @@ async function run(args, dependencies = {}) {
|
|
|
376
336
|
await schedule(forms, options.concurrency, state.results, async form => {
|
|
377
337
|
let formUuid = form.formUuid || state.results[form.key]?.formUuid;
|
|
378
338
|
let shouldResume = Boolean(!form.formUuid && formUuid);
|
|
379
|
-
let delivery = buildDeliveryUrls(baseUrl, options.appType, formUuid);
|
|
380
339
|
const resolvedFields = mapReferences(form.fields, resolve);
|
|
381
340
|
if (!formUuid) {
|
|
382
341
|
const argv = ['create-form', 'create', options.appType, form.title, JSON.stringify(resolvedFields), '--no-open'];
|
|
383
|
-
for (const [
|
|
384
|
-
layout: '--layout',
|
|
385
|
-
theme: '--theme',
|
|
386
|
-
labelAlign: '--label-align',
|
|
387
|
-
icon: '--icon',
|
|
388
|
-
locale: '--locale',
|
|
389
|
-
})) {
|
|
390
|
-
if (form[key]) { argv.push(option, form[key]); }
|
|
391
|
-
}
|
|
342
|
+
for (const key of ['icon', 'locale']) { if (form[key]) { argv.push(`--${key}`, form[key]); } }
|
|
392
343
|
try {
|
|
393
344
|
const created = await call(argv);
|
|
394
345
|
if (typeof created.formUuid !== 'string' || !created.formUuid.startsWith('FORM')) { invalid(`create result: ${form.key}`); }
|
|
395
346
|
formUuid = created.formUuid;
|
|
396
|
-
delivery = {
|
|
397
|
-
...buildDeliveryUrls(baseUrl, options.appType, formUuid),
|
|
398
|
-
...(created.url ? { url: created.url } : {}),
|
|
399
|
-
...(created.formUrl ? { formUrl: created.formUrl } : {}),
|
|
400
|
-
...(created.appUrl ? { appUrl: created.appUrl } : {}),
|
|
401
|
-
};
|
|
402
347
|
} catch (error) {
|
|
403
348
|
const createdFormUuid = error.output?.formUuid || error.output?.details?.formUuid;
|
|
404
349
|
if (typeof createdFormUuid !== 'string' || !createdFormUuid.startsWith('FORM')) {
|
|
@@ -412,43 +357,25 @@ async function run(args, dependencies = {}) {
|
|
|
412
357
|
save(state);
|
|
413
358
|
let resumed = false;
|
|
414
359
|
if (shouldResume) {
|
|
415
|
-
|
|
416
|
-
delivery = {
|
|
417
|
-
...buildDeliveryUrls(baseUrl, options.appType, formUuid),
|
|
418
|
-
...(resumeOutput.url ? { url: resumeOutput.url } : {}),
|
|
419
|
-
...(resumeOutput.formUrl ? { formUrl: resumeOutput.formUrl } : {}),
|
|
420
|
-
...(resumeOutput.appUrl ? { appUrl: resumeOutput.appUrl } : {}),
|
|
421
|
-
};
|
|
360
|
+
await call(['create-form', 'resume', options.appType, formUuid, JSON.stringify(resolvedFields), '--json']);
|
|
422
361
|
resumed = true;
|
|
423
362
|
}
|
|
424
363
|
let schema = await call(['get-schema', options.appType, formUuid, '--field-map-json']);
|
|
425
364
|
if (!readbackMatchesExpectedFields(schema, resolvedFields) && !resumed && !form.formUuid) {
|
|
426
|
-
|
|
427
|
-
delivery = {
|
|
428
|
-
...buildDeliveryUrls(baseUrl, options.appType, formUuid),
|
|
429
|
-
...(resumeOutput.url ? { url: resumeOutput.url } : {}),
|
|
430
|
-
...(resumeOutput.formUrl ? { formUrl: resumeOutput.formUrl } : {}),
|
|
431
|
-
...(resumeOutput.appUrl ? { appUrl: resumeOutput.appUrl } : {}),
|
|
432
|
-
};
|
|
365
|
+
await call(['create-form', 'resume', options.appType, formUuid, JSON.stringify(resolvedFields), '--json']);
|
|
433
366
|
resumed = true;
|
|
434
367
|
schema = await call(['get-schema', options.appType, formUuid, '--field-map-json']);
|
|
435
368
|
}
|
|
436
369
|
if (schema.formUuid !== formUuid || !readbackMatchesExpectedFields(schema, resolvedFields)) {
|
|
437
370
|
throw readbackMismatch(formUuid, { ...form, fields: resolvedFields }, schema);
|
|
438
371
|
}
|
|
439
|
-
return { formUuid, fields: schema.fields
|
|
372
|
+
return { formUuid, fields: schema.fields };
|
|
440
373
|
}, () => save(state));
|
|
441
374
|
const success = Object.values(state.results).every(item => item.status === 'success');
|
|
442
|
-
const output = {
|
|
443
|
-
success,
|
|
444
|
-
groups,
|
|
445
|
-
stateFile,
|
|
446
|
-
results: state.results,
|
|
447
|
-
...((baseUrl && options.appType) ? { appUrl: `${String(baseUrl).replace(/\/+$/, '')}/${options.appType}/workbench` } : {}),
|
|
448
|
-
};
|
|
375
|
+
const output = { success, groups, stateFile, results: state.results };
|
|
449
376
|
if (!success) {
|
|
450
377
|
output.errorCode = 'FORM_BATCH_PARTIAL_FAILURE';
|
|
451
|
-
|
|
378
|
+
output.nextAction = 'Inspect the saved state and child error, then fix the batch input or recover known formUuid values. Do not fall back to create-form create.';
|
|
452
379
|
}
|
|
453
380
|
console.log(JSON.stringify(output));
|
|
454
381
|
if (!output.success) { process.exitCode = 1; }
|
|
@@ -470,7 +397,5 @@ module.exports = {
|
|
|
470
397
|
execute,
|
|
471
398
|
expectedReadbackFields,
|
|
472
399
|
readbackMatchesExpectedFields,
|
|
473
|
-
buildPartialFailureRecovery,
|
|
474
|
-
buildDeliveryUrls,
|
|
475
400
|
validateStaticDefinition,
|
|
476
401
|
};
|