openyida 2026.11.3 → 2026.11.4

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 (60) hide show
  1. package/README.md +2 -6
  2. package/bin/yida.js +0 -25
  3. package/lib/app/application-style.js +2 -3
  4. package/lib/app/fast-theme.js +9 -5
  5. package/lib/app/theme-source.js +2 -7
  6. package/lib/core/chalk.js +2 -1
  7. package/lib/core/command-manifest.js +5 -70
  8. package/lib/core/env-cmd.js +0 -1
  9. package/lib/core/locales/en.js +0 -8
  10. package/lib/core/locales/zh.js +0 -8
  11. package/lib/core/permission-guidance.js +25 -9
  12. package/lib/core/update.js +1 -1
  13. package/lib/design/document.js +5 -0
  14. package/lib/design-plan/themes.js +30 -1
  15. package/package.json +1 -1
  16. package/scripts/postinstall.js +35 -26
  17. package/yida-skills/SKILL.md +4 -2
  18. package/yida-skills/references/setup-and-env.md +6 -0
  19. package/yida-skills/references/yida-api.md +4 -4
  20. package/yida-skills/skills/yida-app/SKILL.md +8 -2
  21. package/yida-skills/skills/yida-app/references/entry-navigation.md +1 -1
  22. package/yida-skills/skills/yida-app/workflow/fast-build.md +7 -3
  23. package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +1 -1
  24. package/yida-skills/skills/yida-app/workflow/step-1-resource-context.md +6 -5
  25. package/yida-skills/skills/yida-app/workflow/step-2-design.md +3 -3
  26. package/yida-skills/skills/yida-app/workflow/step-3-create-or-reuse-app.md +1 -1
  27. package/yida-skills/skills/yida-app/workflow/step-8-publish-navigation.md +7 -5
  28. package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +4 -4
  29. package/yida-skills/skills/yida-canvas-custom-page/references/navigation-and-entry-guide.md +1 -1
  30. package/yida-skills/skills/yida-cool-card/references/configuration.md +1 -1
  31. package/yida-skills/skills/yida-create-app/SKILL.md +7 -7
  32. package/yida-skills/skills/yida-create-form-page/references/form-field-properties.md +1 -1
  33. package/yida-skills/skills/yida-design/SKILL.md +14 -14
  34. package/yida-skills/skills/yida-design/references/application-style-library.md +5 -3
  35. package/yida-skills/skills/yida-design/references/application-theme-consistency.md +7 -7
  36. package/yida-skills/skills/yida-design/references/design-mode.md +5 -2
  37. package/yida-skills/skills/yida-design/references/fast-design-spec.md +1 -1
  38. package/yida-skills/skills/yida-design/references/native-form-styles.md +4 -4
  39. package/yida-skills/skills/yida-design/references/page-quality-gates.md +2 -2
  40. package/yida-skills/skills/yida-design/references/reference-visual-dna.md +2 -2
  41. package/yida-skills/skills/yida-design/references/responsive-layout.md +1 -1
  42. package/yida-skills/skills/yida-design/references/theme-selection.md +11 -3
  43. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/SKILL.md +1 -1
  44. package/yida-skills/skills/yida-design/sub_skill/yida-design-plan/references/build-plan-compact-schema.md +1 -1
  45. package/yida-skills/skills/yida-design/workflow/output-design.md +13 -13
  46. package/yida-skills/skills/yida-design/workflow/step-1-read-brief.md +3 -3
  47. package/yida-skills/skills/yida-design/workflow/step-5-visual-states.md +1 -1
  48. package/yida-skills/skills/yida-design/workflow/step-6-handoff.md +3 -3
  49. package/yida-skills/skills/yida-image-assets/references/manifest-contract.md +6 -3
  50. package/yida-skills/skills/yida-login/SKILL.md +2 -0
  51. package/yida-skills/skills/yida-nav-group/SKILL.md +9 -1
  52. package/yida-skills/skills/yida-prd/SKILL.md +3 -3
  53. package/yida-skills/skills/yida-requirement-analysis/references/handoff.md +3 -1
  54. package/yida-skills/skills/yida-requirement-analysis/workflow/prepare-brief.md +3 -3
  55. package/yida-skills/skills-index.json +7 -8
  56. package/lib/a2a/cmd.js +0 -98
  57. package/lib/a2a/server.js +0 -370
  58. package/lib/bridge/bridge.js +0 -1292
  59. package/lib/dws/dws-wrapper.js +0 -230
  60. package/lib/mcp/server.js +0 -274
package/README.md CHANGED
@@ -105,7 +105,7 @@ npm install -g dingtalk-workspace-cli
105
105
  dws version
106
106
  ```
107
107
 
108
- Alternatively, `openyida dws install` displays official instructions for your platform without running an installer. Once installed, `openyida dws <command> [args]` forwards arguments to your system's dws.
108
+ Run the installed `dws <command> [args]` directly. Check `dws --help` and the relevant subcommand's help for supported options.
109
109
 
110
110
  OpenYida does not bundle or automatically install dws. Dws manages its own version, updates and login. Use `dws auth login` for DingTalk business access and verify the target organization and account. Native YiDA cool-card creation, reads and editor links work without dws; updating a chat card through dws does not save a YiDA template. See the official instructions for other installation methods and check the installed command's `--help` before use.
111
111
 
@@ -534,7 +534,7 @@ When preparing a PR that needs a personal Fork, or when you ask how to support t
534
534
  | `openyida custom-button <list\|inspect\|options\|create\|update\|delete> <appType> <formUuid> [buttonUuid] [--config <file>] [--expected-hash <hash>] [--backup <file>] [--yes] [--json]` | Native custom buttons: inspect and configure form edits, automation flows and page links |
535
535
  | `openyida form-message <list\|inspect\|options\|create\|update\|delete> <appType> <formUuid> [messageId] [--config <file>] [--expected-hash <hash>] [--backup <file>] [--yes] [--json]` | Native form notifications: inspect triggers, recipients and templates, then safely maintain bindings |
536
536
  | `openyida get-schema <appType> <formUuid\|--all> [--summary-json\|--field-map-json\|--analysis-json]` | Get one form Schema or all form Schemas |
537
- | `openyida check-prd-completeness [<prd.md> \| --build-spec <build-context.json> \| --manifest-only] --app-type <appType> [--build-manifest <file>] [--json]` | Check resources, frontend menu hiding and application theme delivery |
537
+ | `openyida check-prd-completeness (<prd.md> [--build-manifest <file>] \| --build-spec <build-context.json> [--build-manifest <file>] \| --manifest-only --build-manifest <file>) --app-type <appType> [--json]` | Check resources, frontend menu hiding and application theme delivery |
538
538
  | `openyida check-design <design.md> [--prd <prd.md>] [--base-dir <dir>] [--json]` | Validate design documents, theme tokens and PRD handoff |
539
539
  | `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
