openyida 2026.11.6 → 2026.11.7

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 CHANGED
@@ -484,7 +484,7 @@ When preparing a PR that needs a personal Fork, or when you ask how to support t
484
484
 
485
485
  | Command | Description |
486
486
  |---------|-------------|
487
- | `openyida login [--qwenwork] [target-url] [--env <name>\|--intl\|--overseas\|--global\|--yidaapps\|--alibaba] [--client-id <clientId>] [--endpoint <url>] [--no-browser]` | Login with OAuth token mode |
487
+ | `openyida login [--qwenwork] [target-url] [--env <name>\|--intl\|--overseas\|--global\|--yidaapps\|--alibaba] [--dingtalk <domestic\|intl>] [--client-id <clientId>] [--endpoint <url>] [--no-browser]` | Login with OAuth token mode |
488
488
  | `openyida logout` | Logout / unbind current project auth |
489
489
  | `openyida auth <status\|login\|refresh\|logout\|profiles\|profile switch\|qwenwork user-info> [--json]` | Token login state and profile management |
490
490
  | `openyida org <list\|switch> [--json] [--corp-id <corpId>] [--no-browser]` | Organization management (list / switch existing profiles first) |
@@ -714,7 +714,7 @@ The opt-in `node scripts/e2e-real/connector/action-update-runner.js` regression
714
714
 
715
715
  #### Environment and Localization
716
716
 
717
- Environment selectors such as `--env intl`, `--intl`, `--overseas`, `--global`, and `--yidaapps` can be used on login-required commands to choose the target Yida environment for that run. The `intl` preset uses `https://www.yidaapps.com` as the built-in Global YiDA entrypoint (not the bare `https://yidaapps.com` domain) and DingTalk International OAuth at `https://login.dingtalk.io`; business API requests still use the authenticated environment `baseUrl`, so customer custom subdomains are supported.
717
+ Environment selectors such as `--env intl`, `--intl`, `--overseas`, `--global`, and `--yidaapps` choose the target YiDA environment for that run. `openyida login --intl` selects Global YiDA at `https://www.yidaapps.com`. In an interactive terminal, login offers domestic DingTalk for overseas YiDA (`login.dingtalk.com`, default) or DingTalk International for overseas YiDA (`login.dingtalk.io`). Press Enter to use domestic DingTalk, or pass `--dingtalk domestic` / `--dingtalk intl` explicitly. Non-interactive calls default to domestic DingTalk. Selecting the overseas YiDA site does not select the DingTalk account system. The CLI retains its local OAuth callback and token session; business API requests use the authenticated environment `baseUrl`, including supported customer custom subdomains.
718
718
 
719
719
  For overseas apps, pass `--locale en_US` or `--locale ja_JP` on creation commands, or set `OPENYIDA_CONTENT_LOCALE`. OpenYida writes YiDA resource names with `zh_CN`, `en_US`, and `ja_JP` values so Global YiDA does not fall back to Chinese-only metadata.
720
720
 
package/bin/yida.js CHANGED
@@ -280,6 +280,7 @@ function getFirstPositionalArg(cliArgs, startIndex = 0) {
280
280
  '--login-url',
281
281
  '--profile',
282
282
  '--user-id',
283
+ '--dingtalk',
283
284
  ]);
284
285
  for (let index = startIndex; index < cliArgs.length; index++) {
285
286
  const arg = cliArgs[index];
@@ -370,6 +371,14 @@ function applyLoginTargetUrl(value) {
370
371
  return true;
371
372
  }
372
373
 
374
+ function applyLoginEnvironmentName(envName) {
375
+ process.env.OPENYIDA_ENV = envName;
376
+ const { resolveEnvNameAlias, INTERNATIONAL_BASE_URL } = require('../lib/core/env-manager');
377
+ if (resolveEnvNameAlias(envName) === 'intl' && (command === 'login' || (command === 'auth' && rawArgs[0] === 'login'))) {
378
+ applyLoginTargetUrl(INTERNATIONAL_BASE_URL);
379
+ }
380
+ }
381
+
373
382
  function applyLoginEnvironmentFlags(cliArgs, options = {}) {
374
383
  const envFlagMap = {
375
384
  '--public': 'public',
@@ -387,6 +396,7 @@ function applyLoginEnvironmentFlags(cliArgs, options = {}) {
387
396
  '--client-id',
388
397
  '--profile',
389
398
  '--user-id',
399
+ '--dingtalk',
390
400
  ]);
391
401
  const targetUrlFlags = new Set([
392
402
  '--endpoint',
@@ -401,7 +411,7 @@ function applyLoginEnvironmentFlags(cliArgs, options = {}) {
401
411
  if (arg === '--env') {
402
412
  const envName = cliArgs[index + 1];
403
413
  if (envName && !envName.startsWith('--')) {
404
- process.env.OPENYIDA_ENV = envName;
414
+ applyLoginEnvironmentName(envName);
405
415
  index++;
406
416
  }
407
417
  continue;
@@ -422,7 +432,7 @@ function applyLoginEnvironmentFlags(cliArgs, options = {}) {
422
432
  continue;
423
433
  }
424
434
  if (envFlagMap[arg]) {
425
- process.env.OPENYIDA_ENV = envFlagMap[arg];
435
+ applyLoginEnvironmentName(envFlagMap[arg]);
426
436
  continue;
427
437
  }
428
438
  if (inferTargetUrl && !arg.startsWith('--') && applyLoginTargetUrl(arg)) {
@@ -534,11 +544,17 @@ function printManifestCommandHelp(commandName) {
534
544
  }
535
545
 
536
546
  function printLoginHelp() {
537
- printCommandUsage(t('cli.login_usage'), t('cli.login_example'));
547
+ printCommandUsage(t('cli.login_usage'), t('cli.login_example'), t('dingtalk_login.help'));
538
548
  }
539
549
 
540
550
  function buildTokenLoginOptions(loginArgs) {
551
+ const dingtalkIndex = loginArgs.indexOf('--dingtalk');
552
+ const dingtalkVersion = dingtalkIndex < 0 ? undefined : loginArgs[dingtalkIndex + 1];
553
+ if (dingtalkIndex >= 0 && !['domestic', 'intl'].includes(dingtalkVersion)) {
554
+ throwCliUsage(t('dingtalk_login.invalid_version'));
555
+ }
541
556
  return {
557
+ dingtalkVersion,
542
558
  clientId: getArgValue(loginArgs, '--client-id'),
543
559
  corpId: getArgValue(loginArgs, '--corp-id'),
544
560
  userId: getArgValue(loginArgs, '--user-id'),
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ const readline = require('readline');
4
+ const { t } = require('../core/i18n');
5
+ const { CliError } = require('../core/cli-error');
6
+ const {
7
+ DINGTALK_LOGIN_ORIGIN,
8
+ DINGTALK_INTL_LOGIN_ORIGIN,
9
+ isYidaAppsHost,
10
+ } = require('../core/env-manager');
11
+
12
+ function originForVersion(version) {
13
+ if (version === 'domestic') { return DINGTALK_LOGIN_ORIGIN; }
14
+ if (version === 'intl') { return DINGTALK_INTL_LOGIN_ORIGIN; }
15
+ throw new CliError(t('dingtalk_login.invalid_version'), { code: 'INVALID_ARGUMENTS' });
16
+ }
17
+
18
+ function explicitLoginOrigin(value) {
19
+ try {
20
+ const origin = new URL(value).origin;
21
+ if ([DINGTALK_LOGIN_ORIGIN, DINGTALK_INTL_LOGIN_ORIGIN].includes(origin)) {
22
+ return origin;
23
+ }
24
+ } catch {
25
+ // A service entry URL does not select the DingTalk account system.
26
+ }
27
+ return null;
28
+ }
29
+
30
+ async function selectDingtalkLoginOrigin(options = {}) {
31
+ if (options.dingtalkVersion !== undefined) {
32
+ return originForVersion(options.dingtalkVersion);
33
+ }
34
+ if (options.loginOrigin) {
35
+ const origin = explicitLoginOrigin(options.loginOrigin);
36
+ if (!origin) {
37
+ throw new CliError(t('dingtalk_login.invalid_origin'), { code: 'INVALID_ARGUMENTS' });
38
+ }
39
+ return origin;
40
+ }
41
+ const env = options.env || process.env;
42
+ const explicitOrigin = explicitLoginOrigin(options.loginUrl || env.OPENYIDA_LOGIN_URL);
43
+ if (explicitOrigin) { return explicitOrigin; }
44
+
45
+ const input = options.input || process.stdin;
46
+ const output = options.output || process.stderr;
47
+ if (!isYidaAppsHost(options.baseUrl) || options.quiet || !input.isTTY || !output.isTTY) {
48
+ return DINGTALK_LOGIN_ORIGIN;
49
+ }
50
+
51
+ const rl = readline.createInterface({ input, output });
52
+ output.write(`${t('dingtalk_login.select_version')}\n1. ${t('dingtalk_login.domestic')}\n2. ${t('dingtalk_login.international')}\n`);
53
+ try {
54
+ return await new Promise((resolve, reject) => {
55
+ let settled = false;
56
+ rl.once('close', () => {
57
+ if (!settled) {
58
+ reject(new CliError(t('dingtalk_login.cancelled'), { code: 'LOGIN_CANCELLED' }));
59
+ }
60
+ });
61
+ const ask = () => rl.question(t('dingtalk_login.choose'), answer => {
62
+ const choice = answer.trim();
63
+ if (choice === '' || choice === '1' || choice === '2') {
64
+ settled = true;
65
+ resolve(choice === '2' ? DINGTALK_INTL_LOGIN_ORIGIN : DINGTALK_LOGIN_ORIGIN);
66
+ } else {
67
+ output.write(`${t('dingtalk_login.invalid_choice')}\n`);
68
+ ask();
69
+ }
70
+ });
71
+ ask();
72
+ });
73
+ } finally {
74
+ rl.close();
75
+ }
76
+ }
77
+
78
+ module.exports = { selectDingtalkLoginOrigin };
@@ -456,6 +456,9 @@ function buildDingtalkOAuthUrl(options) {
456
456
  if (prompt) {
457
457
  url.searchParams.set('prompt', prompt);
458
458
  }
459
+ if (options.forceLogin) {
460
+ url.searchParams.set('FEForceLogin', 'true');
461
+ }
459
462
  return url.toString();
460
463
  }
461
464
 
@@ -694,6 +697,7 @@ function runDingtalkLoopback(options = {}) {
694
697
  redirectUri,
695
698
  state,
696
699
  loginOrigin: options.loginOrigin,
700
+ forceLogin: options.forceLogin,
697
701
  scope: options.scope,
698
702
  prompt: options.prompt,
699
703
  });
@@ -7,12 +7,12 @@ const https = require('https');
7
7
 
8
8
  const {
9
9
  DINGTALK_OAUTH_CLIENT_ID,
10
- DINGTALK_LOGIN_ORIGIN,
11
10
  DINGTALK_INTL_LOGIN_ORIGIN,
12
11
  getCurrentEnvConfig,
13
12
  normalizeBaseUrl,
14
13
  } = require('../core/env-manager');
15
14
  const { runDingtalkLoopback } = require('./oauth-loopback');
15
+ const { selectDingtalkLoginOrigin } = require('./dingtalk-login');
16
16
  const {
17
17
  clearTokenSession,
18
18
  deleteUserAuthProfile,
@@ -71,22 +71,6 @@ function resolveTokenBaseUrl(options = {}) {
71
71
  return baseUrl;
72
72
  }
73
73
 
74
- function resolveDingtalkLoginOrigin(options = {}) {
75
- if (options.loginOrigin) {
76
- return options.loginOrigin;
77
- }
78
- try {
79
- const { config } = getCurrentEnvConfig(options.projectRoot);
80
- const baseUrl = normalizeBaseUrl(config.baseUrl, '');
81
- if (baseUrl && baseUrl.includes('yidaapps.com')) {
82
- return DINGTALK_INTL_LOGIN_ORIGIN;
83
- }
84
- } catch {
85
- // Fall back to domestic DingTalk login.
86
- }
87
- return DINGTALK_LOGIN_ORIGIN;
88
- }
89
-
90
74
  function requestJson(method, url, body, headers = {}) {
91
75
  return new Promise((resolve, reject) => {
92
76
  const parsedUrl = new URL(url);
@@ -328,9 +312,11 @@ async function tokenLogin(options = {}) {
328
312
  const baseUrl = resolveTokenBaseUrl(options);
329
313
  const authBaseUrl = appendPath(baseUrl, DEFAULT_AUTH_PATH_PREFIX);
330
314
  const clientId = options.clientId || process.env.OPENYIDA_DINGTALK_CLIENT_ID || DINGTALK_OAUTH_CLIENT_ID;
315
+ const loginOrigin = await selectDingtalkLoginOrigin({ ...options, baseUrl });
331
316
  const callback = await runDingtalkLoopback({
332
317
  clientId,
333
- loginOrigin: resolveDingtalkLoginOrigin(options),
318
+ loginOrigin,
319
+ forceLogin: loginOrigin === DINGTALK_INTL_LOGIN_ORIGIN,
334
320
  scope: options.scope || process.env.OPENYIDA_DINGTALK_SCOPE || 'openid corpid',
335
321
  prompt: options.prompt,
336
322
  port: options.port,
@@ -1137,9 +1137,10 @@ const COMMAND_GROUPS = [
1137
1137
  id: 'auth',
1138
1138
  titleKey: 'help.group_auth',
1139
1139
  commands: [
1140
- command('login', ['login'], 'login [--qwenwork] [target-url] [--env <name>|--intl|--overseas|--global|--yidaapps|--alibaba] [--client-id <clientId>] [--endpoint <url>] [--no-browser]', 'help.cmd_login', { managedRun: { scope: 'local', allowedFlags: ['--check-only', '--json', '--quiet'], requiredFlags: ['--check-only'] },
1140
+ command('login', ['login'], 'login [--qwenwork] [target-url] [--env <name>|--intl|--overseas|--global|--yidaapps|--alibaba] [--dingtalk <domestic|intl>] [--client-id <clientId>] [--endpoint <url>] [--no-browser]', 'help.cmd_login', { managedRun: { scope: 'local', allowedFlags: ['--check-only', '--json', '--quiet'], requiredFlags: ['--check-only'] },
1141
1141
  requiresLogin: false,
1142
1142
  output: 'json',
1143
+ notes: ['--intl selects https://www.yidaapps.com. Overseas YiDA login offers domestic DingTalk (.com, default) or DingTalk International (.io, explicit selection only). Use --dingtalk domestic|intl to skip the terminal choice. Non-interactive calls default to domestic DingTalk; an explicit DingTalk OAuth entry URL preserves its account system unless --dingtalk overrides it. The CLI still uses an OAuth loopback callback and token session.'],
1143
1144
  }),
1144
1145
  command('login-qwenwork', ['login-qwenwork'], 'login-qwenwork --exchange-ticket <ticket> --ticket-context <json> [--json]', 'help.cmd_login_qwenwork', { managedRun: { scope: 'denied', reason: 'identity_exchange' }, requiresLogin: false, output: 'json', hidden: true }),
1145
1146
  command('logout', ['logout'], 'logout', 'help.cmd_logout', { managedRun: { scope: 'denied', reason: 'scope_not_audited' }, requiresLogin: false }),
@@ -325,7 +325,7 @@ async function cmdAdd(envName) {
325
325
  process.exit(1);
326
326
  }
327
327
 
328
- // 自动推导登录 URL:yidaapps.com 必须走 login.dingtalk.io OAuth。
328
+ // 推导宜搭站点入口;钉钉认证体系在登录时单独选择。
329
329
  const inferredLoginUrl = inferLoginUrlForBaseUrl(baseUrl);
330
330
  const workPlatformLoginUrl = baseUrl.replace(/\/+$/, '') + '/workPlatform';
331
331
  const defaultLoginUrl = existingConfig?.loginUrl && existingConfig.loginUrl !== workPlatformLoginUrl
@@ -68,17 +68,8 @@ function buildDingtalkOAuthLoginUrl(options = {}) {
68
68
  return `${loginOrigin}/oauth2/auth?${params.toString()}`;
69
69
  }
70
70
 
71
- // 海外 YiDA / DingTalk International 登录入口。
72
- // 必须满足三个条件才能让国际版钉钉扫码识别:
73
- // 1. login origin 为 login.dingtalk.io
74
- // 2. redirect_uri 落在 www.yidaapps.com(否则登完跳回国内域名,海外后端拿不到 session)
75
- // 3. 追加 FEForceLogin=true,强制走国际版登录流程
76
- const INTERNATIONAL_LOGIN_URL = buildDingtalkOAuthLoginUrl({
77
- loginOrigin: DINGTALK_INTL_LOGIN_ORIGIN,
78
- baseUrl: INTERNATIONAL_BASE_URL,
79
- lang: 'en_US',
80
- forceLogin: true,
81
- });
71
+ // The YiDA service site is independent of the DingTalk account system.
72
+ const INTERNATIONAL_LOGIN_URL = `${INTERNATIONAL_BASE_URL}/workPlatform`;
82
73
  const LEGACY_INTERNATIONAL_LOGIN_URL = buildDingtalkOAuthLoginUrl({
83
74
  loginOrigin: DINGTALK_INTL_LOGIN_ORIGIN,
84
75
  baseUrl: DEFAULT_BASE_URL,
@@ -99,11 +90,11 @@ const DEFAULT_ALIBABA_INTERNAL_ENV = {
99
90
  description: '阿里内网宜搭',
100
91
  };
101
92
 
102
- /** 海外版 YiDA / DingTalk International 环境配置 */
93
+ /** 海外版 YiDA 环境配置,登录时单独选择钉钉版本。 */
103
94
  const DEFAULT_INTERNATIONAL_ENV = {
104
95
  baseUrl: INTERNATIONAL_BASE_URL,
105
96
  loginUrl: INTERNATIONAL_LOGIN_URL,
106
- description: '海外版 YiDA Apps / DingTalk International(www.yidaapps.com)',
97
+ description: '海外版 YiDA Apps(www.yidaapps.com)',
107
98
  };
108
99
 
109
100
  const BUILTIN_ENVIRONMENTS = {
@@ -292,14 +283,6 @@ function isDefaultWorkPlatformLoginUrl(loginUrl, baseUrl) {
292
283
 
293
284
  function inferLoginUrlForBaseUrl(baseUrl, fallbackLoginUrl) {
294
285
  const normalizedBaseUrl = normalizeBaseUrl(baseUrl, DEFAULT_BASE_URL);
295
- if (isYidaAppsHost(normalizedBaseUrl)) {
296
- return buildDingtalkOAuthLoginUrl({
297
- loginOrigin: DINGTALK_INTL_LOGIN_ORIGIN,
298
- baseUrl: normalizedBaseUrl,
299
- lang: 'en_US',
300
- forceLogin: true,
301
- });
302
- }
303
286
  return fallbackLoginUrl || `${normalizedBaseUrl}/workPlatform`;
304
287
  }
305
288
 
@@ -4,6 +4,17 @@
4
4
  'use strict';
5
5
 
6
6
  module.exports = {
7
+ dingtalk_login: {
8
+ select_version: 'Choose a DingTalk version for overseas YiDA:',
9
+ domestic: 'Domestic DingTalk (overseas YiDA, default)',
10
+ international: 'DingTalk International (overseas YiDA)',
11
+ choose: 'Choose [1/2, default 1]: ',
12
+ invalid_version: '--dingtalk must be domestic or intl.',
13
+ invalid_origin: 'The DingTalk login origin must be https://login.dingtalk.com or https://login.dingtalk.io.',
14
+ invalid_choice: 'Enter 1 or 2, or press Enter for domestic DingTalk.',
15
+ cancelled: 'DingTalk selection cancelled; authorization was not started.',
16
+ help: '--intl selects www.yidaapps.com. Use --dingtalk domestic for domestic DingTalk (.com, default) or --dingtalk intl for DingTalk International (.io). Interactive login offers a choice; non-interactive login defaults to domestic DingTalk.',
17
+ },
7
18
  data_seed: {
8
19
  optional_notes: 'Standard writable components use seed. Addresses: default domestic ADDRESS only. Unadapted optional fields are listed in skippedFields; all-omitted input creates no records.',
9
20
  failed: 'Seed data operation stopped: {0}. Inspect details; do not repeat attempted writes.',
@@ -523,7 +534,7 @@ Examples:
523
534
  save_permission_usage: 'Usage: openyida save-permission <appType> <formUuid> [--package-uuid <packageUuid>] [--data-permission <json>] [--action-permission <json>] [--package-type <FORM_PACKAGE_VIEW|FORM_PACKAGE_START>]',
524
535
  save_permission_example: "Example: openyida save-permission APP_XXX FORM-XXX --data-permission '{\"role\":\"DEFAULT\",\"dataRange\":\"SELF\"}'",
525
536
  exec_failed: '\n❌ Execution failed: {0}',
526
- login_usage: 'Usage: openyida login [--qwenwork] [entryUrl|--public|--alibaba|--intl] [--no-browser] [--check-only] [--json] [--client-id <clientId>]',
537
+ login_usage: 'Usage: openyida login [--qwenwork] [entryUrl|--public|--alibaba|--intl] [--no-browser] [--check-only] [--json] [--client-id <clientId>] [--dingtalk <domestic|intl>]',
527
538
  login_example: 'Examples:\n openyida login # Automatically open the browser via OAuth loopback login\n openyida login --no-browser # Let the caller handle the authorization URL\n openyida login --check-only --json # Check token auth status only\n openyida login --intl # Login against the international environment\n OPENYIDA_NO_BROWSER=1 openyida login # Suppress auto-opening the browser with an environment variable\n openyida auth login # Login alias',
528
539
  login_unsupported_option: 'Removed legacy login option is no longer supported: {0}. Use token/OAuth login; env token mode reads only OPENYIDA_* tokens.',
529
540
  auth_usage: 'Usage: openyida auth <status|login|refresh|logout|profiles|profile switch|qwenwork user-info> [--json]',
@@ -4,6 +4,17 @@
4
4
  'use strict';
5
5
 
6
6
  module.exports = {
7
+ dingtalk_login: {
8
+ select_version: '请选择用于登录宜搭海外站的钉钉版本:',
9
+ domestic: '钉钉国内版(宜搭海外,默认)',
10
+ international: '钉钉国际版(宜搭海外)',
11
+ choose: '请选择 [1/2,默认 1]:',
12
+ invalid_version: '--dingtalk 必须为 domestic 或 intl。',
13
+ invalid_origin: '钉钉认证入口必须为 https://login.dingtalk.com 或 https://login.dingtalk.io。',
14
+ invalid_choice: '请输入 1 或 2,直接回车使用国内版。',
15
+ cancelled: '已取消钉钉版本选择,未发起授权。',
16
+ help: '--intl 登录 www.yidaapps.com;--dingtalk domestic 使用钉钉国内版(默认 .com),--dingtalk intl 使用钉钉国际版(.io)。终端登录前可选择,非交互默认国内版。',
17
+ },
7
18
  data_seed: {
8
19
  optional_notes: '标准可写组件均使用 seed;地址限默认国内 ADDRESS。未适配的可选字段见 skippedFields,全部省略时不创建记录。',
9
20
  failed: '示例数据操作已停止:{0}。请查看错误详情;已尝试写入的记录不得重复创建。',
@@ -523,7 +534,7 @@ openyida - 宜搭命令行工具
523
534
  save_permission_usage: '用法: openyida save-permission <appType> <formUuid> [--package-uuid <packageUuid>] [--data-permission <json>] [--action-permission <json>] [--package-type <FORM_PACKAGE_VIEW|FORM_PACKAGE_START>]',
524
535
  save_permission_example: "示例: openyida save-permission APP_XXX FORM-XXX --data-permission '{\"role\":\"DEFAULT\",\"dataRange\":\"SELF\"}'",
525
536
  exec_failed: '\n❌ 执行失败: {0}',
526
- login_usage: '用法: openyida login [--qwenwork] [entryUrl|--public|--alibaba|--intl] [--no-browser] [--check-only] [--json] [--client-id <clientId>]',
537
+ login_usage: '用法: openyida login [--qwenwork] [entryUrl|--public|--alibaba|--intl] [--no-browser] [--check-only] [--json] [--client-id <clientId>] [--dingtalk <domestic|intl>]',
527
538
  login_example: '示例:\n openyida login # 通过 OAuth loopback 自动打开浏览器登录\n openyida login --no-browser # 不自动打开浏览器,由调用方接管授权链接\n openyida login --check-only --json # 只检查 token 登录态\n openyida login --intl # 使用国际站环境登录\n OPENYIDA_NO_BROWSER=1 openyida login # 通过环境变量抑制自动打开浏览器\n openyida auth login # 登录入口别名',
528
539
  login_unsupported_option: '已删除的旧登录参数不再支持: {0}。请使用 token/OAuth 登录;env token 模式下只读取 OPENYIDA_* token。',
529
540
  first_run_title: ' 🤖 OpenYida - AI 问答模式已开启! ',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openyida",
3
- "version": "2026.11.6",
3
+ "version": "2026.11.7",
4
4
  "description": "OpenYida CLI - AI 宜搭应用开发工具(安装即用,零配置)",
5
5
  "bin": {
6
6
  "openyida": "bin/yida.js",
@@ -116,7 +116,11 @@ openyida login --alibaba
116
116
  openyida login --intl
117
117
  ```
118
118
 
119
- 海外 / international / global / Japan / Global YiDA 使用 `--intl` 或等价入口。
119
+ 海外 / international / global / Japan / Global YiDA 使用 `--intl` 或等价入口,目标站点为 `https://www.yidaapps.com`。站点与钉钉账号体系分别选择,不能因国际站、语言或地区自动使用 `.io`。
120
+
121
+ 用户尚未明确钉钉版本时,使用宿主的结构化提问提供两项:「钉钉国内版(宜搭海外,默认)」和「钉钉国际版(宜搭海外)」。确认后分别执行 `openyida login --intl --dingtalk domestic`(`.com`)或 `openyida login --intl --dingtalk intl`(`.io`),浏览器归属仍按快照添加 `--no-browser`。用户已明确选择时直接复用,不重复提问。
122
+
123
+ CLI 的可交互终端也会展示同样两项,回车默认国内版;非交互调用默认国内版,不等待 stdin。显式 `--dingtalk` 跳过终端选择,优先于授权入口 URL 中的认证域名;仅明确选择国际版或明确提供 `.io` 授权入口时使用 `.io`。CLI 继续使用本机 OAuth 回调接收授权码,不用网页登录 Cookie 代替 CLI 登录态。
120
124
 
121
125
  ## 运行环境注入 Token 模式命令
122
126