540
540
  | `openyida create-page <appType> "<name>" [--mode dashboard] [--hide-nav] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom display page |
@@ -624,8 +624,6 @@ When preparing a PR that needs a personal Fork, or when you ask how to support t
624
624
  | `openyida integration check <appType...>` | Check abnormal integration automation run logs |
625
625
  | `openyida integration detail-log <appType> <procInstId> [--json] [--include-params]` | View integration automation run log details |
626
626
  | `openyida integration diagnose (--text <text>\|--file <path>\|--rules) [--json]` | Diagnose integration automation tickets and common pitfalls |
627
- | `openyida dws <command> [args]` | DingTalk CLI (contacts/calendar/todo/approval etc.) |
628
- | `openyida dws contact user search --keyword <text>` | DingTalk CLI (contacts/calendar/todo/approval etc.) |
629
627
  | `openyida dingtalk-link <url> [--target fullScreen] [--legacy-scheme] [--json]` | Generate DingTalk AppLink / legacy dingtalk:// page links |
630
628
 
631
629
  ### Utility
@@ -635,8 +633,6 @@ When preparing a PR that needs a personal Fork, or when you ask how to support t
635
633
  | `openyida commands [--json]` | Output machine-readable command manifest |
636
634
  | `openyida agent-capabilities [--json] [--summary-json\|--compact]` | Output one-shot agent capability snapshot |
637
635
  | `openyida agent <doctor\|diagnose\|status\|connect\|run\|disconnect\|logout\|logs> [options]` | Connect a local Agent (Go runtime, development preview) |
638
- | `openyida a2a <serve\|agent-card> [options]` | Start local read-only A2A adapter or print Agent Card |
639
- | `openyida bridge start [--token <pair-token>] [--port 6736] [--origin https://demo.aliwork.com] [--open\|--no-open]` | Start OpenYida local web bridge service |
640
636
  | `openyida copy [--force]` | Copy project working directory |
641
637
  | `openyida sample [--list] [<skill> <name>] [--output <file-or-directory>] [--var KEY=VALUE ...] [--design-file <design.md>] [--spec-file <spec.json>] [--primary-color <color>] [--tokens-file <theme.json>] [--nav-theme light\|dark] [--check] [--style-id <themeId\|free-creative>] [--theme-ids <id,...>] [--pop-art-context <explicit-request\|showcase>]` | Output code samples/templates |
642
638
  | `openyida doctor [--fix]` | Environment diagnostics & auto-fix |
package/bin/yida.js CHANGED
@@ -86,7 +86,6 @@ function printHelp() {
86
86
  console.log(` ${DIM}${RESET} openyida login`);
87
87
  console.log(` ${DIM}${RESET} openyida create-app "${t('help.quickstart_app_name')}"`);
88
88
  console.log(` ${DIM}${RESET} openyida create-form create APP_XXX "${t('help.quickstart_form_name')}" .cache/openyida/forms/fields.json`);
89
- console.log(` ${DIM}${RESET} openyida dws contact user search --keyword "张三"`);
90
89
  console.log('');
91
90
  console.log(` ${DIM}${t('help.docs')} https://demo.aliwork.com/o/openyida/helpCenter · https://github.com/openyida/openyida${RESET}`);
92
91
  console.log('');
@@ -667,24 +666,6 @@ async function main() {
667
666
  break;
668
667
  }
669
668
 
670
- case 'mcp': {
671
- const { runStdioServer } = require('../lib/mcp/server');
672
- runStdioServer();
673
- break;
674
- }
675
-
676
- case 'a2a': {
677
- const { run } = require('../lib/a2a/cmd');
678
- await run(args);
679
- break;
680
- }
681
-
682
- case 'bridge': {
683
- const { run } = require('../lib/bridge/bridge');
684
- await run(args);
685
- break;
686
- }
687
-
688
669
  case 'env': {
689
670
  if (shouldUseEnvManagement(args)) {
690
671
  const { run } = require('../lib/core/env-cmd');
@@ -1346,12 +1327,6 @@ async function main() {
1346
1327
  break;
1347
1328
  }
1348
1329
 
1349
- case 'dws': {
1350
- const { run: runDws } = require('../lib/dws/dws-wrapper');
1351
- await runDws(args);
1352
- break;
1353
- }
1354
-
1355
1330
  case 'dingtalk-link': {
1356
1331
  const { run: runDingTalkLink } = require('../lib/dingtalk/dingtalk-link');
1357
1332
  await runDingTalkLink(args);
@@ -4,7 +4,7 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { CliError } = require('../core/cli-error');
6
6
  const { t } = require('../core/i18n');
7
- const { DESIGN_SKILL_ROOT, loadThemeIndex } = require('../design-plan/themes');
7
+ const { DESIGN_SKILL_ROOT, resolveTheme } = require('../design-plan/themes');
8
8
  const START = '/* OPENYIDA APPLICATION STYLE RECIPES START';
9
9
  const END = '/* OPENYIDA APPLICATION STYLE RECIPES END */';
10
10
  const CREATIVE_TOKENS = [
@@ -46,8 +46,7 @@ function applyApplicationStyle(css, metadata, tokens) {
46
46
  }
47
47
 
48
48
  function exportApplicationStyle(id, outputDirectory) {
49
- const theme = loadThemeIndex().themes.find(item => item.themeId === id);
50
- if (!theme) {throw new CliError(t('design_document.invalid', id || '--style-id', 'APPLICATION_STYLE_UNKNOWN'), { code: 'APPLICATION_STYLE_UNKNOWN' });}
49
+ const theme = resolveTheme(id, '--style-id');
51
50
  const directory = path.resolve(outputDirectory);
52
51
  const assets = [['design.md', theme.templatePath], ['app_theme.css', theme.cssTemplatePath], ['form-layout.json', theme.formLayoutPath]];
53
52
  const outputs = assets.map(([name, relative]) => {
@@ -4,7 +4,7 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { CliError, isCliError } = require('../core/cli-error');
6
6
  const { t } = require('../core/i18n');
7
- const { loadThemeIndex, themeTemplatePath, themeNavTheme, resolveThemeColors } = require('../design-plan/themes');
7
+ const { loadThemeIndex, themeSelectionDetails, themeTemplatePath, themeNavTheme, resolveThemeColors } = require('../design-plan/themes');
8
8
  const { parseDesignDocument, serializeDesignDocument, extractDesignTokens } = require('../design/document');
9
9
  const { normalizeCssColorToHex } = require('./custom-theme');
10
10
  const { generateThemeCss } = require('./theme-source');
@@ -19,17 +19,21 @@ function preflight(error) {
19
19
  return error;
20
20
  }
21
21
 
22
- function invalid(field, expected, actual) {
22
+ function invalid(field, expected, actual, details = {}) {
23
23
  throw preflight(new CliError(t('cli_argument.invalid', field), { code: 'FAST_THEME_INVALID',
24
- details: { issues: [{ path: field, expected, ...(actual !== undefined ? { actual } : {}) }] } }));
24
+ details: { ...details, issues: [{ path: field, expected, ...(actual !== undefined ? { actual } : {}), ...details.issues?.[0] }] } }));
25
25
  }
26
26
 
27
27
  // Theme-only generation: no business plan, page specification or Plan renderer.
28
28
  function prepareFastTheme(options) {
29
29
  let theme, color, css, palette, navTheme;
30
30
  try {
31
- theme = loadThemeIndex().themes.find(item => item.themeId === options.styleId);
32
- if (!theme) {invalid('--style-id', 'themeId from design-plan catalog --compact', options.styleId);}
31
+ const themes = loadThemeIndex().themes;
32
+ theme = themes.find(item => item.themeId === options.styleId);
33
+ if (!theme) {
34
+ const details = themeSelectionDetails(options.styleId, '--style-id', themes);
35
+ invalid('--style-id', 'themeId from design-plan catalog --compact', options.styleId, details);
36
+ }
33
37
  color = normalizeCssColorToHex(options.primaryColor);
34
38
  if (!color) {invalid('--primary-color', 'CSS hex or rgb color', options.primaryColor);}
35
39
  if (theme.themeId === 'app-pop' && !['explicit-request', 'showcase'].includes(options.popArtContext)) {
@@ -5,7 +5,7 @@ const path = require('path');
5
5
  const { CliError } = require('../core/cli-error');
6
6
  const { t } = require('../core/i18n');
7
7
  const { parseDesignDocument } = require('../design/document');
8
- const { DESIGN_SKILL_ROOT, loadThemeIndex } = require('../design-plan/themes');
8
+ const { DESIGN_SKILL_ROOT, resolveTheme } = require('../design-plan/themes');
9
9
  const { applyDesignTokens } = require('./theme-from-design');
10
10
  const SOURCE = /^\/\* openyida-theme-source: ([a-z0-9-]+) \*\/\r?\n/m;
11
11
 
@@ -17,12 +17,7 @@ function sourceId(markdown) {
17
17
  // Resolve only catalog paths, never a project-supplied CSS path or theme directory.
18
18
  function themeSource(markdown) {
19
19
  const id = sourceId(markdown);
20
- const theme = id && loadThemeIndex().themes.find(item => item.themeId === id);
21
- if (id !== undefined && !theme) {
22
- throw new CliError(t('design_document.invalid', 'themeProfile.sourceThemeId', 'APPLICATION_STYLE_UNKNOWN'), {
23
- code: 'APPLICATION_STYLE_UNKNOWN', details: { themeId: id },
24
- });
25
- }
20
+ const theme = id !== undefined ? resolveTheme(id, 'themeProfile.sourceThemeId') : undefined;
26
21
  const relative = theme && theme.mode !== 'creative' ? theme.cssTemplatePath : 'references/theme/app-custom-theme-template.css';
27
22
  const file = path.resolve(DESIGN_SKILL_ROOT, relative);
28
23
  if (!file.startsWith(DESIGN_SKILL_ROOT + path.sep)) {throw new Error('Invalid theme CSS path');}
package/lib/core/chalk.js CHANGED
@@ -109,7 +109,8 @@ function banner(title, options = {}) {
109
109
  function step(stepNumber, message, stderr = true) {
110
110
  if (isQuiet()) {return;}
111
111
  const out = stderr ? process.stderr : process.stdout;
112
- out.write(`\n ${c.cyan}[${stepNumber}]${c.reset} ${c.bold}${message}${c.reset}\n`);
112
+ // A marker on its own line must not look like a JSON array to tool-output parsers.
113
+ out.write(`\n ${c.cyan}(${stepNumber})${c.reset} ${c.bold}${message}${c.reset}\n`);
113
114
  }
114
115
 
115
116
  // ── 标签值对输出 ───────────────────────────────────────
@@ -459,7 +459,6 @@ const COMMAND_SIDE_EFFECTS = new Map([
459
459
  'connector.list-actions',
460
460
  'connector.list-connections',
461
461
  'check-prd-completeness',
462
- 'dws.contact-user-search',
463
462
  'get-form-config',
464
463
  'get-page-config',
465
464
  'get-permission',
@@ -555,12 +554,6 @@ const COMMAND_SIDE_EFFECTS = new Map([
555
554
  read_actions: ['list', 'range', 'search-user'],
556
555
  mutating_actions: ['create', 'update', 'cancel'],
557
556
  })],
558
- ['a2a', sideEffect('mixed', {
559
- mutates_yida: false,
560
- mutates_local: true,
561
- read_actions: ['agent-card'],
562
- mutating_actions: ['serve'],
563
- })],
564
557
  ['agent', sideEffect('mixed', {
565
558
  mutates_yida: false,
566
559
  mutates_local: true,
@@ -635,12 +628,6 @@ const COMMAND_SIDE_EFFECTS = new Map([
635
628
  read_actions: ['default', 'overview', 'commodity', 'grant', 'capacity', 'quota', 'abs-path', 'dataflow', 'i18n', 'domain'],
636
629
  mutating_actions: ['domain set'],
637
630
  })],
638
- ['bridge', sideEffect('mixed', {
639
- mutates_yida: false,
640
- mutates_local: true,
641
- read_actions: [],
642
- mutating_actions: ['start'],
643
- })],
644
631
  ['corp-efficiency', sideEffect('mixed', {
645
632
  mutates_yida: true,
646
633
  mutates_local: false,
@@ -671,12 +658,6 @@ const COMMAND_SIDE_EFFECTS = new Map([
671
658
  read_actions: ['default'],
672
659
  mutating_actions: ['--fix'],
673
660
  })],
674
- ['dws', sideEffect('mixed', {
675
- mutates_yida: false,
676
- mutates_local: true,
677
- read_actions: ['help', 'install', 'setup', 'contact user search', 'calendar event list', 'approval instance list'],
678
- mutating_actions: ['todo task create', 'chat robot send', 'depends on dws command'],
679
- })],
680
661
  ['env', sideEffect('mixed', {
681
662
  mutates_yida: false,
682
663
  mutates_local: true,
@@ -701,12 +682,6 @@ const COMMAND_SIDE_EFFECTS = new Map([
701
682
  read_actions: ['overview', 'config', 'languages', 'list'],
702
683
  mutating_actions: ['upsert', 'delete', 'translate', 'translate-all', 'upgrade'],
703
684
  })],
704
- ['mcp', sideEffect('mixed', {
705
- mutates_yida: false,
706
- mutates_local: true,
707
- read_actions: [],
708
- mutating_actions: ['default'],
709
- })],
710
685
  ['nav-group', sideEffect('mixed', {
711
686
  mutates_yida: true,
712
687
  mutates_local: false,
@@ -749,7 +724,6 @@ const COMMAND_PERMISSIONS = new Map([
749
724
  'create-form.validate-fields',
750
725
  'dingtalk-link',
751
726
  'design-plan.catalog',
752
- 'dws.contact-user-search',
753
727
  'formula.evaluate',
754
728
  'formula.check',
755
729
  'formula.contracts',
@@ -882,11 +856,6 @@ const COMMAND_PERMISSIONS = new Map([
882
856
  reason: 'Deletes, removes, or disables existing remote state.',
883
857
  })),
884
858
 
885
- ...permissionEntries([
886
- 'a2a',
887
- ], actionDependentPermission({
888
- preauthorized_actions: ['serve'],
889
- })),
890
859
  ...permissionEntries([
891
860
  'agent',
892
861
  ], actionDependentPermission({
@@ -985,12 +954,6 @@ const COMMAND_PERMISSIONS = new Map([
985
954
  preauthorized_actions: ['domain set'],
986
955
  })),
987
956
 
988
- ...permissionEntries([
989
- 'bridge',
990
- ], actionDependentPermission({
991
- preauthorized_actions: ['start'],
992
- })),
993
-
994
957
  ...permissionEntries([
995
958
  'corp-efficiency',
996
959
  ], actionDependentPermission({
@@ -1023,13 +986,6 @@ const COMMAND_PERMISSIONS = new Map([
1023
986
  preauthorized_actions: ['--fix'],
1024
987
  })),
1025
988
 
1026
- ...permissionEntries([
1027
- 'dws',
1028
- ], actionDependentPermission({
1029
- preauthorized_actions: ['install', 'setup', 'todo task create', 'chat robot send'],
1030
- ask_actions: ['unrecognized dws command'],
1031
- })),
1032
-
1033
989
  ...permissionEntries([
1034
990
  'env',
1035
991
  ], actionDependentPermission({
@@ -1056,12 +1012,6 @@ const COMMAND_PERMISSIONS = new Map([
1056
1012
  ask_actions: ['delete'],
1057
1013
  })),
1058
1014
 
1059
- ...permissionEntries([
1060
- 'mcp',
1061
- ], actionDependentPermission({
1062
- preauthorized_actions: ['default'],
1063
- })),
1064
-
1065
1015
  ...permissionEntries([
1066
1016
  'nav-group',
1067
1017
  ], actionDependentPermission({
@@ -1339,7 +1289,7 @@ const COMMAND_GROUPS = [
1339
1289
  command('create-app', ['create-app'], 'create-app "<name>"|--name <name> [options] [--locale zh_CN|en_US|ja_JP] [--open|--no-open] [--json]', 'help.cmd_create_app', { managedRun: { scope: 'denied', reason: 'scope_not_audited' },
1340
1290
  output: 'json',
1341
1291
  examples: ['openyida create-app --name "CRM" --desc "Customer management" --json'],
1342
- notes: ['QwenWork creation returns pending linkPresentation even with --quiet --no-open; post-creation errors retain it in details. Apply full_app_build.link_presentation_gate before final summary, including app shells and partial delivery.', 'Creation always requests createWithModernTheme=y and verifies the new app identity and modern configuration through getAppIncludingAecpInfo.json before reporting success. APP_CREATED_THEME_UNVERIFIED preserves details.appCreated/appType/retryCreate=false; inspect that app and never recreate or silently downgrade it. themeVerification is configuration readback, not browser rendering proof.', 'Successful results include appUrl/workbenchUrl for the business workspace and adminUrl for developer administration. Complete application delivery retains adminUrl regardless of auth runtime; route construction does not verify recipient access. Preserve the frontend URL from its own page result.', 'In QwenWork, permission failures return a nonzero exit and structured status=permission_required. YIDA_PLATFORM_ACCESS_REQUIRED and YIDA_APP_CREATE_PERMISSION_REQUIRED include details.permissionLabel/permissionUrl and nextAction.label/url; YIDA_PERMISSION_REQUIRED preserves an unclassified permission reason without inventing a link. Explain the missing permission, display the semantic label as a Markdown link to its paired URL (or reuse nextStep), and pause resource writes; do not automatically open it, send an application, switch spaces, log in again or retry creation. Resume only after the user requests continuation and the host identity, organization and permissions are verified.'],
1292
+ notes: ['QwenWork creation returns pending linkPresentation even with --quiet --no-open; post-creation errors retain it in details. Apply full_app_build.link_presentation_gate before final summary, including app shells and partial delivery.', 'Creation always requests createWithModernTheme=y and verifies the new app identity and modern configuration through getAppIncludingAecpInfo.json before reporting success. APP_CREATED_THEME_UNVERIFIED preserves details.appCreated/appType/retryCreate=false; inspect that app and never recreate or silently downgrade it. themeVerification is configuration readback, not browser rendering proof.', 'Successful results include appUrl/workbenchUrl for the business workspace and adminUrl for developer administration. Complete application delivery retains adminUrl regardless of auth runtime; route construction does not verify recipient access. Preserve the frontend URL from its own page result.', 'Recognized permission failures return a nonzero exit and structured status=permission_required in any output mode. An explicit YiDA platform access denial returns the same-origin YiDA access form. An app creation denial from the registration endpoint returns the creation permission form. Both recognize explicit denial messages even with an unmapped error code. YIDA_PLATFORM_ACCESS_REQUIRED and YIDA_APP_CREATE_PERMISSION_REQUIRED include details.permissionLabel/permissionUrl and nextAction.label/url; YIDA_PERMISSION_REQUIRED preserves an unclassified permission reason without inventing a link. Explain the missing permission, copy details.permissionLinkMarkdown verbatim into the user-facing Markdown so the label itself is clickable; for older receipts use [nextAction.label](nextAction.url) or the named link in nextStep. Do not display a bare URL, and pause resource writes; do not automatically open it, send an application, switch spaces, log in again or retry creation. Offer switching organizations only as a user choice after showing the application form. Resume only after the user requests continuation and the host identity, organization and permissions are verified.'],
1343
1293
  }),
1344
1294
  command('design-plan.catalog', ['design-plan', 'catalog'], 'design-plan catalog [--compact] [--json]', 'help.cmd_design_plan_catalog', { managedRun: { scope: 'local' },
1345
1295
  requiresLogin: false, output: 'json',
@@ -1756,9 +1706,9 @@ const COMMAND_GROUPS = [
1756
1706
  command('get-schema', ['get-schema'], 'get-schema <appType> <formUuid|--all> [--summary-json|--field-map-json|--analysis-json]', 'help.cmd_get_schema', { taskConcurrency: {'kind':'read','forbiddenFlags':['--output-dir','--output','-o']}, managedRun: { scope: 'app', appPosition: 0 },
1757
1707
  examples: ['openyida get-schema APP_XXX FORM_XXX --field-map-json'],
1758
1708
  }),
1759
- command('check-prd-completeness', ['check-prd-completeness'], 'check-prd-completeness [<prd.md> | --build-spec <build-context.json> | --manifest-only] --app-type <appType> [--build-manifest <file>] [--json]', 'help.cmd_check_prd_completeness', { managedRun: { scope: 'app', appParser: 'prd-completeness' },
1709
+ command('check-prd-completeness', ['check-prd-completeness'], 'check-prd-completeness (<prd.md> [--build-manifest <file>] | --build-spec <build-context.json> [--build-manifest <file>] | --manifest-only --build-manifest <file>) --app-type <appType> [--json]', 'help.cmd_check_prd_completeness', { managedRun: { scope: 'app', appParser: 'prd-completeness' },
1760
1710
  args: [
1761
- { name: 'prd', type: 'file', source: 'positional', position: 0, description: 'Plan/legacy PRD. Mutually exclusive with --build-spec.' },
1711
+ { name: 'prd', type: 'file', source: 'positional', position: 0, description: 'Plan/legacy PRD. Mutually exclusive with --build-spec and --manifest-only.' },
1762
1712
  { name: 'buildSpec', type: 'file', source: 'option', builder_options: ['--build-spec'], description: 'Optional legacy Fast context; mutually exclusive with PRD/--manifest-only.' },
1763
1713
  { name: 'manifestOnly', type: 'boolean', source: 'option', builder_options: ['--manifest-only'], description: 'Fast final check with actual build-manifest resource IDs and optional applicationTheme/navigationVisibility. Requires --build-manifest; no prebuild JSON or PRD needed.' },
1764
1714
  { name: 'appType', type: 'string', source: 'option', builder_options: ['--app-type', '--appType', '--app_type'], required: true },
@@ -2088,8 +2038,6 @@ const COMMAND_GROUPS = [
2088
2038
  requiresLogin: false,
2089
2039
  output: 'text|json',
2090
2040
  }),
2091
- command('dws', ['dws'], 'dws <command> [args]', 'help.cmd_dws', { managedRun: { scope: 'denied', reason: 'scope_not_audited' } }),
2092
- command('dws.contact-user-search', ['dws', 'contact', 'user', 'search'], 'dws contact user search --keyword <text>', 'help.cmd_dws', { managedRun: { scope: 'denied', reason: 'scope_not_audited' } }),
2093
2041
  command('dingtalk-link', ['dingtalk-link'], 'dingtalk-link <url> [--target fullScreen] [--legacy-scheme] [--json]', 'help.cmd_dingtalk_link', { managedRun: { scope: 'local' },
2094
2042
  requiresLogin: false,
2095
2043
  output: 'text|json',
@@ -2113,19 +2061,6 @@ const COMMAND_GROUPS = [
2113
2061
  output: 'json',
2114
2062
  examples: ['openyida agent diagnose --json', 'openyida agent diagnose --session "<Yida session URL>" --json', 'openyida agent run --help'],
2115
2063
  }),
2116
- command('mcp', ['mcp'], 'mcp', 'help.cmd_commands', { managedRun: { scope: 'denied', reason: 'scope_not_audited' },
2117
- requiresLogin: false,
2118
- output: 'json',
2119
- hidden: true,
2120
- }),
2121
- command('a2a', ['a2a'], 'a2a <serve|agent-card> [options]', 'help.cmd_a2a', { managedRun: { scope: 'denied', reason: 'scope_not_audited' },
2122
- requiresLogin: false,
2123
- output: 'text|json',
2124
- }),
2125
- command('bridge', ['bridge'], 'bridge start [--token <pair-token>] [--port 6736] [--origin https://demo.aliwork.com] [--open|--no-open]', 'help.cmd_bridge', { managedRun: { scope: 'denied', reason: 'scope_not_audited' },
2126
- requiresLogin: false,
2127
- output: 'text|json',
2128
- }),
2129
2064
  command('copy', ['copy'], 'copy [--force]', 'help.cmd_copy', { managedRun: {'scope':'denied','reason':'scope_not_audited'}, requiresLogin: false }),
2130
2065
  command('sample', ['sample'], 'sample [--list] [<skill> <name>] [--output <file-or-directory>] [--var KEY=VALUE ...] [--design-file <design.md>] [--spec-file <spec.json>] [--primary-color <color>] [--tokens-file <theme.json>] [--nav-theme light|dark] [--check] [--style-id <themeId|free-creative>] [--theme-ids <id,...>] [--pop-art-context <explicit-request|showcase>]', 'help.cmd_sample', { managedRun: { scope: 'local' },
2131
2066
  requiresLogin: false,
@@ -2456,8 +2391,8 @@ function summarizeLocalizedCommands(commands) {
2456
2391
  navigation_policy: 'Before PRD planning in Fast and Plan, the agent determines navigation ownership and layout from business context. Follow yida-design/references/navigation-decision.md for entry and layout decisions. Preserve explicit user requirements and existing navigation for local changes; resource-only requests operate on their specified resources and settings. Use native navigation by default for the application workspace, and custom navigation only for an explicitly justified application-level branded menu or special navigation interaction. A service frontend defaults to one coding page with its own menu and all selected business views; a single-step entry can use navigation.type=none. Choose backend native or coding pages by task efficiency. Backend coding pages in platform-shell are content-only: platform menus own cross-module navigation; local Tabs cover categories or states of the current task only. Never turn the management entry menu into a second page navbar, sidebar or module Tabs. Persistent filters/state alone do not justify custom application navigation. Plan handoff pages include derived navigationPolicy; Fast records the same boundary. Do not hide platform navigation to repair duplicate page menus. Store application navigation in navigationType and standalone entry menus in pageSpecHandoff.navigation. Configure a custom frontend menu at page scope and preserve workspace navigation. Record type/source/reason/variant using ai_default for agent ownership decisions and user_selected for explicit user requirements. Include navigation in the overall Plan confirmation; Fast implements the recorded decision. Platform navigation uses update-app --layout top|side|l_shape --show-app-nav, persisting layoutDirection and hideAppNav=n. Preserve stored navType. For appThemeEnable=n or appThemeMode=legacy, persist side/top/l_shape as ver/hoz/ver and white/gray as light; without --layout preserve stored slide/ver/hoz. For modern or unknown capability, normalize layoutDirection and navType using the existing application layout compatibility rules (hoz plus top_side means l_shape; missing layout uses top_fold/top_side for top/l_shape). Apply shell top_fold/none overrides at page scope. Application-wide custom side/top/mixed/dock uses app hiding plus per-page hiding within scope; a standalone frontend in a platform-navigation app uses only page configuration. Read back layoutDirection, hideAppNav and each configured page, then verify the planned frontend and workspace links. Navigation structure is separate from tone. Navigation tone is derived from the final selected theme template, never guessed from the business brief or implicitly defaulted to light; apply that explicit value with update-app --nav-theme. Custom top navigation defaults to edge-to-edge, not floating. Over a hero image, start transparent, add a surface on scroll, restore transparency at the top; expanded menus stay readable. Follow yida-design/references/page-continuity.md; floating requires an explicit design.',
2457
2392
  design_mode_policy: 'Analyze requirements first with yida-requirement-analysis: read only necessary sources before the first question, offer concrete core-function candidates, clarify key usage, and preserve explicit scope and valid answers. Initial intake focuses on core functions and actual usage. Record actual user replies; proceed with dependent planning after a reply or explicit delegation. First-time builds include new apps and existing apps without business pages. After intake, reuse explicit mode choices and detailed supplied plans; if the user delegates the mode or asks for no more questions, use Fast unless Plan is explicit; otherwise, if the mode is unspecified, ask whether to prepare a PRD for confirmation (Plan, more detailed and slower) or build from the supplied requirements (Fast). Without detailed requirements, offer Fast and Plan neutrally. intake.confirmed records scope and key-usage clarification; the plan revision tracks plan approval separately. Apply visual_decision_policy.themeSelection.intent first: infer directly from stated styles or inspect reference websites/images for visual DNA, then generate Fast CSS directly or Plan design/CSS without reopening selection. Preserve sources and separate observed facts from AI defaults. Only without intent, visual reference or reusable choice do Fast and Plan share the three-direction comparison rule; Fast selects internally and Plan also selects internally when delegated. Follow themeSelection.reuse across stages, recovery and pending details; resolve only concrete conflicts. Preserve themeId and source. When Plan is explicit and there is no style intent, visual reference, reusable choice or delegation, generate exactly three directions and follow visual_decision_policy.themeSelection for the style choice before design-plan init. When a style question is needed, use ask_human on every host with text-only options by default. Apply themeSelection.preview on every host: all galleries, widgets, images and preview links are off by default and require explicit user requests; supplied references do not trigger display. On every host follow themeSelection.interactionOrder: batch ready independent style, scope and mode questions in one ask_human call; split only for real answer dependencies or host limits, keep only one pending interaction, and preserve later plan approval. Apply themeSelection.eligibility before recommending, selecting or previewing app-pop; generic all-styles requests do not qualify. Fast with clear name, scope and authorization creates/reuses the app immediately, with independent theme/page work; never wait for a full JSON, context or design check. The following init/authoring/materialize requirements apply only to Plan. Planning preparation derives page scenes, selected theme mapping and navigation structure before init; mark AI suggestions and apply navigation_policy. Existing business apps only clarify the current change. A named resource-only request with explicitScope.allowInferredResources=false keeps planning within the specified resources. When theme mapping is missing, query design-plan catalog once and reuse its themes and pagePatterns. Init returns authoring.pendingFields and context with typed examples; complete pending facts and review coverage before setting ready=true. Reuse one complete agent-capabilities summary per unchanged environment. Standard Plan uses design-plan init parallelTasks, then executes the returned materialize.command exactly once with business-file and visual-file; preview and --from-preview are only for explicitly incremental large plans. Present the current plan without revision numbers in user-visible titles, summaries, attachments or questions. Keep revision in internal confirmation fields, validate it before building, and execute its generated artifacts.',
2458
2393
  product_design_policy: 'yida-requirement-analysis owns shared facts and first-time intake. yida-prd owns business planning; yida-design owns visual design. Reuse the same confirmed brief and supplied details. Prepare business and base visuals concurrently, then bind visuals to settled page tasks. yida-app merges and checks the artifacts before creating resources. Plan authors scope, data and rules, page organization, business interactions and acceptance once. Ordered blocks {name,purpose} supply default priority and content layers; explicit designs remain authoritative. Project-specific acceptance criteria are merged with generated resource checks. Plan uses the compact authoring contract and selected theme context; the CLI reads full templates and renders all artifacts. Fast, Plan and single-page design share yida-design/templates/design-themes and visual_decision_policy: infer directly from supplied style intent or extracted reference DNA, and use the shared three-direction rule only when comparison is needed. Theme templates declare application-global variables from basic-tokens.json with fixed typography, spacing and Tooltip colors, plus scoped custom-page variables; component recipes consume those variables. Each selected template is the authority for navTheme, its six navigation color tokens, and its selected-item shadow token; free-creative authors its own navigation tone and tokens. Explicit project customization stays in visualStyle.tokens. The CLI declares each fixed application palette once in a shared :root and platform-mode selector block. The CLI preserves mode-independent navigation appearance tokens. Light, dark, white and gray mode classes consume the same project tokens; navTheme remains platform metadata, not a second palette. Legacy generated mode blocks are consolidated on update, while unrelated custom CSS is preserved.',
2459
- ui_guidance_policy: 'Fast page implementation consumes confirmed requirements and incremental real resource/field receipts, with app_theme.css for visual tokens; no context/plan/page JSON prerequisite; it directly authors Canvas source without PRD/design/page-spec generation. The following document-based path applies to Plan and legacy builds: page implementation consumes yida-prd prd.md for positioning, information architecture, page prototype, native form entry policy, material strategy, business-specific checks, resource creation order, page implementation delivery order, navigation order, and acceptance criteria; it consumes yida-design design.md for app custom theme CSS delivery, themeColor/navTheme, visual states, visualScaffold, surface material, rounded rules, density rules, components, state styling, and page-level imageNeed. When a page is imageNeed=required, or beneficial with declared image slots, yida-image-assets prepares a traceable asset manifest alongside page layout and interaction work; wait for final images only at that page\'s image binding and acceptance. imageNeed=none skips the branch. prd.md and design.md remain the only design sources of truth. Page implementation may extract page-spec.json as a derived implementation handoff from prd.md + design.md; conflicts are resolved by sending business conflicts to yida-prd and visual conflicts to yida-design before regenerating the spec. Core normal forms default to 1-3 business sample records before page implementation, followed by query readback. An explicit opt-out, configuration dictionary, sensitive data, or lack of safely constructible values requires a recorded skip reason. Screenshots, public sharing, data-source deep binding, and fine navigation grouping are optional after explicit user request or PRD acceptance criteria.',
2460
- default_nav_order_policy: 'For application-wide custom navigation, implement each entry menu and verify app/page navigation hiding. A standalone frontend preserves platform navigation for the management workspace; frontend-only delivery skips platform ordering. After all scoped resources and page publications finish, perform exactly one navigation order operation. Use management tasks and their default destination, without creating a homepage or putting a frontend page first. When execution.entryRecommendation exists, derive navigationOrder from its management/workspace menus. Call openyida nav-group order <appType> <items...> for an explicit order; otherwise call openyida nav-group auto-order <appType> once for legacy single-workspace plans. Do not use openyida publish ... --auto-nav-order for per-page application builds. Explicit and automatic ordering are mutually exclusive; never generate per-item move loops.',
2394
+ ui_guidance_policy: 'Fast page implementation consumes confirmed requirements and incremental real resource/field receipts, with app_theme.css for visual tokens; no context/plan/page JSON prerequisite; it directly authors Canvas source without PRD/design/page-spec generation. The following document-based path applies to Plan and legacy builds: page implementation consumes yida-prd prd.md for positioning, information architecture, page prototype, native form entry policy, material strategy, business-specific checks, resource creation order, page implementation delivery order, navigation order, and acceptance criteria; it consumes yida-design design.md for app custom theme CSS delivery, themeColor/navTheme, visual states, visualScaffold, surface material, rounded rules, density rules, components, state styling, and page-level imageNeed. When a page is imageNeed=required, or beneficial with declared image slots, yida-image-assets prepares a traceable asset manifest alongside page layout and interaction work; wait for final images only at that page\'s image binding and acceptance. imageNeed=none skips the branch. prd.md and design.md remain the only design sources of truth. Page implementation may extract page-spec.json as a derived implementation handoff from prd.md + design.md; conflicts are resolved by sending business conflicts to yida-prd and visual conflicts to yida-design before regenerating the spec. Core normal forms default to 1-3 business sample records before page implementation, followed by query readback. An explicit opt-out, configuration dictionary, sensitive data, or lack of safely constructible values requires a recorded skip reason. Screenshots, public sharing, data-source deep binding, and navigation refinements beyond default grouping are optional after explicit user request or PRD acceptance criteria.',
2395
+ default_nav_order_policy: 'For application-wide custom navigation, implement each entry menu and verify app/page navigation hiding. A standalone frontend preserves platform navigation for the management workspace; frontend-only delivery skips platform ordering. After all scoped resources and page publications finish, perform exactly one navigation order operation. Use management tasks and their default destination, without creating a homepage or putting a frontend page first. When execution.entryRecommendation exists, derive navigationOrder from its management/workspace menus. Call openyida nav-group order <appType> <items...> for an explicit order; otherwise call openyida nav-group auto-order <appType> once for legacy single-workspace plans. Do not use openyida publish ... --auto-nav-order for per-page application builds. Explicit and automatic ordering are mutually exclusive; never generate per-item move loops for sorting. Pass root group IDs for grouped pages to preserve their hierarchy. For complete builds with platform navigation, after sorting and hiding frontend-only entries, read the tree. If more than 8 visible business pages remain at the root, group related pages using yida-nav-group and read back membership. Preserve the default entry, existing groups and visibility, and honor explicit navigation preferences.',
2461
2396
  final_link_policy: 'Return up to three verified application entry URLs: frontend, management, admin; honor scope/exclusions. application_entry_policy.entries.admin=include uses create-app/app-list adminUrl, independent of auth. Never emit one artifact or link card per form, process, report or intermediate file. For frontends, infer standalone when entryMode is missing; preserve an explicit platform-shell choice and its verified workbenchUrl. Use custom URLs only for standalone pages when get-form-config readback confirms renderNav=false. Use verified management entries and viewUuid; do not invent a backend or guess URLs/permissions. In QwenWork follow link_presentation_gate and agent-capabilities link_presentation_policy: select one existing modified page workbench entry when eligible, otherwise adminUrl; call the host link tool once, inspect this turn result, then summarize. Tool selection and fallback evidence follow references/qwenwork-link-presentation.md. Other hosts use their terminal delivery artifact description; use final response when no delivery tool is available. Explain business results/entry purposes/actions. Verify every resource count, seed-record count, and completed/verified claim against its own result/readback. When IDs/status/data summary or a manifest is requested, include one concise verified delivery manifest in that description (or final response).',
2462
2397
  entry_navigation_contract: {
2463
2398
  reference: 'yida-skills/skills/yida-app/references/entry-navigation.md',
@@ -472,7 +472,6 @@ function showHelp() {
472
472
  console.log(` ${YELLOW}OPENYIDA_ENDPOINT${RESET}=https://yida.company.com 强制指定宜搭地址`);
473
473
  console.log(` ${YELLOW}OPENYIDA_LOGIN_URL${RESET}=https://... 强制指定登录页`);
474
474
  console.log(` ${YELLOW}OPENYIDA_ENV${RESET}=private-prod 快速切换环境(不修改配置文件)`);
475
- console.log(` ${YELLOW}OPENYIDA_DWS_ENDPOINT${RESET}=https://dws.company.com 私有化钉钉网关`);
476
475
  console.log('');
477
476
  }
478
477
 
@@ -51,7 +51,6 @@ module.exports = {
51
51
  unsupported_form: 'This CLI has not verified notification writes for this form type: {0}. Existing configurations remain readable.',
52
52
  readback_mismatch: 'Saved message notification does not match readback. Keep the backup and inspect remote state.',
53
53
  },
54
- dws_external: {'note': 'dws is an independent external tool. OpenYida only shows installation instructions; it does not download or install it.', 'install_guide': 'Show official DingTalk CLI installation instructions'},
55
54
  cool_card: {'unsupported_environment': 'The Alibaba Group edition does not support building cool cards.', 'description': 'Create and read native YiDA cool cards (interactive and pinned)', 'usage': 'Usage: openyida cool-card <list|templates|create|get> <appType> [cardPageCode] [--type im|onebox] [--name <title>] [--page <n>] [--size <n>] [--search <text>] [--out <file>] [--json]', 'failed': 'Native cool card operation stopped: {0}'},
56
55
  solution_template: {
57
56
  description: 'Solution templates for independent local agents: discovery, cloud AI handoff and direct enable',
@@ -292,13 +291,10 @@ module.exports = {
292
291
  cmd_integration_check: 'Check abnormal integration automation run logs',
293
292
  cmd_integration_detail_log: 'View integration automation run log details',
294
293
  cmd_integration_diagnose: 'Diagnose integration automation tickets and common pitfalls',
295
- cmd_dws: 'DingTalk CLI (contacts/calendar/todo/approval etc.)',
296
294
  cmd_dingtalk_link: 'Generate DingTalk AppLink / legacy dingtalk:// page links',
297
295
  group_utility: 'Utility',
298
296
  cmd_commands: 'Output machine-readable command manifest',
299
297
  cmd_agent_capabilities: 'Output one-shot agent capability snapshot',
300
- cmd_a2a: 'Start local read-only A2A adapter or print Agent Card',
301
- cmd_bridge: 'Start OpenYida local web bridge service',
302
298
  cmd_copy: 'Copy project working directory',
303
299
  cmd_sample: 'Output code samples/templates',
304
300
  cmd_doctor: 'Environment diagnostics & auto-fix',
@@ -414,7 +410,6 @@ Commands:
414
410
  integration check <appType...> [--json] [--output xlsx] Check abnormal integration automation run logs
415
411
  create-report <appType> "<name>" <chartsJSON|file> Create Yida report
416
412
  append-chart <appType> <reportId> <chartsJSON|file> Append chart to existing report
417
- dws <command> [args] DingTalk CLI (contacts/calendar/todo/approval etc.)
418
413
  export-conversation [options] Export AI conversation records
419
414
  --output, -o <path> Specify output file path
420
415
  --input, -i <file> Specify input conversation file
@@ -442,9 +437,6 @@ Examples:
442
437
  openyida get-page-config APP_XXX FORM-XXX
443
438
  openyida update-form-config APP_XXX FORM-XXX false "Page Title"
444
439
  openyida data query form APP_XXX FORM-XXX --page 1 --size 20
445
- openyida dws contact user search --keyword "wukong"
446
- openyida dws calendar event list
447
- openyida dws todo task create --title "Task"
448
440
  openyida create-report APP_XXX "Sales Report" .cache/openyida/reports/charts.json
449
441
  openyida append-chart APP_XXX REPORT-XXX .cache/openyida/reports/charts.json
450
442
  openyida configure-process APP_XXX FORM-YYY .cache/openyida/process/process-def.json
@@ -51,7 +51,6 @@ module.exports = {
51
51
  unsupported_form: '当前 CLI 尚未验证此表单类型的消息通知写入协议:{0}。仍可查询已有配置。',
52
52
  readback_mismatch: '保存后的消息通知与回读不一致,请保留备份并检查远端状态。',
53
53
  },
54
- dws_external: {'note': 'dws 是独立的外部工具;OpenYida 仅提供安装指引,不下载或安装它。', 'install_guide': '显示钉钉 CLI 官方安装指引'},
55
54
  cool_card: {'unsupported_environment': '集团版不支持酷卡片搭建。', 'description': '创建和读取宜搭原生酷卡片(交互卡片与置顶卡片)', 'usage': '用法: openyida cool-card <list|templates|create|get> <appType> [cardPageCode] [--type im|onebox] [--name <title>] [--page <n>] [--size <n>] [--search <text>] [--out <file>] [--json]', 'failed': '原生酷卡片操作已停止:{0}'},
56
55
  solution_template: {
57
56
  description: '独立本地 Agent 的方案模板查询、云端 AI 搭建入口与直接启用',
@@ -292,13 +291,10 @@ module.exports = {
292
291
  cmd_integration_check: '检查集成自动化异常运行日志',
293
292
  cmd_integration_detail_log: '查看集成自动化运行日志详情',
294
293
  cmd_integration_diagnose: '诊断集成自动化故障文本和常见配置坑',
295
- cmd_dws: '钉钉 CLI(通讯录/日历/待办/审批等)',
296
294
  cmd_dingtalk_link: '生成钉钉 AppLink / 兼容 dingtalk:// 跳转链接',
297
295
  group_utility: '工具',
298
296
  cmd_commands: '输出机器可读命令清单',
299
297
  cmd_agent_capabilities: '输出 Agent 一次性能力快照',
300
- cmd_a2a: '启动本地只读 A2A Adapter 或输出 Agent Card',
301
- cmd_bridge: '启动 OpenYida 本地网页桥接服务',
302
298
  cmd_copy: '复制 project 工作目录',
303
299
  cmd_sample: '输出代码模板',
304
300
  cmd_doctor: '环境诊断与自动修复',
@@ -414,7 +410,6 @@ openyida - 宜搭命令行工具
414
410
  integration check <appType...> [--json] [--output xlsx] 检查集成自动化异常运行日志
415
411
  create-report <appType> "<报表名称>" <图表定义JSON或文件路径> 创建宜搭报表
416
412
  append-chart <appType> <reportId> <图表定义JSON或文件路径> 向已有报表追加图表
417
- dws <command> [args] 钉钉 CLI(通讯录/日历/待办/审批等)
418
413
  export-conversation [选项] 导出 AI 对话记录
419
414
  --output, -o <path> 指定输出文件路径
420
415
  --input, -i <file> 指定输入对话文件
@@ -442,9 +437,6 @@ openyida - 宜搭命令行工具
442
437
  openyida get-page-config APP_XXX FORM-XXX
443
438
  openyida update-form-config APP_XXX FORM-XXX false "页面标题"
444
439
  openyida data query form APP_XXX FORM-XXX --page 1 --size 20
445
- openyida dws contact user search --keyword "悟空"
446
- openyida dws calendar event list
447
- openyida dws todo task create --title "任务"
448
440
  openyida create-report APP_XXX "销售报表" .cache/openyida/reports/charts.json
449
441
  openyida append-chart APP_XXX REPORT-XXX .cache/openyida/reports/charts.json
450
442
  openyida configure-process APP_XXX FORM-YYY .cache/openyida/process/process-def.json
@@ -14,6 +14,15 @@ const AUTH_CODES = new Set([
14
14
  'not_logged_in', 'invalid_access_token', 'expired_access_token',
15
15
  'access_token_expired', 'missing_access_token',
16
16
  ]);
17
+ const PLATFORM_DENIAL_MESSAGES = new Set([
18
+ '已升级宜搭你未在授权范围内因此无法使用如要使用请联系管理员授权',
19
+ '没有宜搭使用权限', '无宜搭使用权限', '暂无宜搭使用权限',
20
+ '没有宜搭平台使用权限', '无宜搭平台使用权限',
21
+ ]);
22
+ const CREATE_DENIAL_CODES = new Set(['no_permission', 'permission_denied', 'forbidden']);
23
+ const CREATE_DENIAL_MESSAGES = new Set([
24
+ '没有权限', '无权限', '暂无权限', '管理员暂未为您分配权限请联系管理员授权',
25
+ ]);
17
26
 
18
27
  function normalizeMessage(value) {
19
28
  return String(value || '').replace(/[\s,,。.!!]/g, '');
@@ -50,25 +59,31 @@ function createPermissionError(response, options = {}) {
50
59
  ? payload.content : {};
51
60
  const code = String(payload.errorCode || payload.code || content.errorCode || content.code || '');
52
61
  const status = String(payload.status || content.status || '').toLowerCase();
53
- const message = String(payload.errorMsg || payload.message || content.errorMsg || content.message || '');
62
+ const message = String(payload.errorMsg || payload.message || content.errorMsg || content.message
63
+ || (typeof payload.error === 'string' ? payload.error : ''));
54
64
  const httpStatus = Number(options.httpStatus || payload.__httpStatus || 0);
55
65
  // 明确的凭据失效继续由原有认证链路处理。
56
66
  if (httpStatus === 401 || AUTH_CODES.has(code.toLowerCase()) || AUTH_CODES.has(status)
57
67
  || /not_logged_in|invalid_access_token|expired_access_token|access_token_expired|access token is invalid or expired/i.test(message)) { return null; }
58
- const failed = payload.success === false || payload.__needLogin || httpStatus >= 300;
68
+ // The registration endpoint can return a business denial with HTTP 200 and
69
+ // an opaque error code or no success flag. Use the explicit denial signal.
70
+ const canInferDenial = payload.success !== true && httpStatus < 500
71
+ && !['302', '307', '401', 'TIANSHU_000030'].includes(code) && status !== '401';
72
+ const normalized = normalizeMessage(message);
73
+ const platformDenied = canInferDenial && PLATFORM_DENIAL_MESSAGES.has(normalized);
74
+ const creationDenied = canInferDenial && /^\/query\/app\/registerApp(?:\.json)?(?:\?|$)/.test(options.requestPath || '')
75
+ && (CREATE_DENIAL_MESSAGES.has(normalized)
76
+ || CREATE_DENIAL_CODES.has(code.toLowerCase()));
77
+ const failed = payload.success === false || payload.__needLogin || httpStatus >= 300 || platformDenied || creationDenied;
59
78
  if (!failed) { return null; }
60
79
  let page = resolvePermissionPage(options.location || payload.__location, options.baseUrl);
61
80
  const legacyDenied = /^(?:TIANSHU_)?000006$/.test(code);
62
- const normalized = normalizeMessage(message);
63
- const creationDenied = /^\/query\/app\/registerApp(?:\.json)?(?:\?|$)/.test(options.requestPath || '')
64
- && (legacyDenied || !code || code === '403')
65
- && ['没有权限', '无权限', '暂无权限', '管理员暂未为您分配权限请联系管理员授权'].includes(normalized);
81
+ if (!page && platformDenied) {
82
+ page = resolvePermissionPage('/defaultPage.html?type=unauth', options.baseUrl);
83
+ }
66
84
  if (!page && creationDenied) {
67
85
  page = resolvePermissionPage('/defaultPage.html?type=noAppCreationAuth', options.baseUrl);
68
86
  }
69
- if (!page && legacyDenied && normalized === '已升级宜搭你未在授权范围内因此无法使用如要使用请联系管理员授权') {
70
- page = resolvePermissionPage('/defaultPage.html?type=unauth', options.baseUrl);
71
- }
72
87
  if (!page && !legacyDenied && httpStatus !== 403 && code !== '403' && status !== '403') { return null; }
73
88
  if (!page && options.tool !== 'qwenwork') { return null; }
74
89
  const permissionType = page ? page.permissionType : 'unknown';
@@ -83,6 +98,7 @@ function createPermissionError(response, options = {}) {
83
98
  if (page) {
84
99
  details.permissionLabel = label;
85
100
  details.permissionUrl = page.url;
101
+ details.permissionLinkMarkdown = `[${label}](${page.url})`;
86
102
  details.nextAction = { type: 'open_url', label, url: page.url };
87
103
  }
88
104
  const displayMessage = page || !message ? t(`permission_guidance.${permissionType}`) : redactString(message);
@@ -163,7 +163,7 @@ function shouldSkipAutoUpdateCommand(command, args = []) {
163
163
  if (!command || ['--help', '-h', '--version', '-v'].includes(command)) {
164
164
  return true;
165
165
  }
166
- if (['commands', 'agent-capabilities', 'agent', 'mcp', 'a2a', 'bridge', 'update'].includes(command)) {
166
+ if (['commands', 'agent-capabilities', 'agent', 'update'].includes(command)) {
167
167
  return true;
168
168
  }
169
169
  return args.some(arg => ['--help', '-h', '--version', '-v', '--check-only'].includes(arg));
@@ -385,6 +385,11 @@ function validateDesignDocument(markdown, options = {}) {
385
385
  if (profile.sourceThemeId !== undefined && (typeof profile.sourceThemeId !== 'string' || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(profile.sourceThemeId))) {
386
386
  invalid('themeProfile.sourceThemeId', 'INVALID_THEME_SOURCE');
387
387
  }
388
+ // Check provenance before authoring fields, page contracts or palette work.
389
+ // Lazy require: the theme reader also imports the document parser.
390
+ if (profile.sourceThemeId !== undefined) {
391
+ require('../design-plan/themes').resolveTheme(profile.sourceThemeId, 'themeProfile.sourceThemeId');
392
+ }
388
393
  for (const key of ['name', 'themeColor', 'themeColorSource']) {if (!nonempty(profile[key])) {invalid(`themeProfile.${key}`, 'NONEMPTY_STRING_REQUIRED');}}
389
394
  if (!/^#[\da-f]{6}$/i.test(profile.themeColor) || profile.themeColor.toUpperCase() !== tokens['--color-brand1-6'].toUpperCase()) {
390
395
  invalid('themeProfile.themeColor', 'PRIMARY_COLOR_MISMATCH');
@@ -3,6 +3,7 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { CliError } = require('../core/cli-error');
6
+ const { t } = require('../core/i18n');
6
7
  const { readJson } = require('./files');
7
8
  const { parseDesignDocument } = require('../design/document');
8
9
 
@@ -19,6 +20,34 @@ function loadThemeIndex() {
19
20
  ? { ...theme, supportedNavigationLayouts: layouts[theme.themeId] } : theme) };
20
21
  }
21
22
 
23
+ function themeSelectionDetails(themeId, field = 'themeId', themes = loadThemeIndex().themes) {
24
+ const availableThemeIds = themes.map(theme => theme.themeId);
25
+ // Unlisted historical bundles stay on disk, but are not current selections.
26
+ // Never turn a caller-supplied ID into an arbitrary filesystem lookup.
27
+ const templatePresent = typeof themeId === 'string' && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(themeId)
28
+ && fs.existsSync(path.join(THEME_DIR, themeId, 'design.md'));
29
+ const reason = templatePresent ? 'UNLISTED_TEMPLATE' : 'UNKNOWN_THEME_ID';
30
+ const catalogCommand = 'openyida design-plan catalog --compact';
31
+ return {
32
+ path: field, themeId, reason, availableThemeIds, catalogCommand,
33
+ nextStep: catalogCommand, nextArgv: ['design-plan', 'catalog', '--compact'],
34
+ nextAction: 'select_catalog_theme_and_regenerate',
35
+ preserveProjectFiles: true, idOnlyReplacementAllowed: false,
36
+ issues: [{ path: field, code: 'APPLICATION_STYLE_UNKNOWN', actual: themeId, reason, nextStep: catalogCommand }],
37
+ };
38
+ }
39
+
40
+ function resolveTheme(themeId, field = 'themeId') {
41
+ const themes = loadThemeIndex().themes;
42
+ const theme = themes.find(item => item.themeId === themeId);
43
+ if (!theme) {
44
+ throw new CliError(t('design_document.invalid', field, 'APPLICATION_STYLE_UNKNOWN'), {
45
+ code: 'APPLICATION_STYLE_UNKNOWN', details: themeSelectionDetails(themeId, field, themes),
46
+ });
47
+ }
48
+ return theme;
49
+ }
50
+
22
51
  function themeTemplatePath(theme) {
23
52
  const file = path.resolve(DESIGN_SKILL_ROOT, theme.templatePath);
24
53
  if (!file.startsWith(`${THEME_DIR}${path.sep}`) || !fs.existsSync(file)) {
@@ -103,4 +132,4 @@ function resolveColorToken(tokens, name, seen = new Set()) {
103
132
  return alias ? resolveColorToken(tokens, alias[1], seen) || alias[2] || null : null;
104
133
  }
105
134
 
106
- module.exports = { DESIGN_SKILL_ROOT, PLAN_SKILL_ROOT, loadThemeIndex, themeTemplatePath, themeNavTheme, resolveThemeColors, resolveColorToken };
135
+ module.exports = { DESIGN_SKILL_ROOT, PLAN_SKILL_ROOT, loadThemeIndex, resolveTheme, themeSelectionDetails, themeTemplatePath, themeNavTheme, resolveThemeColors, resolveColorToken };